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

Create GrammaticalCase, GrammaticalGender and GrammaticalNumber as first class citizens #74

Closed
MehdiK opened this issue Feb 4, 2014 · 10 comments

Comments

@MehdiK
Copy link
Member

MehdiK commented Feb 4, 2014

As proposed by @hazzik in #15

@MehdiK
Copy link
Member Author

MehdiK commented Feb 4, 2014

@hazzik - could you please explain what you mean by this?

@hazzik
Copy link
Member

hazzik commented Feb 18, 2014

Sorry for long being quiet a long time. I'll try to explain.

The idea was to bring that grammatical categories to the library to simplify localisation, Internationalisation and globalisation easier to languages with that categories.

As first example we could make a common mechanism to identify grammatical number category, and based on this rule select a correct resource key.

For English: 1 => singular; 2 => dual; 3 => plural, etc
For Russian: 1 => singular; 2,3,4=>paucal; 5 => plural.

Later I plan to implement localisation for Russian using that approach.

@mexx
Copy link
Collaborator

mexx commented Apr 10, 2014

From what I saw by now I think that GrammaticalNumber should be a local concept of each language specific formatter, as different languages do have different cases for it and it only depends on the number being formatted. So I would not introduce it as public concept of the API.

Even if the cases of GrammaticalCase and GrammaticalGender also differ from language to language, these concepts need to be public to control the output of ToWords and ToOrdinalWords as parameters to this methods.

@mexx
Copy link
Collaborator

mexx commented Apr 11, 2014

As mentioned in my previous comment I added GrammaticalCase and GrammaticalGender in #147.
GrammaticalGender is currently not used, but I'll be using it when implementing ToOrdinalWords in russian translation.

@thunsaker
Copy link
Contributor

Awesome! I'll be integrating these into my #188 Spanish ordinal translation as well.

@MehdiK
Copy link
Member Author

MehdiK commented Apr 12, 2014

I think it's safe to close this now that #147 is in. You agree guys?!

@mexx
Copy link
Collaborator

mexx commented Apr 12, 2014

👍 from me.

@MehdiK
Copy link
Member Author

MehdiK commented Apr 12, 2014

@mexx so how is the GrammaticalNumber going to fit into this (for ordinal localisations)?

@mexx
Copy link
Collaborator

mexx commented Apr 12, 2014

For ordinal localisations only case and gender is needed. Grammatical number is determined by the number being formatted.

@MehdiK
Copy link
Member Author

MehdiK commented Apr 12, 2014

Thanks for the response. Closing this. This was a burden I had NO idea about and I'm glad it's sorted. Thanks a lot.

@MehdiK MehdiK closed this as completed Apr 12, 2014
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

No branches or pull requests

4 participants