Skip to content

Commit

Permalink
Merge pull request #5690 from solidusio/backport/v4.3/pr-5683
Browse files Browse the repository at this point in the history
[v4.3] Fix JS locale data for release of Money 6.19
  • Loading branch information
spaghetticode authored Mar 11, 2024
2 parents 770e2ce + a6424f0 commit e47d9ce
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 e47d9ce

Please sign in to comment.