mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
add ngettext to ankiqt namespace
This commit is contained in:
parent
1567de9469
commit
6c758babe0
1 changed files with 4 additions and 0 deletions
|
@ -1562,9 +1562,13 @@ it to your friends.
|
||||||
def getTranslation(self, text):
|
def getTranslation(self, text):
|
||||||
return self.languageTrans.ugettext(text)
|
return self.languageTrans.ugettext(text)
|
||||||
|
|
||||||
|
def getTranslation2(self, text1, text2, n):
|
||||||
|
return self.languageTrans.ngettext(text1, text2, n)
|
||||||
|
|
||||||
def installTranslation(self):
|
def installTranslation(self):
|
||||||
import __builtin__
|
import __builtin__
|
||||||
__builtin__.__dict__['_'] = self.getTranslation
|
__builtin__.__dict__['_'] = self.getTranslation
|
||||||
|
__builtin__.__dict__['ngettext'] = self.getTranslation2
|
||||||
|
|
||||||
# Syncing
|
# Syncing
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in a new issue