Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #6252 ([mobile UX] Eur symbol displayed below the price of the item) #6383

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Darkswarm.filter "localizeCurrency", (currencyConfig)->
# Set decimal points, 2 or 0 if hide_cents.
decimals = if currencyConfig.hide_cents == "true" then 0 else 2
# Set format if the currency symbol should come after the number, otherwise (default) use the locale setting.
format = if currencyConfig.symbol_position == "after" then "%n %u" else undefined
format = if currencyConfig.symbol_position == "after" then "%n%u" else undefined
andrewpbrett marked this conversation as resolved.
Show resolved Hide resolved
andrewpbrett marked this conversation as resolved.
Show resolved Hide resolved
# We need to use parseFloat as the amount should come in as a string.
amount = parseFloat(amount)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe 'convert number to localised currency ', ->

it "can place symbols after the amount", ->
currencyconfig.symbol_position = "after"
expect(filter(333.3)).toEqual "333.30 $"
expect(filter(333.3)).toEqual "333.30$"

it "can add a currency string", ->
currencyconfig.display_currency = "true"
Expand Down