translation: Croatian

fix inflected long month names
fix dd_dformat04
This commit is contained in:
Josip 2015-06-19 23:44:15 +02:00
parent 6e87ee433c
commit 5a752205b3
2 changed files with 42 additions and 12 deletions

View File

@ -98,6 +98,8 @@ class DateParserHR(DateParser):
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile(
"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
@ -141,7 +143,13 @@ class DateDisplayHR(DateDisplay):
def dd_dformat04(self, date_val, inflect, long_months):
"""
day month_name year
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
print('LONGMONTH: ', long_months)
_ = self._locale.translation.sgettext
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
@ -149,11 +157,33 @@ class DateDisplayHR(DateDisplay):
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
elif date_val[1] == 0: # month is zero but day is not (see 8477)
return self.display_iso(date_val)
else:
return "{day:d}. {long_month.f[G]} {year}.".format(
day = date_val[0],
long_month = long_months[date_val[1]],
year = year)
# TRANSLATORS: this month is ALREADY inflected: ignore it
return _("{day:d} {long_month} {year}").format(
day = date_val[0],
long_month = self.format_long_month(date_val[1],
inflect, long_months).replace('.', ''),
year = year)
# def dd_dformat04(self, date_val, inflect, long_months):
# """
# day month_name year
# """
# year = self._slash_year(date_val[2], date_val[3])
# if date_val[0] == 0:
# if date_val[1] == 0:
# return year + '.'
# else:
# return self.format_long_month_year(date_val[1], year,
# inflect, long_months)
# else:
# return "{day:d} {long_month} {year}".format(
# day = date_val[0],
# long_month = long_months[date_val[1]],
# year = year)
#-------------------------------------------------------------------------
#

View File

@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Gramps 4.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-06-07 20:07+0200\n"
"PO-Revision-Date: 2015-06-14 20:01+0100\n"
"PO-Revision-Date: 2015-06-19 23:37+0100\n"
"Last-Translator: josip <josip@pisoj.com>\n"
"Language-Team: \n"
"Language: hr\n"
@ -1909,7 +1909,7 @@ msgstr "to"
#: ../gramps/gen/datehandler/_datedisplay.py:404
msgid "{date_quality}from {date_start} to {date_stop}{nonstd_calendar_and_ny}"
msgstr "{date_quality}od {date_start} do {date_stop}{nonstd_calendar_and_ny}"
msgstr "{date_quality} od {date_start} do {date_stop}{nonstd_calendar_and_ny}"
#. If there is no special inflection for "between <Month>"
#. in your language, DON'T translate this string. Otherwise,
@ -1929,42 +1929,42 @@ msgstr "and"
msgid ""
"{date_quality}between {date_start} and {date_stop}{nonstd_calendar_and_ny}"
msgstr ""
"{date_quality}između {date_start} i {date_stop}{nonstd_calendar_and_ny}"
"{date_quality} između {date_start} i {date_stop}{nonstd_calendar_and_ny}"
#. 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!!!
#: ../gramps/gen/datehandler/_datedisplay.py:462
msgid "before-date|"
msgstr "before "
msgstr "before"
#. 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!!!
#: ../gramps/gen/datehandler/_datedisplay.py:467
msgid "after-date|"
msgstr "after "
msgstr "after"
#. 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!!!
#: ../gramps/gen/datehandler/_datedisplay.py:472
msgid "about-date|"
msgstr "about "
msgstr "about"
#. 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!!!
#: ../gramps/gen/datehandler/_datedisplay.py:477
msgid "estimated-date|"
msgstr "estimated "
msgstr "estimated"
#. 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!!!
#: ../gramps/gen/datehandler/_datedisplay.py:482
msgid "calculated-date|"
msgstr "calculated "
msgstr "calculated"
#: ../gramps/gen/datehandler/_datedisplay.py:501
msgid "{date_quality}{noncompound_modifier}{date}{nonstd_calendar_and_ny}"