Changes

From Gramps

Third-party Addons

17 bytes added, 12:58, 14 November 2008
Information for Plugin writers: fixed translation hack
* Your translation function should then look like this:
from gettext import gettext
import locale
mytranslation = {
'Name' : "Nom"
}
from gettext import gettext
import locale
lang = locale.getlocale()[0]
if lang:
lang = lang.split('_')[0]
def _(string):
if lang == 'fr': return mytranslation.get(string, gettext(string)) else: return gettext(string)
Change here 'fr' by the language code of your language
* If the report becomes part of GRAMPS, it will suffice to delete this code and replace it by
from gettext import gettext as _
48
edits

Navigation menu