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 Feb 24, 2022
1 parent 25f93d2 commit 3d009e8
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 @@ -28,6 +28,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 unless draft?(node)
end
Expand Down

0 comments on commit 3d009e8

Please sign in to comment.