Skip to content

WIP - Number to words localisation improvements#149

Merged
MehdiK merged 7 commits into
Humanizr:masterfrom
hazzik:number-to-words-localisation
Apr 10, 2014
Merged

WIP - Number to words localisation improvements#149
MehdiK merged 7 commits into
Humanizr:masterfrom
hazzik:number-to-words-localisation

Conversation

@hazzik

@hazzik hazzik commented Apr 9, 2014

Copy link
Copy Markdown
Contributor

I'm trying to improve experience and encourage users to localise ToWords/ToOrdinalWords extension methods.

I've introduced INumberToWordsConverter:

public interface INumberToWordsConverter
{
    string Convert(int number);
    string ConvertToOrdinal(int number);
}

Also I want to clarify how shall behave untranslated converter? Shall it throw NotSupportedException or just return number.ToString()?

@hazzik

hazzik commented Apr 9, 2014

Copy link
Copy Markdown
Contributor Author

Related to #132

@thunsaker

Copy link
Copy Markdown
Contributor

RE: Unsupported languages - Throwing an error would just upset people using it, at least the number would still have usable code.

@hazzik

hazzik commented Apr 9, 2014

Copy link
Copy Markdown
Contributor Author

Yep, I do not like exceptions here as well

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome. I think we'll need to structure the Localisation folder a bit better; but good for now.

@MehdiK MehdiK merged commit 6e60aa3 into Humanizr:master Apr 10, 2014
@MehdiK

MehdiK commented Apr 10, 2014

Copy link
Copy Markdown
Collaborator

Thanks for the great work @hazzik. I think #132 should be fixed now! It's a shame we didn't have some failing tests for it; although admittedly we never tackled it directly.

@MehdiK

MehdiK commented Apr 10, 2014

Copy link
Copy Markdown
Collaborator

Thanks for your great contribution @hazzik. This is now released to NuGet as v1.19.1.

@hazzik hazzik deleted the number-to-words-localisation branch May 8, 2017 21:46
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