[pacman-dev] [PATCH] Mark string as translatable

Dan McGee dpmcgee at gmail.com
Sat Apr 6 10:58:44 EDT 2013


On Sat, Apr 6, 2013 at 12:03 AM, Allan McRae <allan at archlinux.org> wrote:

> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
>  src/pacman/callback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/pacman/callback.c b/src/pacman/callback.c
> index 71d9d04..3fa2166 100644
> --- a/src/pacman/callback.c
> +++ b/src/pacman/callback.c
> @@ -401,7 +401,7 @@ void cb_question(alpm_question_t event, void *data1,
> void *data2,
>                                 strftime(created, 12, "%Y-%m-%d",
> localtime(&time));
>
>                                 if(key->revoked) {
> -                                       revoked = " (revoked)";
> +                                       revoked = _(" (revoked)");
>
It might be better to find a way to not have the leading space in the
translatable part; these are the kind of things that often get messed up.
I'm not sure I see a great way of doing that though without another '%s' in
the format string and a ternary (key->revoked ? " " : "").

                                }
>
>                                 *response = yesno(_("Import PGP key
> %d%c/%s, \"%s\", created: %s%s?"),
> --
> 1.8.2
>
>
>


More information about the pacman-dev mailing list