[Kde-pim] Double quotes in Comment field for Akonadi agents/resources are required

Alexander Potashev aspotashev at gmail.com
Wed Jan 15 22:45:05 GMT 2014


2014/1/16 Albert Astals Cid <aacid at kde.org>:
> El Dimecres, 15 de gener de 2014, a les 20:39:21, Kevin Krammer va escriure:
>> On Tuesday, 2014-01-14, 23:35:36, Alexander Potashev wrote:
>> > Hi,
>> >
>> > Many KDE translators run into the following trap in how Akonadi plugin
>> > loader interprets fields in .desktop files.
>> >
>> > When there is a comma in the value for Name of Comment field, then it
>> > has to be enclosed in double quotes. Otherwise the string is
>> > considered invalid and is not shown in the UI (the parser probably
>> > thinks it's a comma-separated list).
>>
>> It does indeed.
>>
>> > (This is why I'm CCing kde-pim)
>> > May be the problem can be fixed in the code, because Comment fields
>> > with commas in .desktop files for KCM modules do not require quotes.
>>
>> Most likely an unforseen consequence of not using the usual KDE classes but
>> somewhat similar Qt classes.
>> Looks like we need a proper desktop file parser instead of QSettings.
>>
>> Can you file a bug report? Product Akonadi, component "server"

Kevin,

Will do in a few minutes if Wi-Fi in the train I'm on won't shut off until then.

>
> As discussed on the #kontact irc it'd be great if someone can you check if
> qsettings like comments in .desktop files, i.e. a line like
> # ctxt: (keep-ascii-quoted) The outer ASCII quotes must be kept, they are not
> seen by the user.
> so that we can add it to inform the users and also use the keyword keep-ascii-
> quoted so that our automatic tools go through the messages and complain for
> those that are not correct.
>
> So if someone can do that testing cool. If not it should go into a bug with
> all this info.

Albert,

It's easy to test since the agent/resource creation dialog monitors
.desktop files for updates (System Settings -> Personal Information
(Akonadi Resources) and click "Add..."). After adding the "# ctxt:
..." line as you suggested just before the original English line
"Comment=" that dialog keeps showing the correct Name and Comment. To
be sure I also restarted Akonadi (akonadictl restart) and the above
still worked.

I didn't test if the "# ctxt: ..." line can be parsed correctly by scripty.

-- 
Alexander Potashev
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list