You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dongsheng Song <do...@apache.org> on 2011/03/11 03:58:34 UTC
[PATCH] Make translator happy - was - Re: svn commit: r1052029 - /subversion/trunk/subversion/libsvn_repos/commit.c
On Thu, Dec 23, 2010 at 02:53, <bl...@apache.org> wrote:
> Author: blair
> Date: Wed Dec 22 18:53:48 2010
> New Revision: 1052029
>
> URL: http://svn.apache.org/viewvc?rev=1052029&view=rev
> Log:
> The error from the post-commit is already self-describing so
> svn_repos__post_commit_error_str() doesn't need to wrap its error with
> a duplicae "post-commit error" text.
>
> Also, i18n the text.
>
1051763 blair if (hook_err1)
1051763 blair {
1051763 blair if (err == hook_err1)
1051763 blair {
1052029 blair if (hook_err2->message)
1052029 blair msg = apr_pstrdup(pool, hook_err2->message);
1) invoke apr_pstrdup, OK
1052029 blair else
1052029 blair msg = _("post-commit hook failed with
no error message");
1051763 blair }
1051763 blair else
1051763 blair {
1052029 blair msg = hook_err2->message
1052029 blair ? hook_err2->message
1052029 blair : _("post-commit hook failed with
no error message.");
2) not invoke apr_pstrdup
1052029 blair msg = apr_psprintf(
1052029 blair pool,
1052029 blair _("post commit FS processing had
error '%s' and %s"),
1052029 blair err->message ? err->message :
_("(no error message)"),
1052029 blair msg);
3) nearly impossible for translate
1051763 blair }
1051763 blair }
1051763 blair else
1051763 blair {
1051988 blair msg = apr_psprintf(pool,
1052029 blair _("post-commit FS
processing had error '%s'."),
1053499 blair err->message ? err->message
1053499 blair : _("(no
error message)"));
1051763 blair }
How about the following patch ?
[[[
* subversion/libsvn_repos/commit.c: Make translator happy.
]]]
Index: commit.c
===================================================================
--- commit.c (revision 1080427)
+++ commit.c (working copy)
@@ -644,16 +644,16 @@
if (hook_err2->message)
msg = apr_pstrdup(pool, hook_err2->message);
else
- msg = _("post-commit hook failed with no error message");
+ msg = _("post-commit hook failed with no error message.");
}
else
{
msg = hook_err2->message
- ? hook_err2->message
+ ? apr_pstrdup(pool, hook_err2->message)
: _("post-commit hook failed with no error message.");
msg = apr_psprintf(
pool,
- _("post commit FS processing had error '%s' and %s"),
+ _("post commit FS processing had error:\n%s\n%s"),
err->message ? err->message : _("(no error message)"),
msg);
}
@@ -661,7 +661,7 @@
else
{
msg = apr_psprintf(pool,
- _("post-commit FS processing had error '%s'."),
+ _("post-commit FS processing had error:\n%s"),
err->message ? err->message
: _("(no error message)"));
}
--
Dongsheng
Re: [PATCH] Make translator happy - was - Re: svn commit: r1052029 - /subversion/trunk/subversion/libsvn_repos/commit.c
Posted by Philip Martin <ph...@wandisco.com>.
Dongsheng Song <do...@apache.org> writes:
> [[[
> * subversion/libsvn_repos/commit.c: Make translator happy.
(svn_repos__post_commit_error_str): Copy string into correct
pool, tweak error text to make translator happy.
The pool change should be mentioned in the log. +1 to commit
--
Philip