Skip to content

EspoCRM – Open Source CRM Application

Admin panel label translation

Yurii04e9f29b9ac1
diff --git a/client/src/views/admin/index.js b/client/src/views/admin/index.js
index 1c20b9f68c..afdf45d0dc 100644
--- a/client/src/views/admin/index.js
+++ b/client/src/views/admin/index.js
@@ -77,10 +77,18 @@ class AdminIndexView extends View {
panelItem.itemList = panelItem.itemList || [];
panelItem.label = this.translate(panelItem.label, 'labels', 'Admin');
+ if (panelItem.labelTranslation) {
+ panelItem.label = this.getLanguage().translatePath(panelItem.labelTranslation);
+ }
+
if (panelItem.itemList) {
panelItem.itemList.forEach(item => {
item.label = this.translate(item.label, 'labels', 'Admin');
+ if (item.labelTranslation) {
+ item.label = this.getLanguage().translatePath(item.labelTranslation);
+ }
+
if (item.description) {
item.keywords = (this.getLanguage().get('Admin', 'keywords', item.description) || '')
.split(',');
diff --git a/schema/metadata/app/adminPanel.json b/schema/metadata/app/adminPanel.json
index c35d3a3a97..9150094af0 100644
--- a/schema/metadata/app/adminPanel.json
+++ b/schema/metadata/app/adminPanel.json
@@ -12,6 +12,10 @@
"type": "string",
"description": "A panel label. A translation path: Admin > labels > {label}."
},
+ "labelTranslation": {
+ "type": "string",
+ "description": "A label translation path. As of v10.0.3."
+ },
"order": {
"type": "integer",
"description": "Used for ordering panels on the page."
@@ -33,6 +37,10 @@
"type": "string",
"description": "An item (link) label. A translation path: Admin > labels > {label}."
},
+ "labelTranslation": {
+ "type": "string",
+ "description": "A label translation path. As of v10.0.3."
+ },
"iconClass": {
"type": "string",
"description": "A CSS class for the icon."