-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakepo
More file actions
executable file
·33 lines (26 loc) · 779 Bytes
/
makepo
File metadata and controls
executable file
·33 lines (26 loc) · 779 Bytes
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
#!/bin/bash -e
#©keithhedger Fri 3 Oct 17:38:03 BST 2014 kdhedger68713@gmail.com
MAKEPOS=0
MAKEMOS=0
DOMAINNAME=kkedit
if [ "X$1" = "Xmakepos" ];then
MAKEPOS=1
MAKEMOS=0
fi
if [ "X$1" = "Xmakemos" ];then
MAKEPOS=0
MAKEMOS=1
fi
langs="fr_FR"
rm ${DOMAINNAME}.pot||true
xgettext --package-name ${DOMAINNAME} --package-version 1.2 --default-domain ${DOMAINNAME} --output ${DOMAINNAME}.pot KKEdit/src/*.cpp KKEdit/src/*.h
for arg in $langs
do
mkdir --parents po/${arg}/LC_MESSAGES
if [ $MAKEPOS -eq 1 ];then
msginit --no-translator --locale $arg --output-file ${DOMAINNAME}_${arg}.po --input ${DOMAINNAME}.pot
fi
if [ $MAKEMOS -eq 1 ];then
msgfmt --check --verbose --output-file po/${arg}/LC_MESSAGES/${DOMAINNAME}.mo ${DOMAINNAME}_${arg}.po
fi
done