-
Notifications
You must be signed in to change notification settings - Fork 92
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
bugfix_french_converter #49
base: master
Are you sure you want to change the base?
Conversation
bugfix for french convertion: deux cents euros deux cent mille euros, cent ne prends pas de "s"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thank you for the bug fix. Sorry for the delay in submitting the code review. Please see my comments.
private final Map<Integer, String> exceptions; | ||
private final Map<Integer, String> exceptions; | ||
|
||
private boolean baseNumbers = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this, this is not a good pattern. Add a private method private String asWords(Integer value, boolean isBaseNumber)
, move code from public String asWords(Integer value)
and call it from there with true
. Call it from getThousandsAsWords
with false
(currently line 57).
@@ -94,7 +94,7 @@ class FrenchValuesTest extends Specification { | |||
24_190 | "vingt-quatre mille cent quatre-vingt-dix" | |||
653_000 | "six cent cinquante-trois mille" | |||
123_454 | "cent vingt-trois mille quatre cent cinquante-quatre" | |||
700_000 | "sept cents mille" | |||
700_000 | "sept cent mille" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about sept cent millions
? should it be cent
or cents
? Now it's cents
bugfix for french convertion:
deux cents euros
deux cent mille euros, cent ne prends pas de "s"
Added convertion process for Millions.