forked from djbook-ru/djbookru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
po_update.sh
executable file
·34 lines (29 loc) · 1006 Bytes
/
po_update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Скрипт предназначен для сбора из исходного кода и шаблонов текстовых
# строк, предназначенных для перевода.
LANGUAGES="ru"
PROJECTS="src"
APPS="main accounts claims code_review comments djangobb_forum doc_comments examples forum news videos links"
if test $# -gt 0; then
APPS=$@
fi
for lang in ${LANGUAGES}; do
for project in ${PROJECTS}; do
cd ${project}
mkdir -p locale
django-admin.py makemessages --locale ${lang}
cd ..
for app in ${APPS}; do
if test -d ${project}/${app}; then
cd ${project}/${app}
echo "Update messages for application: ${project}.${app}"
mkdir -p locale
django-admin.py makemessages --locale ${lang}
cd -
else
echo "Unknown application ${app}. Skipping..."
fi
done
done
done
exit 0