Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ GEM
rake
rdoc
semver2
json (2.21.2)
json (3.1.0)
jwt (2.10.3)
base64
language_server-protocol (3.17.0.6)
Expand Down Expand Up @@ -79,8 +79,8 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
parallel (2.1.0)
parser (3.3.12.0)
parallel (2.3.0)
parser (3.3.14.0)
ast (~> 2.4.1)
racc
power_assert (3.1.0)
Expand Down Expand Up @@ -109,26 +109,28 @@ GEM
erb
psych (>= 4.0.0)
tsort
regexp_parser (2.12.0)
regexp_parser (2.13.4)
reline (0.6.3)
io-console (~> 0.5)
rubocop (1.89.0)
json (~> 2.3)
rubocop (1.92.3)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
regexp_parser (>= 2.11.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.50.0)
rubocop-ast (1.53.0)
ast (~> 2.4)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-shopify (3.0.2)
prism (>= 1.7)
racc
rubocop-shopify (3.1.0)
lint_roller
rubocop (~> 1.72, >= 1.72.1)
rubocop (~> 1.89)
ruby-lsp (0.26.11)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
Expand All @@ -142,9 +144,9 @@ GEM
thor (1.5.0)
thread_safe (0.3.6)
tsort (0.2.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
unicode-display_width (3.3.0)
unicode-emoji (~> 4.3)
unicode-emoji (4.3.0)

PLATFORMS
aarch64-linux
Expand Down
8 changes: 4 additions & 4 deletions lib/cldr/export/data/calendars/gregorian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def elements(node, kind, context, width, options = {})
end

def xpath_to_key(xpath, kind, context, width)
kind = (xpath =~ %r(/([^\/]*)Width) && Regexp.last_match(1)) || kind
context = (xpath =~ %r(Context\[@type='([^\/]*)'\]) && Regexp.last_match(1))&.underscore || context
width = (xpath =~ %r(Width\[@type='([^\/]*)'\]) && Regexp.last_match(1)) || width
kind = (xpath =~ %r(/([^/]*)Width) && Regexp.last_match(1)) || kind
context = (xpath =~ %r(Context\[@type='([^/]*)'\]) && Regexp.last_match(1))&.underscore || context
width = (xpath =~ %r(Width\[@type='([^/]*)'\]) && Regexp.last_match(1)) || width
:"calendars.gregorian.#{kind}s.#{context}.#{width}"
end

Expand All @@ -79,7 +79,7 @@ def eras

key_result = select(path).each_with_object({}) do |node, ret|
if node.name == "alias"
target = (node.attribute("path").value.match(%r{/([^\/]+)$}) && Regexp.last_match(1)).gsub("era", "").gsub(/s$/, "").downcase
target = (node.attribute("path").value.match(%r{/([^/]+)$}) && Regexp.last_match(1)).gsub("era", "").gsub(/s$/, "").downcase
break :"calendars.gregorian.eras.#{target}"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/cldr/format/decimal/number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Number
attr_reader :prefix, :suffix, :integer_format, :fraction_format, :symbols

DEFAULT_SYMBOLS = { group: ",", decimal: ".", plus_sign: "+", minus_sign: "-" }.freeze
FORMAT_PATTERN = /([^0#,\.]*)([0#,\.]+)([^0#,\.]*)$/
FORMAT_PATTERN = /([^0#,.]*)([0#,.]+)([^0#,.]*)$/

def initialize(format, symbols = {})
@symbols = DEFAULT_SYMBOLS.merge(symbols)
Expand Down
Loading