Browse Source

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.
Ghostkeeper 6 years ago
parent
commit
163f102dda

+ 2 - 1
plugins/ChangeLogPlugin/ChangeLog.py

@@ -1,4 +1,4 @@
-# Copyright (c) 2015 Ultimaker B.V.
+# Copyright (c) 2018 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 from UM.i18n import i18nCatalog
@@ -29,6 +29,7 @@ class ChangeLog(Extension, QObject,):
         self._change_logs = None
         Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated)
         Application.getInstance().getPreferences().addPreference("general/latest_version_changelog_shown", "2.0.0") #First version of CURA with uranium
+        self.setMenuName(catalog.i18nc("@item:inmenu", "Changelog"))
         self.addMenuItem(catalog.i18nc("@item:inmenu", "Show Changelog"), self.showChangelog)
 
     def getChangeLogs(self):

+ 2 - 1
plugins/PostProcessingPlugin/PostProcessingPlugin.py

@@ -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