Seite 1 von 1

locales in ubutu package

Verfasst: 17 Sep 2020, 11:39
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

Re: locales in ubutu package

Verfasst: 18 Sep 2020, 09:11
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

Re: locales in ubutu package

Verfasst: 09 Feb 2021, 15:56
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