Translation questions

Hello, in order to translate UCS I followed this chapter docs.software-univention.de/deve … ranslation but the generated deb package file didn’t seem to do anything. That’s when I noticed that the UCS version that I have is 4.1. So I have 2 questions:

  1. Where can I download UCS 4.0 just for the purposes of testing this package?
  2. Are there any tools for helping me with the translation files migration from 4.0 to 4.1?

Thanks for your attention.

Hi,
in my case, it seemed to work fine (at least the initial preparation of a translation package). You can have a look at the 4.1 documentation. Then, I executed the following code (slightly adjusted commands from the doc in order to be up-to-date with 4.1-1):

univention-install univention-ucs-translation-template dpkg-dev subversion
mkdir ~/translation
cd ~/translation
svn co http://forge.univention.org/svn/dev/branches/ucs-4.1/ucs-4.1-1
univention-ucs-translation-build-package.py -s ~/translation/ucs-4.1-1 -c fr -l fr_FR.UTF-8:UTF-8 -n French

Can you execute these without problems?

best regards
Alexander Kläser

Concerning the update of a translation package, the steps are described in the manual, as well:
docs.software-univention.de/deve … atepackage

best regards
Alexander Kläser

Yes, I can execute these commands with no issues.

This is what I did now:

univention-install univention-ucs-translation-template dpkg-dev subversion
mkdir ~/translation
cd ~/translation
svn co http://forge.univention.org/svn/dev/branches/ucs-4.1/ucs-4.1-1
univention-ucs-translation-build-package.py -s ~/translation/ucs-4.1-1 -c fr -l fr_FR.UTF-8:UTF-8 -n French

edited a few .po files

cd ~/translation/univention-ucs-translation-fr
dpkg-buildpackage 
dpkg -i ../univention-ucs-translation-fr_*.deb

restarted the system and still didn’t find any signs of the french package in UCS.

I realized that the created translation package sets a wrong UCR variable in its debian/*postinst script. You need to set the following variable manually (or adapt the postinst script):

ucr set ucs/server/languages/fr_FR=Francais

I edited the po file of the UDM UMC module (it will change the description of the tiles shown on the UMC overview page):

cat fr/management/univention-management-console-module-udm/umc/fr.po
[...]
msgid "Users"
msgstr "Utilisateur"

msgid "Management of domain users"
msgstr "Gestion d'utilisateurs"

msgid "Groups"
msgstr "Groupes"

msgid "Management of user and computer groups in the domain"
msgstr "Gestion de groupes d'utilisateurs et d'ordinateurs dans un domaine"
[...]

I then followed the documentation for the build steps by executing (attention, in the manual, there is the suffix “.py” missing):

univention-ucs-translation-update-source-files.py -s ~/translation/ucs-4.1-1 -c fr
univention-ucs-translation-update-target-files.py -s ~/translation/ucs-4.1-1 -c fr

When logging in at UMC, I first chose in the upper right as language “Francais” (this is now visible as the wrong UCR variable had been set). After the login, my users category is now named “Utilisateurs” and user and group modules have the changes I applied.

I hope that helps.

best regards
Alexander Kläser

Alright, setting the variable manually fixed the issue! Thanks for your help.

Something strange is be happening when generating .po files at 4.1-1.

Take for example management/univention-join/umc/js/de.po from the 4.1-1 repository. There it contains strings for join.js. But the generated po file fr/management/univention-join/umc/js/fr.po is the following:

# This file is auto-generated by the dh-umc tools and should not be edited!
msgid ""
msgstr ""
"Project-Id-Version: univention-management-console-module-join\n"
"Report-Msgid-Bugs-To: packages@univention.de\n"
"POT-Creation-Date: 2016-03-17 06:56-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"

#: umc/python/join/__init__.py:386 umc/python/join/__init__.py:437
msgid "A join process is already running."
msgstr ""

#: umc/python/join/__init__.py:417 umc/python/join/__init__.py:470
#, python-format
msgid "An unexpected error occurred: %s"
msgstr ""

#: umc/python/join/__init__.py:451
msgid "Authentication"
msgstr ""

#: umc/python/join/__init__.py:394 umc/python/join/__init__.py:441
msgid ""
"Currently, software is being installed or uninstalled. Join scripts should "
"not be run right now."
msgstr ""

#: umc/python/join/__init__.py:398
msgid "Domain join"
msgstr ""

#: umc/python/join/__init__.py:315
#, python-format
msgid "Error: %s"
msgstr ""

#: umc/python/join/__init__.py:224
#, python-format
msgid "Executing join script %s"
msgstr ""

#: umc/python/join/__init__.py:223
msgid "Executing join scripts"
msgstr ""

#: umc/python/join/__init__.py:105
msgid "Initializing"
msgstr ""

#: umc/python/join/__init__.py:390
msgid "Invalid server role! A master domain controller can not be joined."
msgstr ""

#: umc/python/join/__init__.py:75
msgid ""
"No DNS record for the domaincontroller master was found. This might be a "
"problem with the configured DNS server. Please make sure the DNS settings "
"are correct."
msgstr ""

#: umc/python/join/__init__.py:251
msgid ""
"Some join scripts could not be executed. More details can be found in the "
"log file <i>/var/log/univention/join.log</i>.<br/>Please retry to execute "
"the join scripts after resolving any conflicting issues."
msgstr ""

#: umc/python/join/__init__.py:94
msgid "The entered FQDN is not a valid value"
msgstr ""

#: umc/python/join/__init__.py:78
msgid ""
"The lookup of the domaincontroller master record timed out. There might be a"
" problem with the configured DNS server. Make sure the DNS server is up and "
"running or check the DNS settings."
msgstr ""

#: umc/python/join/__init__.py:212
#, python-format
msgid ""
"The system join process could not be completed:<br/><br/><i>%s</i><br/><br/>"
" More details can be found in the log file "
"<i>/var/log/univention/join.log</i>.<br/>Please retry after resolving any "
"conflicting issues."
msgstr ""

#: umc/python/join/__init__.py:412 umc/python/join/__init__.py:465
msgid "finished..."
msgstr ""

Any idea what’s going wrong here?

Oh yes, you are right, this is incorrect, I could reproduce the error. It seems that the python source files are take by mistake instead of the javascript ones.

I applied this patch and obtained the correct files. Could you verify whether it works for you, as well?

wget http://forge.univention.org/bugzilla/attachment.cgi?id=7556 -O ucs-i18n.patch
patch /usr/share/pyshared/univention/translationhelper.py ucs-i18n.patch

best regards
Alexander Kläser

Hello again, first of all I’m sorry I forgot to confirm here that the patch indeed worked for me. Thanks for that.

We’re still having other problems stemming from the deb package creation though. We update the translated strings but sometimes the process doesn’t detect the changes and the newly created package still have some old translation strings. We’re not really sure where the previous translations are cached, we tried deleting every .mo file generated by univention-ucs-translation-update-target-files.py but no luck. We also tried to manually update the POT-Creation-Date on the files but nothing changed. Could you provide us some insight on this? Thanks.

If I understand correctly, you perform the following steps (also as described in the manual):
[ol]
[li] Initial build of translation package[/li]
[li] Changes to .po files.[/li]
[li] Run univention-ucs-translation-update-target-files.py in order to compile the translation files. (This step is necessary each time before building the translation .deb package.)[/li]
[li] Adapt debian/changelog file and increase package version (by executing dch -i). Run dpkg-buildpackage in order to build a new .deb package.[/li][/ol]
Is this correct? Or did you mean updates w.r.t. the UCS SVN repository? In this case the two additional steps are required:
[ol]
[li] Update SVN repository via svn up.[/li]
[li] Merge changes into .po files of the translation package by running univention-ucs-translation-update-source-files.py.[/li]
[li] See (2) above.[/li]
[li] See (3) above.[/li]
[li] See (4) above.[/li][/ol]
I hope this helps.

best regards
Alexander Kläser

Mastodon