Add "Translator" tag to comments intended for translators

This commit is contained in:
Nick Hall 2021-06-01 14:02:38 +01:00
parent 7ef0cc3bff
commit 7c43a08952
4 changed files with 83 additions and 80 deletions

View File

@ -67,25 +67,27 @@ class DateDisplay:
formats = (
# format 0 - must always be ISO
# Translators: Numeric year, month, day
_T_("YYYY-MM-DD (ISO)"),
# format # 1 - must always be locale-preferred numerical format
# such as YY.MM.DD, MM-DD-YY, or whatever your locale prefers.
# This should be the format that is used under the locale by
# strftime() for '%x'.
# You may translate this as "Numerical", "System preferred", or similar.
# Translators: You may translate this as "Numerical",
# "System preferred", or similar.
_T_("Numerical", "date format"),
# Full month name, day, year
# Translators: Full month name, day, year
_T_("Month Day, Year"),
# Abbreviated month name, day, year
# Translators: Abbreviated month name, day, year
_T_("MON DAY, YEAR"),
# Day, full month name, year
# Translators: Day, full month name, year
_T_("Day Month Year"),
# Day, abbreviated month name, year
# Translators: Day, abbreviated month name, year
_T_("DAY MON YEAR")
)
"""
@ -182,67 +184,67 @@ class DateDisplay:
"from"
# first date in a span
# If "from <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "from <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "from"),
"to"
# second date in a span
# If "to <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "to <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "to"),
"between"
# first date in a range
# If "between <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "between <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "between"),
"and"
# second date in a range
# If "and <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "and <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "and"),
"before"
# If "before <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "before <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "before"),
"after"
# If "after <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "after <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "after"),
"about"
# If "about <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "about <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "about"),
"estimated"
# If "estimated <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "estimated <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "estimated"),
"calculated"
# If "calculated <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# Translators: If "calculated <Month>" needs a special inflection
# in your language, translate to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{long_month} {year}", "calculated"),
@ -254,67 +256,67 @@ class DateDisplay:
"from"
# first date in a span
# If "from <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "from <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "from"),
"to"
# second date in a span
# If "to <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "to <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "to"),
"between"
# first date in a range
# If "between <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "between <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "between"),
"and"
# second date in a range
# If "and <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "and <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "and"),
"before"
# If "before <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "before <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "before"),
"after"
# If "after <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "after <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "after"),
"about"
# If "about <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "about <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "about"),
"estimated"
# If "estimated <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "estimated <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "estimated"),
"calculated"
# If "calculated <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# Translators: If "calculated <Month>" needs a special inflection
# in your language, translate to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
# else leave it untranslated
: _("{short_month} {year}", "calculated"),
@ -421,14 +423,14 @@ class DateDisplay:
qual_str = self._qual_str[date.get_quality()]
scal = self.format_extras(cal, date.get_new_year())
d1 = self.display_cal[cal](date.get_start_date(),
# If there is no special inflection for "from <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "from" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "from <Month>" in your language, DON'T translate this.
# Otherwise, translate to "from" in ENGLISH!!! ENGLISH!!!
inflect=self._("", "from-date"))
d2 = self.display_cal[cal](date.get_stop_date(),
# If there is no special inflection for "to <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "to" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "to <Month>" in your language, DON'T translate this.
# Otherwise, translate to "to" in ENGLISH!!! ENGLISH!!!
inflect=self._("", "to-date"))
return self._("{date_quality}from {date_start} to {date_stop}"
"{nonstd_calendar_and_ny}").format(
@ -446,14 +448,14 @@ class DateDisplay:
qual_str = self._qual_str[date.get_quality()]
scal = self.format_extras(cal, date.get_new_year())
d1 = self.display_cal[cal](date.get_start_date(),
# If there is no special inflection for "between <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "between" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "between <Month>" in your language, DON'T translate this.
# Otherwise, translate to "between" in ENGLISH!!! ENGLISH!!!
inflect=self._("", "between-date"))
d2 = self.display_cal[cal](date.get_stop_date(),
# If there is no special inflection for "and <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "and" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "and <Month>" in your language, DON'T translate this.
# Otherwise, translate to "and" in ENGLISH!!! ENGLISH!!!
inflect=self._("", "and-date"))
return self._("{date_quality}between {date_start} and {date_stop}"
"{nonstd_calendar_and_ny}").format(
@ -485,29 +487,29 @@ class DateDisplay:
return self.dd_range(date)
else:
if mod == Date.MOD_BEFORE:
# If there is no special inflection for "before <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "before" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "before <Month>" in your language, DON'T translate this.
# Otherwise, translate to "before" in ENGLISH!!! ENGLISH!!!
date_type = _("", "before-date")
elif mod == Date.MOD_AFTER:
# If there is no special inflection for "after <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "after" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "after <Month>" in your language, DON'T translate this.
# Otherwise, translate to "after" in ENGLISH!!! ENGLISH!!!
date_type = _("", "after-date")
elif mod == Date.MOD_ABOUT:
# If there is no special inflection for "about <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "about" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "about <Month>" in your language, DON'T translate this.
# Otherwise, translate to "about" in ENGLISH!!! ENGLISH!!!
date_type = _("", "about-date")
elif qual == Date.QUAL_ESTIMATED:
# If there is no special inflection for "estimated <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "estimated" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "estimated <Month>" in your language, DON'T translate this.
# Otherwise, translate to "estimated" in ENGLISH!!! ENGLISH!!!
date_type = _("", "estimated-date")
elif qual == Date.QUAL_CALCULATED:
# If there is no special inflection for "calculated <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "calculated" in ENGLISH!!! ENGLISH!!!
# Translators: If there is no special inflection for
# "calculated <Month>" in your language, DON'T translate this.
# Otherwise, translate to "calculated" in ENGLISH!!! ENGLISH!!!
date_type = _("", "calculated-date")
else:
date_type = ""
@ -761,7 +763,8 @@ class DateDisplay:
# day month_abbreviation year
value = self.dd_dformat05(date_val, inflect, short_months)
if date_val[2] < 0:
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation for negative dates
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation
# for negative dates
return self._bce_str % value
else:
return value

View File

@ -487,7 +487,7 @@ class FamilyLinesReport(Report):
person = self._db.get_person_from_handle(handle)
gid = person.get_gramps_id()
name = person.get_primary_name().get_regular_name()
# Translators: needed for Arabic, ignore othewise
# Translators: needed for Arabic, ignore otherwise
id_n = self._("%(str1)s, %(str2)s") % {'str1':gid, 'str2':name}
self.doc.add_comment('# -> ' + id_n)

View File

@ -247,7 +247,7 @@ class IndivCompleteReport(Report):
self.doc.start_row()
self.write_cell(label)
if parent_name:
# for example (a stepfather): John Smith, relationship: Step
# Translators: e.g. (a stepfather): John Smith, relationship: Step
text = self._('%(parent-name)s, relationship: %(rel-type)s'
) % {'parent-name' : parent_name,
'rel-type' : self._(rel_type)}

View File

@ -57,31 +57,31 @@ def load_on_reg(dbstate, uistate, plugin):
# "default" is used as default
# default style sheet in the options
# Basic Ash style sheet
# Translators: Basic Ash style sheet
["Basic-Ash", 1, _("Basic-Ash"),
path_css('Web_Basic-Ash.css'), None, [], []],
# Basic Blue style sheet with navigation menus
# Translators: Basic Blue style sheet with navigation menus
["Basic-Blue", 1, _("Basic-Blue"),
path_css('Web_Basic-Blue.css'), None, [], []],
# Basic Cypress style sheet
# Translators: Basic Cypress style sheet
["Basic-Cypress", 1, _("Basic-Cypress"),
path_css('Web_Basic-Cypress.css'), None, [], []],
# basic Lilac style sheet
# Translators: Basic Lilac style sheet
["Basic-Lilac", 1, _("Basic-Lilac"),
path_css('Web_Basic-Lilac.css'), None, [], []],
# basic Peach style sheet
# Translators: Basic Peach style sheet
["Basic-Peach", 1, _("Basic-Peach"),
path_css('Web_Basic-Peach.css'), None, [], []],
# basic Spruce style sheet
# Translators: Basic Spruce style sheet
["Basic-Spruce", 1, _("Basic-Spruce"),
path_css('Web_Basic-Spruce.css'), None, [], []],
# Mainz style sheet with its images
# Translators: Mainz style sheet with its images
["Mainz", 1, _("Mainz"),
path_css('Web_Mainz.css'), None,
[path_img("Web_Mainz_Bkgd.png"),
@ -89,11 +89,11 @@ def load_on_reg(dbstate, uistate, plugin):
path_img("Web_Mainz_Mid.png"),
path_img("Web_Mainz_MidLight.png")], []],
# Nebraska style sheet
# Translators: Nebraska style sheet
["Nebraska", 1, _("Nebraska"),
path_css('Web_Nebraska.css'), None, [], []],
# Visually Impaired style sheet with its navigation menus
# Translators: Visually Impaired style sheet with its navigation menus
["Visually Impaired", 1, _("Visually Impaired"),
path_css('Web_Visually.css'), "narrative-menus.css", [], []],