Webcal : pylint (applied remarks on the last patch)
This commit is contained in:
parent
0455cb90ce
commit
e8636a1dcc
@ -47,7 +47,7 @@ _LOG = logging.getLogger(".WebPage")
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||||
_ = glocale.translation.sgettext
|
_ = glocale.translation.sgettext
|
||||||
NGETTEXT = glocale.translation.ngettext # else "nearby" comments are ignored
|
ngettext = glocale.translation.ngettext # else "nearby" comments are ignored
|
||||||
from gramps.gen.lib import Date, Name, NameType, Person
|
from gramps.gen.lib import Date, Name, NameType, Person
|
||||||
from gramps.gen.lib.date import Today
|
from gramps.gen.lib.date import Today
|
||||||
from gramps.gen.const import PROGRAM_NAME, URL_HOMEPAGE
|
from gramps.gen.const import PROGRAM_NAME, URL_HOMEPAGE
|
||||||
@ -322,7 +322,7 @@ class WebCalReport(Report):
|
|||||||
|
|
||||||
# _('translation')
|
# _('translation')
|
||||||
with self._user.progress(_("Web Calendar Report"),
|
with self._user.progress(_("Web Calendar Report"),
|
||||||
(_('Calculating Holidays for year %04d') % year),
|
_('Calculating Holidays for year %04d') % year,
|
||||||
365) as step:
|
365) as step:
|
||||||
|
|
||||||
holiday_table = libholiday.HolidayTable()
|
holiday_table = libholiday.HolidayTable()
|
||||||
@ -522,8 +522,7 @@ class WebCalReport(Report):
|
|||||||
|
|
||||||
# each year will link to current month.
|
# each year will link to current month.
|
||||||
# this will always need an extension added
|
# this will always need an extension added
|
||||||
full_month_name = date_displayer.long_months[
|
full_month_name = date_displayer.long_months[self.today.get_month()]
|
||||||
self.today.get_month()]
|
|
||||||
|
|
||||||
# Note. We use '/' here because it is a URL, not a OS dependent
|
# Note. We use '/' here because it is a URL, not a OS dependent
|
||||||
# pathname.
|
# pathname.
|
||||||
@ -2013,7 +2012,7 @@ def get_day_list(event_date, holiday_list, bday_anniv_list):
|
|||||||
else:
|
else:
|
||||||
age = '<em>%s' % nyears
|
age = '<em>%s' % nyears
|
||||||
# translators: leave all/any {...} untranslated
|
# translators: leave all/any {...} untranslated
|
||||||
txt_str = NGETTEXT("{couple}, {years} year anniversary",
|
txt_str = ngettext("{couple}, {years} year anniversary",
|
||||||
"{couple}, {years} year anniversary",
|
"{couple}, {years} year anniversary",
|
||||||
nyears).format(couple=text, years=age)
|
nyears).format(couple=text, years=age)
|
||||||
txt_str += "</em>"
|
txt_str += "</em>"
|
||||||
|
Loading…
Reference in New Issue
Block a user