Page MenuHomePhabricator

Adapt number format across languages
Closed, DeclinedPublic

Description

Numbers are formatted in different ways across languages (e.g., 1.234,56 vs. 1.234,56). It would be great if Content Translation took care of that adaptation to save users time.
This adaptation can be tricky to automate (MT may or may not already do it, and there are always many edge cases when dealing with numbers) but it is worth having a ticket to capture ideas about it.

In this comment a user mentions the use of the "magic word formatnum".

Event Timeline

Pginer-WMF raised the priority of this task from to Needs Triage.
Pginer-WMF updated the task description. (Show Details)
Pginer-WMF added a project: ContentTranslation.
Pginer-WMF subscribed.
Amire80 set Security to None.

Seems something for the translation services to improve. Fixing specific things on top of their returned translations may be problematic.

I agree with declining, but I'd add a slightly different rationale: It should be done, but not by Content Translation. Content Translation should be responsible for adapting only the most obvious and least ambiguous things, like links and images. Template adaptation is very non-obvious, and it is done by Content Translation, but that, too, should be refactored (see T243150 for an initial proposal).

Number adaptation should not be done by Content Translation, but by some other software component. A prerequisite for such a component is better semantic understanding of what the content is, not just for the sake of translation, but for the sake of semantics in general. Numbers may mean different things—sometimes they need a comma, sometimes a period, and sometimes some other separator, even within the same language. Sometimes they need to be converted to a different script, and sometimes they don't. Maybe this will come from better definition of parameter types in templates, and maybe from some other parser feature, but in any case, it shouldn't be Content Translation itself.

However, in the bright future when such a service will become available, Content Translation should definitely use it.