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 - spanish money converters #152

Merged
merged 4 commits into from
Apr 9, 2024
Merged

Conversation

jglaszka
Copy link
Collaborator

@jglaszka jglaszka commented Jan 5, 2024

Related to #149

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3f6438b) 98.70% compared to head (6e2bfc9) 98.70%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #152   +/-   ##
=========================================
  Coverage     98.70%   98.70%           
- Complexity      535      538    +3     
=========================================
  Files            81       82    +1     
  Lines          2157     2167   +10     
  Branches         83       84    +1     
=========================================
+ Hits           2129     2139   +10     
  Misses           14       14           
  Partials         14       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +27 to +32
// bugfix - ugly hack for ending with "1" :( numerals + nouns needs to have specific gender form
// for example "51 euros" - it is needed to use "cincuenta y un" instead of "cincuenta y uno"
// converter itself does not have context if it is formatting for "standalone" form or with noun
if (words.endsWith("uno")) {
words = words.replaceAll("uno$","un");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option is to create a separate IntegerToStringConverter just for spanish bankingMoney conversion

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the other hand, there's plenty of replaceAll usages in this project so that wouldn't be an excpetion

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go with first proposition but it's up to you - second one is not that ugly in the end.

@joordonezoArago
Copy link

Hello, when is this correction coming out? Thank you for your response.

@jglaszka
Copy link
Collaborator Author

jglaszka commented Apr 9, 2024

Hello, when is this correction coming out? Thank you for your response.

I will take a look today.

@jglaszka jglaszka merged commit 32c13f7 into master Apr 9, 2024
5 checks passed
@jglaszka jglaszka deleted the bugfix/spanish-money-converters branch April 9, 2024 12:18
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.

3 participants