Open meichthys opened 4 weeks ago
Language switcher is merged actually. #330 And there is already one PR merged regarding Chinese translation, not sure whether all messages are translated. #264
About 60% has been translated.
On #349 I made an initial step to have Spanish translation, I'll be happy to test next beta release and find potential fixes on strings.
To help on the translation for new languages I made a small script to use trans
command from translate-shell
package.
Now most of the work is to review translations are good and fix bad translations.
#!/usr/bin/env bash
INPUT_FILE=en.json
OUTPUT_FILE=es.json
while IFS= read -r line; do
# Extract the string between ': "' and '"'
extracted_string=$(echo "$line" | awk -F'": "' '{split($2, a, "\""); print a[1]}')
if [ -z "$extracted_string" ]; then
output_line="$line"
else
translated_string=$(trans :es --brief "$extracted_string")
output_line=${line//$extracted_string/$translated_string}
# output_line=$(echo "$line" | sed "s/$extracted_string/$translated_string/g")
fi
echo "$output_line" >>"$OUTPUT_FILE"
done <"$INPUT_FILE"
Discussed in https://github.com/orgs/TriliumNext/discussions/240