[pacman-dev] [PATCH] Mark string as translatable
Allan McRae
allan at archlinux.org
Sat Apr 6 11:09:11 EDT 2013
On 07/04/13 00:58, Dan McGee wrote:
> 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 ? " " : "").
>
I had considered that (I do not even like the brackets in the translated
string), but had not found a solution. I'll go for the ternary if
really, really needed...
> }
>>
>> *response = yesno(_("Import PGP key
>> %d%c/%s, \"%s\", created: %s%s?"),
>> --
>> 1.8.2
>>
>>
>>
>
>
>
More information about the pacman-dev
mailing list