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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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