Skip to content

Commit

Permalink
Merge pull request #3231 from arnaud-morvan/processing_menu_translation
Browse files Browse the repository at this point in the history
[processing] translate alg names in vector menu and options dialog
  • Loading branch information
alexbruy committed Jun 24, 2016
2 parents 92bfcd4 + 9edab1e commit 6749351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/ConfigDialog.py
Expand Up @@ -207,7 +207,7 @@ def fillTreeUsingProviders(self):
groupItem.setEditable(False)

for alg in provider.algs:
algItem = QStandardItem(alg.name)
algItem = QStandardItem(alg.i18n_name or alg.name)
algItem.setIcon(icon)
algItem.setEditable(False)
try:
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/menus.py
Expand Up @@ -155,7 +155,7 @@ def removeMenus():


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

Expand Down Expand Up @@ -232,6 +232,6 @@ def getMenu(name, parent):

def findAction(actions, alg, actionText=None):
for action in actions:
if action.text() in [actionText, alg.name]:
if action.text() in [actionText, alg.i18n_name, alg.name]:
return action
return None

0 comments on commit 6749351

Please sign in to comment.