-
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
Localize keyboard button texts (e.g. "Ctrl" -> "Strg") #4090
Comments
re: "Enter full screen mode": I just added it last night. It should be picked up by Transifex today and be available for translation soon. |
Sorry just read again and it looks like you also want the button texts translatable too, I agree this is a good idea. |
@bhousel 'full screen mode' arrived at transifex, thanks. Waiting for 'Ctrl' etc. |
I've added the localizable button labels in c22fa60. These will appear on Transifex within the next day, and when they do, I'll add some translation instructions. While it works for the "Keyboard shortcuts" screen, localization won't work yet in the popup tooltips. This is because Still trying to think of how I can reconcile the two approaches. Probably some combination of:
|
The localizable button labels arrived at transifex |
Thanks! I'm leaving it open until I can fix how the shortcuts are displayed in tooltips. |
@bhousel Do you mean that you also want to display "Strg" + "<- Rück" here: |
Yes! |
@bhousel is this still on your agenda? |
@1ec5 hello, I'm interested to solve this issue, is there something which I should know other than the previous comments? I'm new to open source and been tested the repository on my local. I've started to work on it. |
Sure, feel free to post a pull request for review when you’re ready. Per #4090 (comment), the only thing left to do here is update tooltips to also localize the modifier key names. You’ll need to be using either Windows or Linux to see the key names, because on macOS, language-independent key symbols appear in the tooltips instead. In your local environment, append the Here’s an example of where a tooltip shows shortcut keys (specifically, when hovering over the Show History Panel checkbox in the Map Data panel): iD/modules/ui/sections/data_layers.js Line 404 in b5d45e3
That calls into a function that hard-codes English names, which seems promising. However, it’s right next to the code that was fixed in c22fa60, so there must be a reason why it wasn’t changed. This function might be used elsewhere where it needs to retain the raw English names, in which case you might need to find a different way to localize these key names. |
Thank you so much for providing such a clear and detailed explanation of this issue, I’ll review the mentioned areas and proceed with the updates as suggested. I'm on MacOS but will try to figure out somehow. |
So, I approached this issue in mentioned way, I got a bit familiar and saw that, In the local environment, append the language parameter to the URL to test iD in a particular language doesn't seem to work directly as http://localhost:8080/?language=de doesn't change the language unless the computer system language is set to that particular language or any browser extension forcibly change the language of the webpage. I used UserSwitcherAgent Extension setting to Windows Browser Environment like Internet Explorer and Locale Switcher Extension to convert on English to German (Device used MacOS Sequoia 15.1) On it! It's very Interesting )) |
Sorry, I should’ve been clearer: iD doesn’t use real URL query parameters; instead, it uses a similar syntax as the URL hash (after the |
No problem, hopefully I'll be able to push a quality PR to this issue. |
@1ec5 Please let me know if I'm missing out on something on StillAbeginnerr@672b376 |
…specific keyboard shortcut mappings with localization
…specific keyboard shortcut mappings with localization
…specific keyboard shortcut mappings with localization
Thanks for posting #10570 – let’s continue the discussion about your implementation there. |
There is one untranslatable item at Browsing "Enter full screen mode".
Maybe you can make some button-texts translatable:
"Ctrl", "Space", "PgUp", "PgDn", "Home", "End", "Backspace"
maybe even those I would use the same Text in German as in English:
"Shift", "Pause", "Alt", "Enter", "Esc"
The text was updated successfully, but these errors were encountered: