MOBILE-4081 lang: Fix generation of local app module file
parent
99f3c7a4f4
commit
a347ff01c5
|
@ -3,6 +3,7 @@
|
||||||
# Script to create langindex from available language packs.
|
# Script to create langindex from available language packs.
|
||||||
# ./create_langindex.sh [findbetter]
|
# ./create_langindex.sh [findbetter]
|
||||||
# If findbetter is set it will try to find a better solution for every key.
|
# If findbetter is set it will try to find a better solution for every key.
|
||||||
|
# Edit lang_functions.sh LANGPACKSFOLDER variable to match your system's
|
||||||
#
|
#
|
||||||
|
|
||||||
source "functions.sh"
|
source "functions.sh"
|
||||||
|
|
|
@ -103,7 +103,7 @@ function get_language {
|
||||||
|
|
||||||
curl -s $MOODLEORG_URL/$lastversion/$lang.zip --output $lang.zip > /dev/null
|
curl -s $MOODLEORG_URL/$lastversion/$lang.zip --output $lang.zip > /dev/null
|
||||||
size=$(du -k "$lang.zip" | cut -f 1)
|
size=$(du -k "$lang.zip" | cut -f 1)
|
||||||
if [ ! -n $lang.zip ] || [ $size -le 60 ]; then
|
if [ ! -n $lang.zip ] || [ $size -le 1 ]; then
|
||||||
echo "Wrong language name or corrupt file for $lang"
|
echo "Wrong language name or corrupt file for $lang"
|
||||||
rm $lang.zip
|
rm $lang.zip
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ function get_languages {
|
||||||
for lang in $langs; do
|
for lang in $langs; do
|
||||||
get_language "$lang"
|
get_language "$lang"
|
||||||
|
|
||||||
if [ $suffix != '' ]; then
|
if [ ! -z $suffix ]; then
|
||||||
get_language "$lang$suffix"
|
get_language "$lang$suffix"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -3,12 +3,16 @@
|
||||||
# Script to update language packs on assets and detect new translated languages.
|
# Script to update language packs on assets and detect new translated languages.
|
||||||
# ./update_lang.sh [language]
|
# ./update_lang.sh [language]
|
||||||
# If language is set it will only update the selected language.
|
# If language is set it will only update the selected language.
|
||||||
|
# Edit lang_functions.sh LANGPACKSFOLDER variable to match your system's
|
||||||
#
|
#
|
||||||
source "functions.sh"
|
source "functions.sh"
|
||||||
source "lang_functions.sh"
|
source "lang_functions.sh"
|
||||||
|
|
||||||
forceLang=$1
|
forceLang=$1
|
||||||
|
|
||||||
|
print_title 'Generating language from code...'
|
||||||
|
npx gulp lang
|
||||||
|
|
||||||
print_title 'Getting local mobile langs'
|
print_title 'Getting local mobile langs'
|
||||||
git clone --branch integration --depth 1 https://github.com/moodlehq/moodle-local_moodlemobileapp.git ../../moodle-local_moodlemobileapp
|
git clone --branch integration --depth 1 https://github.com/moodlehq/moodle-local_moodlemobileapp.git ../../moodle-local_moodlemobileapp
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue