mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
remove unnecessary self.ordflag
This commit is contained in:
@@ -59,20 +59,19 @@ class Num2Word_DE(Num2Word_EU):
|
|||||||
"nen": "nens",
|
"nen": "nens",
|
||||||
"rde": "rdes",
|
"rde": "rdes",
|
||||||
"rden": "rdens"}
|
"rden": "rdens"}
|
||||||
self.ordflag = False
|
|
||||||
|
|
||||||
def merge(self, curr, next):
|
def merge(self, curr, next):
|
||||||
ctext, cnum, ntext, nnum = curr + next
|
ctext, cnum, ntext, nnum = curr + next
|
||||||
|
|
||||||
if cnum == 1:
|
if cnum == 1:
|
||||||
if nnum < 10**6 or self.ordflag:
|
if nnum < 10**6:
|
||||||
return next
|
return next
|
||||||
ctext = "eine"
|
ctext = "eine"
|
||||||
|
|
||||||
if nnum > cnum:
|
if nnum > cnum:
|
||||||
if nnum >= 10**6:
|
if nnum >= 10**6:
|
||||||
if cnum > 1:
|
if cnum > 1:
|
||||||
if ntext.endswith("e") or self.ordflag:
|
if ntext.endswith("e"):
|
||||||
ntext += "n"
|
ntext += "n"
|
||||||
else:
|
else:
|
||||||
ntext += "en"
|
ntext += "en"
|
||||||
|
|||||||
Reference in New Issue
Block a user