Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the special casing of one key #80

Merged
merged 3 commits into from
Nov 9, 2021

Conversation

movermeyer
Copy link
Collaborator

@movermeyer movermeyer commented Nov 8, 2021

What are you trying to accomplish?

Fixes #76

If the CLDR locale data doesn't have pluralization data for the currency:

a) We shouldn't make it up
b) one is not a valid pluralization key in most languages
c) Often pluralization keys other than one are needed

See #76 for the full context

What approach did you choose and why?

Simple removal of the key.

I also had to fix the CHANGELOG to be able to include a note on this change. It was sorted backwards from what Keep a Changelog specifies, and it was missing an entry for my previous change.

What should reviewers focus on?

🤷 I've documented the change, and ruby-cldr is pre-1.0.0, so "Anything MAY change at any time".

The impact of these changes

Consumers may have to update their code if they were relying on this key's existence.
ruby-cldr will no longer be making up data in this case. 👍

Testing

  1. Run thor cldr:export --components currencies
  2. Open data/af/currencies.yml

Note that there is no longer any one key for LVL, since there is no one key for LVL in the CLDR data.

If the locale doesn't have pluralization data for the currency:

a) We shouldn't make it up
b) `one` is not a valid pluralization key in most languages
c) Often pluralization keys other than `one` are needed
@movermeyer movermeyer force-pushed the mo.remove_one_special_casing branch from b90e0c3 to 425adb3 Compare November 8, 2021 19:37
@movermeyer movermeyer marked this pull request as ready for review November 8, 2021 19:42
@Korri Korri merged commit d55247a into ruby-i18n:master Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove special one key handling in Currencies#currency
3 participants