You're not registered yet. Click here to register. Credits 
You can register here for free.
This topic has 2 replies
and has been read 275 times
 Practical tips for translation of *.lang files (Localization)
Bussinchen Offline

Posts: 2

Thu Jul 26, 2012 12:58 am
& signs (ampersands) in the *.lang files for hotkey activation Quote · reply

Ampersand "&" in the *.lang file for hotkey activation in the program

Dear translators!

As you maybe know, it is possible in Scrabble3D to open menus by using the computer keyboard instead of clicking with the mouse. The hotkeys needed for the use of that function are activated by the ampersand sign (i.e. the & sign = “and”) in the lang files. The "&" must be placed before some letter, and pressing the Alt key and then the key with that letter will open the menu in question.

Example: In the line miForum.Caption=&Discussions... (Forum) (taken from english.lang) the &-sign activates the hotkey for the D key, i.e. pressing the Alt Key and then the D key (Alt+D) will open this Scrabble3D forum in your internet browser. So you need not to use your mouse to do that.

But now there is a little problem: If several identical letters are activated by "&" in the same menu, the program does not know which one of the menu entries you want to choose when pressing the letter key in question. In that case it is necessary to browse through all the menu entries with that letter by pressing the Enter key several times. But if you are forced to do that, the hotkey will not be very “hot” (= fast, quick) any longer, but it will take a rather long time to arrive at the menu entry you want to chose. The “hotkey” of before has so to speak become a “coldkey” and using the mouse would be a much faster way to choose the menu entries. It’s a pity if users of Scrabble3D cannot profit from that nice hotkey function because &-signs have been placed badly in the lang files.

Of course it is difficult to know if the position of the ampersands is chosen well, when you are working on your translation in the text file. That's why it is necessary to check the hotkeys in the program. If you press the Alt key, you will see that some letters in the menu entries in the program are underlined. Now it is important to have only one letter underlined for each hotkey. If two identical letters are underlined, the hotkey will not work well.

Have a look on this example taken from the French file french.lang:

You see that each underlined letter is different, and that means that pressing Alt+N on your keyboard really will start a new game, pressing Alt+V really will finish the move, pressing Alt+C really will challenge the move, and so on. If there were two N underlined in the same menu, the program would not know which one of the entries you want to choose, and the hotkey Alt+N would not work. So now you understand that wrong positions of the ampersand sign in the *.lang file will make it impossible to use the hotkey function in a quick and smooth manner. Of course the good positions of the &-signs have to be chosen individually for each language and will thus be different for different languages.

You may compare the underlined letters in French and those in Irish. They are different in both languages, but both in French and Irish, the hotkeys will work fine!
You see also that in Irish, three of the main menus have a C as first letter. But the translator has not put the ampersand three times in front of the letter C; he had chosen other letters instead: Comhad, Cluiche, Cumraíocht. And that's correct!

Please feel free to ask questions here, if you still are a little bit confused about those hotkeys. I will always try to help you, if I can!

Yours sincerely,

I OpenSource!
• Scrabble3D Download: | • Scrabble3D Help: Wiki | • Scrabble3D News: Twitter | • Scrabble3D Fanship: Facebook
• Scrabble3D in Italia: Sezione Scrabble3D sul Forum della Federazione Italiana Gioco Scrabble

xyz Offline

Posts: 69

Mon Nov 26, 2012 3:20 pm
#2 RE: & signs (ampersands) in the *.lang files for hotkey activation Quote · reply


I have the latest version of scrabble3d. I have recently been translating the Finnish texts. Here are some of my observations and questions regarding the ampersand use in *.lang files. I would really like to have some comment to each of the points I raise, at least, if you really want the Finnish translation (just kidding :)

Some of these might be program bugs.

1) you don't need to press (or keep down) ALT key for the hotkeys. You need it only once in the main window menu, and even there you can use the mouse. With this tip you are already 50 % faster! At least it worked for me using different translation files, in the menus and setting tabs. The underscore is not visible if you don't press ALT, but the hotkey still works without the ALT key.

2) Should &s be used everywhere? hotkeys are in many places (in various translations) in the settings tabs, but not everywhere. Some tickboxes have it some not, even on the same tab.
If hotkeys are used in order to be able to play without mouse, that doesn't work now. For example, in the rules tab you have to click on the panel first (e.g. Time penalty) for hotkeys to work. So it is not much (or any) faster than mouse.

3)The example with French menu (and the Irish!) shows "New game" with hotkey ALT+N and "Next player" with hotkey CTRL+N. I think it is very confusing. The English "Game" menu has the same function for each ALT+letter and CTRL+letter, but not in the other main window menus.

4) Should the menus have text ALT+(letter) in addition to the CTRL+(letter), it is easier to see than the underscore?

(5) In the Finnish translation in the rules tab, time penalty panel when I press h (ALT+h) the tickbox rightly changes but at the same time "american english" appears in the right-hand Standard settings tab.)

6) In the English translation, rules tab has 4 different functions with hotkey L.

7) Rules tab -> time penalty panel -> press l for "game lost after final time out" -> cursor goes to
"penalty for jokers left" (even if you tick first "game lost...")

8) If you press Alt+GW for word search window (it is on focus), then (alt+)C for category, it opens main window configuration menu instead

9) Rules tab-> press c for "cambio secco" -> you get the confirmation window of close-button

10) You cannot select tabs in game options by letter, so you have to use mouse anyway to change settings. Do hotkeys really help here?

These are just examples, many other similar clashes with hotkeys in various latest language files.

Scotty Offline


Posts: 3.595

Mon Nov 26, 2012 7:56 pm
#3 RE: & signs (ampersands) in the *.lang files for hotkey activation Quote · reply

Keep in mind the program runs on a lot of OS with different themes and settings. E.g. you may have underscores always present in Windows just by configuration. That does not mean consistency is of less importance. Quite contrary!
You are right, a good "hotkeying" is desirable. You can put ampersands in your translation wherever you want. Just make it right for the finnish people. But we should distinguish between hotkeys with ALT and Ctrl (let's call it a shortcut). Those shortcuts are a generalized way to start a function and not adjusted by translation, hotkeys an alternative for mouse use and modified by translation. If you find violations in the original text please report. But make sure you don't have loaded any lang file and the program is the latest release. And let your PC some time for computation. When I press ALT+GW+C it works as expected. English.lang is not part of the program anymore. The english translation will be generated by someone, akerbeltz I hope. The file default.lang is created on startup (in po format) but without any content. You can load the default.lang, i.e. configure it as your preferred localization, and restart the program to have the untouched original texts.

Download: | Help: Wiki | Discussion: Forum | News: Twitter | Fanship: Facebook

disconnected Scrabble3D Chat Members online 0
Xobor Einfach ein eigenes Forum erstellen