mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
translation hint stripping
This commit is contained in:
parent
ee691cc608
commit
7a0f18d2c7
1 changed files with 5 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import os, sys
|
||||
import os, sys, re
|
||||
import gettext
|
||||
import threading
|
||||
|
||||
|
@ -93,5 +93,9 @@ def getLang():
|
|||
else:
|
||||
return currentLang
|
||||
|
||||
def noHint(str):
|
||||
"Remove translation hint from end of string."
|
||||
return re.sub("(^.*?)( ?\(.+?\))?$", "\\1", str)
|
||||
|
||||
if not currentTranslation:
|
||||
setLang("en_US", local=False)
|
||||
|
|
Loading…
Reference in a new issue