zope.i18n 5.1__py3-none-any.whl → 5.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zope/i18n/format.py +2 -2
- zope/i18n/testmessagecatalog.py +2 -2
- zope/i18n/tests/test_formats.py +603 -714
- zope/i18n/tests/test_translationdomain.py +11 -4
- zope/i18n/tests/test_zcml.py +7 -7
- zope.i18n-5.3-py3.12-nspkg.pth +1 -0
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info}/METADATA +51 -20
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info}/RECORD +12 -12
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info}/WHEEL +1 -1
- zope.i18n-5.1-py3.11-nspkg.pth +0 -1
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info/licenses}/LICENSE.txt +0 -0
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info}/namespace_packages.txt +0 -0
- {zope.i18n-5.1.dist-info → zope_i18n-5.3.dist-info}/top_level.txt +0 -0
zope/i18n/format.py
CHANGED
@@ -185,7 +185,7 @@ class DateTimeFormat:
|
|
185
185
|
datetime.datetime.combine(
|
186
186
|
datetime.date.today(),
|
187
187
|
datetime.time(*[e or 0 for e in ordered[3:]]))
|
188
|
-
|
188
|
+
).timetz()
|
189
189
|
return datetime.time(
|
190
190
|
*[e or 0 for e in ordered[3:]], **{'tzinfo': tzinfo}
|
191
191
|
)
|
@@ -612,7 +612,7 @@ def buildDateTimeParseInfo(calendar, pattern):
|
|
612
612
|
|
613
613
|
# am/pm marker (Text)
|
614
614
|
for entry in _findFormattingCharacterInPattern('a', pattern):
|
615
|
-
info[entry] =
|
615
|
+
info[entry] = fr'({calendar.am}|{calendar.pm})'
|
616
616
|
|
617
617
|
# era designator (Text)
|
618
618
|
# TODO: works for gregorian only right now
|
zope/i18n/testmessagecatalog.py
CHANGED
@@ -30,11 +30,11 @@ class TestMessageCatalog:
|
|
30
30
|
def queryMessage(self, msgid, default=None):
|
31
31
|
default = getattr(msgid, 'default', default)
|
32
32
|
if default is not None and default != msgid:
|
33
|
-
msg = "{} ({})"
|
33
|
+
msg = f"{msgid} ({default})"
|
34
34
|
else:
|
35
35
|
msg = msgid
|
36
36
|
|
37
|
-
return "[[{}][{}]]"
|
37
|
+
return f"[[{self.domain}][{msg}]]"
|
38
38
|
|
39
39
|
getMessage = queryMessage
|
40
40
|
|