]>
Commit | Line | Data |
---|---|---|
f1d6f80d | 1 | #!/bin/sh |
a151895d AJ |
2 | # |
3 | ## Copyright (C) 1996-2014 The Squid Software Foundation and contributors | |
4 | ## | |
5 | ## Squid software is distributed under GPLv2+ license and includes | |
6 | ## contributions from numerous individuals and organizations. | |
7 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
8 | ## | |
9 | ||
8289d754 | 10 | # |
52532388 | 11 | # Update the core errpages.pot file from the basic templates |
8289d754 AJ |
12 | # Useful if any template has altered. |
13 | # | |
0bb1e8fd | 14 | # To be run during maintenance from the main squid directory |
52532388 | 15 | # |
8289d754 | 16 | |
0bb1e8fd AJ |
17 | ## Begin errors/ Updates. |
18 | ||
19 | cd errors/ | |
8289d754 | 20 | # Make sure any existing temp stuff is gone from previous updates... |
9447b393 | 21 | rm -rf ./pot |
52532388 AJ |
22 | rm -f errpages.pot.new |
23 | rm errpages.pot | |
8289d754 AJ |
24 | |
25 | # make a temp directory for all our workings... | |
9447b393 | 26 | mkdir pot |
8289d754 | 27 | |
02259ff8 | 28 | # Generate per-page dictionaries ... |
8289d754 | 29 | for f in `ls -1 ./templates/`; do |
02259ff8 CT |
30 | case ${f} in |
31 | error-details.txt) | |
32 | ../scripts/mk-error-details-po.pl ./templates/${f} > ./pot/${f}.pot | |
33 | ;; | |
34 | ERR_*) | |
f1d6f80d | 35 | html2po -i ./templates/${f} -P --duplicates=merge -o ./pot/${f}.pot |
02259ff8 CT |
36 | ;; |
37 | *) | |
38 | echo "SKIP: ${f}" | |
39 | esac | |
8289d754 AJ |
40 | done |
41 | ||
52532388 AJ |
42 | # merge and sort the per-page .pot into a single master |
43 | msgcat ./pot/*.pot -s -o errpages.pot.new && | |
8289d754 | 44 | ( |
52532388 | 45 | cat errpages.pot.new | |
c7e30298 | 46 | sed s/PACKAGE\ VERSION/Squid-3/ | |
8289d754 | 47 | sed s/LANGUAGE\ \<LL\@li\.org\>/Squid\ Developers\ \<squid-dev\@squid-cache\.org\>/ |
52532388 | 48 | ) >errpages.pot |
8289d754 | 49 | |
f1d6f80d | 50 | ## Update all existing dictionaries with the new content ... |
8289d754 | 51 | for f in `ls -1 ./*.po` ; do |
f1d6f80d | 52 | echo -n "Update: ${f} ... " |
52532388 | 53 | msgmerge --verbose -s -o ${f}.new ${f} errpages.pot |
672dc006 | 54 | chown --reference=${f} ${f}.new |
f1d6f80d | 55 | mv ${f}.new ${f} |
8289d754 | 56 | done |
58bb3453 AJ |
57 | |
58 | # cleanup. | |
9447b393 | 59 | rm -rf pot |
52532388 | 60 | rm -f errpages.pot.new |
0bb1e8fd AJ |
61 | cd .. |
62 | ## Done errors/ Updates | |
63 | ||
0e16b211 | 64 | |
9447b393 | 65 | ## begin doc/manuals updates |
0e16b211 | 66 | |
9447b393 AJ |
67 | # Build the po4a.conf |
68 | cat doc/po4a.cnf >po4a.conf | |
3675839d | 69 | for f in `ls -1 helpers/*/*/*.8 src/*.8.in tools/*/*.1 tools/*.8.in` ; do |
9447b393 | 70 | echo "" >>po4a.conf |
13b8928e AJ |
71 | manp=`basename ${f}` |
72 | echo "[type: man] ${f} \$lang:doc/manuals/\$lang/${manp}" >>po4a.conf | |
9447b393 | 73 | done |
0e16b211 | 74 | |
13b8928e | 75 | ## po4a conversion of all doc/manuals man files... |
ef8d9073 | 76 | po4a --no-translations -o groff_code=verbatim --verbose po4a.conf |
0e16b211 | 77 | |
13b8928e AJ |
78 | ( |
79 | cat doc/manuals/manuals.pot | | |
80 | sed s/PACKAGE\ VERSION/Squid-3/ | | |
81 | sed s/LANGUAGE\ \<LL\@li\.org\>/Squid\ Developers\ \<squid-dev\@squid-cache\.org\>/ | |
82 | ) >doc/manuals/manuals.pot.tmp | |
83 | mv doc/manuals/manuals.pot.tmp doc/manuals/manuals.pot | |
0e16b211 | 84 | |
0e16b211 | 85 | ## Done doc/manuals/ Update |