diff --git a/gramps/gen/datehandler/_date_hr.py b/gramps/gen/datehandler/_date_hr.py index 66d206bcf..43dd6231f 100644 --- a/gramps/gen/datehandler/_date_hr.py +++ b/gramps/gen/datehandler/_date_hr.py @@ -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) #------------------------------------------------------------------------- # diff --git a/po/hr.po b/po/hr.po index db55cb176..993c0fb65 100644 --- a/po/hr.po +++ b/po/hr.po @@ -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 \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 " #. 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 " #. 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 " #. 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 " #. 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 " #. 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 " #. 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}"