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.
|
||||
# ./create_langindex.sh [findbetter]
|
||||
# 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"
|
||||
|
|
|
@ -103,7 +103,7 @@ function get_language {
|
|||
|
||||
curl -s $MOODLEORG_URL/$lastversion/$lang.zip --output $lang.zip > /dev/null
|
||||
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"
|
||||
rm $lang.zip
|
||||
|
||||
|
@ -154,7 +154,7 @@ function get_languages {
|
|||
for lang in $langs; do
|
||||
get_language "$lang"
|
||||
|
||||
if [ $suffix != '' ]; then
|
||||
if [ ! -z $suffix ]; then
|
||||
get_language "$lang$suffix"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
# Script to update language packs on assets and detect new translated languages.
|
||||
# ./update_lang.sh [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 "lang_functions.sh"
|
||||
|
||||
forceLang=$1
|
||||
|
||||
print_title 'Generating language from code...'
|
||||
npx gulp lang
|
||||
|
||||
print_title 'Getting local mobile langs'
|
||||
git clone --branch integration --depth 1 https://github.com/moodlehq/moodle-local_moodlemobileapp.git ../../moodle-local_moodlemobileapp
|
||||
|
||||
|
|
Loading…
Reference in New Issue