Merge branch 'assert' into 'master'
[mailman.git] / update-pot.sh
blob78dae286bf1e659c08053c4b452a7d5790433bd8
1 #!/bin/bash
3 # This script update the mailman.pot file with new strings.
5 pot_file="src/mailman/messages/mailman.pot"
7 # First, update the pot file with the new strings.
8 ls src/mailman/*/*.py | xargs xgettext -o $pot_file -w 115
10 # Then, update all the existing .po files.
11 for each in src/mailman/templates/en/*.txt; do
12 filename=$(basename $each)
13 echo -e "\nmsgid \"$filename\"" >> $pot_file
14 echo "msgstr \"\"" >> $pot_file
15 done
17 # Then, update all the po files.
18 for each in src/mailman/messages/*/*/*.po; do
19 msgmerge --update -w 85 --no-fuzzy-matching --no-wrap $each $pot_file
20 done
22 # Finally, update the engligh PO file.
23 python3 update_po.py