AW: KDE Review: Moving Smb4K to extragear/network

Burkhard Lück lueck at hube-lueck.de
Thu Jan 23 21:25:21 GMT 2014


Am Donnerstag, 23. Januar 2014, 09:08:03 schrieb alexander.reinholdt at t-
online.de:
> [...]
> 
> > > 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/:
> > 
> > scriptengines/javascript/plasmoid/declarativeappletscript.cpp#90
> > KGlobal::locale()->insertCatalog("plasma_applet_" %
> > description().pluginName());
> > 
> > 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
> > 
> > #!/bin/bash
> > $XGETTEXT `find . -name \*.qml` -L Java -o
> > $podir/plasma_applet_smb4k-qml.pot
> > 
> > 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
> in core/
> 
> Thanks for the directions, Burkhard and Albert. I will split the current
> catalogue into three *.pot files as suggested by Albert.
> 
https://git.reviewboard.kde.org/r/115263/

-- 
Burkhard Lück





More information about the kde-core-devel mailing list