-
Notifications
You must be signed in to change notification settings - Fork 19
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
Basic localization support #1344
Basic localization support #1344
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Is there any way to reload the UI without refreshing the whole page? |
Not really. I'd need to look into editor.js, maybe it should get a method to that effect. The closes thing would be is to call Else: what are the downsides of a page reload for what you are doing? |
Random idea (to be considered for later, it may not be that relevant for this initial work): should we maintain the translations as a (google-docs or equivalent) spreadsheet, to make it easier to onboard people who can help with providing/fixing/checking translations? |
Please run |
Maybe using professional platforms like Crowdin or Transifex is a better idea. They offer free project hosting for open-source repos. |
…client/lang/*.json
Signed-off-by: Aaron Ruan <aaron212cn@outlook.com>
5751186
to
967ad92
Compare
Rebased |
680b1bb
to
73b54c7
Compare
About the json prettier plugin: that's fine as long as we have control about which files it will touch. Like, there are .json files in test-common that I'm not sure I want to be touched. There are .json files inside .fontra folder that should not be touched, but I think they are already ignored. |
I'm planning to mark this PR as ready, since there're too many files modified. The main editor is almost localized, and for unlocalized dialogs and pop-ups I'll open a second PR after this one's merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this huge amount of work, and for keeping it up to date!
I left some comments.
General question, if I find things that are not yet translated, would you like me to tell you, or are you aware? For example, I found the dialogs that use "_sourcePropertiesRunDialog" to be untranslated.
Please use pre-commit, you may have to run "pre-commit install" to turn it on for this repo. I notice in the test fail that it reformats some .json files that are unrelated to this PR. I would prefer them to not be changed. Maybe you can activate the json prettier only for the files you are interested in? |
…ontra into localization-support
I see that if a translation is not found, the key is returned. I'm worried about new things that will be added, which will be in English first. Imagining we may have more translations in the future, I wonder if we should fall back to english if a translation isn't found. Else we'd be forced to always have all new translations ready at the same time, which seems impractical. |
IMO this isn't a big problem right now, since we can still hardcode the English strings in the source code for new strings. I'll add the fallback strategy in the next PR, so that new strings can use |
Thanks so much! |
Close #1340
Todos
current workaround: use
location.reload(true)
to reload