Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FCAC1179B for ; Sun, 12 May 2013 18:17:06 +0000 (UTC) Received: (qmail 89533 invoked by uid 500); 12 May 2013 18:17:06 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 89501 invoked by uid 500); 12 May 2013 18:17:05 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 89493 invoked by uid 99); 12 May 2013 18:17:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 May 2013 18:17:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 May 2013 18:17:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BDE902388847; Sun, 12 May 2013 18:16:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1481619 - /subversion/trunk/subversion/libsvn_subr/utf8proc.c Date: Sun, 12 May 2013 18:16:42 -0000 To: commits@subversion.apache.org From: brane@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130512181642.BDE902388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); }