Skip to content

Commit

Permalink
Ignore plural cases of units for now
Browse files Browse the repository at this point in the history
[This PR](unicode-org/cldr#474) added information about cases for pluralization of units.
This code was not ready for that, and started returning whichever happened to be that last case in the section.

For now, we'll just return the case-less version as we always did.
  • Loading branch information
movermeyer committed Apr 21, 2022
1 parent da6a9a5 commit 809a304
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cldr/export/data/units.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def units(node)

def unit(node)
node.xpath("unitPattern").each_with_object({}) do |node, result|
# Ignore cases for now. We don't have a way to expose them yet.
# TODO: https://github.com/ruby-i18n/ruby-cldr/issues/67
next result if node.attribute("case")
count = node.attribute("count") ? node.attribute("count").value.to_sym : :one
result[count] = node.content
end
Expand Down

0 comments on commit 809a304

Please sign in to comment.