locales in ubutu package

Antworten
nicolaslebrun
Beiträge: 98
Registriert: 18 Apr 2011, 11:43

locales in ubutu package

Beitrag von nicolaslebrun »

In ubuntu package, locales generation is very long lasting

in ubuntu.py, there's

Code: Alles auswählen

# Generate and set locales
# This will lead to generating all locales:
cmds.append("cat /usr/share/i18n/SUPPORTED > /etc/locale.gen")
cmds.append('echo "locales locales/default_environment_locale      select  %s" | debconf-set-selections' % locale)
replace the line

Code: Alles auswählen

cmds.append("cat /usr/share/i18n/SUPPORTED > /etc/locale.gen")
with

Code: Alles auswählen

cmds.append('cat /usr/share/i18n/SUPPORTED |grep "en_US.UTF-8\|%s" > /etc/locale.gen' % locale)
seems to work and is sufficient to me...

What do you think?

Regards,
Nico Lebrun
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1080
Registriert: 10 Jun 2015, 12:19

Re: locales in ubutu package

Beitrag von m.radtke »

Hi Nicolas
thanks for your feedback.

I think this needs a bit of adaption to make it work for more than US locales, but your suggestion is something to consider :)

Regards
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
nicolaslebrun
Beiträge: 98
Registriert: 18 Apr 2011, 11:43

Re: locales in ubutu package

Beitrag von nicolaslebrun »

Hi,

i do the same in debian.py

Code: Alles auswählen

cmds.append('cat /usr/share/i18n/SUPPORTED |grep "en_US.UTF-8\|%s" > /etc/locale.gen' % locale)
It leads to generate the locale i can select in the property "language" of the package.

With fr as language, it leads to a locale.gen that contain

en_US.UTF-8
fr_FR.UTF-8

It looks sufficient to me, isn't it ?

regards,
Nico
Antworten