Skip to content

Commit

Permalink
Merge pull request solidusio#5683 from mamhoff/fix-money-6.19
Browse files Browse the repository at this point in the history
Fix JS locale data for release of Money 6.19
  • Loading branch information
spaghetticode authored Mar 7, 2024
2 parents d5dd8b6 + f19e6fc commit 885a453
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Spree.formatMoney = function(amount, currency) {
var thousand = Spree.t('currency_delimiter');
var decimal = Spree.t('currency_separator');

return accounting.formatMoney(amount, currencyInfo[0], currencyInfo[1], thousand, decimal, currencyInfo[2]);
return accounting.formatMoney(amount, currencyInfo[0], currencyInfo[1], thousand, decimal, currencyInfo[2]).trim();
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
JSON.dump(
Spree::Config.available_currencies.map { |c|
format =
if c.symbol == "" || c.symbol_first
if c.format.present?
c.format.gsub("%u", "%s").gsub("%n", "%v")
elsif c.symbol == "" || c.symbol_first
"%s%v"
else
"%v %s"
end

[c.id.to_s.upcase, [
c.symbol || "¤",
c.exponent,
Expand Down

0 comments on commit 885a453

Please sign in to comment.