Skip to content

Commit

Permalink
Merge pull request #5977 from solidusio/backport/v4.2/pr-5683
Browse files Browse the repository at this point in the history
[v4.2] Fix JS locale data for release of Money 6.19
  • Loading branch information
tvdeyen authored Dec 2, 2024
2 parents d896b5a + 31704bb commit cc645f9
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 cc645f9

Please sign in to comment.