locales in ubutu package

Antworten
nicolaslebrun
Beiträge: 112
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
Ex-uib-Team
Beiträge: 1767
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


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


nicolaslebrun
Beiträge: 112
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