-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add language debugging mode #3755
Comments
So, I did this today: It's kind of weird but it works.. Is this something that would be useful to people doing translations? The idea is that now iD can switch languages on-the-fly, and I added a special language called Right now toggling languages can only be done through the dev console (we can add a proper field to pick the language later, closing #3120): id.ui().restart('it')
id.ui().restart('ru')
id.ui().restart('zh')
id.ui().restart('_tkeys_') |
Yes, that could be useful for zeroing in on an incorrect translation I spot while using iD. I sometimes use a similar mode when translating MediaWiki (example), although fortunately Transifex’s search engine is much more usable than Translatewiki.net’s. More commonly, I need to go in the other direction while translating in Transifex: figuring out where a string marked for translation is used within iD. For that purpose, I usually head over to this repository’s commit history and root around for the relevant change. (Thank you for descriptive commit messages!) One way to improve this workflow would be a mode where untranslated UI elements are highlighted prominently or greeked (replaced with lookalike ¢ħª®ä©ţǝ®§ or emoji). |
Another improvement is if you add a link to the Git commit in the transifex comment for each string. In that way, i can easy go directory to the relevant commit. |
Thanks for the feedback @1ec5 and @magol... There isn't a great way to go from Transifex back to iD, aside maybe from looking at the key itself and then doing a search in the iD source code. Even that is not great because it requires some familiarity with how the code draws the UI. E.g. search for this key, or some part of it: Anyway I'll close this for now, and you can use the method above to switch languages until we close #3120 |
BTW for anyone following this issue, I just setup the master mirror (#3912) so that it also pulls the latest translations from Transifex. That means that every 10 minutes that mirror will have the latest code from master along with the latest translation strings applied on top of that code. I hope it will be helpful so that translators can see the effects of their work pretty quickly. This will be useful because when #3921 lands, there will be a lot of translation work to do. |
This is an idea from today's show-and-tell which would help translators a lot.
It would be great to be able to switch iD into a mode where instead of the translation strings, you just see the translation keys. This in itself isn't too hard to do by changing what the code in
locale.t()
does.The tricky part is that there are probably lots of components of iD that are only entered once and never updated again. When switching the language, we'd really need to rebuild the ui from scratch. This code is in
ui/init.js
and is really not designed to be rerun. It might be ok to preserve some of the map state and throw out all that stuff and reenter it - I don't know. It's like how iD can switch in and out of the walkthrough, but probably more complicated.This would enable #3120 too (switching languages on the fly).
The text was updated successfully, but these errors were encountered: