Make extension menu items translatable

If these extension plug-ins don't set their menu names, the plug-in name is used as the menu name. The plug-in names are not translated, so this appears as an untranslated string then.
This commit is contained in:
Ghostkeeper 2018-11-15 09:38:14 +01:00
parent 103d79c89d
commit 163f102dda
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 4 additions and 2 deletions

View file

@ -32,7 +32,8 @@ class PostProcessingPlugin(QObject, Extension):
def __init__(self, parent = None) -> None:
QObject.__init__(self, parent)
Extension.__init__(self)
self.addMenuItem(i18n_catalog.i18n("Modify G-Code"), self.showPopup)
self.setMenuName(i18n_catalog.i18nc("@item:inmenu", "Post Processing"))
self.addMenuItem(i18n_catalog.i18nc("@item:inmenu", "Modify G-Code"), self.showPopup)
self._view = None
# Loaded scripts are all scripts that can be used