Fix some gettext warnings

svn: r20646
This commit is contained in:
Benny Malengier 2012-11-10 11:26:14 +00:00
parent 536d5f4f8b
commit b4ca613e21
5 changed files with 8 additions and 3 deletions

View File

@ -38,6 +38,7 @@ import sys
# Gramps Modules # Gramps Modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _
from gramps.gen.user import User from gramps.gen.user import User
#------------------------------------------------------------------------ #------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _
from . import Rule from . import Rule
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -35,6 +35,7 @@ LOG = logging.getLogger(".Db")
# Gramps Modules # Gramps Modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gramps.gen.ggettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -71,6 +71,8 @@ def _get_empty_endnote_numbers(obj):
""" """
return "" return ""
# avoid normal translation!
##from gramps.gen.ggettext import gettext as _
def _(message): return message def _(message): return message
#------------------------------------------------------------------------ #------------------------------------------------------------------------

View File

@ -23,7 +23,7 @@
""" Unittest for testing POTFILES.in and Makefile contents """ """ Unittest for testing POTFILES.in and Makefile contents """
# PYTHONPATH=/../src python po_test.py # PYTHONPATH=/../gramps python po_test.py
import unittest import unittest
import os import os
@ -168,8 +168,8 @@ def suite2():
continue continue
if glob.fnmatch.fnmatch(potfile,"*.py"): if glob.fnmatch.fnmatch(potfile,"*.py"):
suite.addTest(TestGetText('test_gettext_py_%04d', potfile, suite.addTest(TestGetText('test_gettext_py_%04d', potfile,
["import gettext", ["import gettext",
"from gen.ggettext", "from gramps.gen.ggettext",
"import sgettext"])) "import sgettext"]))
elif glob.fnmatch.fnmatch(potfile,"*.glade"): elif glob.fnmatch.fnmatch(potfile,"*.glade"):
suite.addTest(TestGetText('test_gettext_glade_%04d', potfile, suite.addTest(TestGetText('test_gettext_glade_%04d', potfile,