mirror of
https://github.com/yweber/lodel2.git
synced 2026-07-30 01:23:26 +02:00
mlstring: delete an translation
This commit is contained in:
parent
50fb6fa1fd
commit
fbb6a39261
1 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,11 @@ class MlString(object):
|
|||
return self.translations[lang]
|
||||
|
||||
def set(self, lang, text):
|
||||
self.translations[lang] = text
|
||||
if not text:
|
||||
if lang in self.translations:
|
||||
del(self.translations[lang])
|
||||
else:
|
||||
self.translations[lang] = text
|
||||
|
||||
def __str__(self):
|
||||
if self.translations:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue