I came up with a CSS-only solution.
The message in English would be: '<strong>Editing</strong> <span>$1</span>' In Japanese: '<span>$1</span>を<strong>編集中</strong>'
Now the CSS (the message is inside a <h2>):
h2 { display: table; width: 100%;
> * { display: table-cell; // padding instead of spaces between words padding-right: .5em; }
strong { width: 1em; }
span { overflow: hidden; text-overflow: ellipsis; // required for text-overflow to work max-width: 1em; } }
Comments?
Now, bonus question. The message is "'''Editing''' $1" now. Should I create a new key or just edit the English message?
On 12/11/2013 05:12 PM, Juliusz Gonera wrote:
If you are in beta on mobile now, there's a new look for the editor. The heading of the editor now says "Editing [article name]" in English.
The problem is that designers want this to be always one line long at most and truncate it when it's longer. This is fine in English where "Editing" is at the beginning, not OK in some languages, e.g. Japanese:
http://tinyurl.com/qftpgy4 (click the pencil icon)
where "editing" ("編集中") is at the end. If we truncate this, it won't make much sense.
Should I suggest in the message description that the translators should use such a grammatical construction so that the word "editing" stays at the beginning? That's what designers suggested.