- const QString timeLineIcon = "package_utility_time"; // TODO: Ask the Oxygen team to create
- // a custom icon for the timeline-protocol
-
- m_systemBookmarks.append(SystemBookmarkData(KUrl(KUser().homeDir()),
- "user-home",
- i18nc("@item", "Home")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("remote:/"),
- "network-workgroup",
- i18nc("@item", "Network")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("/"),
- "folder-red",
- i18nc("@item", "Root")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("trash:/"),
- "user-trash",
- i18nc("@item", "Trash")));
-
- if (m_nepomukRunning) {
- m_systemBookmarks.append(SystemBookmarkData(KUrl("timeline:/today"),
- timeLineIcon,
- i18nc("@item Recently Accessed", "Today")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("timeline:/yesterday"),
- timeLineIcon,
- i18nc("@item Recently Accessed", "Yesterday")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("timeline:/thismonth"),
- timeLineIcon,
- i18nc("@item Recently Accessed", "This Month")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("timeline:/lastmonth"),
- timeLineIcon,
- i18nc("@item Recently Accessed", "Last Month")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("search:/documents"),
- "folder-txt",
- i18nc("@item Commonly Accessed", "Documents")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("search:/images"),
- "folder-image",
- i18nc("@item Commonly Accessed", "Images")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("search:/audio"),
- "folder-sound",
- i18nc("@item Commonly Accessed", "Audio Files")));
- m_systemBookmarks.append(SystemBookmarkData(KUrl("search:/videos"),
- "folder-video",
- i18nc("@item Commonly Accessed", "Videos")));
+ // Note: The context of the I18N_NOOP2 must be "KFile System Bookmarks". The real
+ // i18nc call is done after reading the bookmark. The reason why the i18nc call is not
+ // done here is because otherwise switching the language would not result in retranslating the
+ // bookmarks.
+ m_systemBookmarks.append(SystemBookmarkData(QUrl::fromLocalFile(KUser().homeDir()),
+ QStringLiteral("user-home"),
+ I18N_NOOP2("KFile System Bookmarks", "Home")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("remote:/")),
+ QStringLiteral("network-workgroup"),
+ I18N_NOOP2("KFile System Bookmarks", "Network")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl::fromLocalFile(QStringLiteral("/")),
+ QStringLiteral("folder-red"),
+ I18N_NOOP2("KFile System Bookmarks", "Root")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("trash:/")),
+ QStringLiteral("user-trash"),
+ I18N_NOOP2("KFile System Bookmarks", "Trash")));
+
+ if (m_fileIndexingEnabled) {
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("timeline:/today")),
+ QStringLiteral("go-jump-today"),
+ I18N_NOOP2("KFile System Bookmarks", "Today")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("timeline:/yesterday")),
+ QStringLiteral("view-calendar-day"),
+ I18N_NOOP2("KFile System Bookmarks", "Yesterday")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("timeline:/thismonth")),
+ QStringLiteral("view-calendar-month"),
+ I18N_NOOP2("KFile System Bookmarks", "This Month")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("timeline:/lastmonth")),
+ QStringLiteral("view-calendar-month"),
+ I18N_NOOP2("KFile System Bookmarks", "Last Month")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("search:/documents")),
+ QStringLiteral("folder-text"),
+ I18N_NOOP2("KFile System Bookmarks", "Documents")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("search:/images")),
+ QStringLiteral("folder-images"),
+ I18N_NOOP2("KFile System Bookmarks", "Images")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("search:/audio")),
+ QStringLiteral("folder-sound"),
+ I18N_NOOP2("KFile System Bookmarks", "Audio Files")));
+ m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("search:/videos")),
+ QStringLiteral("folder-videos"),
+ I18N_NOOP2("KFile System Bookmarks", "Videos")));