mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[Processing] Translate alg names in menu and options dialog
This commit is contained in:
parent
36e7f920c2
commit
9edab1e0a8
@ -207,7 +207,7 @@ class ConfigDialog(BASE, WIDGET):
|
||||
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:
|
||||
|
@ -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())
|
||||
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user