Bug 273468

Summary: service menu "Compress" is not translated when browsing a folder in Konqueror
Product: [Applications] dolphin Reporter: Alexander Potashev <aspotashev>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED WORKSFORME    
Severity: normal CC: lueck
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Context menu in Konqueror

Description Alexander Potashev 2011-05-17 10:52:29 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

The reason is that translation catalog "dolphin" is not loaded. This can be fixed by the following patch, but probably a better fix would be like it was done in Filelight (http://websvn.kde.org/trunk/KDE/kdeutils/filelight/src/part/part.cpp?view=markup#l66)


diff --git a/dolphin/src/dolphinpart.cpp b/dolphin/src/dolphinpart.cpp
index 2990435..1ef52d0 100644
--- a/dolphin/src/dolphinpart.cpp
+++ b/dolphin/src/dolphinpart.cpp
@@ -68,6 +68,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
     // make sure that other apps using this part find Dolphin's view-file-columns icons
     KIconLoader::global()->addAppDir("dolphin");
 
+    KGlobal::locale()->insertCatalog("dolphin");
+
     m_view = new DolphinView(KUrl(), parentWidget);
     m_view->setTabsForFilesEnabled(true);
     setWidget(m_view);


Reproducible: Always
Comment 1 Burkhard Lück 2011-05-18 08:41:33 UTC
Using trunk in x-test and branch in de I see ne untranslated strings in konqueror file manager mode in the context menu opened by clicking the RMB.

I guess you mean these strings:
Compress -> Here, As ZIP Archive, As RAR Archive, As ZIP/TAR Archive, Compress To...

These strings are from ark*desktop files and translated using these files, no need to load any catalog for that.

Having them in desktop*.po files is just a conveniance for the translators.
Comment 2 Alexander Potashev 2011-05-18 09:57:40 UTC
Created attachment 60101 [details]
Context menu in Konqueror

No, I see only "Compress" not translated in Konqueror. In Dolphin it is translated.
Comment 3 Burkhard Lück 2011-05-18 12:52:28 UTC
Really strange, all strings in the context menu (Compress + subitems) are translated via ark_addtoservicemenu.desktop, no translation catalog is involved here.

So either you should see them all translated or none.

The insertCatalog() call you proposed is not necessary, dolphinpart.cpp has the line K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin")), so it loads the catalog already. I can verify that using a patched kdelibs with additional kDebug() calls enabled in every function where catalogs are loaded/removed starting konqueror from konsole.

Afaik the application dolphin is dolphin_shell+dolphin_part, konqueror in filemanager mode is konqueror_shell+dolphin_part. As no catalog is involved in translation, Compress + subitems should be either translated or untranslated in both cases, but not mixed.

Do you have more than one ark_addtoservicemenu.desktop?
Does your ark_addtoservicemenu.desktop have "X-KDE-Submenu[ru]=Упаковать"?
Comment 4 Alexander Potashev 2011-05-18 16:41:31 UTC
$ locate ark_addtoserviceme
/home/sasha/kde-full/kde/trunk/KDE/kdeutils/ark/app/ark_addtoservicemenu.desktop
/usr/my-portage-distfiles/svn-src/kdeutils-4.5.9999/kdeutils/ark/app/ark_addtoservicemenu.desktop
/usr/share/kde4/services/ServiceMenus/ark_addtoservicemenu.desktop
/vz/private/102/usr/share/kde4/services/ServiceMenus/ark_addtoservicemenu.desktop


In the file /usr/share/kde4/services/ServiceMenus/ark_addtoservicemenu.desktop, I have a few "...[ru]" strings including "X-KDE-Submenu[ru]=Упаковать".
Comment 5 Alexander Potashev 2011-05-18 18:16:24 UTC
BTW, works well in Archlinux (i.e. "Compress" is translated in Konqueror).
Comment 6 Alexander Potashev 2011-05-18 18:19:50 UTC
(In reply to comment #5)
> BTW, works well in Archlinux (i.e. "Compress" is translated in Konqueror).

It was kde*-4.6.43git20110506 from http://arch.morrigan.ch/kde-snapshots/os/i686/