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 the issue where japanese formatting is no longer possible. #1067

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

masoo
Copy link
Contributor

@masoo masoo commented Jan 19, 2024

I am using the money gem in a Japanese locale, but there seems to be an issue with the Money#format method, as indicated in the following link:

https://github.com/RubyMoney/money/blob/main/lib/money/money.rb#L627

I would like to make various changes as follows:

irb(main):001:0> Money.new(1000, "JPY").format(format: "%u %n foo bar")
=> "¥ 1,000 foo bar"

However, in reality, the format does not change:

irb(main):001:0> Money.new(1000, "JPY").format(format: "%u %n foo bar")
=> "1,000円"

Removing localize_formatting_rules Formatting would be the correct fix, but it has been rejected. I am waiting for the 7.0 release, but I cannot wait until then.

#650
#101

Without removing localize_formatting_rulesFormatting, I have made adjustments so that the format is applied correctly.

@masoo masoo changed the title Fix the issue where formatting is no longer possible. Fix the issue where japanese formatting is no longer possible. Jan 19, 2024
@semmons99 semmons99 merged commit 2ef600a into RubyMoney:main Mar 13, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants