Skip to content

Commit 27d7b53

Browse files
committed
Always create TMX if locale doesn't have one
1 parent c8e8634 commit 27d7b53

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

app/scripts/glossaire.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@ function updateStandardRepo() {
216216
updated_locale=$?
217217
fi
218218

219+
# Check if we have a cache file for this locale. If it's a brand
220+
# new locale, we'll have the folder and no updates, but we
221+
# still need to create the cache.
222+
cache_file="${root}TMX/${locale}/cache_${locale}_${repo_name}.php"
223+
if [ ! -f $cache_file ]
224+
then
225+
echored "Cache doesn't exist for ${repo_name}/${locale}"
226+
updated_locale=1
227+
fi
228+
219229
if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
220230
then
221231
buildCache $locale
@@ -234,6 +244,13 @@ function updateStandardRepo() {
234244
updated_locale=$?
235245
fi
236246

247+
cache_file="${root}TMX/${locale_code}/cache_${locale_code}_${repo_name}.php"
248+
if [ ! -f $cache_file ]
249+
then
250+
echored "Cache doesn't exist for ${repo_name}/${locale_code}"
251+
updated_locale=1
252+
fi
253+
237254
if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
238255
then
239256
buildCache $locale_code
@@ -310,6 +327,16 @@ function updateGaiaRepo() {
310327
updated_locale=$?
311328
fi
312329

330+
# Check if we have a cache file for this locale. If it's a brand
331+
# new locale, we'll have the folder and no updates, but we
332+
# still need to create the cache.
333+
cache_file="${root}TMX/${locale}/cache_${locale}_${repo_name}.php"
334+
if [ ! -f $cache_file ]
335+
then
336+
echored "Cache doesn't exist for ${repo_name}/${locale}"
337+
updated_locale=1
338+
fi
339+
313340
if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
314341
then
315342
buildCache $locale
@@ -329,6 +356,13 @@ function updateGaiaRepo() {
329356
updated_locale=$?
330357
fi
331358

359+
cache_file="${root}TMX/${locale_code}/cache_${locale_code}_${repo_name}.php"
360+
if [ ! -f $cache_file ]
361+
then
362+
echored "Cache doesn't exist for ${repo_name}/${locale_code}"
363+
updated_locale=1
364+
fi
365+
332366
if [ "$forceTMX" = true -o "$updated_english" = true -o "$updated_locale" -eq 1 ]
333367
then
334368
buildCache $locale_code

0 commit comments

Comments
 (0)