Added map for 3406: Use of translation context on plugins/quickview/FilterByName.py
svn: r13729
This commit is contained in:
parent
b1744c0ee1
commit
6e8f40e9f2
@ -37,14 +37,24 @@ import posixpath
|
|||||||
from TransUtils import sgettext as _
|
from TransUtils import sgettext as _
|
||||||
from gettext import ngettext
|
from gettext import ngettext
|
||||||
|
|
||||||
# force translation
|
fname_map = {'all people': _('Filtering_on|all people'),
|
||||||
[_('Filtering_on|all people'), _('Filtering_on|males'), _('Filtering_on|females'),
|
'males': _('Filtering_on|males'),
|
||||||
_('Filtering_on|people with unknown gender'), _('Filtering_on|people with incomplete names'),
|
'females': _('Filtering_on|females'),
|
||||||
_('Filtering_on|people with missing birth dates'), _('Filtering_on|disconnected people'),
|
'people with unknown gender':
|
||||||
_('Filtering_on|all families'), _('Filtering_on|unique surnames'),
|
_('Filtering_on|people with unknown gender'),
|
||||||
_('Filtering_on|people with media'), _('Filtering_on|media references'),
|
'people with incomplete names':
|
||||||
_('Filtering_on|unique media'), _('Filtering_on|missing media'),
|
_('Filtering_on|people with incomplete names'),
|
||||||
_('Filtering_on|media by size'), _('Filtering_on|list of people')]
|
'people with missing birth dates':
|
||||||
|
_('Filtering_on|people with missing birth dates'),
|
||||||
|
'disconnected people': _('Filtering_on|disconnected people'),
|
||||||
|
'all families': _('Filtering_on|all families'),
|
||||||
|
'unique surnames': _('Filtering_on|unique surnames'),
|
||||||
|
'people with media': _('Filtering_on|people with media'),
|
||||||
|
'media references': _('Filtering_on|media references'),
|
||||||
|
'unique media': _('Filtering_on|unique media'),
|
||||||
|
'missing media': _('Filtering_on|missing media'),
|
||||||
|
'media by size': _('Filtering_on|media by size'),
|
||||||
|
'list of people': _('Filtering_on|list of people')}
|
||||||
|
|
||||||
def run(database, document, filter_name, *args, **kwargs):
|
def run(database, document, filter_name, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
@ -56,7 +66,10 @@ def run(database, document, filter_name, *args, **kwargs):
|
|||||||
sdoc = SimpleDoc(document)
|
sdoc = SimpleDoc(document)
|
||||||
stab = SimpleTable(sdb)
|
stab = SimpleTable(sdb)
|
||||||
# display the title
|
# display the title
|
||||||
sdoc.title(_("Filtering on %s") % _(filter_name)) # listed above
|
if filter_name in fname_map:
|
||||||
|
sdoc.title(_("Filtering on %s") % fname_map[filter_name]) # listed above
|
||||||
|
else:
|
||||||
|
sdoc.title(_("Filtering on %s") % _(filter_name))
|
||||||
sdoc.paragraph("")
|
sdoc.paragraph("")
|
||||||
matches = 0
|
matches = 0
|
||||||
if (filter_name == 'all people'):
|
if (filter_name == 'all people'):
|
||||||
|
Loading…
Reference in New Issue
Block a user