-
Notifications
You must be signed in to change notification settings - Fork 966
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
Changed the NumberToWords Converter to find the right converter by the language Name as well #174
Conversation
…e language Name aswell. This is needed for languages that can be ambiguous in Two Letter ISO Code (pt-BR, pt-PT both have 'pt' Two Letter ISO code).
I changed the Converter code to first look for the RFC 1766 standard name, as described here, and then to look for the Two Letter ISO Name. I added a test and a dummy class for Brazilian Portuguese just to show it can get the factory for both cases. |
Please rebase your work on top of upstream. Your fork is a few commits behind. |
[Fact] | ||
public void CanGetRFCStandardLanguageSpecificFactory() | ||
{ | ||
|
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 redundant spaces.
…e language Name aswell. This is needed for languages that can be ambiguous in Two Letter ISO Code (pt-BR, pt-PT both have 'pt' Two Letter ISO code).
…factories. Better NumerToWordsFactoryTests formatting.
…om/akamud/Humanizer into feature/to-words-converter-by-name Conflicts: release_notes.md src/Humanizer.Tests/Localisation/NumerToWordsFactoryTests.cs
Please check if everything is correct now |
{ | ||
public override string Convert(int number) | ||
{ | ||
return "not implemented"; |
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.
This will upset Brazilian users I believe. We need to implement this first.
I rebased your work and tidied up a few things and pushed up to 183. We need to implement the Brazilian converter or we'll upset a few users. Please pull that branch down, implement the converter and push to a new PR. Closing this now. |
I'm finishing the pt-BR implementation. Will push when I'm done. |
Fix suggested by @kappy in Issue #168
This is needed for languages that can be ambiguous in Two Letter ISO Code (pt-BR, pt-PT both have 'pt' Two Letter ISO code).