[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [patch] l10n crashes

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-09-04 01:45:13 CEST

Philip Martin wrote:
> "Max Bowsher" <maxb@ukf.net> writes:
>
>>--- Makefile.in (revision 16034)
>>+++ Makefile.in (working copy)
>>@@ -273,6 +273,19 @@
>> -name "*.c" -print -or \
>> -name "svn_error_codes.h" -print | \
>> $(XGETTEXT) --sort-by-file -k_ -kN_ -kSVN_ERRDEF:3 \
>>+ --flag=_:1:pass-c-format \

Oh, yes, I forgot that important line. We want one for "N_" as well, to catch
these:

subversion/libsvn_subr/io.c: N_("Can't close file '%s'"),

>>+ --flag=svn_cmdline_printf:2:c-format \
>>+ --flag=svn_cmdline_fprintf:3:c-format \
>>+ --flag=svn_error_createf:3:c-format \
>>+ --flag=svn_error_wrap_apr:2:c-format \
>>+ --flag=svn_stream_printf:3:c-format \
>>+ --flag=svn_stream_printf_from_utf8:4:c-format \
>>+ --flag=svn_string_createf:2:c-format \
>>+ --flag=svn_string_createv:2:c-format \
>>+ --flag=svn_stringbuf_createf:2:c-format \
>>+ --flag=svn_stringbuf_createv:2:c-format \
>>+ --flag=dav_svn__send_xml:3:c-format \
>>+ --flag=svn_fs_bdb__dberrf:3:c-format \
>> --msgid-bugs-address=dev@subversion.tigris.org \
>> --add-comments --files-from=- -o po/subversion.pot )
>
>
> It looks like that's just the extern names, there are two static
> names as well:
>
> libsvn_ra_svn/marshal.c:writebuf_printf()

There's little point in adding this one because it's not used with localisable
strings.

> libsvn_client/diff.c:file_printf_from_utf8()

This one is, though.

More importantly, when I edit subversion/po/fr.po and remove a "%s" from one
string that is marked "c-format", and add "%s" to another, I get no warnings or
errors:

~/src/subversion> svn diff subversion/po/fr.po
[...]
-#: clients/cmdline/info-cmd.c:62 svnlook/main.c:782
+#: clients/cmdline/info-cmd.c:269 svnlook/main.c:782
  #, c-format
  msgid "Name: %s\n"
-msgstr "Nom : %s\n"
+msgstr "Nom :\n"

-#: clients/cmdline/info-cmd.c:66
+#: clients/cmdline/info-cmd.c:273
  #, c-format
  msgid "URL: %s\n"
-msgstr "URL : %s\n"
+msgstr "URL : %s %s\n"
[...]

~/src/subversion> (cd ~/build/subversion/ && make locale-gnu-po-update PO=fr)
(cd /home/julianfoad/src/subversion/subversion/ ; \
  find . \
   -name .svn -prune -or \
   -name tests -prune -or \
   -name bindings -prune -or \
   -name "*.c" -print -or \
   -name "svn_error_codes.h" -print | \
  /usr/bin/xgettext --sort-by-file -k_ -kN_ -kSVN_ERRDEF:3 \
   --flag=_:1:pass-c-format \
   --flag=svn_cmdline_printf:2:c-format \
   --flag=svn_cmdline_fprintf:3:c-format \
   --flag=svn_error_createf:3:c-format \
   --flag=svn_error_wrap_apr:2:c-format \
   --flag=svn_stream_printf:3:c-format \
   --flag=svn_stream_printf_from_utf8:4:c-format \
   --flag=svn_string_createf:2:c-format \
   --flag=svn_string_createv:2:c-format \
   --flag=svn_stringbuf_createf:2:c-format \
   --flag=svn_stringbuf_createv:2:c-format \
   --flag=dav_svn__send_xml:3:c-format \
   --flag=svn_fs_bdb__dberrf:3:c-format \
   --flag=file_printf_from_utf8:3:c-format \
   --msgid-bugs-address=dev@subversion.tigris.org \
   --add-comments --files-from=- -o po/subversion.pot )
...........................................................................................................................................
done.

What am I doing wrong? I've never tried to do this before.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 4 01:46:01 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.