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

bugfix_french_converter #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benazika
Copy link

bugfix for french convertion:
deux cents euros
deux cent mille euros, cent ne prends pas de "s"
Added convertion process for Millions.

bugfix for french convertion:
deux cents euros
deux cent mille euros, cent ne prends pas de "s"
Copy link
Collaborator

@MaciejLipinski MaciejLipinski left a 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;
Copy link
Collaborator

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"
Copy link
Collaborator

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

@MaciejLipinski MaciejLipinski linked an issue Nov 12, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect French translation for hundreds of thousands
2 participants