newlines in translations

Asked by Angelo Locritani

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:
Last query:
Last reply:
Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
Angelo Locritani (alocritani) said :
#4

Thanks Nasenbaer, that solved my question.