From 809a304d5ff88aac547087bee2a4085d96f901ae Mon Sep 17 00:00:00 2001 From: Michael Overmeyer Date: Fri, 27 Aug 2021 11:50:03 -0400 Subject: [PATCH] Ignore plural cases of units for now [This PR](https://github.com/unicode-org/cldr/pull/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. --- lib/cldr/export/data/units.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cldr/export/data/units.rb b/lib/cldr/export/data/units.rb index 7d977ecd..f37eb590 100644 --- a/lib/cldr/export/data/units.rb +++ b/lib/cldr/export/data/units.rb @@ -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