Ark: please add context for accelerator keys in part.cpp

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sun May 15 10:21:32 UTC 2016


2016-05-15 8:20 GMT+02:00 Lasse Liehu <lasse.liehu at gmail.com>:
> On 15 May 2016 at 0:29 Elvis Angelaccio <elvis.angelaccio at kdemail.net>
> wrote:
>>
>> 2016-05-14 22:25 GMT+02:00 Burkhard Lück <lueck at hube-lueck.de>:
>> > Hi developers,
>> >
>> > this forwarded mail is apparently about these translation messages:
>> >
>> > "@action:inmenu", "Add &Comment"
>> > "@action:inmenu", "Edit &Comment"
>> >
>> > ----------  Weitergeleitete Nachricht  ----------
>> >
>> > Betreff: Ark: please add context for accelerator keys in part.cpp
>> > Datum: Samstag, 14. Mai 2016, 17:02:33 CEST
>> > Von: Andrej Mernik <andrejm at ubuntu.si>
>> > An: KDE i18n-doc <kde-i18n-doc at kde.org>
>> >
>> > in KF5 version of ark.po I found two strings that might confuse the
>> > translators, They are located at:
>> >
>> > #: part/part.cpp:460
>> >
>> > and contain accelerator key &C. At first I thought this might be a bug
>> > preventing user to use one of the options, but looking at the code it
>> > looks
>> > that they are exclusive.
>> >
>> > Can a context be added so the translators will know that one is active
>> > if
>> > archive has comment and other when the archive has no comment?
>>
>> Not sure how to handle this, since both actions already have
>> "@action:inmenu" as context.
>> Should we replace that context with something like this?
>>
>> m_editCommentAction->setText(m_model->archive()->hasComment() ?
>> i18nc("mutually exclusive with Add &Comment", "Edit &Comment"),
>> i18nc("mutually exclusive with Edit &Comment", "Add &Comment"));
>
>
> Something like that, but please don't remove "@action:inmenu" if they are
> still actions in a menu. Instead have context like: "@action:inmenu mutually
> exclusive with Add &Comment".

Cool, I didn't know that this was possible.
Fixed with: https://quickgit.kde.org/?p=ark.git&a=commitdiff&h=6b9bc44d575ab4ddc022aec28cd736221cc31aa1

>
>> Possible alternative:
>>
>> m_editCommentAction->setText(i18nc("%1 is either Add or Edit", "%1
>> &Comment", m_model->archive()->hasComment() ? i18n("Edit") :
>> i18n("Add")));
>
>
> Please keep messages as complete sentences if possible. Splitting small
> parts of messages like this can make it hard or impossible to properly
> translate messages into some languages. For example in my language, Finnish,
> "Comment" needs to be in a different noun case (form) depending on whether
> the verb is "Add" or "Edit".
>
> Cheers,
> Lasse

Cheers,
Elvis


More information about the Kde-utils-devel mailing list