KActionMenu(const QIcon &icon, const QString &text, QObject *parent) failed to i18nc for Konsole https://twitter.com/xiangzhai/status/654138729271918592 when clicked the File menu on the top of Konsole, the New Tab failed to i18nc. KActionMenu https://projects.kde.org/projects/frameworks/kwidgetsaddons/repository/revisions/master/entry/src/kactionmenu.cpp#L66 looks ok! is Qt5 bug? KF5 Version: 5.15.0 Qt5 Version: 5.5.0 workaround patch for Konsole, but ... it is the huge work to change each KActionMenu: diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index cbfec0c..b9936d5 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -291,6 +291,7 @@ void MainWindow::setupActions() // File Menu _newTabMenuAction = new KActionMenu(QIcon::fromTheme(QStringLiteral("tab-new")), i18nc("@action:inmenu", "&New Tab"), collection); + _newTabMenuAction->setText(i18nc("@action:inmenu", "&New Tab")); collection->setDefaultShortcut(_newTabMenuAction, Qt::CTRL + Qt::SHIFT + Qt::Key_T); collection->setShortcutsConfigurable(_newTabMenuAction, true); _newTabMenuAction->setAutoRepeat(false); Reproducible: Always
Odd workaround, because the constructor in kactionmenu.cpp also calls "setText()" with the given string.
kf5.24.0 fixed