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




Posts: 17

Tue Oct 02, 2012 1:19 am
How to create line breaks in hints (tooltips) Quote · reply

Line breaks in hints, i.e. tooltips

In the hints of the files default.lang / english.lang, Scotty has not implemented any line breaks. This is due to the fact that he has no line break signs in his source code. And that means that translators who don’t check other language files, unfortunately never will know anything about the possiblity to avoid one very very long line in a tooltip by using a special command in the lang-files.

Let me give you an example in Catalan language:

rgWordCheckMode.Hint=Trieu com es validen les jugades: Prevalidació=valida la jugada abans de fer-la efectiva; Consulta=després de fer la jugada, demana als altres jugadors si s'han d'acceptar els mots, Impugnació=impugna la jugada



Screenshot: Ugly, long one line tooltip without any line breaks





This is really a very very long hint (= tooltip). But if you put \\n (= backslash backslash n ) somewhere in your hint text, this will create a line break:

rgWordCheckMode.Hint=Trieu com es validen les jugades:\\n• Prevalidació=valida la jugada abans de fer-la efectiva;\\n• Consulta=després de fer la jugada, demana als\\n altres jugadors si s'han d'acceptar els mots;\\n• Impugnació=impugna la jugada


rgWordCheckMode.Hint=
Trieu com es validen les jugades:\\n
• Prevalidació=valida la jugada abans de fer-la efectiva;\\n
• Consulta=després de fer la jugada, demana als\\n
altres jugadors si s'han d'acceptar els mots;\\n
• Impugnació=impugna la jugada



As you see, I have even added points (Alt+7 in Windows OS) and spaces in order to have a nicer tooltip.



Screenshot: Nice compact tooltip with several line breaks





This is a little bit like a nice make-up for the otherwise already beautiful interface of our Scrabble3D.exe.


Good luck with your \\n line breaks!

But pay attention, please: These line breaks are possible only in hints, not elsewhere!

Example: rgWordCheckMode.Hint=xxxxxxx\\nxxxxx


Kind regards from your
L10n-Bussinchen


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


Bussinchen Online




Posts: 17

Thu Jan 03, 2013 12:03 pm
#2 RE: How to create line breaks in hints (tooltips) Quote · reply

If you are working in po format line breaks in hints (tooltips) are created by only one backslash and the letter n: \n (instead of \\n in ini format).


Example taken from spanish.lang in po format:

#: acchallenge.hint
msgctxt "acChallenge.Hint"
msgid "Object last move"
msgstr "Jugando en modo \"Cuestionamiento\", se puede\ncuestionar la jugada que se acaba de colocar"


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


 Jump  
disconnected Scrabble3D Chat Members online 1
Xobor Einfach ein eigenes Forum erstellen