Add python-format flag to PO files

This commit is contained in:
Cédric Krier
2024-05-01 19:13:04 +02:00
parent ed5f91a480
commit 5b9cc03243
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add python-format flag to PO files
* Add partial support for constraints with SQLite backend
Version 7.2.0 - 2024-04-29
+7
View File
@@ -938,6 +938,13 @@ class Translation(
name=translation.name,
overriding_module=translation.overriding_module))
flags = [] if not translation.fuzzy else ['fuzzy']
try:
translation.src % ()
except ValueError:
# Incomplete format is not python format
pass
except TypeError:
flags.append('python-format')
trans_ctxt = '%(type)s:%(name)s:' % {
'type': translation.type,
'name': translation.name,