Project

General

Profile

Download (652 Bytes) Statistics
| Branch: | Tag: | Revision:

theme / update-translations.sh @ 29db41bb

1
#! /bin/sh
2

    
3
CKAN_INSTALL_DIR=../venv/src/ckan/
4

    
5
python setup.py extract_messages --mapping-file babel.cfg --output i18n/ckanext.pot
6

    
7
for LANG in fr es ca it bg tr
8
do
9
	if [ -e i18n/$LANG/LC_MESSAGES/ckanext.po ]
10
	then
11
		python setup.py update_catalog -l $LANG -i i18n/ckanext.pot -o i18n/$LANG/LC_MESSAGES/ckanext.po
12
	else
13
		python setup.py init_catalog -l $LANG -i i18n/ckanext.pot -o i18n/$LANG/LC_MESSAGES/ckanext.po
14
	fi
15

    
16
	test -d $CKAN_INSTALL_DIR && msgcat --use-first \
17
		"i18n/$LANG/LC_MESSAGES/ckanext.po" \
18
		"$CKAN_INSTALL_DIR/ckan/i18n/$LANG/LC_MESSAGES/ckan.po" \
19
		| msgfmt - -o "$CKAN_INSTALL_DIR/ckan/i18n/$LANG/LC_MESSAGES/ckan.mo"
20
done
(10-10/10)