After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667207 - Verify that a translation will not break a build
Verify that a translation will not break a build
Product: damned-lies
Classification: Infrastructure
Component: vertimus
Other Linux
: Normal enhancement
: ---
Assigned To: damned-lies Maintainer(s)
damned-lies Maintainer(s)
Depends on:
Reported: 2012-01-03 20:09 UTC by Gil Forcada
Modified: 2018-05-22 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Gil Forcada 2012-01-03 20:09:16 UTC
I pushed a documentation translation[1] on Cheese which had a non closing tag and it was reported as it breaks the build[2]. I already fixed it[3] :)

It would be handy if just like Damned-Lies already passes a "msgfmt -cv" on translations to also pass another check.

The Makefiles actually are compiling the po files to mo objects and then building the xml files, so something like:

pocompile ca.po
itstool -m ca.po ../C/*.page

Is it feasible to run something along those lines on uploaded files?

Comment 1 Gil Forcada 2012-01-08 23:48:29 UTC
Sorry to bother, the actual commands should be:

pocompile -i ca.po -o
itstool -m ../C/*.{page,xml}  # I noticed that it handles perfectly both XML and Mallard docs
Comment 2 Alexandre Franke 2012-07-30 15:58:32 UTC
What is the difference between pocompile and msgfmt (which is already called by Damned lies)?
Comment 3 Daniel Mustieles 2012-07-31 08:57:40 UTC
What about using gtxml (from pyg3t) to check the syntax?
Comment 4 Gabor Kelemen 2013-03-25 16:25:17 UTC
pyg3t lives now at
and it would be super useful to integrate it :)

Currently the build can fail for a documentation like this:
  GEN    de/
Warning: Could not merge translation for msgid:
Alternatively, use the keyboard to open the <gui>Activities Overview</gui> by pressing the <key xref="keyboard-key-super">Super</key> key.
Warning: Could not merge translation for msgid:
Alternatively, use the keyboard to open the <gui>Activities Overview</gui> by pressing the <key xref="keyboard-key-super">Super</key> key.

Running gtxml on the po file gives:
$ gtxml gnome-help/de/de.po 
At line 583: mismatched tag
#: C/ C/
msgid ""
"Alternatively, use the keyboard to open the <gui>Activities Overview</gui> by"
" pressing the <key xref=\"keyboard-key-super\">Super</key> key."
msgstr ""
"Verwenden Sie die Tastatur, um die <gui>Aktivitäten-Übersicht</gui> durch "
"Drücken der <key xref=\"keyboard-key-super\">Super</key>-Taste </span> zu "

Showing this output on the per language overview pages (like{ui|doc}/) just like the pot generation problems would be very useful for QA.
Comment 5 Daniel Mustieles 2013-03-25 16:34:24 UTC
Gtxml is Python code, so it should not be very difficult to integrate it on DL.

Should it be a blocker check (i.e. PO file upload no allowed if it doesn't pass this check) or just a warning message?
Comment 6 Gabor Kelemen 2013-03-25 16:45:30 UTC
I think it would be a good idea to catch such problems early and handle them ruthlessly, even if they "only" make the string appear ugly (on UI) or untranslated (in docs).
Comment 7 Daniel Mustieles 2013-03-25 16:51:33 UTC
The ideal situation would be to have this kind of checks in the translation tool (Gtranslator, for example).

In the case of Gtranslator, Ignacio was woking on it (and there is a branch in git with the plugin's code, but it's incomplete). Having it implemented in GTR would help translators to identify and fix this kind of errors, like others are detected.

Maybe this would be a good reason to target our efforts in finding a new maintainer for GTR and finally deprecate the use of Lokalize to translate GNOME.

It this is not possible, having it in DL as a blocker check would help to avoid errors in documentation.
Comment 8 GNOME Infrastructure Team 2018-05-22 12:11:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: