5 # - to generate just the pot file
7 # - to update all locales
9 # - to update one the LL locale
13 XGETTEXT
=${XGETTEXT:-xgettext}
14 MSGMERGE
=${MSGMERGE:-msgmerge}
17 for i
in . .. ..
/..
; do
18 if [ -d "$i/subversion/po" ]; then
23 if [ -z "$svn_base" ]; then
24 echo "E: You must run po-update.sh from within a Subversion source tree." >&2
32 if [ -z "$pot_done" ]; then
33 echo "Building subversion.pot..."
34 (cd $svn_base/subversion
/po
&& \
36 -name .svn
-prune -or \
37 -name tests
-prune -or \
38 -name bindings
-prune -or \
39 -name "*.c" -print -or \
40 -name "svn_error_codes.h" -print | \
41 $XGETTEXT --sort-by-file -k_ -kN_ -kSVN_ERRDEF:3 \
42 --flag=_
:1:pass-c-format \
43 --flag=N_
:1:pass-c-format \
44 --flag=svn_cmdline_printf
:2:c-format \
45 --flag=svn_cmdline_fprintf
:3:c-format \
46 --flag=svn_error_createf
:3:c-format \
47 --flag=svn_error_wrap_apr
:2:c-format \
48 --flag=svn_stream_printf
:3:c-format \
49 --flag=svn_stream_printf_from_utf8
:4:c-format \
50 --flag=svn_string_createf
:2:c-format \
51 --flag=svn_string_createv
:2:c-format \
52 --flag=svn_stringbuf_createf
:2:c-format \
53 --flag=svn_stringbuf_createv
:2:c-format \
54 --flag=svn_fs_bdb__dberrf
:3:c-format \
55 --flag=file_printf_from_utf8
:3:c-format \
56 --flag=do_io_file_wrapper_cleanup
:3:c-format \
57 --flag=do_io_file_wrapper_cleanup
:4:c-format \
58 --msgid-bugs-address=dev@subversion.tigris.org \
59 --add-comments --files-from=- -o subversion.pot
)
66 (cd $svn_base/subversion
/po
&&
69 # In a display of truly bizarre behaviour, msgmerge (at least, the
70 # GNU gettext-tools 0.14.6 implementation) inverts the order of obsolete
71 # messages every time it is run. Therefore, run it twice, to invert and
72 # then re-invert, to minimize spurious diffs.
73 $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
74 $MSGMERGE --sort-by-file --no-wrap --update $i subversion.pot
83 while [ $# -ge 1 ]; do
87 if [ -e $svn_base/subversion
/po
/$1.po
]; then
90 echo "E: No such .po file '$1.po'" >&2
97 for lang
in $langs; do