twitter/twitter-cldr-rb

Incorrect list formatter behaviour

valodzka opened this issue · 2 comments

TwitterCldr::Formatters::ListFormatter.new(:zh).format(['a', 'b', 'c'], :'unit-narrow')

Expected result: "abc"
Actual result: "c"

Obvious fix would be to replace:

https://github.com/twitter/twitter-cldr-rb/blob/master/lib/twitter_cldr/formatters/list_formatter.rb#L57

with result.gsub!(/(\d)/) { elements[$1.to_i] }

Hey @valodzka thanks for the bug report! This should be fixed in v6.0.1 :)