[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Fix translations not showing in the Sort by and Additional Information submenus
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2012-08-23 1:52:52
Message-ID: 201208230352.52300.christoph () maxiom ! de
[Download RAW message or body]

Hi Albert and Frank,

Regarding the "(I18N_EMPTY_MESSAGE)" in Dolphin menus,
the problem is indeed caused by above commit.

The issue is that the code expects an empty string for the group 
header, if the actions should not be grouped in a sub-menu, but stay 
at top level.

Attached patch fixes the issue for me, but I don't like the long line, 
so please improve :)

Christoph Feck (kdepepo)

["Dolphin.diff" (text/x-patch)]

diff --git a/dolphin/src/kitemviews/kfileitemmodel.cpp b/dolphin/src/kitemviews/kfileitemmodel.cpp
index 1bf9e65..4857289 100644
--- a/dolphin/src/kitemviews/kfileitemmodel.cpp
+++ b/dolphin/src/kitemviews/kfileitemmodel.cpp
@@ -561,7 +561,7 @@ QList<KFileItemModel::RoleInfo> KFileItemModel::rolesInformation()
                 RoleInfo info;
                 info.role = map[i].role;
                 info.translation = i18nc(map[i].roleTranslationContext, map[i].roleTranslation);
-                info.group = i18nc(map[i].groupTranslationContext, map[i].groupTranslation);
+                info.group = map[i].groupTranslation ? i18nc(map[i].groupTranslationContext, \
map[i].groupTranslation) : QString();  info.requiresNepomuk = map[i].requiresNepomuk;
                 info.requiresIndexer = map[i].requiresIndexer;
                 rolesInfo.append(info);



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic