From ddda0d38c7e1c2927cf0f45717f965bd56adf0f1 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 16 Feb 2022 11:57:10 +0530 Subject: [PATCH] fix: minor fixes to t`strings` --- reports/GeneralLedger/viewConfig.js | 1 + src/pages/DatabaseSelector.vue | 5 +++-- src/pages/SetupWizard/SetupWizard.vue | 2 +- src/utils.js | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/reports/GeneralLedger/viewConfig.js b/reports/GeneralLedger/viewConfig.js index 761dfc2c..51f8a3c0 100644 --- a/reports/GeneralLedger/viewConfig.js +++ b/reports/GeneralLedger/viewConfig.js @@ -1,4 +1,5 @@ import { partyWithAvatar } from '@/utils'; +import { t } from 'frappe'; import getCommonExportActions from '../commonExporter'; let title = 'General Ledger'; diff --git a/src/pages/DatabaseSelector.vue b/src/pages/DatabaseSelector.vue index 66be312d..3d1b6ec7 100644 --- a/src/pages/DatabaseSelector.vue +++ b/src/pages/DatabaseSelector.vue @@ -224,8 +224,9 @@ export default { } const title = this.t`DB Connection Error`; - let content = this - .t`Please select an existing database or create a new one. reason: ${reason}, filePath: ${filePath}`; + let content = + this.t`Please select an existing database or create a new one.` + + ` reason: ${reason}, filePath: ${filePath}`; if (reason === DB_CONN_FAILURE.CANT_OPEN) { content = this .t`Can't open database file: ${filePath}, please create a new file.`; diff --git a/src/pages/SetupWizard/SetupWizard.vue b/src/pages/SetupWizard/SetupWizard.vue index 495dd49c..e02481b3 100644 --- a/src/pages/SetupWizard/SetupWizard.vue +++ b/src/pages/SetupWizard/SetupWizard.vue @@ -165,7 +165,7 @@ export default { this.$emit('setup-complete'); } else { const title = this.t`DB Connection Error`; - const content = this.t`reason: ${reason}, filePath: ${filePath}`; + const content = `reason: ${reason}, filePath: ${filePath}`; await showErrorDialog(title, content); } }, diff --git a/src/utils.js b/src/utils.js index ba6c7814..ce577eb3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -34,7 +34,7 @@ export async function showMessageDialog({ export function deleteDocWithPrompt(doc) { return new Promise((resolve) => { showMessageDialog({ - message: t`Are you sure you want to delete ${doc.doctype} "${doc.name}"?`, + message: t`Are you sure you want to delete ${doc.doctype} ${doc.name}?`, description: t`This action is permanent`, buttons: [ {