Univention Bugzilla – Bug 42260
Extend translation tools to be able to integrate more special cases
Last modified: 2018-05-18 13:53:41 CEST
+++ This bug was initially created as a clone of Bug #42163 +++ +++ This bug was initially created as a clone of Bug #41221 +++ Apparently univention-ucs-translation-build-package doesn't include the ucs-4.13/management/univention-management-console-frontend/index.html .
(In reply to Richard Ulmer from comment #0) > +++ This bug was initially created as a clone of Bug #42163 +++ > > +++ This bug was initially created as a clone of Bug #41221 +++ > > Apparently univention-ucs-translation-build-package doesn't include the > ucs-4.13/management/univention-management-console-frontend/index.html . This is currently not handled correctly through specialcases.json, ideally translationhelper.py needs an adjustment to handle multiple patterns in input_files, for example: { "input_files": ["umc/**js", "*.html"] "mo_destination": "usr/share/univention-management-console-frontend/js/umc/i18n/{lang}/app.json", "package_dir": "management/univention-management-console-frontend", "package_name": "univention-management-console-frontend", "po_subdir": "umc", "target": "json" }
As discussed: * Please implement the feature with multiple input_files entries; for this you will probably need the detection of file types (→ python-magic) * Could you check whether it is possible to scan HTML files for data-i18n attributes; this is relevant for the UCS overview page, EC2 landing page etc.
As discussed, please also add an option for referencing a custom specialcases.json file (for UCS@school, Bug 41777).
Just to explain the motivation here... in order to update a translation package, we would like to have the minimum amount of manual work. Currently, we need to merge all PO files referenced in additional_targets.mk manually. I would like to avoid this situation. Once we can integrated most special cases here, we would be able to move the definition of special cases into the package themselves. This in turn would be more flexible and would also allow to use translation routines (à la dh-umc-module-build/dh-umc-module-install) in the packages, replacing the varying currently used methods.
r 72640 remove 85_ucs-translation-template dir
ucslint I:0011-16: debian/python-univention-lib.univention-l10n: unknown debhelper file
r73298 adds: * handling of multiple input sources * HTML processing logic * special case definitions per binary package via debian/*.univention-l10n r73297: YAML r73254, r73146: commit special case definitions to affected packages UCS 4.1-3: Package: univention-ucs-translation-template Version: 3.1.0-0.21.201610171630
r73321: imports debian/ *.univention-l10n files from UCS 4.1-3 r73322, r73320: import changes from UCS 4.1-3 and minor adjustments to xgettext calls UCS 4.2-0: Package: univention-ucs-translation-template Version: 4.1.0-0A~4.2.0.201610181432
<http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-3/job/AutotestJoin/lastCompletedBuild/SambaVersion=s3,Systemrolle=master/testReport/85_ucs-translation-template/01_merge_new_module/test/> fails since 8 runs: >[2016-10-22 23:29:21.840274] Ausgecheckt, Revision 27633. >(2016-10-22 23:29:22.258178) Usage: univention-ucs-translation-build-package [options] -s source_dir -c language_code -l locale -n language_name >(2016-10-22 23:29:22.258214) e.g.: -s /path/to/ucs-repository/ -c de -l de_DE.UTF-8:UTF-8 -n Deutsch >(2016-10-22 23:29:22.258265) >(2016-10-22 23:29:22.258314) univention-ucs-translation-build-package: error: no such option: --languagename >[2016-10-22 23:29:22.273157] Error: Subprocess exited unsuccessfully. Attempted command: >[2016-10-22 23:29:22.273186] univention-ucs-translation-build-package --source=SVN --languagecode=XX --locale=fr_FR.UTF-8:UTF-8 --languagename=TEST0 packaging/univention-ucs-translation-template/univention-ucs-translation-build-package: > 48 »···parser.add_option('-n', '--language-name', ^
(In reply to Philipp Hahn from comment #9) > <http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-3/job/ > AutotestJoin/lastCompletedBuild/SambaVersion=s3,Systemrolle=master/ > testReport/85_ucs-translation-template/01_merge_new_module/test/> fails > since 8 runs: > > >[2016-10-22 23:29:21.840274] Ausgecheckt, Revision 27633. > >(2016-10-22 23:29:22.258178) Usage: univention-ucs-translation-build-package [options] -s source_dir -c language_code -l locale -n language_name > >(2016-10-22 23:29:22.258214) e.g.: -s /path/to/ucs-repository/ -c de -l de_DE.UTF-8:UTF-8 -n Deutsch > >(2016-10-22 23:29:22.258265) > >(2016-10-22 23:29:22.258314) univention-ucs-translation-build-package: error: no such option: --languagename > >[2016-10-22 23:29:22.273157] Error: Subprocess exited unsuccessfully. Attempted command: > >[2016-10-22 23:29:22.273186] univention-ucs-translation-build-package --source=SVN --languagecode=XX --locale=fr_FR.UTF-8:UTF-8 --languagename=TEST0 > > packaging/univention-ucs-translation-template/univention-ucs-translation- > build-package: > > 48 »···parser.add_option('-n', '--language-name', > ^ UCS 4.1-3: r73852: Fixes --language-name option in test Package: ucs-test Version: 6.0.36-39.1550.201610282003 r73856: merge to UCS 4.1-4 r73857: merge to UCS 4.2-0
UCS 4.1-3: r73853: minor adjustements to special case handling Package: univention-ucs-translation-template Version: 3.1.0-2.23.201610282014 r73854: merge to 4.1-4 r73855: merge to 4.2-0
r73858: YAML
REOPEN: ./packaging/univention-ucs-translation-template/ucr-l10n:48:17: F821 undefined name '_'
Can you please remove the grep_ucr_translatables script in the root UCS directory.
(In reply to Eduard Mai from comment #10) > (In reply to Philipp Hahn from comment #9) > > <http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-3/job/ > > AutotestJoin/lastCompletedBuild/SambaVersion=s3,Systemrolle=master/ > > testReport/85_ucs-translation-template/01_merge_new_module/test/> fails > > since 8 runs: > > [...] > UCS 4.1-3: > r73852: Fixes --language-name option in test > Package: ucs-test > Version: 6.0.36-39.1550.201610282003 > > r73856: merge to UCS 4.1-4 > r73857: merge to UCS 4.2-0 85_ucs-translation-template.01_merge_new_module.test now runs successfully.
AFAIS, ucr-l10n is currently _not_ installed (should be installed to /usr/share/univention-l10n/ maybe?). This script will be needed by a translation package (i.e., univention-l10n-fr) and it will be called for changes in UCR variables.
(In reply to Alexander Kläser from comment #16) > AFAIS, ucr-l10n is currently _not_ installed (should be installed to > /usr/share/univention-l10n/ maybe?). This script will be needed by a > translation package (i.e., univention-l10n-fr) and it will be called for > changes in UCR variables. Probably the script should go into a different package (binary or even source package?).
Tagging to 4.1-4. Please add an entry to the 4.1-4 changelog (i.e., no errata YAML files).
Created attachment 8177 [details] Proposed patch This patch adds a new binary package containing the script ucr-l10n.
UCS 4.1-4: r74035, r74036 apply patch with slight changes. Package: univention-ucs-translation-template Version: 3.1.0-3.24.201611021904 UCS 4.2-0: r74037: merge to UCS 4.2-0
I added debian/univention-l10n-tools.install which was missing. (Sorry, I used the wrong bug number in the first commit.) Then everything worked nicely. univention-ucs-translation-template (3.1.0-5): r74063 | Bug #41777: added missing debian/univention-l10n-tools.install file r74065 | Bug #42260: corrected path in debian/univention-l10n-tools.install ... and synced the changes to 4.2-0: univention-ucs-translation-template (4.1.0-5): r74067 | Bug #42260: corrected path in debian/univention-l10n-tools.install r74066 | Bug #42260: added missing debian/univention-l10n-tools.install file In 4.1-3, I removed the staging YAML file [r74068] and added a 4.1-4 changelog entry [r74070].
Open points: * Bug 42842 - Check 4.2-0 merge of package univention-ucs-translation-template * Bug 42841 - Update section for UCS translation * Bug 42844 - Integrate translation of UCR variables into univention-ucs-translation-template Changes: OK, changes work fine. Merge to 4.2-0: OK... missing merges to 4.2-0 will be handled via Bug 42841. Changelog 4.1-4: OK... I added the entry [r74070] → VERIFIED
I was missing another point that we discussed: Bug 42845 - UCS overview entries with UCR variables are not translated into French
UCS 4.1-4 has been released: https://docs.software-univention.de/release-notes-4.1-4-en.html https://docs.software-univention.de/release-notes-4.1-4-de.html If this error occurs again, please use "Clone This Bug".