summaryrefslogtreecommitdiff
path: root/update-translations.sh
diff options
context:
space:
mode:
authorTobias McNulty <tobias@caktusgroup.com>2025-09-04 11:25:19 -0400
committerSaptak Sengupta <saptak013@gmail.com>2025-09-12 12:44:11 +0530
commit455763ef243adb74a0f2c3d17f44ada3761517f8 (patch)
tree1a007c326fd9ec17876abed82ba4c4ef07e081ec /update-translations.sh
parent567e690b8cd58db5081a95d3a2b7f9e9c7c07861 (diff)
Updated instructions
Diffstat (limited to 'update-translations.sh')
-rwxr-xr-xupdate-translations.sh18
1 files changed, 7 insertions, 11 deletions
diff --git a/update-translations.sh b/update-translations.sh
index 49d01500..6d0fda43 100755
--- a/update-translations.sh
+++ b/update-translations.sh
@@ -1,21 +1,17 @@
#!/bin/sh
-# Update translations from Transifex for the supported languages, and remove
-# the source location references (to help keep the diff noise down). Adapted from:
+# Script to update translations and remove the source location references (to help keep the
+# diff noise down). Adapted from:
# https://github.com/django/django-docs-translations/blob/stable/2.1.x/manage_translations.py
set -ex
-LANGUAGES="el es fr id it ja ko pl pt_BR zh_Hans"
-
LOCALE_DIRS="dashboard/locale/ docs/locale/ locale/"
-for LANG in $LANGUAGES; do
- tx pull -f -l $LANG --minimum-perc=70
- for DIR in $LOCALE_DIRS; do
- PO_FILE="$DIR$LANG/LC_MESSAGES/django.po"
- if [ -f "$PO_FILE" ]; then
- msgcat --no-location -o $PO_FILE $PO_FILE
- fi
+tx pull -a -f --minimum-perc=70
+
+for DIR in $LOCALE_DIRS; do
+ for PO_FILE in $(find $DIR -name django.po -not -path en/); do
+ msgcat --no-location -o $PO_FILE $PO_FILE
done
done