mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Fix typo 'seperator' on source code
This commit is contained in:
@@ -263,14 +263,14 @@ class Num2Word_Base(object):
|
||||
def _cents_terse(self, number, currency):
|
||||
return "%02d" % number
|
||||
|
||||
def to_currency(self, val, currency='EUR', cents=True, seperator=',',
|
||||
def to_currency(self, val, currency='EUR', cents=True, separator=',',
|
||||
adjective=False):
|
||||
"""
|
||||
Args:
|
||||
val: Numeric value
|
||||
currency (str): Currency code
|
||||
cents (bool): Verbose cents
|
||||
seperator (str): Cent seperator
|
||||
separator (str): Cent separator
|
||||
adjective (bool): Prefix currency name with adjective
|
||||
Returns:
|
||||
str: Formatted string
|
||||
@@ -297,7 +297,7 @@ class Num2Word_Base(object):
|
||||
minus_str,
|
||||
self.to_cardinal(left),
|
||||
self.pluralize(left, cr1),
|
||||
seperator,
|
||||
separator,
|
||||
cents_str,
|
||||
self.pluralize(right, cr2)
|
||||
)
|
||||
|
||||
@@ -168,10 +168,10 @@ class Num2Word_ES(Num2Word_EU):
|
||||
self.verify_ordinal(value)
|
||||
return "%s%s" % (value, "º" if self.gender_stem == 'o' else "ª")
|
||||
|
||||
def to_currency(self, val, currency='EUR', cents=True, seperator=' con',
|
||||
def to_currency(self, val, currency='EUR', cents=True, separator=' con',
|
||||
adjective=False):
|
||||
result = super(Num2Word_ES, self).to_currency(
|
||||
val, currency=currency, cents=cents, seperator=seperator,
|
||||
val, currency=currency, cents=cents, separator=separator,
|
||||
adjective=adjective)
|
||||
# Handle exception, in spanish is "un euro" and not "uno euro"
|
||||
return result.replace("uno", "un")
|
||||
|
||||
@@ -682,10 +682,10 @@ class Num2Word_FI(lang_EU.Num2Word_EU):
|
||||
suffix = suffix or " ennen ajanlaskun alkua"
|
||||
return self.to_cardinal(val).replace(" ", "") + suffix
|
||||
|
||||
def to_currency(self, val, currency="EUR", cents=True, seperator=" ja",
|
||||
def to_currency(self, val, currency="EUR", cents=True, separator=" ja",
|
||||
adjective=False):
|
||||
return super(Num2Word_FI, self).to_currency(
|
||||
val, currency=currency, cents=cents, seperator=seperator,
|
||||
val, currency=currency, cents=cents, separator=separator,
|
||||
adjective=adjective)
|
||||
|
||||
def splitnum(self, value, options):
|
||||
|
||||
@@ -131,7 +131,7 @@ def n2w(n):
|
||||
return int2word(int(n))
|
||||
|
||||
|
||||
def to_currency(n, currency='EUR', cents=True, seperator=','):
|
||||
def to_currency(n, currency='EUR', cents=True, separator=','):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ class Num2Word_JA(Num2Word_Base):
|
||||
|
||||
return fmt % (era_name, era_year_words)
|
||||
|
||||
def to_currency(self, val, currency="JPY", cents=False, seperator="",
|
||||
def to_currency(self, val, currency="JPY", cents=False, separator="",
|
||||
adjective=False, reading=False, prefer=None):
|
||||
left, right, is_negative = parse_currency_parts(
|
||||
val, is_int_with_cents=cents)
|
||||
|
||||
@@ -123,7 +123,7 @@ class Num2Word_KO(Num2Word_Base):
|
||||
return ("%s년" % valtext if not suffix
|
||||
else "%s %s년" % (suffix, valtext))
|
||||
|
||||
def to_currency(self, val, currency="KRW", cents=False, seperator="",
|
||||
def to_currency(self, val, currency="KRW", cents=False, separator="",
|
||||
adjective=False):
|
||||
left, right, is_negative = parse_currency_parts(
|
||||
val, is_int_with_cents=cents)
|
||||
|
||||
@@ -215,13 +215,13 @@ class Num2Word_PT(Num2Word_EU):
|
||||
return self.to_cardinal(abs(val)) + ' antes de Cristo'
|
||||
return self.to_cardinal(val)
|
||||
|
||||
def to_currency(self, val, currency='EUR', cents=True, seperator=' e',
|
||||
def to_currency(self, val, currency='EUR', cents=True, separator=' e',
|
||||
adjective=False):
|
||||
# change negword because base.to_currency() does not need space after
|
||||
backup_negword = self.negword
|
||||
self.negword = self.negword[:-1]
|
||||
result = super(Num2Word_PT, self).to_currency(
|
||||
val, currency=currency, cents=cents, seperator=seperator,
|
||||
val, currency=currency, cents=cents, separator=separator,
|
||||
adjective=adjective)
|
||||
# undo the change on negword
|
||||
self.negword = backup_negword
|
||||
|
||||
@@ -173,14 +173,14 @@ class Num2Word_SR(Num2Word_Base):
|
||||
|
||||
return ' '.join(words)
|
||||
|
||||
def to_currency(self, val, currency='EUR', cents=True, seperator=',',
|
||||
def to_currency(self, val, currency='EUR', cents=True, separator=',',
|
||||
adjective=False):
|
||||
"""
|
||||
Args:
|
||||
val: Numeric value
|
||||
currency (str): Currency code
|
||||
cents (bool): Verbose cents
|
||||
seperator (str): Cent seperator
|
||||
separator (str): Cent separator
|
||||
adjective (bool): Prefix currency name with adjective
|
||||
Returns:
|
||||
str: Formatted string
|
||||
@@ -210,7 +210,7 @@ class Num2Word_SR(Num2Word_Base):
|
||||
minus_str,
|
||||
self.to_cardinal(left, feminine=cr1[-1]),
|
||||
self.pluralize(left, cr1),
|
||||
seperator,
|
||||
separator,
|
||||
cents_str,
|
||||
self.pluralize(right, cr2)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user