Add template for a simple kpart-based application
ClosedPublic

Authored by kossebau on Jul 20 2017, 3:13 PM.

Details

Summary

Inspired by kpartapp template from kapptemplates.

Keeping the template with the sources they are based on
helps both discovery and also maintenance.

Diff Detail

Repository
R306 KParts
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Jul 20 2017, 3:13 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 20 2017, 3:13 PM

Generated template: https://share.kde.org/index.php/s/cSeyBNVGvPTPAiO

Follows the templates for krunner and plasma, which also are placed in the frameworks sources. Plan is to move the other templates from kapptemplate to the respective sources as well, and at the end of the day turn kapptemplate into a framework lib (and some util apps), which then allows kdevelop, kate & co. to share the from-template-generation code.

aacid added a subscriber: aacid.Jul 24 2017, 12:35 PM

At least there is a problem l10n wise in which there is a Messages.sh so i guess it will be run and create a "fake" .pot file (and something similar for the .desktop file)

Though probably this is already happening?

Any idea on how we would make that not happen?

In D6800#128256, @aacid wrote:

At least there is a problem l10n wise in which there is a Messages.sh so i guess it will be run and create a "fake" .pot file (and something similar for the .desktop file)

Though probably this is already happening?

Good question, had not thought about before. Indeed the existing template elsewhere also have pure Messages.sh in the tree, e.g.
https://cgit.kde.org/kapptemplate.git/tree/src/templates/C++/kde-frameworks5
https://cgit.kde.org/kapptemplate.git/tree/src/templates/C++/kpartapp/src
https://cgit.kde.org/kapptemplate.git/tree/src/templates/C++/akonadiresource
as well as
https://cgit.kde.org/plasma-framework.git/tree/templates/cpp-plasmoid
https://cgit.kde.org/plasma-framework.git/tree/templates/plasma-wallpaper

Looking at
https://websvn.kde.org/trunk/l10n-kf5/templates/messages/kdesdk/
https://websvn.kde.org/trunk/l10n-kf5/templates/messages/frameworks/
I cannot see though any catalogs which would match the template-string catalog names, so seems there is some magic already to prevent that?

@ltoscano can you raise the curtain on this matter? :)

lueck added a subscriber: lueck.Jul 24 2017, 2:06 PM

I cannot see though any catalogs which would match the template-string catalog names, so seems there is some magic already to prevent that?

l10n-kf5/scripts/extract-messages.sh:
 # skip Messages.sh files of KDevelop's app templates
 grep '{APPNAMELC}[^ ]*.pot' $subdir/Messages.sh 1>/dev/null && continue
aacid added a comment.Jul 24 2017, 2:36 PM

Ok, so i guess that would apply to kparts too.

So with the Messages.sh sorted out (thanks @aacid for raising and @lueck for pointing out where it is already handled), if there are no objections, would add on Tuesday, 27th.

This revision was automatically updated to reflect the committed changes.