HomePhabricator

Hard-code fallback for ckb number formatting
f22388367031Unpublished

Authored by MusikAnimal on Feb 19 2019, 3:43 AM.

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Hard-code fallback for ckb number formatting

The fallback works on its on my local, but for some reason prod doesn't
agree, even with the same version of PHP and ext-intl. This commit is a
cheap workaround.

Add num_format and date_format to other locations in the app where it
was forgotten.

Bug: T213503

Details

Committed
MusikAnimalFeb 19 2019, 4:45 AM
ChangeId
None

Event Timeline

Epine added a subscriber: Epine.Mar 10 2019, 9:52 AM

@MusikAnimal, thank you for working on this. On line 314, you’ve written ar for the getLang command, does this affect the numerals? Because if this part is supposed to change the numerals, Arabic numbers are same as English numbers 1234567890. These numbers used in the English language are originally Arabic.

@MusikAnimal, thank you for working on this. On line 314, you’ve written ar for the getLang command, does this affect the numerals? Because if this part is supposed to change the numerals, Arabic numbers are same as English numbers 1234567890. These numbers used in the English language are originally Arabic.

It is only affecting numerals. ar apparently uses Hindu-Arabic numerals, which I think is what you want? In T213503 you pointed to https://xtools.wmflabs.org/ec/ckb.wikipedia.org/%C3%89pine?uselang=ar saying these are the numerals that should be shown in ckb.

The change is up and running on our staging site, please verify everything looks correct: https://xtools-dev.wmflabs.org/ec/ckb.wikipedia.org/%C3%89pine?uselang=ckb

(also, do not use staging for general purpose, it is not intended to be stable :)

Epine added a comment.Mar 13 2019, 9:31 PM

@MusikAnimal, thank you for working on this. On line 314, you’ve written ar for the getLang command, does this affect the numerals? Because if this part is supposed to change the numerals, Arabic numbers are same as English numbers 1234567890. These numbers used in the English language are originally Arabic.

It is only affecting numerals. ar apparently uses Hindu-Arabic numerals, which I think is what you want? In T213503 you pointed to https://xtools.wmflabs.org/ec/ckb.wikipedia.org/%C3%89pine?uselang=ar saying these are the numerals that should be shown in ckb.

The change is up and running on our staging site, please verify everything looks correct: https://xtools-dev.wmflabs.org/ec/ckb.wikipedia.org/%C3%89pine?uselang=ckb

(also, do not use staging for general purpose, it is not intended to be stable :)

Yes, this should be the final result, with the exception of the timecard: https://xtools-dev.wmflabs.org/ec-timecard/ckb.wikipedia.org/Épine I noticed that the time numerals are still Arabic here. It would be great if we can work on this as well.

Yes, this should be the final result

Great!

with the exception of the timecard: https://xtools-dev.wmflabs.org/ec-timecard/ckb.wikipedia.org/Épine I noticed that the time numerals are still Arabic here. It would be great if we can work on this as well.

Indeed. This is tricky since it is a JavaScript library that does not natively support numerical localization. I attempted a workaround but it turned into a rabbit hole. I will definitely give it another shot. I've created T218267 so we don't forget about it.

Indeed. This is tricky since it is a JavaScript library that does not natively support numerical localization. I attempted a workaround but it turned into a rabbit hole. I will definitely give it another shot. I've created T218267 so we don't forget about it.

If you couldn’t fix it, it’s not such a big issue and you can skip that part. As long as the general interface is localized then we’re good to go. Thanks again for working on this :) BTW, not sure if you have seen my previous messages on your talk page on the en wiki but we also talked about getting your bot running on ckb. Lemme know if it was possible to do that as well.

Commit No Longer Exists

This commit no longer exists in the repository.