Page MenuHomePhabricator

Allow developers to enforce string limits in message translations.
Open, LowPublic

Description

It would be useful to developers, specifically in designing on rare occasions to enforce character limits on translations.
See:
https://www.mail-archive.com/design@lists.wikimedia.org/msg00132.html

I'm not sure what is the best way to do this, but a magic word in a qqq code might be a useful easy way to do this.

When translating, if a message goes over this limit, the translator should be warned that this is the case (note I don't think it should stop the translation but it should certainly make them aware).

e.g.
{{ENFORCE_LIMIT=100}}

Details

Reference
bz57867

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:38 AM
bzimport set Reference to bz57867.
bzimport added a subscriber: Unknown Object (MLST).

I see how this feature request may make sense, but I don't see it getting a high priority.

Character count is limited as proxy metric for text fitting in a defined space; 10 characters of Chinese is a LOT wider than 10 characters of Arabic...

Might consider specifying a "font family, font size, max CSS pixel width" combination, which could be used to encapsulate the translated preview in an appropriately sized box, immediately showing if it overflows the expected size.

The best solution would be real-time layout previews of the translated text in an example context using actual target styles and formatting.... but that sounds harder. :)

This might also be useful for CentralNotice banner translations.