From a03ca7f4742a8ae3c3aedd53a7543ec85811c406 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 14 Feb 2022 11:35:47 +0530 Subject: [PATCH] chore: deprecate old syntax, remove variable calls --- frappe/utils/translation.js | 1 - src/pages/Settings/Settings.vue | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/utils/translation.js b/frappe/utils/translation.js index 24d2dd5a..fc2c3c56 100644 --- a/frappe/utils/translation.js +++ b/frappe/utils/translation.js @@ -29,7 +29,6 @@ class TranslationString { #stitch() { if (!(this.args[0] instanceof Array)) { - return this.args.join(' '); throw new ValueError( `invalid args passed to TranslationString ${ this.args diff --git a/src/pages/Settings/Settings.vue b/src/pages/Settings/Settings.vue index 26919091..5a96d25f 100644 --- a/src/pages/Settings/Settings.vue +++ b/src/pages/Settings/Settings.vue @@ -80,16 +80,19 @@ export default { fieldsChanged: [], tabs: [ { + key: 'Invoice', label: t`Invoice`, icon: 'invoice', component: markRaw(TabInvoice), }, { + key: 'General', label: t`General`, icon: 'general', component: markRaw(TabGeneral), }, { + key: 'System', label: t`System`, icon: 'system', component: markRaw(TabSystem), @@ -134,7 +137,7 @@ export default { }, setActiveTab() { const { tab } = this.$route.query; - const index = this.tabs.findIndex((i) => i.label === t(tab || 'Invoice')); + const index = this.tabs.findIndex((i) => i.key === tab || 'Invoice'); if (index !== -1) { this.activeTab = index; }