Kaynağa Gözat

Language setting

Bob Mottram 8 yıl önce
ebeveyn
işleme
c0479cffde
2 değiştirilmiş dosya ile 18 ekleme ve 16 silme
  1. 1
    0
      src/freedombone-config
  2. 17
    16
      src/freedombone-utils-international

+ 1
- 0
src/freedombone-config Dosyayı Görüntüle

@@ -1280,6 +1280,7 @@ function interactive_select_language {
1280 1280
     esac
1281 1281
     save_configuration_values
1282 1282
 
1283
+    locale-gen "${DEFAULT_LANGUAGE}"
1283 1284
     update-locale LANG=${DEFAULT_LANGUAGE}
1284 1285
     update-locale LANGUAGE=${DEFAULT_LANGUAGE}
1285 1286
     update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}

+ 17
- 16
src/freedombone-utils-international Dosyayı Görüntüle

@@ -29,26 +29,27 @@
29 29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30 30
 
31 31
 function locale_setup {
32
-	if grep -Fxq "locale_setup" $COMPLETION_FILE; then
33
-		return
34
-	fi
32
+    if grep -Fxq "locale_setup" $COMPLETION_FILE; then
33
+        return
34
+    fi
35 35
 
36
-	apt-get -y install locales locales-all debconf
36
+    apt-get -y install locales locales-all debconf
37 37
 
38
-	if [ ! "$DEFAULT_LANGUAGE" ]; then
39
-		DEFAULT_LANGUAGE='en_GB.UTF-8'
40
-	fi
41
-	if [ ${#DEFAULT_LANGUAGE} -lt 2 ]; then
42
-		DEFAULT_LANGUAGE='en_GB.UTF-8'
43
-	fi
38
+    if [ ! "$DEFAULT_LANGUAGE" ]; then
39
+        DEFAULT_LANGUAGE='en_GB.UTF-8'
40
+    fi
41
+    if [ ${#DEFAULT_LANGUAGE} -lt 2 ]; then
42
+        DEFAULT_LANGUAGE='en_GB.UTF-8'
43
+    fi
44 44
 
45
-	update-locale LANG=${DEFAULT_LANGUAGE}
46
-	update-locale LANGUAGE=${DEFAULT_LANGUAGE}
47
-	update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}
48
-	update-locale LC_ALL=${DEFAULT_LANGUAGE}
49
-	update-locale LC_CTYPE=${DEFAULT_LANGUAGE}
45
+    locale-gen "${DEFAULT_LANGUAGE}"
46
+    update-locale LANG=${DEFAULT_LANGUAGE}
47
+    update-locale LANGUAGE=${DEFAULT_LANGUAGE}
48
+    update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}
49
+    update-locale LC_ALL=${DEFAULT_LANGUAGE}
50
+    update-locale LC_CTYPE=${DEFAULT_LANGUAGE}
50 51
 
51
-	echo 'locale_setup' >> $COMPLETION_FILE
52
+    echo 'locale_setup' >> $COMPLETION_FILE
52 53
 }
53 54
 
54 55
 # NOTE: deliberately no exit 0