Univention Bugzilla – Bug 40340
Univention Management Console translations not working as described
Last modified: 2016-02-04 14:05:07 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' ----
Created attachment 7386 [details] output of univention-ucs-translation-build-package.py
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 virtualization/univention-virtual-machine-manager-daemon/umc...
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
OK: code OK: advisory (r66678) OK: manual test: runs through: prints errors, but continues
<http://errata.software-univention.de/ucs/4.1/98.html>