Feature #3115

Language packs support

Added by Davide Principi over 6 years ago. Updated over 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-httpd-admin
Target version:v6.6
Resolution: NEEDINFO:No

Description

Language packs install localized strings under

  • /usr/share/nethesis/Nethgui/Language
  • /usr/share/nethesis/NethServer/Language

To localize correctly the following enhancements are required:

  • Implement support for country codes (ll_CC form - languagecode_CountryCode)
  • Support HTTP_ACCEPT_LANGUAGE HTTP header
  • Set LANG environment variable when spawining sub processes

Related issues

Related to NethServer 6 - Enhancement #2887: Localize "password expire" notifications CLOSED
Related to NethServer 6 - Task #3155: Software Center Languages category CLOSED

Associated revisions

Revision 503b9189
Added by Davide Principi over 6 years ago

Rely on Nethgui framework for LANG environment settings. Refs #3115

Revision 51e816d7
Added by Davide Principi over 6 years ago

Removed Spanish translation. Refs #3115

Revision 7dbc212a
Added by Davide Principi over 6 years ago

Removed Spanish translation. Refs #3115

Revision f709247a
Added by Davide Principi over 6 years ago

Removed Spanish translation. Refs #3115

Revision 6d7e34c1
Added by Davide Principi over 6 years ago

Merge branch 'b3115'. Refs #3115

Revision d1dc639c
Added by Davide Principi over 6 years ago

Bump Nethgui f9d6b1545d7dc5e59aac56609ad475a7a2b83c46. Refs #3115

Revision 70a4b35d
Added by Davide Principi over 6 years ago

.spec: Require php-intl module. Refs #3115

Refs nethesis/nethserver-nethgui#4000

Revision 02121f05
Added by Davide Principi over 6 years ago

Moved .po language catalogs to nethserver-lang project. Refs #3115

Revision a5aa1583
Added by Davide Principi over 6 years ago

Moved Italian catalogs to nethserver-lang package. Refs #3115

Revision a908b3ed
Added by Davide Principi over 6 years ago

Moved language catalogs to nethserver-lang package. Refs #3115

Revision 469149b0
Added by Davide Principi over 6 years ago

Moved language catalogs to nethserver-lang package. Refs #3115

Revision d8362805
Added by Davide Principi over 6 years ago

Restored nethserver-firewall-base.pot file. Refs #3115

Revision b758ee5f
Added by Davide Principi over 6 years ago

Moved .po language catalogs to nethserver-lang project. Refs #3115

Revision d1c79847
Added by Davide Principi over 6 years ago

Moved Italian catalogs to nethserver-lang package. Refs #3115

Revision 6d3f3916
Added by Davide Principi over 6 years ago

Require nethserver-lang-it and nethserver-lang-en packages. Refs #3115

To avoid RPM file conflicts with legacy packages, en and it langpacks
use the Override namespace.

Bump Nethgui 8562556c339740e219f82456d3988e35e076c5fa.
Refs nethserver/nethserver-nethgui#4000 nethserver/nethserver-nethgui#4001

Revision 32262daf
Added by Davide Principi over 6 years ago

Bump Nethgui ab277fe5accdc2cf932c1a63b06029157586f2d0. Refs #3115

Revision 97eef6e9
Added by Davide Principi over 6 years ago

Use only .po files to generate gettext catalogs. Refs #3115

Revision 5f1decca
Added by Davide Principi over 6 years ago

Added Portuguese support. Refs #3115

Updated translations.

Revision cd6cd71c
Added by Davide Principi over 6 years ago

Group lang packs by language, with region-specific support. Refs #3115

Revision 52039d6f
Added by Davide Principi over 6 years ago

Moved Help/it into nethserver-lang. Refs #3115

Revision f22f0913
Added by Davide Principi over 6 years ago

Dev: added Internationalization section. Refs #3115

Revision c6319261
Added by Davide Principi over 6 years ago

nethserver-base: Transifex configuration. Refs #3115

Revision 0418e122
Added by Davide Principi over 6 years ago

Transifex configuration. Refs #3115

Revision f0f25a66
Added by Davide Principi over 6 years ago

Transifex configuration. Refs #3115

Revision 30269112
Added by Davide Principi over 6 years ago

Transifex configuration. Refs #3115

History

#1 Updated by Davide Principi over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#3 Updated by Davide Principi over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

MODIFIED

  • The Nethgui framework now sets LANG environment varialble. Removed LANG setting from nethserver-base
  • New version of Nethgui framework in nethserver-httpd-admin
To avoid RPM conflicts with old Spanish and Italian translations, the following packages have been built again:
  • nethserver-directory
  • nethserver-samba
  • nethserver-base
  • nethserver-firewall-base
  • nethserver-backup-data

Test case

Enable the nethserver-testing repository and upgrade packages to modified version from Software center. This action is performed on an "it" or "en" interface: it must not break the current session.

  • After a successful upgrade verify the interface is translated correctly and help files are still available.
  • Logout
  • Login again by selecting a different locale and repeat the checks.
  • All Italian and English locale must be installed by default
  • Assuming nethserver-testing is enalbed in .repo file, to install additional locales, type at the console:
    # yum install nethserver-lang-*
    
  • An URL like https://192.168.122.179:980 should redirect the UA to the default language. If the user has authenticated, his locale choice must be honoured, otherwise the default locale is defined by the UA language preferences with the Accept-Language HTTP header. If the locale is not recognized the default is en-US.

#4 Updated by Davide Principi over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing (6.6):
nethserver-httpd-admin-1.3.8-1.1.gd1dc639.ns6.noarch.rpm
nethserver-httpd-admin-1.3.8-1.3.g6d3f391.ns6.noarch.rpm
nethserver-base-2.6.5-1.3.g6d7e34c.ns6.noarch.rpm
nethserver-samba-1.5.0-1.1.gf709247.ns6.noarch.rpm
nethserver-base-2.6.5-1.6.gd1c7984.ns6.noarch.rpm

nethserver-httpd-admin-1.3.8-1.4.g32262da.ns6.noarch.rpm
nethserver-base-2.6.5-1.7.ge37ede7.ns6.noarch.rpm
nethserver-directory-2.1.0-1.1.g7dbc212.ns6.noarch.rpm
nethserver-samba-1.5.0-1.3.ga5aa158.ns6.noarch.rpm
nethserver-firewall-base-2.5.1-1.15.gd836280.ns6.noarch.rpm
nethserver-backup-data-1.1.2-1.1.ga908b3e.ns6.noarch.rpm

nethserver-lang-de-0.0.1-1.ns6.noarch.rpm
nethserver-lang-el-0.0.1-1.ns6.noarch.rpm
nethserver-lang-en-0.0.1-1.ns6.noarch.rpm
nethserver-lang-es-0.0.1-1.ns6.noarch.rpm
nethserver-lang-fr-0.0.1-1.ns6.noarch.rpm
nethserver-lang-hu-0.0.1-1.ns6.noarch.rpm
nethserver-lang-it-0.0.1-1.ns6.noarch.rpm
nethserver-lang-nl-0.0.1-1.ns6.noarch.rpm
nethserver-lang-ru-0.0.1-1.ns6.noarch.rpm

#5 Updated by Davide Principi over 6 years ago

  • Assignee deleted (Davide Principi)

#6 Updated by Davide Principi over 6 years ago

#7 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee set to Giacomo Sanchietti

#8 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 20

Test cases

  • After a successful upgrade verify the interface is translated correctly and help files are still available. OK
  • All Italian and English locale must be installed by default OK
  • Extra locales OK
  • Login page automatically selects UA language OK
But I've found following problems:
  • the login page display a bunch of English languages even if not installed (eg. English-Zimbawe). The form should display only installed locales
  • when using English language, todos yellow boxes are not displayed. When trying to execute from command line:
    [root@localhost ~]#  /etc/nethserver/todos.d/20samba_admin 
    Traceback (most recent call last):
      File "/etc/nethserver/todos.d/20samba_admin", line 41, in <module>
        gettext.install('nethserver-samba')
      File "/usr/lib64/python2.6/gettext.py", line 495, in install
        t = translation(domain, localedir, fallback=True, codeset=codeset)
      File "/usr/lib64/python2.6/gettext.py", line 480, in translation
        t = _translations.setdefault(key, class_(open(mofile, 'rb')))
      File "/usr/lib64/python2.6/gettext.py", line 180, in __init__
        self._parse(fp)
      File "/usr/lib64/python2.6/gettext.py", line 339, in _parse
        tmsg = unicode(tmsg, self._charset)
    LookupError: unknown encoding: CHARSET
    

    Same problem for /etc/nethserver/todos.d/80backup-data script.

#9 Updated by Davide Principi over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#10 Updated by Davide Principi over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60
  • Read Login language from installed packages (require langs > 0.0.1-1.5)
  • Language name with uppercase first letter
  • Fixed English catalog CHARSET exception

#11 Updated by Davide Principi over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-httpd-admin-1.3.8-1.5.gc53ccb6.ns6.noarch.rpm
nethserver-lang-de-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-el-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-en-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-es-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-fr-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-hu-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-it-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-nl-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-pt-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm
nethserver-lang-ru-0.0.1-1.5.gcd6cd71.ns6.noarch.rpm

#12 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee set to Giacomo Sanchietti

#13 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

All tests passed.

#14 Updated by Davide Principi over 6 years ago

We should discuss Internationalization rules https://github.com/nethesis/nethserver-docs/pull/66

#15 Updated by Davide Principi over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates:
nethserver-httpd-admin-1.4.0-1.ns6.noarch.rpm
nethserver-base-2.7.0-1.ns6.src.rpm
nethserver-directory-2.2.0-1.ns6.noarch.rpm
nethserver-firewall-base-2.6.0-1.ns6.noarch.rpm
nethserver-samba-1.5.1-1.ns6.noarch.rpm
nethserver-backup-data-1.1.3-1.ns6.noarch.rpm

nethserver-lang-de-1.0.0-1.ns6.noarch.rpm
nethserver-lang-el-1.0.0-1.ns6.noarch.rpm
nethserver-lang-en-1.0.0-1.ns6.noarch.rpm
nethserver-lang-es-1.0.0-1.ns6.noarch.rpm
nethserver-lang-fr-1.0.0-1.ns6.noarch.rpm
nethserver-lang-hu-1.0.0-1.ns6.noarch.rpm
nethserver-lang-it-1.0.0-1.ns6.noarch.rpm
nethserver-lang-nl-1.0.0-1.ns6.noarch.rpm
nethserver-lang-pt-1.0.0-1.ns6.noarch.rpm
nethserver-lang-ru-1.0.0-1.ns6.noarch.rpm

#16 Updated by Davide Principi about 6 years ago

  • Related to Task #3155: Software Center Languages category added

Also available in: Atom PDF