* various: Use TransUtils.sgettext instead of gettext.gettext to work out stripping the context.

svn: r6155
This commit is contained in:
Alex Roitman 2006-03-16 20:24:27 +00:00
parent 691dc6e757
commit 93add4967a
160 changed files with 183 additions and 184 deletions

View File

@ -1,4 +1,6 @@
2006-03-16 Alex Roitman <shura@gramps-project.org>
* various: Use TransUtils.sgettext instead of gettext.gettext to
work out stripping the context.
* py-compile: Remove as it is autogenerated.
* po/Makefile.in.in: Remove as it is autogenerated.
* po/*po: Remove and re-add from old src/po to keep history.

View File

@ -37,7 +37,7 @@ import os
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -33,7 +33,7 @@ Module responsible for handling the command line arguments for GRAMPS.
#-------------------------------------------------------------------------
import os
import getopt
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import os
#-------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@ __version__ = "$Revision$"
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
from cStringIO import StringIO
#-------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ import gtk.glade
import gc
import const
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -45,7 +45,7 @@ from Editors import EditEvent, DelEventQuery
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('Description'),

View File

@ -45,7 +45,7 @@ from QuestionDialog import QuestionDialog, ErrorDialog
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('ID'),

View File

@ -3,7 +3,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import gc
import re
import cgi

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import gc
import re
import logging

View File

@ -44,7 +44,7 @@ from QuestionDialog import QuestionDialog, ErrorDialog
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('Title'),

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
from cgi import escape
#-------------------------------------------------------------------------

View File

@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import cPickle as pickle
#-------------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ from QuestionDialog import QuestionDialog, ErrorDialog
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('Place Name'),

View File

@ -46,7 +46,7 @@ from QuestionDialog import QuestionDialog, ErrorDialog
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('Name'),

View File

@ -46,7 +46,7 @@ from QuestionDialog import QuestionDialog, ErrorDialog
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
column_names = [
_('Title'),

View File

@ -41,7 +41,7 @@ __version__ = "$Revision$"
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import gc
#-------------------------------------------------------------------------

View File

@ -33,7 +33,7 @@ __version__ = "$Revision$"
# python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
#
#-------------------------------------------------------------------------
import time
from gettext import gettext as _
from TransUtils import sgettext as _
import locale
import logging

View File

@ -34,7 +34,7 @@ from gtk.gdk import ACTION_COPY, BUTTON1_MASK
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import pickle
try:

View File

@ -30,7 +30,7 @@ mechanism for the user to edit address information.
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -33,7 +33,7 @@ __version__ = "$Revision$"
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
try:
set()

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
try:
set()

View File

@ -26,7 +26,7 @@
#
#-------------------------------------------------------------------------
import cPickle as pickle
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -38,7 +38,7 @@ import Utils
from _EditSecondary import EditSecondary
from GrampsWidgets import *
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import os
#-------------------------------------------------------------------------

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -27,7 +27,7 @@
#-------------------------------------------------------------------------
import os
import locale
from gettext import gettext as _
from TransUtils import sgettext as _
from cgi import escape
#-------------------------------------------------------------------------

View File

@ -26,7 +26,7 @@
#
#-------------------------------------------------------------------------
import cPickle as pickle
from gettext import gettext as _
from TransUtils import sgettext as _
import logging
log = logging.getLogger(".")

View File

@ -20,7 +20,7 @@
# $Id$
from gettext import gettext as _
from TransUtils import sgettext as _
import DisplayState
import DateHandler

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
try:
set()

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -20,7 +20,7 @@
# $Id$
from gettext import gettext as _
from TransUtils import sgettext as _
import DisplayState
import Config

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import logging
log = logging.getLogger(".")

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
try:
set()

View File

@ -25,7 +25,7 @@
# python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
from cgi import escape
#-------------------------------------------------------------------------

View File

@ -28,7 +28,7 @@
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -38,7 +38,7 @@ from xml.sax import make_parser,handler,SAXParseException
#-------------------------------------------------------------------------
import os
import sets
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#
@ -64,7 +64,6 @@ import const
import RelLib
import DateHandler
import NameDisplay
from TransUtils import strip_context as __
from Utils import for_each_ancestor,probably_alive,get_source_referents
#-------------------------------------------------------------------------
@ -1303,7 +1302,7 @@ class HasNameOf(Rule):
labels = [ _('Given name:'),
_('Family name:'),
_('Suffix:'),
__('person|Title:')]
_('person|Title:')]
name = _('People with the <name>')
description = _("Matches people with a specified (partial) name")
category = _('General filters')

View File

@ -27,7 +27,7 @@
#-------------------------------------------------------------------------
import os
import sets
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -34,7 +34,7 @@ import os
import time
import locale
import sets
from gettext import gettext as _
from TransUtils import sgettext as _
from bsddb import dbshelve, db
import logging
log = logging.getLogger(".GrampsDb")
@ -120,7 +120,7 @@ class GrampsBSDDB(GrampsDbBase):
"""GRAMPS database object. This object is a base class for other
objects."""
UseTXN = False
UseTXN = True
def __init__(self):
"""creates a new GrampsDB"""

View File

@ -37,7 +37,7 @@ import locale
import re
from sys import maxint
import sets
from gettext import gettext as _
from TransUtils import sgettext as _
import logging
log = logging.getLogger(".GrampsDb")

View File

@ -33,7 +33,7 @@ import string
import const
import time
from gettext import gettext as _
from TransUtils import sgettext as _
# and module sets for earlier pythons
try:

View File

@ -29,7 +29,7 @@
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
import sets
#-------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ import os
import sets
import shutil
from xml.parsers.expat import ExpatError, ParserCreate
from gettext import gettext as _
from TransUtils import sgettext as _
import re
#------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@ import os
import time
import re
import shutil
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -28,7 +28,7 @@
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -34,7 +34,7 @@ import time
import shutil
import os
import codecs
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -1,4 +1,4 @@
from gettext import gettext as _
from TransUtils import sgettext as _
import sys,os
import const

View File

@ -1,4 +1,4 @@
from gettext import gettext as _
from TransUtils import sgettext as _
import gtk

View File

@ -23,7 +23,7 @@
import cgi
import locale
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import sets
#-------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@ except:
from gnome.vfs import mime_get_short_list_applications, \
mime_get_description, get_mime_type
from gettext import gettext as _
from TransUtils import sgettext as _
def get_application(type):
"""Returns the application command and application name of the

View File

@ -21,7 +21,7 @@
import mimetypes
import const
import gtk
from gettext import gettext as _
from TransUtils import sgettext as _
_type_map = {
'application/x-gramps' : 'GRAMPS database',

View File

@ -29,7 +29,7 @@ sys.path.append("ObjectSelector")
import os.path
import gtk
import gobject
from gettext import gettext as _
from TransUtils import sgettext as _
import _Factories
from _Constants import ObjectTypes

View File

@ -22,7 +22,7 @@
import gtk
import gobject
from gettext import gettext as _
from TransUtils import sgettext as _
from logging import getLogger
log = getLogger(".ObjectSelector")

View File

@ -20,7 +20,7 @@
# $Id$
from gettext import gettext as _
from TransUtils import sgettext as _
import gtk
import gobject

View File

@ -93,7 +93,7 @@ At runtime Object selector is constructed from these widgets in the following st
-------------------------------------------------------------------------------
"""
from gettext import gettext as _
from TransUtils import sgettext as _
from _ObjectSelectorWindow import ObjectSelectorWindow
from _Constants import ObjectTypes

View File

@ -25,7 +25,7 @@
# python
#
#----------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#----------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import time
import cgi
import sys

View File

@ -31,7 +31,7 @@ General option handling, including saving and parsing.
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -36,7 +36,7 @@ importers, exporters, and document generators.
import os
import sys
import re
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -46,7 +46,7 @@ import traceback
import os
import sys
import re
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -32,7 +32,7 @@ __version__ = "$Revision$"
#
#-------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
from types import ClassType, InstanceType
import logging

View File

@ -30,7 +30,7 @@ Report option handling, including saving and parsing.
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -32,7 +32,7 @@ A collection of utilities to aid in the generation of reports.
#-------------------------------------------------------------------------
import time
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -32,7 +32,7 @@ __version__ = "$Revision$"
# Python modules
#
#------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import logging
log = logging.getLogger(".")

View File

@ -31,7 +31,7 @@ __version__ = "$Revision$"
#
#-------------------------------------------------------------------------
from types import ClassType, InstanceType
from gettext import gettext as _
from TransUtils import sgettext as _
import logging
log = logging.getLogger(".")

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -39,7 +39,7 @@ from QuestionDialog import ErrorDialog, WarningDialog
#
#-------------------------------------------------------------------------
import const
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
__author__ = "Donald N. Allingham"
__version__ = "$Revision$"
from gettext import gettext as _
from TransUtils import sgettext as _
from _CalSdn import *
#-------------------------------------------------------------------------

View File

@ -28,8 +28,7 @@
import RelLib
import types
from gettext import gettext as _
from TransUtils import strip_context as __
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#
@ -279,28 +278,28 @@ class RelationshipCalculator:
elif gender == RelLib.Person.FEMALE:
return _("wife")
else:
return __("gender unknown|spouse")
return _("gender unknown|spouse")
elif family_rel == RelLib.Family.UNMARRIED:
if gender == RelLib.Person.MALE:
return __("unmarried|husband")
return _("unmarried|husband")
elif gender == RelLib.Person.FEMALE:
return __("unmarried|wife")
return _("unmarried|wife")
else:
return __("gender unknown,unmarried|spouse")
return _("gender unknown,unmarried|spouse")
elif family_rel == RelLib.Family.CIVIL_UNION:
if gender == RelLib.Person.MALE:
return __("male,civil union|partner")
return _("male,civil union|partner")
elif gender == RelLib.Person.FEMALE:
return __("female,civil union|partner")
return _("female,civil union|partner")
else:
return __("gender unknown,civil union|partner")
return _("gender unknown,civil union|partner")
else:
if gender == RelLib.Person.MALE:
return __("male,unknown relation|partner")
return _("male,unknown relation|partner")
elif gender == RelLib.Person.FEMALE:
return __("female,unknown relation|partner")
return _("female,unknown relation|partner")
else:
return __("gender unknown,unknown relation|partner")
return _("gender unknown,unknown relation|partner")
else:
return None
return None

View File

@ -28,7 +28,7 @@
import cPickle as pickle
import os
from xml.sax.saxutils import escape
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -37,7 +37,7 @@ import gc
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
import gc
#-------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ present, we default to no spell checking.
import Config
from gettext import gettext as _
from TransUtils import sgettext as _
#-----------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -27,7 +27,7 @@
#-------------------------------------------------------------------------
from xml.parsers.expat import ParserCreate
from random import Random
from gettext import gettext as _
from TransUtils import sgettext as _
import os
#-------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2005 Donald N. Allingham
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,9 +18,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
from gettext import gettext as _
# $Id$
def strip_context(msgid,sep='|'):
from gettext import gettext
def sgettext(msgid,sep='|'):
"""
Strip the context used for resolving translation ambiguities.
@ -37,8 +39,8 @@ def strip_context(msgid,sep='|'):
@rtype: unicode
"""
msgval = _(msgid)
sep_idx = msgid.rfind(sep)
if msgval == msgid and sep_idx != -1:
msgval = gettext(msgid)
if msgval == msgid:
sep_idx = msgid.rfind(sep)
msgval = msgid[sep_idx+1:]
return msgval

View File

@ -1,5 +1,5 @@
from gettext import gettext as _
from TransUtils import sgettext as _
import cgi
import gtk

View File

@ -29,7 +29,7 @@ import os
import sys
import locale
import sets
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
from bsddb import db
import os
from cStringIO import StringIO

View File

@ -31,7 +31,7 @@ Provides a BaseDoc based interface to the AbiWord document format.
#-------------------------------------------------------------------------
import base64
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -26,7 +26,7 @@
#
#------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -28,7 +28,7 @@
import os
import re
import time
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -29,7 +29,7 @@ import time
import cStringIO
import gzip
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -34,7 +34,7 @@
#
#------------------------------------------------------------------------
from string import punctuation
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -33,7 +33,7 @@
# python modules
#
#------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -53,7 +53,7 @@ import Mime
# internationalization
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
from xml.sax.saxutils import escape
_apptype = 'application/vnd.oasis.opendocument.text'

View File

@ -31,7 +31,7 @@ import time
import locale
from cStringIO import StringIO
from math import pi, cos, sin, fabs
from gettext import gettext as _
from TransUtils import sgettext as _
from xml.sax.saxutils import escape
#-------------------------------------------------------------------------

View File

@ -28,7 +28,7 @@
import os
import tempfile
import zipfile
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -26,7 +26,7 @@
#
#-------------------------------------------------------------------------
from math import pi, cos, sin
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,7 @@
# Python modules
#
#------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -26,7 +26,7 @@
#
#------------------------------------------------------------------------
import os
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

View File

@ -26,7 +26,7 @@
#
#-------------------------------------------------------------------------
from math import pi, cos, sin, fabs
from gettext import gettext as _
from TransUtils import sgettext as _
#-------------------------------------------------------------------------
#

View File

@ -27,7 +27,7 @@
# python modules
#
#------------------------------------------------------------------------
from gettext import gettext as _
from TransUtils import sgettext as _
#------------------------------------------------------------------------
#

Some files were not shown because too many files have changed in this diff Show More