Proposal: Translation keys for the web app #682
davidgamez
started this conversation in
Decisions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Considerations
As Mobility Database serves consumers globally, it’s a great practice to serve the UI and data in local languages to make our service more accessible. As a small organization, having a full-time team of translators in 10+ languages is challenging. In this discussion, we limit the conversation to just the Web UI labels, not the data.
Requirements
Solutions
Fully automated
Create a script that calls the translate API with the JSON files and publishes them to GitHub. This can be done per branch on PR. We should about direct commits to the main as the QA deployment gets triggers per main pushes.
Pros
Cons
Github action + human reviewer
Create a script to translate JSON files. The script is executed on GH actions when files are changed. The script can add a comment to the PR with a zip of the generated files; then the developer should get the files and commit them to git after reviewing them. A variant of this is to always keep the autogenerated files in Git for reference, in this case, the script can commit back the files without the need for an attachment.
Pros
Cons
Local script
Pros
Cons
Translate text override
In case the text overrides, we can keep a twin file to the original target file with just the keys that are override. This reduces the risk of losing overrides on translation files and keeps a history of community-suggested overrides.
Example:
Source file common.json
Override file common_override.json
Beta Was this translation helpful? Give feedback.
All reactions