Univention Bugzilla – Bug 41187
translate SAML identity provider module description
Last modified: 2017-01-17 10:35:53 CET
The SAML identity provider module in the UMC overview is not translated. (title + description).
cf. Bug 41222, Comment 3: > [...] > The module is currently still not translated, see also Bug 41187. The reason > for this is two-fold. Firstly, there is no > debian/univention-saml.umc-modules file (i.e., the module description > contained in the XML module file is not translated). Secondly, the de.po > file is in the package root file and not below > modules/univention/admin/handlers/saml. AFAIS, this needs to be changed via > Bug 41187. These two discussed changes should be applied via this bug. Then the translation will be fine.
(In reply to Alexander Kläser from comment #1) > cf. Bug 41222, Comment 3: > > [...] > > Secondly, the de.po file is in the package root file and not below > > modules/univention/admin/handlers/saml. AFAIS, this needs to be changed via > > Bug 41187. Incorrect, the second part is fine.
See also the ucs-school-umc-common package as an example which only contains a XML module file, as well.
Created attachment 7818 [details] pseudo patch Here a starting point. IMHO we should adjust dh-umc-module-{install,build} to have parameters --ignore-python --ignore-javascript to make it possible to translate flavor-only modules. ucs-school-umc-common uses --core which is wrong.
Created attachment 7819 [details] workaround without changes in dh-umc* This patch works around the problem dh-umc-module-install -c creating umc-core.mo instead of a dedicated .mo file.
AFAIS, if "Module: udm-saml" is specified, the rm + msgfmt as well as the translationId (which is especially for links in UMC) should then be unnecessary. ---------- 8< ---------- --- a/saml/univention-saml/debian/rules +++ b/saml/univention-saml/debian/rules @@ -27,13 +27,22 @@ # License with the Debian GNU/Linux or Univention distribution in file # /usr/share/common-licenses/AGPL-3; if not, see # <http://www.gnu.org/licenses/>. +override_dh_auto_build: + dh-umc-module-build -c + dh_auto_build override_dh_auto_install: + dh-umc-module-install -c + # fix translation + rm debian/univention-saml/usr/share/univention-management-console/i18n/de/umc-core.mo + mkdir -p usr/share/univention-management-console/i18n/de + msgfmt --check --output-file=usr/share/univention-management-console/i18n/de/udm-saml.mo umc/de.po dh_auto_install univention-install-config-registry --- /dev/null +++ b/saml/univention-saml/debian/univention-saml.umc-modules @@ -0,0 +1,6 @@ +Module: umc-core +Python: +Category: none +Definition: umc/saml-serviceprovider.xml +Javascript: +Icons: umc/icons --- a/saml/univention-saml/umc/saml-serviceprovider.xml +++ b/saml/univention-saml/umc/saml-serviceprovider.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!--DOCTYPE umc SYSTEM "branches/ucs-3.1/ucs/management/univention-management-console/doc/module.dtd"--> <umc version="2.0"> - <module id="udm" icon="udm-saml-serviceprovider" version="1.0"> + <module id="udm" translationId="udm-saml" icon="udm-saml-serviceprovider" version="1.0"> <name/> <description/> <keywords/> ---------- 8< ----------
(In reply to Alexander Kläser from comment #6) > AFAIS, if "Module: udm-saml" is specified, the rm + msgfmt as well as the > translationId (which is especially for links in UMC) should then be From dh_umc.py: 218 » » if core: 219 » » » if module.module_name != 'umc-core' or not module.xml_categories: 220 » » » » raise ValueError('Module definition does not match core module')
Btw: in UCS 4.2 modules without python/javascript don't need --core anymore! --core was for the UMC-Server core and was misused for e.g. ucs-school-branding and univention-saml.
(In reply to Alexander Kläser from comment #6) > AFAIS, if "Module: udm-saml" is specified, the rm + msgfmt as well as the > translationId (which is especially for links in UMC) should then be > unnecessary. To clarify, after further investigation this is now the definition of the .umc-modules file: Module: umc-core Category: none Definition: umc/saml-serviceprovider.xml Icons: umc/icons Module must be 'umc-core' and Category must be set in order to use dh-umc-module-{install,build} with -c option. The translationId attribute is needed because otherwise the message string of the module definition be will looked up in /usr/share/univention-management-console/i18n/{language_code}/udm.mo, were it is not included. I adjusted the changes to move umc-core.mo instead of deleting and rebuilding it. r73372: applied fix as described above. UCS 4.1-3: Package: univention-saml Version: 3.0.27-6.105.201610191908
r73373: YAML
I needed to add a call to refresh-i18n in the source package. The mo file was outdated. Afterwards everything was correctly translated. univention-saml (3.0.27-7): r73972 | Bug #41187: update .mo file univention-saml.yaml: r73974 | Bug #41187: update package version Changes: OK → "umc-core" needs to be specified. → The .mo file should be generated during the build process, but let's leave it like that for the moment. I synced my changes to 4.1-4 (I removed the YAML file via the revert): univention-saml (3.0.27-7): r73976 | Bug #41187: update .mo file univention-saml.yaml: r73977 | Revert "Bug #41187: fixes translation of the module description" r73975 | Bug #41187: fixes translation of the module description ... and 4.2-0 (previous commits were missing): univention-saml (4.0.0-7): r73979 | Bug #41187: update .mo file r73978 | Bug #41187: fixes translation of the module description
<http://errata.software-univention.de/ucs/4.1/320.html>