newlines in translations

Asked by Angelo Locritani on 2011-12-10

Translating strings I found that in several places there is a newline symbol.

A note says "represents a line break. Start a new line in the equivalent position in the translation. "

Should line break been inserted in the same logical position or at the exact character position?

For example in "translate this <newline symbol> here" the newline symbol is at character 16. Should it be inserted at 16 or after the translation of "translate it" (regardless of character number) ?

Question information

Language:
English Edit question
Status:
Solved
For:
widelands Edit question
Assignee:
No assignee Edit question
Solved by:
Nasenbaer
Solved:
2011-12-28
Last query:
2011-12-28
Last reply:
2011-12-18
Jens Beyer (qcumber-some) said : #1

From what I remember, newlines should never be in texts or translations.
They need to be marked up by <br> sequences.

Nevertheless this question would also be valid with <br> tags; the translations might use a slightly different word length, most dialogs (all?) can wrap text longer than one line.

Angelo Locritani (alocritani) said : #2

So should I report (or even better correct) any case of newlines not marked with <br> in original English texts?

Best Nasenbaer (nasenbaer) said : #3

(un-)fortunally Jens is not right.

There are two types of text:
* text rendered in richtext format -> in that case \n are ignored by the renderer and simply not drawn, but <br> are used instead
* Simply text as is - in that case \n (or new line symbol as it is shown in the translation tool on launchpad) is a real new line. Placement of that newline is in all cases the logical position and not the character position (actually as we do not use a monospaced font, character position would not help a lot. :) )

So normally there should not be need for a change in the text files.

Angelo Locritani (alocritani) said : #4

Thanks Nasenbaer, that solved my question.