Skip to content

Commit

Permalink
feat: add support for Bulgarian Lev (BGN) and Croatian Kuna (HRK) cur…
Browse files Browse the repository at this point in the history
…rency
  • Loading branch information
tmchow committed Jan 21, 2024
1 parent 40fe2a3 commit 4ff84cd
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 27 deletions.
22 changes: 22 additions & 0 deletions lib/currency-locales/locales/bg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bg:
number:
format:
precision: 2
separator: ","
delimiter: " "

currency:
format:
unit: 'лв'
precision: 2
format: '%n%u'
separator: ","
delimiter: " "

percentage:
format:
delimiter: " "

precision:
format:
delimiter: " "
22 changes: 22 additions & 0 deletions lib/currency-locales/locales/hr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
hr:
number:
format:
precision: 2
separator: ","
delimiter: "."

currency:
format:
unit: 'kn'
precision: 2
format: '%n %u'
separator: ","
delimiter: "."

percentage:
format:
delimiter: "."

precision:
format:
delimiter: "."
26 changes: 0 additions & 26 deletions lib/currency-locales/locales/ngn.yml

This file was deleted.

3 changes: 2 additions & 1 deletion spec/integration/currency_locales_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def number_with_precision(number)

locales = {
'ae' => ['AED 9.99', 'AED 9,999.99', '9.99', '9,999.99'],
'bg' => ['9,99лв', '9 999,99лв', '9,99', '9 999,99'],
'cs' => ['9,99Kč', '9999,99Kč', '9,99', '9999,99'],
'da' => ['9,99kr', '9.999,99kr', '9,99', '9.999,99'],
'en-AU' => ['$9.99', '$9,999.99', '9.99', '9,999.99'],
Expand All @@ -44,12 +45,12 @@ def number_with_precision(number)
'es-MX' => ['$9.99', '$9,999.99', '9.99', '9,999.99'],
'eu' => ['€9.99', '€9,999.99', '9.99', '9,999.99'],
'gsw-CH' => ['CHF9.99', 'CHF9,999.99', '9.99', '9,999.99'],
'hr' => ['9,99 kn', '9.999,99 kn', '9,99', '9.999,99'],
'hu' => ['10Ft', '10000Ft', '9,99', '9999,99'],
'il' => ['₪9.99', '₪9,999.99', '9.99', '9,999.99'],
'ja' => ['¥10', '¥10,000', '9.99', '9,999.99'],
'ms-MY' => ['RM9.99', 'RM9,999.99', '9.99', '9,999.99'],
'nb' => ['9,99 kr', '9999,99 kr', '9,99', '9999,99'],
'ngn' => ['₦9.99', '₦9,999.99', '9.99', '9,999.99'],
'pl' => ['9,99 zł', '9999,99 zł', '9,99', '9999,99'],
'pt-BR' => ['R$9,99', 'R$9.999,99', '9,99', '9.999,99'],
'ro' => ['9,99 RON', '9.999,99 RON', '9,99', '9.999,99'],
Expand Down

0 comments on commit 4ff84cd

Please sign in to comment.