-
Notifications
You must be signed in to change notification settings - Fork 475
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
Add support for Serbian (Latin) #207
Conversation
6601e0b
to
d9c525b
Compare
Used the long scale name instead of the short one. Simplified the scale and the ones geneder definition.
Pull Request Test Coverage Report for Build 483
💛 - Coveralls |
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.
Could you refactor base into something like:
def _currency_units_verbose(self, number, currency):
return self.to_cardinal(number)
def _currency_fractions_verbose(self, number, currency):
return self.to_cardinal(number)
to_currency:
unit_str = self._currency_units_verbose(left, currency)
fraction_str = self._currency_fractions_verbose(right, currency) \
if cents else "%02d" % right
return u'%s%s %s%s %s %s' % (
minus_str,
unit_str,
self.pluralize(left, cr1),
seperator,
fraction_str,
self.pluralize(right, cr2)
)
So you don't have to overload whole thing?
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.
Thanks for taking the time to make this contribution!
Could you please also update the README.rst to include lang_SR?
Merge with original repository
Pull Request Test Coverage Report for Build 535
💛 - Coveralls |
Changes proposed in this pull request:
Add support for Serbian (Latin)
Adds support for local currency RSD, EUR and RUB
Status
How to verify this change
Just run the tests.
I included tests for RUB, EUR and RSD.
Tried to cover all the possible case combinations (in grammar sense) and plural form changes.
Additional notes
The ordinal numbers have not been implemented yet.