You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/05/12 20:16:42 UTC
svn commit: r1481619 - /subversion/trunk/subversion/libsvn_subr/utf8proc.c
Author: brane
Date: Sun May 12 18:16:42 2013
New Revision: 1481619
URL: http://svn.apache.org/r1481619
Log:
Mark messages from our utf8proc wrapper as translatable.
* subversion/libsvn_subr/utf8proc.c
(encode_ucs4, svn_utf__glob): Make messages translatable and more neutral.
(svn_utf__glob): Fix escape-token length check.
Modified:
subversion/trunk/subversion/libsvn_subr/utf8proc.c
Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc.c?rev=1481619&r1=1481618&r2=1481619&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c Sun May 12 18:16:42 2013
@@ -156,7 +156,7 @@ encode_ucs4(svn_membuf_t *buffer, apr_in
utf8len = utf8proc_encode_char(ucs4chr, ((uint8_t*)buffer->data + *length));
if (!utf8len)
return svn_error_createf(SVN_ERR_UTF8PROC_ERROR, NULL,
- "Invalid Unicode character U+%04lX",
+ _("Invalid Unicode character U+%04lX"),
(long)ucs4chr);
*length += utf8len;
return SVN_NO_ERROR;
@@ -196,11 +196,11 @@ svn_utf__glob(svn_boolean_t *match,
apr_size_t patternbuf_len;
apr_size_t tempbuf_len;
- /* If we're in LIKE mode, we don't do custom escape chars. */
+ /* If we're in GLOB mode, we don't do custom escape chars. */
if (escape && !sql_like)
return svn_error_create(SVN_ERR_UTF8_GLOB, NULL,
- "The GLOB operator does not allow"
- " a custom escape character");
+ _("Cannot use a custom escape token"
+ " in glob matching mode"));
/* Convert the patern to NFD UTF-8. We can't use the UCS-4 result
because apr_fnmatch can't handle it.*/
@@ -228,12 +228,12 @@ svn_utf__glob(svn_boolean_t *match,
if (result < 0)
return svn_error_create(SVN_ERR_UTF8PROC_ERROR, NULL,
gettext(utf8proc_errmsg(result)));
- if (result > 1)
+ if (result == 0 || result > 1)
return svn_error_create(SVN_ERR_UTF8_GLOB, NULL,
- "The ESCAPE parameter is too long");
+ _("Escape token must be one character"));
if ((ucs4esc & 0xFF) != ucs4esc)
return svn_error_createf(SVN_ERR_UTF8_GLOB, NULL,
- "Invalid ESCAPE character U+%04lX",
+ _("Invalid escape character U+%04lX"),
(long)ucs4esc);
}