Univention Bugzilla – Bug 18512
The "Contact" tab doesn't allow to set a country
Last modified: 2015-08-06 17:51:44 CEST
Aufgefallen bei der Schulung: In den Kontakt-Informationen im UDM kann zu der Adresse im Reiter "Kontakt" kein Land gespeichert werden.
This issue has been filed against UCS 2.3. UCS 2.3 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug". In this case please provide detailed information on how this issue is affecting you.
This has been requested in trainings a few times.
Still applicable to UCS 3.2.
(In reply to Alexander Kläser from comment #3) > Still applicable to UCS 3.2. And to UCS 4.0
Requested again. We should add friendlyCountryName.
Commit 62171 adds a country field to the contact tab, (udm attribute "country"). The LDAP attributes "c"/"countryName" and "friendlyCountryName" cannot be used, because they belong into a different structural object class chain: they meant to describe a country, not a person. The LDAP attribute 'st'/'stateOrProvinceName' is used instead. It is included with MAY in organizationalPerson. Although more characters would be possible, the ISO 3166-1 two-letter country codes are stored in LDAP. A DUM syntax class translates them into natural names. A test (61_udm-users/27_country_names_uptodate) was commited in 62172 that uses python-pycountry to check if the static list of country names and abbreviations in univention.admin.syntax.Country.choices is uptodate.
Commit 62180 adds a package dependency for the test.
The german translation of the countries is missing. Otherwise it look fine.
Added German translations in commits (62230-) 62233. The country translations were generated with: ------ import pycountry import gettext from univention.admin.handlers import simplePolicy import univention.admin.syntax as udm_syntax german = gettext.translation('iso3166', pycountry.LOCALES_DIR, languages=['de']) german.install() with open("/tmp/country_de", "wb") as f: for short, country in udm_syntax.Country.choices: f.write('#: modules/univention/admin/syntax.py:\nmsgid "%s"\nmsgstr "%s"\n\n' % (country, _(country))) ------ cat /tmp/country_de >> management/univention-directory-manager-modules/modules/univention/admin/de.po ------ Debians/Ubuntus/UCS python-pycountry do not contain the translations. pycountry has to be installed via pip.
With commit 62240 the translations for the country names from the package 'iso-codes' are used. YAML: 2015-07-17-univention-directory-manager-modules.yaml
OK: udm integration OK: UMC integration Reopen: The syntax definition has to be extended. Due to the translation of country names the list has to be resorted after translating the country names. Currently, the list is sorted by country codes. This leads to an unexpected order; e.g. in german, the list reads Australien Österreich Aserbaidschan
With commit 62429 the list of countries gets sorted in the currently used language. Package (10.0.31-8) and YAML updated (r62430).
OK: list gets sorted correctly for en and de OK: yaml -> Verified
I have problems with the dependency iso-codes? -------------------- 8< -------------------- $ apt-get install python-univention-directory-manager [...] The following packages have unmet dependencies: python-univention-directory-manager : Depends: iso-codes but it is not installable E: Unable to correct problems, you have held broken packages. -------------------- 8< --------------------
How does your sources.list look like? iso-codes is available in the 4.0-0 maintained repository.
(In reply to Erik Damrose from comment #15) > How does your sources.list look like? iso-codes is available in the 4.0-0 > maintained repository. True, my repository configuration was broken.
<http://errata.univention.de/ucs/4.0/278.html>