[Mediawiki-i18n] Truncating a message, enforcing word order

P. Blissenbach publi at web.de
Thu Dec 12 12:12:36 UTC 2013

"Juliusz Gonera" wrote:
> [...]
> On 12/11/2013 06:41 PM, Matthew Flaschen wrote:
> > That's almost certainly not possible in every language.  It could work
> > as a suggestion, though ("If possible...").
> Jared said that it doesn't even have to be treated as a sentence, can be 
> something like "Editing: [article name]".
> > However, it might be better to wrap the title (language aside, it could
> > provide better usability for some scenarios, e.g. if you lock your phone
> > when editing, then come back to it and want to see what page you're on).
> I'm not sure if I understand the example use case. Also, this solution 
> has all sorts of other problems. Let's say we try to do it in PHP, we 
> don't even know the browser window width. Let's say we do it in 
> JavaScript, we know the browser window width, but we don't know how many 
> characters will fit in a single line... For those reasons I'd rather 
> stick with text-overflow: ellipsis in CSS.

The solution is to have three DIVs nested into another DIV or,
alternatively, a table of three columns.
* Line wrapping is forbidden in each of them.
* The central one employs CSS text-overflow: ellipsis
  and shows the full title on mouseover.
* The outer two have i18n'ed strings like "Editing:" or "is being edited"
  which most often means that either the left or the right column is empty,
  depending on the language, shrinking to zero width.


(this e-mail probably scanned by NSA and GCHQ and others)

More information about the Mediawiki-i18n mailing list