Sie sind vermutlich noch nicht im Forum angemeldet - Klicken Sie hier um sich kostenlos anzumelden Impressum 
Sie können sich hier anmelden
Dieses Thema hat 1 Antworten
und wurde 438 mal aufgerufen
 Practical tips for translation of *.lang files (Localization)
Bussinchen Offline




Beiträge: 90

02.10.2012 01:19
How to create line breaks in hints (tooltips) Zitat · Antworten

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 Offline




Beiträge: 90

03.01.2013 12:03
#2 RE: How to create line breaks in hints (tooltips) Zitat · Antworten

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

 Sprung  
Xobor Forum Software von Xobor.de
Einfach ein Forum erstellen
Datenschutz