Fixed #31937 -- Eased translation of time strings in some languages.
This commit is contained in:
parent
1351f2ee16
commit
e4430f22c8
Binary file not shown.
|
@ -13,7 +13,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: django\n"
|
"Project-Id-Version: django\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
|
"POT-Creation-Date: 2021-04-10 16:05+0200\n"
|
||||||
"PO-Revision-Date: 2021-03-18 23:20+0000\n"
|
"PO-Revision-Date: 2021-03-18 23:20+0000\n"
|
||||||
"Last-Translator: Vláďa Macek <macek@sandbox.cz>\n"
|
"Last-Translator: Vláďa Macek <macek@sandbox.cz>\n"
|
||||||
"Language-Team: Czech (http://www.transifex.com/django/django/language/cs/)\n"
|
"Language-Team: Czech (http://www.transifex.com/django/django/language/cs/)\n"
|
||||||
|
@ -1143,52 +1143,52 @@ msgid ", "
|
||||||
msgstr ", "
|
msgstr ", "
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] "%d rok"
|
msgstr[0] "%(num)d rok"
|
||||||
msgstr[1] "%d roky"
|
msgstr[1] "%(num)d roky"
|
||||||
msgstr[2] "%d roku"
|
msgstr[2] "%(num)d roku"
|
||||||
msgstr[3] "%d let"
|
msgstr[3] "%(num)d let"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] "%d měsíc"
|
msgstr[0] "%(num)d měsíc"
|
||||||
msgstr[1] "%d měsíce"
|
msgstr[1] "%(num)d měsíce"
|
||||||
msgstr[2] "%d měsíců"
|
msgstr[2] "%(num)d měsíců"
|
||||||
msgstr[3] "%d měsíců"
|
msgstr[3] "%(num)d měsíců"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] "%d týden"
|
msgstr[0] "%(num)d týden"
|
||||||
msgstr[1] "%d týdny"
|
msgstr[1] "%(num)d týdny"
|
||||||
msgstr[2] "%d týdne"
|
msgstr[2] "%(num)d týdne"
|
||||||
msgstr[3] "%d týdnů"
|
msgstr[3] "%(num)d týdnů"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] "%d den"
|
msgstr[0] "%(num)d den"
|
||||||
msgstr[1] "%d dny"
|
msgstr[1] "%(num)d dny"
|
||||||
msgstr[2] "%d dní"
|
msgstr[2] "%(num)d dní"
|
||||||
msgstr[3] "%d dní"
|
msgstr[3] "%(num)d dní"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] "%d hodina"
|
msgstr[0] "%(num)d hodina"
|
||||||
msgstr[1] "%d hodiny"
|
msgstr[1] "%(num)d hodiny"
|
||||||
msgstr[2] "%d hodiny"
|
msgstr[2] "%(num)d hodiny"
|
||||||
msgstr[3] "%d hodin"
|
msgstr[3] "%(num)d hodin"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] "%d minuta"
|
msgstr[0] "%(num)d minuta"
|
||||||
msgstr[1] "%d minuty"
|
msgstr[1] "%(num)d minuty"
|
||||||
msgstr[2] "%d minut"
|
msgstr[2] "%(num)d minut"
|
||||||
msgstr[3] "%d minut"
|
msgstr[3] "%(num)d minut"
|
||||||
|
|
||||||
msgid "Forbidden"
|
msgid "Forbidden"
|
||||||
msgstr "Nepřístupné (Forbidden)"
|
msgstr "Nepřístupné (Forbidden)"
|
||||||
|
|
|
@ -4,7 +4,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Django\n"
|
"Project-Id-Version: Django\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
|
"POT-Creation-Date: 2021-04-10 16:05+0200\n"
|
||||||
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
|
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
|
||||||
"Last-Translator: Django team\n"
|
"Last-Translator: Django team\n"
|
||||||
"Language-Team: English <en@li.org>\n"
|
"Language-Team: English <en@li.org>\n"
|
||||||
|
@ -1364,43 +1364,43 @@ msgstr ""
|
||||||
|
|
||||||
#: utils/timesince.py:9
|
#: utils/timesince.py:9
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: utils/timesince.py:10
|
#: utils/timesince.py:10
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: utils/timesince.py:11
|
#: utils/timesince.py:11
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: utils/timesince.py:12
|
#: utils/timesince.py:12
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: utils/timesince.py:13
|
#: utils/timesince.py:13
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: utils/timesince.py:14
|
#: utils/timesince.py:14
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -279,110 +279,110 @@ msgstr "za %(delta)s"
|
||||||
#. Translators: 'naturaltime-past' strings will be included in '%(delta)s ago'
|
#. Translators: 'naturaltime-past' strings will be included in '%(delta)s ago'
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] "%d rokem"
|
msgstr[0] "%(num)d rokem"
|
||||||
msgstr[1] "%d lety"
|
msgstr[1] "%(num)d lety"
|
||||||
msgstr[2] "%d rokem"
|
msgstr[2] "%(num)d rokem"
|
||||||
msgstr[3] "%d lety"
|
msgstr[3] "%(num)d lety"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] "%d měsícem"
|
msgstr[0] "%(num)d měsícem"
|
||||||
msgstr[1] "%d měsíci"
|
msgstr[1] "%(num)d měsíci"
|
||||||
msgstr[2] "%d měsícem"
|
msgstr[2] "%(num)d měsícem"
|
||||||
msgstr[3] "%d měsíci"
|
msgstr[3] "%(num)d měsíci"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] "%d týdnem"
|
msgstr[0] "%(num)d týdnem"
|
||||||
msgstr[1] "%d týdny"
|
msgstr[1] "%(num)d týdny"
|
||||||
msgstr[2] "%d týdny"
|
msgstr[2] "%(num)d týdny"
|
||||||
msgstr[3] "%d týdny"
|
msgstr[3] "%(num)d týdny"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] "%d dnem"
|
msgstr[0] "%(num)d dnem"
|
||||||
msgstr[1] "%d dny"
|
msgstr[1] "%(num)d dny"
|
||||||
msgstr[2] "%d dny"
|
msgstr[2] "%(num)d dny"
|
||||||
msgstr[3] "%d dny"
|
msgstr[3] "%(num)d dny"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] "%d hodinou"
|
msgstr[0] "%(num)d hodinou"
|
||||||
msgstr[1] "%d hodinami"
|
msgstr[1] "%(num)d hodinami"
|
||||||
msgstr[2] "%d hodinami"
|
msgstr[2] "%(num)d hodinami"
|
||||||
msgstr[3] "%d hodinami"
|
msgstr[3] "%(num)d hodinami"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] "%d minutou"
|
msgstr[0] "%(num)d minutou"
|
||||||
msgstr[1] "%d minutami"
|
msgstr[1] "%(num)d minutami"
|
||||||
msgstr[2] "%d minutami"
|
msgstr[2] "%(num)d minutami"
|
||||||
msgstr[3] "%d minutami"
|
msgstr[3] "%(num)d minutami"
|
||||||
|
|
||||||
#. Translators: 'naturaltime-future' strings will be included in '%(delta)s
|
#. Translators: 'naturaltime-future' strings will be included in '%(delta)s
|
||||||
#. from now'
|
#. from now'
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] "%d rok"
|
msgstr[0] "%(num)d rok"
|
||||||
msgstr[1] "%d roky"
|
msgstr[1] "%(num)d roky"
|
||||||
msgstr[2] "%d let"
|
msgstr[2] "%(num)d let"
|
||||||
msgstr[3] "%d let"
|
msgstr[3] "%(num)d let"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] "%d měsíc"
|
msgstr[0] "%(num)d měsíc"
|
||||||
msgstr[1] "%d měsíce"
|
msgstr[1] "%(num)d měsíce"
|
||||||
msgstr[2] "%d měsíců"
|
msgstr[2] "%(num)d měsíců"
|
||||||
msgstr[3] "%d měsíců"
|
msgstr[3] "%(num)d měsíců"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] "%d týden"
|
msgstr[0] "%(num)d týden"
|
||||||
msgstr[1] "%d týdny"
|
msgstr[1] "%(num)d týdny"
|
||||||
msgstr[2] "%d týdnů"
|
msgstr[2] "%(num)d týdnů"
|
||||||
msgstr[3] "%d týdnů"
|
msgstr[3] "%(num)d týdnů"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] "%d den"
|
msgstr[0] "%(num)d den"
|
||||||
msgstr[1] "%d dny"
|
msgstr[1] "%(num)d dny"
|
||||||
msgstr[2] "%d dní"
|
msgstr[2] "%(num)d dní"
|
||||||
msgstr[3] "%d dní"
|
msgstr[3] "%(num)d dní"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] "%d hodina"
|
msgstr[0] "%(num)d hodina"
|
||||||
msgstr[1] "%d hodiny"
|
msgstr[1] "%(num)d hodiny"
|
||||||
msgstr[2] "%d hodin"
|
msgstr[2] "%(num)d hodin"
|
||||||
msgstr[3] "%d hodin"
|
msgstr[3] "%(num)d hodin"
|
||||||
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] "%d minuta"
|
msgstr[0] "%(num)d minuta"
|
||||||
msgstr[1] "%d minuty"
|
msgstr[1] "%(num)d minuty"
|
||||||
msgstr[2] "%d minut"
|
msgstr[2] "%(num)d minut"
|
||||||
msgstr[3] "%d minut"
|
msgstr[3] "%(num)d minut"
|
||||||
|
|
|
@ -4,7 +4,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Django\n"
|
"Project-Id-Version: Django\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-01-15 09:00+0100\n"
|
"POT-Creation-Date: 2021-04-07 14:40+0200\n"
|
||||||
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
|
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
|
||||||
"Last-Translator: Django team\n"
|
"Last-Translator: Django team\n"
|
||||||
"Language-Team: English <en@li.org>\n"
|
"Language-Team: English <en@li.org>\n"
|
||||||
|
@ -283,48 +283,48 @@ msgstr ""
|
||||||
#: contrib/humanize/templatetags/humanize.py:205
|
#: contrib/humanize/templatetags/humanize.py:205
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:206
|
#: contrib/humanize/templatetags/humanize.py:206
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:207
|
#: contrib/humanize/templatetags/humanize.py:207
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:208
|
#: contrib/humanize/templatetags/humanize.py:208
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:209
|
#: contrib/humanize/templatetags/humanize.py:209
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:210
|
#: contrib/humanize/templatetags/humanize.py:210
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-past"
|
msgctxt "naturaltime-past"
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
|
@ -332,47 +332,47 @@ msgstr[1] ""
|
||||||
#: contrib/humanize/templatetags/humanize.py:214
|
#: contrib/humanize/templatetags/humanize.py:214
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d year"
|
msgid "%(num)d year"
|
||||||
msgid_plural "%d years"
|
msgid_plural "%(num)d years"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:215
|
#: contrib/humanize/templatetags/humanize.py:215
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d month"
|
msgid "%(num)d month"
|
||||||
msgid_plural "%d months"
|
msgid_plural "%(num)d months"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:216
|
#: contrib/humanize/templatetags/humanize.py:216
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d week"
|
msgid "%(num)d week"
|
||||||
msgid_plural "%d weeks"
|
msgid_plural "%(num)d weeks"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:217
|
#: contrib/humanize/templatetags/humanize.py:217
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d day"
|
msgid "%(num)d day"
|
||||||
msgid_plural "%d days"
|
msgid_plural "%(num)d days"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:218
|
#: contrib/humanize/templatetags/humanize.py:218
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d hour"
|
msgid "%(num)d hour"
|
||||||
msgid_plural "%d hours"
|
msgid_plural "%(num)d hours"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: contrib/humanize/templatetags/humanize.py:219
|
#: contrib/humanize/templatetags/humanize.py:219
|
||||||
#, python-format
|
#, python-format
|
||||||
msgctxt "naturaltime-future"
|
msgctxt "naturaltime-future"
|
||||||
msgid "%d minute"
|
msgid "%(num)d minute"
|
||||||
msgid_plural "%d minutes"
|
msgid_plural "%(num)d minutes"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
|
@ -202,21 +202,21 @@ class NaturalTimeFormatter:
|
||||||
}
|
}
|
||||||
past_substrings = {
|
past_substrings = {
|
||||||
# Translators: 'naturaltime-past' strings will be included in '%(delta)s ago'
|
# Translators: 'naturaltime-past' strings will be included in '%(delta)s ago'
|
||||||
'year': npgettext_lazy('naturaltime-past', '%d year', '%d years'),
|
'year': npgettext_lazy('naturaltime-past', '%(num)d year', '%(num)d years', 'num'),
|
||||||
'month': npgettext_lazy('naturaltime-past', '%d month', '%d months'),
|
'month': npgettext_lazy('naturaltime-past', '%(num)d month', '%(num)d months', 'num'),
|
||||||
'week': npgettext_lazy('naturaltime-past', '%d week', '%d weeks'),
|
'week': npgettext_lazy('naturaltime-past', '%(num)d week', '%(num)d weeks', 'num'),
|
||||||
'day': npgettext_lazy('naturaltime-past', '%d day', '%d days'),
|
'day': npgettext_lazy('naturaltime-past', '%(num)d day', '%(num)d days', 'num'),
|
||||||
'hour': npgettext_lazy('naturaltime-past', '%d hour', '%d hours'),
|
'hour': npgettext_lazy('naturaltime-past', '%(num)d hour', '%(num)d hours', 'num'),
|
||||||
'minute': npgettext_lazy('naturaltime-past', '%d minute', '%d minutes'),
|
'minute': npgettext_lazy('naturaltime-past', '%(num)d minute', '%(num)d minutes', 'num'),
|
||||||
}
|
}
|
||||||
future_substrings = {
|
future_substrings = {
|
||||||
# Translators: 'naturaltime-future' strings will be included in '%(delta)s from now'
|
# Translators: 'naturaltime-future' strings will be included in '%(delta)s from now'
|
||||||
'year': npgettext_lazy('naturaltime-future', '%d year', '%d years'),
|
'year': npgettext_lazy('naturaltime-future', '%(num)d year', '%(num)d years', 'num'),
|
||||||
'month': npgettext_lazy('naturaltime-future', '%d month', '%d months'),
|
'month': npgettext_lazy('naturaltime-future', '%(num)d month', '%(num)d months', 'num'),
|
||||||
'week': npgettext_lazy('naturaltime-future', '%d week', '%d weeks'),
|
'week': npgettext_lazy('naturaltime-future', '%(num)d week', '%(num)d weeks', 'num'),
|
||||||
'day': npgettext_lazy('naturaltime-future', '%d day', '%d days'),
|
'day': npgettext_lazy('naturaltime-future', '%(num)d day', '%(num)d days', 'num'),
|
||||||
'hour': npgettext_lazy('naturaltime-future', '%d hour', '%d hours'),
|
'hour': npgettext_lazy('naturaltime-future', '%(num)d hour', '%(num)d hours', 'num'),
|
||||||
'minute': npgettext_lazy('naturaltime-future', '%d minute', '%d minutes'),
|
'minute': npgettext_lazy('naturaltime-future', '%(num)d minute', '%(num)d minutes', 'num'),
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -6,12 +6,12 @@ from django.utils.timezone import is_aware, utc
|
||||||
from django.utils.translation import gettext, ngettext_lazy
|
from django.utils.translation import gettext, ngettext_lazy
|
||||||
|
|
||||||
TIME_STRINGS = {
|
TIME_STRINGS = {
|
||||||
'year': ngettext_lazy('%d year', '%d years'),
|
'year': ngettext_lazy('%(num)d year', '%(num)d years', 'num'),
|
||||||
'month': ngettext_lazy('%d month', '%d months'),
|
'month': ngettext_lazy('%(num)d month', '%(num)d months', 'num'),
|
||||||
'week': ngettext_lazy('%d week', '%d weeks'),
|
'week': ngettext_lazy('%(num)d week', '%(num)d weeks', 'num'),
|
||||||
'day': ngettext_lazy('%d day', '%d days'),
|
'day': ngettext_lazy('%(num)d day', '%(num)d days', 'num'),
|
||||||
'hour': ngettext_lazy('%d hour', '%d hours'),
|
'hour': ngettext_lazy('%(num)d hour', '%(num)d hours', 'num'),
|
||||||
'minute': ngettext_lazy('%d minute', '%d minutes'),
|
'minute': ngettext_lazy('%(num)d minute', '%(num)d minutes', 'num'),
|
||||||
}
|
}
|
||||||
|
|
||||||
TIMESINCE_CHUNKS = (
|
TIMESINCE_CHUNKS = (
|
||||||
|
@ -73,13 +73,13 @@ def timesince(d, now=None, reversed=False, time_strings=None, depth=2):
|
||||||
since = delta.days * 24 * 60 * 60 + delta.seconds
|
since = delta.days * 24 * 60 * 60 + delta.seconds
|
||||||
if since <= 0:
|
if since <= 0:
|
||||||
# d is in the future compared to now, stop processing.
|
# d is in the future compared to now, stop processing.
|
||||||
return avoid_wrapping(time_strings['minute'] % 0)
|
return avoid_wrapping(time_strings['minute'] % {'num': 0})
|
||||||
for i, (seconds, name) in enumerate(TIMESINCE_CHUNKS):
|
for i, (seconds, name) in enumerate(TIMESINCE_CHUNKS):
|
||||||
count = since // seconds
|
count = since // seconds
|
||||||
if count != 0:
|
if count != 0:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return avoid_wrapping(time_strings['minute'] % 0)
|
return avoid_wrapping(time_strings['minute'] % {'num': 0})
|
||||||
result = []
|
result = []
|
||||||
current_depth = 0
|
current_depth = 0
|
||||||
while i < len(TIMESINCE_CHUNKS) and current_depth < depth:
|
while i < len(TIMESINCE_CHUNKS) and current_depth < depth:
|
||||||
|
@ -87,7 +87,7 @@ def timesince(d, now=None, reversed=False, time_strings=None, depth=2):
|
||||||
count = since // seconds
|
count = since // seconds
|
||||||
if count == 0:
|
if count == 0:
|
||||||
break
|
break
|
||||||
result.append(avoid_wrapping(time_strings[name] % count))
|
result.append(avoid_wrapping(time_strings[name] % {'num': count}))
|
||||||
since -= seconds * count
|
since -= seconds * count
|
||||||
current_depth += 1
|
current_depth += 1
|
||||||
i += 1
|
i += 1
|
||||||
|
|
|
@ -77,7 +77,12 @@ class TimesinceTests(TestCase):
|
||||||
|
|
||||||
def test_second_before_equal_first_humanize_time_strings(self):
|
def test_second_before_equal_first_humanize_time_strings(self):
|
||||||
time_strings = {
|
time_strings = {
|
||||||
'minute': npgettext_lazy('naturaltime-future', '%d minute', '%d minutes'),
|
'minute': npgettext_lazy(
|
||||||
|
'naturaltime-future',
|
||||||
|
'%(num)d minute',
|
||||||
|
'%(num)d minutes',
|
||||||
|
'num',
|
||||||
|
),
|
||||||
}
|
}
|
||||||
with translation.override('cs'):
|
with translation.override('cs'):
|
||||||
for now in [self.t, self.t - self.onemicrosecond, self.t - self.oneday]:
|
for now in [self.t, self.t - self.onemicrosecond, self.t - self.oneday]:
|
||||||
|
|
Loading…
Reference in New Issue