-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internationalization (i18n) / multiple language support #338
Comments
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 Edit: the previous version perfomed substitutions, even in the tags which caused some problems 😰 . This new version instead of making string substitution it recreates the line using the translation. #!/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]}')
# Extract the tag (string before ':')
tag="${line%%:*}"
if [ -z "$extracted_string" ]; then
output_line="$line"
else
translated_string=$(trans :es --brief "$extracted_string")
# NOTE: you need to remove extra commas on some lines
output_line="${tag}: \"${translated_string}\","
fi
echo "$output_line" >>"$OUTPUT_FILE"
done <"$INPUT_FILE"
|
I guess this is still in progress? |
Discussed in https://github.com/orgs/TriliumNext/discussions/240
Originally posted by eliandoran July 18, 2024
One of the core aspects of Trilium that is missing is the fact that it is an English-only software.
There are solutions such as @Nriver 's repo which work by replacing the hard-coded messages within the application via regular expressions.
Speaking of which, @Nriver , would you be willing to help us with setting up Chinese for the application?
On my side I would prefer a different method which involves adding multilanguage support directly in the application instead of doing it at build time, however your existing expertise plus translations would go a long way.
What do you think?
The text was updated successfully, but these errors were encountered: