Salome HOME
#12754 fixed i18n accent francais
[tools/sat.git] / src / i18n / build_strings.sh
1 #!/bin/bash
2
3 # This script gets the strings from code to internationalize from the source code
4
5 I18HOME=`dirname $0`
6 SRC_DIR=$I18HOME/../..
7
8 # get strings for french translation
9 echo "Build strings for French, create and merging salomeTools.po" 
10
11 poFile=$I18HOME/fr/LC_MESSAGES/salomeTools.po
12 refFile=$I18HOME/fr/LC_MESSAGES/ref.pot
13
14 cp ${poFile} ${poFile}_old
15
16 xgettext $SRC_DIR/src/i18n/*.py \
17          $SRC_DIR/*.py \
18          $SRC_DIR/commands/*.py \
19          $SRC_DIR/src/*.py \
20          --no-wrap \
21          --no-location \
22          --language=Python \
23          --omit-header \
24          --output=${refFile}
25
26 msgmerge --quiet --update --previous $poFile $refFile
27
28 #retirer les messages obsolètes « #~ »
29 #msgattrib --no-obsolete -o $poFile $poFile
30
31 #ne pas retirer les messages obsolètes « #~ »
32 msgattrib --previous --output-file ${poFile} ${poFile}
33
34 rm $refFile
35
36 echo "Do translate stuff please..."
37 meld ${poFile} ${poFile}_old
38
39 echo "Do not forget 'translate.py' or 'translate.sh' to create salomeTools.mo"
40