Paste #Gfqdqx4eP8c61pyZhtpQ
Welcome On LodgeIt
Welcome to the LodgeIt pastebin. In order to use the notification feature
a 31 day cookie with an unique ID was created for you. The lodgeit database
does not store any information about you, it's just used for an advanced
pastebin experience :-). Read more on the about lodgeit page. Have fun :-)
hide this notification
| 45 |
45 |
percreq="70" |
| 46 |
46 |
echo "Updating LINGUAS ..." |
| 47 |
47 |
for po in po/*.po; do |
| 48 |
|
percdone=$(msgfmt -o /dev/null --statistics $po 2>&1 | awk '{printf "%.0f\n", $1 / ($1 + $4 + $7) * 100}') |
|
48 |
percdone=$(msgfmt -o /dev/null --statistics $po 2>&1 | awk '{printf "%.0f", $1 / ($1 + $4 + $7) * 100}') |
| 49 |
49 |
if [ "$percdone" -ge "$percreq" ]; then |
| 50 |
50 |
basename $po .po |
| 51 |
51 |
fi |
| … |
| 54 |
54 |
|
| 55 |
55 |
while getopts ":gl:u" opt; do |
| 56 |
56 |
case $opt in |
| 57 |
|
g) |
| 58 |
|
generated="yes";; |
| 59 |
|
l) |
| 60 |
|
language=$OPTARG;; |
| 61 |
|
u) |
| 62 |
|
shipped_languages |
| 63 |
|
exit;; |
|
57 |
g) |
|
58 |
generated="yes";; |
|
59 |
l) |
|
60 |
language=$OPTARG;; |
|
61 |
u) |
|
62 |
shipped_languages |
|
63 |
exit;; |
| 64 |
64 |
esac |
| 65 |
65 |
done |
| 66 |
66 |
|
| 2 |
2 |
|
| 3 |
3 |
build_creds () { |
| 4 |
4 |
for lang in $@; do |
| 5 |
|
echo '<?xml version="1.0" encoding="utf-8"?><section>' > $lang/translators.xml |
| 6 |
|
translator_credits=$(tail -q -n +2 $lang/xi-translator-credits.xml) |
| 7 |
|
echo $translator_credits >> $lang/translators.xml |
|
5 |
printf '<?xml version="1.0" encoding="utf-8"?>\n<section>\n' > $lang/translators.xml |
|
6 |
tail -n +2 $lang/xi-translator-credits.xml >> $lang/translators.xml |
| 8 |
7 |
|
| 9 |
8 |
translators=$(sed -n '/^msgid "translator-credits"/,/^$/ {s@^"[ ]*\(.\+\)[ ]\+https://launchpad.net/~\([^ \\"]\+\).*$@\t<listitem><para>\1 (\2)</para></listitem>@p;/^$/Q}' po/$lang.po | sort -u) |
| 10 |
9 |
if [ -z "$translators" ]; then |
| 11 |
|
translators_not_found=$(tail -q -n +2 $lang/xi-translators-not-found.xml) |
| 12 |
|
echo $translators_not_found >> $lang/translators.xml |
|
10 |
tail -n +2 $lang/xi-translators-not-found.xml >> $lang/translators.xml |
| 13 |
11 |
else |
| 14 |
12 |
printf "<itemizedlist>\n%b\n</itemizedlist>\n" "$translators" >> $lang/translators.xml |
| 15 |
13 |
fi |
| … |
| 20 |
18 |
|
| 21 |
19 |
while getopts ":gl:" opt; do |
| 22 |
20 |
case $opt in |
| 23 |
|
g) |
| 24 |
|
generated="yes";; |
| 25 |
|
l) |
| 26 |
|
language=$OPTARG;; |
|
21 |
g) |
|
22 |
generated="yes";; |
|
23 |
l) |
|
24 |
language=$OPTARG;; |
| 27 |
25 |
esac |
| 28 |
26 |
done |
| 29 |
27 |
|