Skip to content

Commit

Permalink
Merge pull request #80 from movermeyer/mo.remove_one_special_casing
Browse files Browse the repository at this point in the history
Remove the special casing of `one` key
  • Loading branch information
Korri authored Nov 9, 2021
2 parents 4c62b6f + 425adb3 commit d55247a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
33 changes: 18 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

- Only export plurals.rb for those that have plurals data, [#71](https://github.com/ruby-i18n/ruby-cldr/pull/71)
- Only export plural keys for currencies that have pluralization data, [80](https://github.com/ruby-i18n/ruby-cldr/pull/80)

---

## [0.2.0] - 2019-03-26
## [0.5.0] - 2020-11-20

- Updated to CLDR 34 [#43](https://github.com/ruby-i18n/ruby-cldr/pull/43)
- Lots of [other changes](https://github.com/ruby-i18n/ruby-cldr/compare/v0.1.1...v0.2.0)
- Added a changelog, [#49](https://github.com/ruby-i18n/ruby-cldr/pull/49)
- Added Travis CI for testing, [#48](https://github.com/ruby-i18n/ruby-cldr/pull/48)
- Added root fallback to en language, [#47](https://github.com/ruby-i18n/ruby-cldr/pull/47)
- Added subdivisions to the list of exportable components, [#46](https://github.com/ruby-i18n/ruby-cldr/pull/46)
- Added country codes as an exportable component, [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)
- Added narrow symbols to exported currency data, [#64](https://github.com/ruby-i18n/ruby-cldr/pull/64)

## [0.4.0] - 2020-09-01

- Support pluralization codes with missing spaces [#53](https://github.com/ruby-i18n/ruby-cldr/pull/53)
- Add in functionality to export country codes [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)

## [0.3.0] - 2019-06-16

- Export currency names [#51](https://github.com/ruby-i18n/ruby-cldr/pull/51)
- Bring back root fallback for english [#47](https://github.com/ruby-i18n/ruby-cldr/pull/47)
- Export subdivisions [#46](https://github.com/ruby-i18n/ruby-cldr/pull/46)

## [0.4.0] - 2020-09-01

- Support pluralization codes with missing spaces [#53](https://github.com/ruby-i18n/ruby-cldr/pull/53)
- Add in functionality to export country codes [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)

## [0.5.0] - 2020-11-20
## [0.2.0] - 2019-03-26

- Added a changelog, [#49](https://github.com/ruby-i18n/ruby-cldr/pull/49)
- Added Travis CI for testing, [#48](https://github.com/ruby-i18n/ruby-cldr/pull/48)
- Added root fallback to en language, [#47](https://github.com/ruby-i18n/ruby-cldr/pull/47)
- Added subdivisions to the list of exportable components, [#46](https://github.com/ruby-i18n/ruby-cldr/pull/46)
- Added country codes as an exportable component, [#61](https://github.com/ruby-i18n/ruby-cldr/pull/61)
- Added narrow symbols to exported currency data, [#64](https://github.com/ruby-i18n/ruby-cldr/pull/64)
- Updated to CLDR 34 [#43](https://github.com/ruby-i18n/ruby-cldr/pull/43)
- Lots of [other changes](https://github.com/ruby-i18n/ruby-cldr/compare/v0.1.1...v0.2.0)

[Unreleased]: https://github.com/ruby-i18n/ruby-cldr/compare/v0.5.0...HEAD
1 change: 0 additions & 1 deletion lib/cldr/export/data/currencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def currency(node)
count = node.attribute('count').value.to_sym
result[count] = node.content
else
result[:one] = node.content if result[:one].nil?
result[:name] = node.content
end
end
Expand Down
5 changes: 0 additions & 5 deletions test/export/data/currencies_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ class TestCldrCurrencies < Test::Unit::TestCase
assert_equal({ :symbol=>'US$', :'narrow_symbol'=>'$'}, currencies[:USD])
end

test 'currencies uses the label to populate :one when count is unavailable' do
currencies = Cldr::Export::Data::Currencies.new('ak')[:currencies]
assert_equal({ :name => 'Yuan', :one => 'Yuan' }, currencies[:CNY])
end

# Cldr::Export::Data.locales.each do |locale|
# test "extract currencies for #{locale}" do
# assert_nothing_raised do
Expand Down

0 comments on commit d55247a

Please sign in to comment.