Page MenuHomePhabricator

[Insertables] Wrong suggestion of $ variable names in Special:Translate
Closed, DeclinedPublic

Description

In some messages, the syntax "$4" is not a variable name but a price in dollars (see for instance [[meta:Translations:FDC portal/Annual report on the Funds Dissemination Committee process 2012-2013/19/en]]), however it is presented in the Special:Translate interface as a suggestion of translation variable in the bottom of the translation window.


See Also:
T60746: [Insertables] Variable names containing hyphen are truncated

Details

Reference
bz58445

Event Timeline

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

A possible resolution would be to send the translation variable names along with the original message in the Translate extension. I didn’t dive into the code but I guess the message is sent in a JSON variable, where an additionnal field could be added.

There are several wars to easily work around this. Add space between the dollar sign and number, don't use the dollar sign, add a zero width marker between the dollar sign and the number. Take your pick and be happy :).

Change 103743 had a related patch set uploaded by M4tx:
Fix insertables matching

https://gerrit.wikimedia.org/r/103743

My point: all these amounts, numbers, dates etc should be excluded from translatable text (moved into templates or hided tgrough translation variable).
For this example may be markup: <tvar|amount>$4</>

Nikerabbit removed a project: Patch-For-Review.
Nikerabbit updated the task description. (Show Details)
Nikerabbit removed a subscriber: wikibugs-l-list.