Page MenuHomePhabricator

After manually editing $separatorTransformTable in English translation, decimal separators for numbers have not changed
Open, LowestPublic

Description

Hello.

I have the problem with calculation by #expr after change languages (russian to english; english to russian).

I decided to make the display of numbers monotonous (in particular, the decimal separator and the thousands separator). For this, I added to the file MessagesEn.php

$separatorTransformTable = [ ',' => "\u{00A0}", '.' => ',' ];

instead

$separatorTransformTable = null

(I know that changing system files is bad, but in a different way).

But the display of numbers after these changes has not changed.

Event Timeline

Antohabio created this task.Fri, Oct 4, 5:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFri, Oct 4, 5:44 PM
Antohabio updated the task description. (Show Details)Fri, Oct 4, 5:45 PM
Aklapper removed a project: I18n.Sat, Oct 5, 9:00 AM

@Antohabio: Does it work with \xc2\xa0 instead of \u{00A0}?

In general, this might be a support question and not (yet) a bug report. :)

Aklapper changed the task status from Open to Stalled.Sat, Oct 5, 9:36 AM

@Antohabio: Does it work with \xc2\xa0 instead of \u{00A0}?

No, this not working.

\u{00A0} I copied from Russian language files.

Aklapper renamed this task from Problem with decimal separator in numbers to After manually editing $separatorTransformTable in English translation, decimal separators for numbers have not changed.Mon, Oct 7, 9:09 AM
Aklapper changed the task status from Stalled to Open.
Aklapper triaged this task as Lowest priority.
Aklapper added a project: MediaWiki-General.

It works for me. The localisation data is cached (https://www.mediawiki.org/wiki/Localisation#Caching) – try running the update.php maintenance script to purge the caches.

Antohabio added a comment.EditedMon, Oct 7, 5:07 PM

It works for me. The localisation data is cached (https://www.mediawiki.org/wiki/Localisation#Caching) – try running the update.php maintenance script to purge the caches.

Can I only clear cache directory or should I run the script update.php?

I don't know, sorry. It might depend on your configuration, on my wiki I didn't even have to purge any caches, the change took effect immediately.

Antohabio added a comment.EditedTue, Oct 8, 7:31 AM

On this time, I run update.php. This process is completed successfully. Page purged.
But I see the numbers with comma thousands separator
Why changes in MessagesEn.php not applied?

Sorry, I have no idea.