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 696578 - Add pre-receive hook to validate xml tags po files
Add pre-receive hook to validate xml tags po files
Status: RESOLVED OBSOLETE
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2013-03-25 18:37 UTC by Gabor Kelemen
Modified: 2013-11-21 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gabor Kelemen 2013-03-25 18:37:04 UTC
Translators tend to break xml tags in po file from time to time. 
There is a tool to check for such problems, gtxml[1] from the pyg3t project.

It's usage in a pre-receive hook would be simple: 

run `gtxml $po_file`
    if there is output[2], show it to the committer and abort
    if there is no output, let the po file in

[1]: https://launchpad.net/pyg3t
[2]: see example in https://bugzilla.gnome.org/show_bug.cgi?id=667207#c4
Comment 1 Gabor Kelemen 2013-08-01 09:49:26 UTC
Another option would be to use pofilter -t xmltags from the translate-toolkit package, this is at least packaged for most distributions. Only problem is that it's a bit too picky:

$ pofilter -t xmltags Ubuntu\ One/gnome-translations/development/evolution.master.hu.po 
processing 1 files...
msgid ""
msgstr ""
"Project-Id-Version: evolution master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=evolut"
"ion&keywords=I18N+L10N&component=Miscellaneous\n"
"POT-Creation-Date: 2013-07-28 02:01+0000\n"
"PO-Revision-Date: 2013-08-01 08:20+0200\n"
"Last-Translator: Gabor Kelemen <kelemeng at gnome dot hu>\n"
"Language-Team: Hungarian <openscope at googlegroups dot com>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"

# (pofilter) xmltags: Added XML tags
#. The translator-credits string is for translators to list
#. * per-language credits for translation, displayed in the
#. * about dialog.
#: ../shell/e-shell-window-actions.c:74
msgid "translator-credits"
msgstr ""
"Bán Szabolcs <shooby at gnome dot hu>\n"
"Dvornik László <dvornik at gnome dot hu>\n"
"Kelemen Gábor <kelemeng at gnome dot hu>\n"
"Nitsch Zoltán <regisztralj at gmail dot com>\n"
"Tímár András <timar at gnome dot hu>\n"
"Zsiráf <zsiraf at mylinux dot hu>"
[###########################################] 100%
Comment 2 Gabor Kelemen 2013-08-06 10:16:01 UTC
I have opened http://bugs.locamotion.org/show_bug.cgi?id=3067 about pofilter being too picky. If it's possible to solve that, using pofilter would be preferable to using an "unstable" software from its VCS.
Comment 3 Andrea Veri 2013-11-21 14:56:33 UTC
The GNOME Infrastructure Team is currently migrating its bug / issue tracker away from Bugzilla to Request Tracker and therefore all the currently open bugs have been closed and marked as OBSOLETE.

The following move will also act as a cleanup for very old and ancient tickets that were still living on Bugzilla. If your issue still hasn't been fixed as of today please report it again on the relevant RT queue.

More details about the available queues you can report the bug against can be found at https://wiki.gnome.org/Sysadmin/RequestTracker.

Thanks for your patience,

the GNOME Infrastructure Team