mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
Simplify trick to generate locales
This commit is contained in:
parent
c6619d9b7e
commit
950b994ebb
1 changed files with 5 additions and 5 deletions
|
@ -528,11 +528,11 @@ function fix_locales() {
|
|||
command -v locale-gen > /dev/null || apt_get_wrapper -o Dpkg::Options::="--force-confold" -y install locales
|
||||
|
||||
# Generate at least en_US.UTF-8
|
||||
if grep "en_US.UTF-8" /etc/locale.gen; then
|
||||
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen
|
||||
else
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
fi
|
||||
grep -q "^ *en_US.UTF-8" /etc/locale.gen || echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
|
||||
# FIXME: here some day we should try to identify the user's lang from LANG or LC_ALL and generate the appropriate locale ...
|
||||
# (and set this lang as the default in /etc/env 3 lines below)
|
||||
|
||||
locale-gen
|
||||
|
||||
# If no /etc/environment exists, default to en_US.UTF-8
|
||||
|
|
Loading…
Add table
Reference in a new issue