Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> writes:
> 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 ""
You can declare 'fmt' inside the 'if' block. Other than that, +1 to
commit (I assume you've tested), and thanks for the fix!
-Karl
>> ===================================================================
>> --- 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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 27 23:13:53 2007