Make astronomical Plasma plugin JSON consistent with other plugins and translatable
AbandonedPublic

Authored by yurchor on Jul 24 2018, 2:45 PM.

Details

Reviewers
kossebau
Group Reviewers
Plasma
Localization
Summary

Currently, JSON file has a structure which is not parsed by the scripty. The patch tries to fix this.

Test Plan
  1. Use of "python <some_dir>/createjsoncontext.py find . -name \*.json ./po" where <some_dir> is a clone of this dir: https://websvn.kde.org/trunk/l10n-kf5/scripts/ should extract messages from astronomicaleventsplugin.json (tested)
  2. The plugin should work (not tested)

Diff Detail

Repository
R114 Plasma Addons
Lint
Lint Skipped
Unit
Unit Tests Skipped
yurchor created this revision.Jul 24 2018, 2:45 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 24 2018, 2:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
yurchor requested review of this revision.Jul 24 2018, 2:45 PM
ltoscano added a subscriber: ltoscano.

Adding @kossebau with the question: is there a reason to not have the KPlugin key in the json file?

abetts added a subscriber: abetts.Jul 24 2018, 2:53 PM
abetts removed a subscriber: abetts.

TD;LR current legacy-based implementation might need that format. Needs complete tested porting to KPlugin.

I had blindly copying the only other-known-to-me existing plugin data, which also has that metadata schema.
Cmp. also https://phabricator.kde.org/source/plasma-workspace/browse/master/plasmacalendarintegration/holidayeventsplugin.json

Looking at https://phabricator.kde.org/source/plasma-framework/browse/master/src/declarativeimports/calendar/eventpluginsmanager.cpp$136 I see now that this is some legacy schema, and one could also use kplugin-based metadata. Might need some other changes to the plugin, like changing the IID. Can have a look later this week.

But grepping for *.json makes my MIME/Media type heart bleed. Someone(tm) should introduce a proper file suffix (e.g. .kplugindata) for those specific schema.
We also use .cpp for C++ sources, despite the base format being plain text (.txt).

yurchor abandoned this revision.Aug 13 2018, 5:07 PM