[why]
Sorting the keys gives the advantage of having strings with same context
together making it easier to have consistency on translations.
[how]
1. Having a .edn file execute:
grep ":" src/resources/dicts/es.edn | grep -v "/" | sort > single_keys
grep ":" src/resources/dicts/es.edn | grep "/" | sort > hierarchical_keys
2. Both files are sorted, now manually merge them into sorted_file. I
decided to left turial keys on top, then single_keys and finally
hierarchical_keys at the end. Check the braces.
3. Execute this script:
#!/bin/bash
while IFS= read -r line; do
if [[ "$line" == *\"* ]]; then
first_quote_index=$(expr index "$line" \")
content_after_quote="${line:$first_quote_index}"
content_before_quote="${line:0:$first_quote_index-1}"
spaces=$(printf '%*s' $((52 - ${#content_before_quote})))
echo "$content_before_quote$spaces\"$content_after_quote"
else
echo "$line"
fi
done <sorted_file >formatted_file
4. Replace the .edn file with the resultant formated_file. Now all
strings start at column 53.
* i18n: fix translation of switch to in zh-CN.
* fix: Enable i18n for create or search graph in the context of whiteboard.
* i18n: Add Chinese translations for whiteboard feature.
* i18n: Add more Chinese translations for whiteboard feature.
* i18n: Add i18n for "Properties settings for this query:"
* i18n: Add i18n for "No matched result"
* i18n: Add i18n for "Tips: press f to go full screen"
* i18n: Add i18n for "redo/undo history"
* i18n: Add i18n for "help documents"
* i18n: Add i18n for "bug report"
* fix: Make translate for Tips press f go fullscreen
* fix: Remove placeholder zh-cn that is not used.
* fix: Add a hidden element to use :whiteboard/create-or-search-graph so it will not be reported as unused.
* i18n: Add i18n for "check update"
* i18n: Add i18n for "export current page"
* i18n: Add i18n for "Grant permission"
* i18n: Fix for Chinese, "These translations keys are invalid because they are just copying the English value"
* revert: Translation for whiteboard/create-or-search-graph blocked by bb lang:validate-translations
* i18n: Fix translation for Chinese with help from amazing andelf.
* Update src/resources/dicts/zh-cn.edn
Co-authored-by: Andelf <andelf@gmail.com>
* Update src/resources/dicts/zh-cn.edn
Co-authored-by: Andelf <andelf@gmail.com>
* Update src/resources/dicts/zh-cn.edn
Co-authored-by: Andelf <andelf@gmail.com>
---------
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
Co-authored-by: Andelf <andelf@gmail.com>