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 016b05b commit 38a8335
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cldr/export/data/units.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def units(node)

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

0 comments on commit 38a8335

Please sign in to comment.