I wanted a central place to track I18N efforts for NetLogo Web, including Galapagos (for now). The status now is that during the runtime error checking work I used Jason's original idea to add I18N bundles for those error messages. John C then used that to add Simplified Chinese support for those same runtime error messages, and I just added the code to Galapagos to handle switching based on the browser's locale.
Here is what remains to be done:
Longer term goals and/or ideas that we can split off once the above work is complete:
- Support per-model translations using the same format as Turtle Universe.
- Some kind of script that can help keep the translation files in sync. This can include things like pointing out missing strings from the non-
en_us file, pointing out strings that don't exist in the en_us file (key name changes), and also auto-adding missing strings for people doing translation work. Some of this should be added to the Actions tests.
- Get language bundles loading dynamically to avoid users needlessly loading the translation bundles they don't need. This should probably wait until we've converted Tortoise to use ES modules.
- Possibly look into just making Google Translate (or other translation service) work for NetLogo Web models for anything that has yet-to-be translated or for languages we don't support. Jason had a comment about that in this Galapagos issue.
- NetTango Web and HubNet Web will also need to be translated after Galapagos itself supports I18N.
- Look into merging the I18N translation files from NetLogo desktop, NetLogo Web, Turtle Universe, NetTango Web, and HubNet Web to a common format and repository so we can maximize re-use between the platforms for common GUI strings and runtime messages.
I wanted a central place to track I18N efforts for NetLogo Web, including Galapagos (for now). The status now is that during the runtime error checking work I used Jason's original idea to add I18N bundles for those error messages. John C then used that to add Simplified Chinese support for those same runtime error messages, and I just added the code to Galapagos to handle switching based on the browser's locale.
Here is what remains to be done:
I18NBundle's static declaration. Note that not all NetLogo error messages are used in Tortoise yet, so it might be best to only transfer the ones that are in the existingen_usfile. Automating some of this process may be possible.Longer term goals and/or ideas that we can split off once the above work is complete:
en_usfile, pointing out strings that don't exist in theen_usfile (key name changes), and also auto-adding missing strings for people doing translation work. Some of this should be added to the Actions tests.