You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2004/12/06 19:36:33 UTC
Re: svn commit: r12171 - trunk/subversion/libsvn_subr
On Sun, 5 Dec 2004 philip@tigris.org wrote:
> Modified: trunk/subversion/libsvn_subr/path.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_subr/path.c?view=diff&rev=12171&p1=trunk/subversion/libsvn_subr/path.c&r1=12170&p2=trunk/subversion/libsvn_subr/path.c&r2=12171
> ==============================================================================
> --- trunk/subversion/libsvn_subr/path.c (original)
> +++ trunk/subversion/libsvn_subr/path.c Sun Dec 5 17:06:29 2004
> @@ -1061,7 +1061,7 @@
>
> if (apr_err)
> return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
> - "Couldn't determine absolute path of '%s'",
> + _("Couldn't determine absolute path of '%s'"),
> svn_path_local_style (relative, pool));
> }
>
> @@ -1100,7 +1100,7 @@
> else
> {
> return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
> - "'%s' is neither a file nor a directory name",
> + _("'%s' is neither a file nor a directory name"),
> svn_path_local_style(path, pool));
> }
>
> @@ -1206,7 +1206,7 @@
> apr_err = apr_filepath_encoding (&encoding_style, pool);
> if (apr_err)
> return svn_error_wrap_apr (apr_err,
> - "Can't determine the native path encoding");
> + _("Can't determine the native path encoding"));
>
> /* ### What to do about APR_FILEPATH_ENCODING_UNKNOWN?
> Well, for now we'll just punt to the svn_utf_ functions;
>
> Modified: trunk/subversion/libsvn_subr/utf.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_subr/utf.c?view=diff&rev=12171&p1=trunk/subversion/libsvn_subr/utf.c&r1=12170&p2=trunk/subversion/libsvn_subr/utf.c&r2=12171
> ==============================================================================
> --- trunk/subversion/libsvn_subr/utf.c (original)
> +++ trunk/subversion/libsvn_subr/utf.c Sun Dec 5 17:06:29 2004
> @@ -443,7 +442,7 @@
> (unsigned char)last[i-valid]),
> NULL);
> msg = apr_pstrcat (pool, msg,
> - ")\nfollowed by invalid UTF-8 sequence\n(hex:", NULL);
> + _(")\nfollowed by invalid UTF-8 sequence\n(hex:"), NULL);
>
> /* 4 invalid octets will guarantee that the faulty octet is displayed */
> invalid = data + len - last;
> @@ -452,7 +451,7 @@
> for (i = 0; i < invalid; ++i)
> msg = apr_pstrcat (pool, msg, apr_psprintf (pool, " %02x",
> (unsigned char)last[i]), NULL);
> - msg = apr_pstrcat (pool, msg, ")", NULL);
> + msg = apr_pstrcat (pool, msg, _(")"), NULL);
>
Ooops, how wold you translate that string? In cases like this, you need to
keep the translated string together, by preparing the replacable part
first in a separate string.
Thanks for _()ing, BTW.
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r12171 - trunk/subversion/libsvn_subr
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 6 Dec 2004, Philip Martin wrote:
> "Peter N. Lundblad" <pe...@famlundblad.se> writes:
>
> > On Sun, 5 Dec 2004 philip@tigris.org wrote:
> >
> >> Modified: trunk/subversion/libsvn_subr/utf.c
> >> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_subr/utf.c?view=diff&rev=12171&p1=trunk/subversion/libsvn_subr/utf.c&r1=12170&p2=trunk/subversion/libsvn_subr/utf.c&r2=12171
> >> ==============================================================================
> >> --- trunk/subversion/libsvn_subr/utf.c (original)
> >> +++ trunk/subversion/libsvn_subr/utf.c Sun Dec 5 17:06:29 2004
> >> @@ -443,7 +442,7 @@
> >> (unsigned char)last[i-valid]),
> >> NULL);
> >> msg = apr_pstrcat (pool, msg,
> >> - ")\nfollowed by invalid UTF-8 sequence\n(hex:", NULL);
> >> + _(")\nfollowed by invalid UTF-8 sequence\n(hex:"), NULL);
> >>
> >> /* 4 invalid octets will guarantee that the faulty octet is displayed */
> >> invalid = data + len - last;
> >> @@ -452,7 +451,7 @@
> >> for (i = 0; i < invalid; ++i)
> >> msg = apr_pstrcat (pool, msg, apr_psprintf (pool, " %02x",
> >> (unsigned char)last[i]), NULL);
> >> - msg = apr_pstrcat (pool, msg, ")", NULL);
> >> + msg = apr_pstrcat (pool, msg, _(")"), NULL);
> >>
> >
> > Ooops, how wold you translate that string? In cases like this, you need to
> > keep the translated string together, by preparing the replacable part
> > first in a separate string.
>
> Which string?
>
Look at the line right above what I wrote. There, you will see _(")").
This is a message fragment, which is problematic for translators. See the
gettext manual for more info.
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r12171 - trunk/subversion/libsvn_subr
Posted by Philip Martin <ph...@codematters.co.uk>.
"Peter N. Lundblad" <pe...@famlundblad.se> writes:
> On Sun, 5 Dec 2004 philip@tigris.org wrote:
>
>> Modified: trunk/subversion/libsvn_subr/path.c
>> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_subr/path.c?view=diff&rev=12171&p1=trunk/subversion/libsvn_subr/path.c&r1=12170&p2=trunk/subversion/libsvn_subr/path.c&r2=12171
>> ==============================================================================
>> --- trunk/subversion/libsvn_subr/path.c (original)
>> +++ trunk/subversion/libsvn_subr/path.c Sun Dec 5 17:06:29 2004
>> @@ -1061,7 +1061,7 @@
>>
>> if (apr_err)
>> return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
>> - "Couldn't determine absolute path of '%s'",
>> + _("Couldn't determine absolute path of '%s'"),
>> svn_path_local_style (relative, pool));
>> }
>>
>> @@ -1100,7 +1100,7 @@
>> else
>> {
>> return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
>> - "'%s' is neither a file nor a directory name",
>> + _("'%s' is neither a file nor a directory name"),
>> svn_path_local_style(path, pool));
>> }
>>
>> @@ -1206,7 +1206,7 @@
>> apr_err = apr_filepath_encoding (&encoding_style, pool);
>> if (apr_err)
>> return svn_error_wrap_apr (apr_err,
>> - "Can't determine the native path encoding");
>> + _("Can't determine the native path encoding"));
>>
>> /* ### What to do about APR_FILEPATH_ENCODING_UNKNOWN?
>> Well, for now we'll just punt to the svn_utf_ functions;
>>
>> Modified: trunk/subversion/libsvn_subr/utf.c
>> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_subr/utf.c?view=diff&rev=12171&p1=trunk/subversion/libsvn_subr/utf.c&r1=12170&p2=trunk/subversion/libsvn_subr/utf.c&r2=12171
>> ==============================================================================
>> --- trunk/subversion/libsvn_subr/utf.c (original)
>> +++ trunk/subversion/libsvn_subr/utf.c Sun Dec 5 17:06:29 2004
>> @@ -443,7 +442,7 @@
>> (unsigned char)last[i-valid]),
>> NULL);
>> msg = apr_pstrcat (pool, msg,
>> - ")\nfollowed by invalid UTF-8 sequence\n(hex:", NULL);
>> + _(")\nfollowed by invalid UTF-8 sequence\n(hex:"), NULL);
>>
>> /* 4 invalid octets will guarantee that the faulty octet is displayed */
>> invalid = data + len - last;
>> @@ -452,7 +451,7 @@
>> for (i = 0; i < invalid; ++i)
>> msg = apr_pstrcat (pool, msg, apr_psprintf (pool, " %02x",
>> (unsigned char)last[i]), NULL);
>> - msg = apr_pstrcat (pool, msg, ")", NULL);
>> + msg = apr_pstrcat (pool, msg, _(")"), NULL);
>>
>
> Ooops, how wold you translate that string? In cases like this, you need to
> keep the translated string together, by preparing the replacable part
> first in a separate string.
Which string?
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org