Skip to content

Commit 2457400

Browse files
authored
Create update.sh
1 parent 86d2768 commit 2457400

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/update.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
# Update local po files from Transifex
3+
4+
set -ex
5+
6+
LANGUAGE=pt_BR
7+
8+
# Create POT Files
9+
cd cpython/Doc
10+
#make build ALLSPHINXOPTS="-E -b gettext -D gettext_compact=0 -d build/.doctrees . locales/pot"
11+
sphinx-build -E -b gettext -D gettext_compact=0 -d build/.doctrees . locales/pot
12+
13+
# Update CPython's .tx/config
14+
cd locales
15+
sphinx-intl create-txconfig
16+
sphinx-intl update-txconfig-resources -p locales/pot -d . --transifex-project-name python-newest
17+
18+
# Update the translation project's .tx/config
19+
cd ../../..
20+
mkdir -p .tx
21+
sed cpython/Doc/locales/.tx/config \
22+
-e '/^source_file/d' \
23+
-e 's|<lang>/LC_MESSAGES/||' \
24+
-e "s|^file_filter|trans.${LANGUAGE}|" \
25+
> .tx/config
26+
27+
tx pull -l $LANGUAGE --use-git-timestamps --parallel

0 commit comments

Comments
 (0)