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

[PATCH] Fix wrong string in subversion/libsvn_repos/reporter.c (Was: svn commit: r28368 - trunk/subversion/libsvn_repos)

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: 2007-12-27 20:01:33 CET

2007-12-15 16:41:01 Dongsheng Song napisaƂ(a):
> Yes, the current pot is bad:
>
> #: ../libsvn_repos/reporter.c:168
> msgid "Invalid length (%"
> msgstr ""
>
> If apply the following patch, it's good:
>
> #: ../libsvn_repos/reporter.c:168
> #, c-format
> msgid "Invalid length (%%%s) when about to read a string"
> msgstr ""
>
> ===================================================================
> --- subversion/libsvn_repos/reporter.c (revision 28499)
> +++ subversion/libsvn_repos/reporter.c (working copy)
> @@ -155,6 +155,7 @@
> {
> apr_uint64_t len;
> char *buf;
> + char *fmt;
>
> SVN_ERR(read_number(&len, temp, pool));
>
> @@ -164,9 +165,10 @@
> string, anyone?) but let's be future-proof anyway. */
> if (len + 1 < len)
> {
> + fmt = apr_psprintf(pool, _("Invalid length (%%%s) when about to read
> "
> + "a string"), APR_UINT64_T_FMT);
> return svn_error_createf(SVN_ERR_REPOS_BAD_REVISION_REPORT, NULL,
> - _("Invalid length (%" APR_UINT64_T_FMT ") "
> - "when about to read a string"), len);
> + fmt, len);
> }
>
> buf = apr_palloc(pool, len + 1);
>

I've reviewed this patch and I'm confirming that it's correct, however
'char *fmt;' isn't necessary, so I'm attaching the updated patch.

Could any full committer review it?

[[[
* subversion/libsvn_repos/reporter.c
  (read_string): Use apr_psprintf to create translatable string.

Patch by: cauchy
          arfrever

Suggested by: dionisos
]]]

-- 
Arfrever Frehtes Taifersar Arahesis

Received on Thu Dec 27 20:06:16 2007

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