translation hint stripping

This commit is contained in:
Damien Elmes 2012-05-28 17:17:57 +09:00
parent ee691cc608
commit 7a0f18d2c7

View file

@ -2,7 +2,7 @@
# Copyright: Damien Elmes <anki@ichi2.net> # Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import os, sys import os, sys, re
import gettext import gettext
import threading import threading
@ -93,5 +93,9 @@ def getLang():
else: else:
return currentLang return currentLang
def noHint(str):
"Remove translation hint from end of string."
return re.sub("(^.*?)( ?\(.+?\))?$", "\\1", str)
if not currentTranslation: if not currentTranslation:
setLang("en_US", local=False) setLang("en_US", local=False)