locales in ubutu package

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

locales in ubutu package

Beitragvon nicolaslebrun » 17 Sep 2020, 11:39

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: 941
Registriert: 10 Jun 2015, 12:19

Re: locales in ubutu package

Beitragvon m.radtke » 18 Sep 2020, 09:11

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.