KDE Review: Moving Smb4K to extragear/network
Albert Astals Cid
aacid at kde.org
Mon Jan 20 22:33:30 GMT 2014
El Dilluns, 20 de gener de 2014, a les 12:55:52, Burkhard Lück va escriure:
> Am Sonntag, 19. Januar 2014, 10:34:35 schrieb Alexander Reinholdt:
> > [...]
> > > Hmm, running smb4k in locale x-test with recent smb4k compiled from
> > > sources
> > > in master only the settings dialog for the smb4k plasmoid is translated,
> > > but not the dialog opened with a left mouse button click on the smb4k
> > > plasmoid icon. This dialog shows no "xx" around the gui strings.
> > >
> > > And like Albert I fail to see any code to load the translation catalog
> > > smb4k in the plasmoid.
> > I checked the the code and compared it with the tutorials on techbase. And
> > I seem to have done everything necessary: All strings in the QML code are
> > translatable and the strings are correctly extracted from the QML files
> > as well. Could you please give me a hint, what's missing?
> Sure, extraction to the translation catalog "smb4k" is correct, that was
> never in question.
> But your plasmoid tries to load the translation catalog
> "plasma_applet_smb4k- qml", but this catalog does not exist, therefore the
> plasmoid gui is untranslated.
> The catalog name for the plasmoid is generated in kde-runtime/plasma/:
> KGlobal::locale()->insertCatalog("plasma_applet_" %
> With plasmoid/package/metadata.desktop:32:X-KDE-PluginInfo-Name=smb4k-qml
> the catalogname is "plasma_applet_smb4k-qml"
> Adding a Messages.sh in smb4k/plasmoid/ with
> $XGETTEXT `find . -name \*.qml` -L Java -o
> makes the plasmoid gui translated, but e.g. the dialogs "Edit Bookmarks" +
> "Mount Share" opened from the plasmoid are still untranslated, because the
> messages for them are in smb4k.
> @Albert: How to solve this dilemma?
The proper solution would probably be splitting the thing into 3 .pot files,
one for core/ that gets loaded with a KCatalogLoader, one for smb4k that gets
loaded by the regular KAboutData/KComponentData way and another for the
plasmoid that gets loaded the plasmoid way.
The easy solution is just adding a KCatalogLoader of smb4k catalog somewhere
More information about the kde-core-devel