Skip to content

EspoCRM – Open Source CRM Application

Record action item labelTranslation support

Yurii7f5521b64992
diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
index 2bcfedeb16..50ff0a4a54 100644
--- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
+++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
@@ -36,7 +36,7 @@
"modalDetailActionList": [
{
"name": "complete",
- "label": "Complete",
+ "labelTranslation": "Task.labels.Complete",
"acl": "edit",
"handler": "modules/crm/handlers/task/detail-actions",
"actionFunction": "complete",
diff --git a/client/src/helpers/action-item-setup.js b/client/src/helpers/action-item-setup.js
index 715d0cc25b..ba2244ffd1 100644
--- a/client/src/helpers/action-item-setup.js
+++ b/client/src/helpers/action-item-setup.js
@@ -110,7 +110,7 @@ class ActionItemSetupHelper {
actionDefsList.forEach(item => {
const name = item.name;
- if (!item.label) {
+ if (!item.label && !item.labelTranslation) {
item.text = this.language.translate(name, 'actions', scope);
}
diff --git a/schema/metadata/clientDefs.json b/schema/metadata/clientDefs.json
index f8f7933b76..89a7d8e365 100644
--- a/schema/metadata/clientDefs.json
+++ b/schema/metadata/clientDefs.json
@@ -893,6 +893,10 @@
"type": "string",
"description": "A translatable label."
},
+ "labelTranslation": {
+ "type": "string",
+ "description": "A label translation path. As of v10.0."
+ },
"handler": {
"type": "string",
"description": "A handler class for the action."