Skip to content

Commit

Permalink
Always create TMX if locale doesn't have one
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo committed Mar 1, 2016
1 parent c8e8634 commit 27d7b53
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/scripts/glossaire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ function updateStandardRepo() {
updated_locale=$?
fi

# Check if we have a cache file for this locale. If it's a brand
# new locale, we'll have the folder and no updates, but we
# still need to create the cache.
cache_file="${root}TMX/${locale}/cache_${locale}_${repo_name}.php"
if [ ! -f $cache_file ]
then
echored "Cache doesn't exist for ${repo_name}/${locale}"
updated_locale=1
fi

if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
then
buildCache $locale
Expand All @@ -234,6 +244,13 @@ function updateStandardRepo() {
updated_locale=$?
fi

cache_file="${root}TMX/${locale_code}/cache_${locale_code}_${repo_name}.php"
if [ ! -f $cache_file ]
then
echored "Cache doesn't exist for ${repo_name}/${locale_code}"
updated_locale=1
fi

if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
then
buildCache $locale_code
Expand Down Expand Up @@ -310,6 +327,16 @@ function updateGaiaRepo() {
updated_locale=$?
fi

# Check if we have a cache file for this locale. If it's a brand
# new locale, we'll have the folder and no updates, but we
# still need to create the cache.
cache_file="${root}TMX/${locale}/cache_${locale}_${repo_name}.php"
if [ ! -f $cache_file ]
then
echored "Cache doesn't exist for ${repo_name}/${locale}"
updated_locale=1
fi

if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
then
buildCache $locale
Expand All @@ -329,6 +356,13 @@ function updateGaiaRepo() {
updated_locale=$?
fi

cache_file="${root}TMX/${locale_code}/cache_${locale_code}_${repo_name}.php"
if [ ! -f $cache_file ]
then
echored "Cache doesn't exist for ${repo_name}/${locale_code}"
updated_locale=1
fi

if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
then
buildCache $locale_code
Expand Down

0 comments on commit 27d7b53

Please sign in to comment.