Skip to content

Commit 9edab1e

Browse files
committedJun 23, 2016
[Processing] Translate alg names in menu and options dialog
1 parent 36e7f92 commit 9edab1e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎python/plugins/processing/gui/ConfigDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def fillTreeUsingProviders(self):
207207
groupItem.setEditable(False)
208208

209209
for alg in provider.algs:
210-
algItem = QStandardItem(alg.name)
210+
algItem = QStandardItem(alg.i18n_name or alg.name)
211211
algItem.setIcon(icon)
212212
algItem.setEditable(False)
213213
try:

‎python/plugins/processing/gui/menus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def removeMenus():
155155

156156

157157
def addAlgorithmEntry(alg, menuName, submenuName, actionText=None, icon=None, addButton=False):
158-
action = QAction(icon or alg.getIcon(), actionText or alg.name, iface.mainWindow())
158+
action = QAction(icon or alg.getIcon(), actionText or alg.i18n_name or alg.name, iface.mainWindow())
159159
action.triggered.connect(lambda: _executeAlgorithm(alg))
160160
action.setObjectName("mProcessingUserMenu_%s" % alg.commandLineName())
161161

@@ -232,6 +232,6 @@ def getMenu(name, parent):
232232

233233
def findAction(actions, alg, actionText=None):
234234
for action in actions:
235-
if action.text() in [actionText, alg.name]:
235+
if action.text() in [actionText, alg.i18n_name, alg.name]:
236236
return action
237237
return None

0 commit comments

Comments
 (0)
Please sign in to comment.