desktoptojson and list properties / i18n of JSON files

Alexander Richardson arichardson.kde at gmail.com
Wed Nov 19 17:29:42 GMT 2014


2014-11-19 16:30 GMT+00:00 Burkhard Lück <lueck at hube-lueck.de>:
> Am Mittwoch, 19. November 2014, 01:28:51 schrieb Kevin Funk:
>> On Wednesday 19 November 2014 00:09:25 Albert Astals Cid wrote:
>> > El Dimarts, 18 de novembre de 2014, a les 23:01:14, Alex Merry va
> escriure:
>> > > On Tuesday 18 November 2014 23:45:56 Albert Astals Cid wrote:
>> > > > I didn't even know we were using json now. Why did we change from
>> > > > .desktop
>> > > > file to .json ones? What's the benefit? Seems like .desktop files did
>> > > > their
>> > > > job good enough and we have all the tooling available already.
>> > >
>> > > Because that's what Qt uses - Qt5 plugins have JSON metadata as
>> > > standard,
>> > > meaning it's all in one file (the JSON is embedded in the plugin,
>> > > although
>> > > it can be read without loading the plugin).
>> >
>> > And Qt introduced a technology without making it translatable? What fields
>> > do we need to make translatable? Can somebody point me to such a .json
>> > file
>> > we'd like to translate?
>>
>> Here's one: http://pastebin.kde.org/p4p38fqr1
>>
>> That's kdevpatchreview.json, generated from kdevpatchreview.desktop via
>> kcoreaddons_desktop_to_json(...) during the CMake run.
>>
> But the kdevpatchreview.desktop is installed nevertheless and is apparently
> used to get the translations for Name + Comment/Description.
> Having german translations for Name + Comment/Description only in
> kdevpatchreview.json at build time, but removed after installation in the
> installed kdevpatchreview.desktop file makes them untranslated for me.
>
> Looks to me like translations are not supported via json files.

Translations are definitively supported with the JSON metadata.
kdevpatchreview.desktop is not installed, seems that is a leftover
from an older make install.
I guess the .desktop file overrides the metadata loaded from the .so
file. They both have the same plugin id so the one that is added later
(.desktop) overrides the previous one.

Regards,
Alex




More information about the kde-core-devel mailing list