-
Notifications
You must be signed in to change notification settings - Fork 35
/
po_update.sh
executable file
·37 lines (31 loc) · 1.06 KB
/
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
35
36
37
#!/bin/bash
# Скрипт предназначен для сбора из исходного кода и шаблонов текстовых
# строк, предназначенных для перевода.
LANGUAGES="ru"
PROJECTS="src"
APPS="main accounts claims code_review comments djangobb_forum doc_comments examples forum news videos links"
export PYTHONPATH=$PYTHONPATH:`pwd`
export DJANGO_SETTINGS_MODULE=src.settings
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