Bug 40340 - Univention Management Console translations not working as described
Univention Management Console translations not working as described
Product: UCS
Classification: Unclassified
Component: General
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Florian Best
Daniel Tröder
Depends on: 38155 40341
  Show dependency treegraph
Reported: 2015-12-23 18:31 CET by Daniel Orrego
Modified: 2016-02-04 14:05 CET (History)
8 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:

output of univention-ucs-translation-build-package.py (29.59 KB, text/plain)
2015-12-23 18:31 CET, Daniel Orrego

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Orrego univentionstaff 2015-12-23 18:31:11 CET
+++ This bug was initially created as a clone of Bug #38155 +++

As shown in bug 38155, Comment 1. univention-ucs-translation-build-package.py script fails to create the mo files for the destination language:

msgfmt: found 2 fatal errors
install: cannot stat `es_CO/./virtualization/univention-virtual-machine-manager-daemon/umc/es_CO.mo': No such file or directory
Traceback (most recent call last):
  File "/usr/bin/univention-ucs-translation-build-package.py", line 77, in <module>
    tlh.update_and_install_translation_files_to_correct_path(module, options.target_language, package_path_absolute, startdir)
  File "/usr/lib/pymodules/python2.7/univention/translationhelper.py", line 111, in update_and_install_translation_files_to_correct_path
    os.unlink(os.path.join(package_path_absolute, po_file.replace('.po', '.mo')))
OSError: [Errno 2] No such file or directory: 'es_CO/./virtualization/univention-virtual-machine-manager-daemon/umc/es_CO.mo'
Comment 1 Daniel Orrego univentionstaff 2015-12-23 18:31:57 CET
Created attachment 7386 [details]
output of univention-ucs-translation-build-package.py
Comment 2 Daniel Orrego univentionstaff 2015-12-24 11:01:59 CET
The "2 fatal errors" are actually these:

# msgfmt -v -o test.mo ./es_CO.po
./es_CO.po:21: duplicate message definition...
./es_CO.po:16: ...this is the location of the first definition
./es_CO.po:24: duplicate message definition...
./es_CO.po:19: ...this is the location of the first definition
msgfmt: found 2 fatal errors

And that is because the po was generated with repeated messages, if you remove them the mo can be generated.

So we need to see how is that they are duplicated in
Comment 3 Florian Best univentionstaff 2016-01-08 16:10:06 CET
I made the script more robust so that it won't crash anymore. The messages are still duplicated → I don't know why. Commits are done with svn r38155.

univention-ucs-translation-template (3.0.1-3):
r66677 | Bug #38155: enhance robustness of univention-ucs-translation-build-package.py
r66664 | Bug #38155: fix python build
Comment 4 Daniel Tröder univentionstaff 2016-01-29 13:55:04 CET
OK: code
OK: advisory (r66678)
OK: manual test: runs through: prints errors, but continues
Comment 5 Janek Walkenhorst univentionstaff 2016-02-04 14:05:07 CET