Browse Source

Update translations

Bob Mottram 9 years ago
parent
commit
2bb7a202e9
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      translate

+ 6
- 4
translate View File

@@ -97,7 +97,7 @@ function install_translations {
97 97
     do
98 98
         COMMAND_NAME=$(echo $f | awk -F '/' '{print $2}')
99 99
         for lang in "${language[@]}"
100
-        do
100
+        do          
101 101
             # convert json to mo
102 102
             if [ -f /usr/bin/i18next-conv ]; then
103 103
                 if [ ! -f locale/${lang}/${COMMAND_NAME}.mo ]; then
@@ -109,9 +109,11 @@ function install_translations {
109 109
             fi
110 110
 
111 111
             # install the mo
112
-            if [ -f locale/${lang}/${COMMAND_NAME}.mo ]; then
113
-                cp locale/${lang}/${COMMAND_NAME}.mo /usr/share/locale/${lang}/${COMMAND_NAME}.mo
114
-            fi
112
+            if [ -d /usr/share/locale/${lang} ]; then
113
+                if [ -f locale/${lang}/${COMMAND_NAME}.mo ]; then
114
+                    cp locale/${lang}/${COMMAND_NAME}.mo /usr/share/locale/${lang}/${COMMAND_NAME}.mo
115
+                fi          
116
+            fi          
115 117
         done
116 118
     done
117 119
 }