remove unnecessary self.ordflag

This commit is contained in:
isnani
2015-12-14 08:40:32 +01:00
parent 41a97d6931
commit 9d99647e17

View File

@@ -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"