mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
refactor: t( => t` in *.vue <script/>
This commit is contained in:
parent
cad59570a0
commit
5ffaa39ff6
@ -168,11 +168,11 @@ export default {
|
||||
getEmptyMessage() {
|
||||
const { emptyMessage } = this.df ?? {};
|
||||
if (typeof emptyMessage === 'function') {
|
||||
return this.t(emptyMessage(this.doc));
|
||||
return emptyMessage(this.doc);
|
||||
} else if (emptyMessage) {
|
||||
return this.t(emptyMessage);
|
||||
return emptyMessage;
|
||||
}
|
||||
return this.t('Empty');
|
||||
return this.t`Empty`;
|
||||
},
|
||||
selectItem(d) {
|
||||
if (d.action) {
|
||||
|
@ -204,9 +204,9 @@ export default {
|
||||
},
|
||||
filterAppliedMessage() {
|
||||
if (this.activeFilterCount === 1) {
|
||||
return this.t('1 filter applied');
|
||||
return this.t`1 filter applied`;
|
||||
}
|
||||
return this.t('{0} filters applied', [this.activeFilterCount]);
|
||||
return this.t`${this.activeFilterCount} filters applied`;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -196,7 +196,7 @@ export default {
|
||||
this.fileSelectedFrom = 'Existing File';
|
||||
const filePath = (
|
||||
await ipcRenderer.invoke(IPC_ACTIONS.GET_OPEN_FILEPATH, {
|
||||
title: this.t('Select file'),
|
||||
title: this.t`Select file`,
|
||||
properties: ['openFile'],
|
||||
filters: [{ name: 'SQLite DB File', extensions: ['db'] }],
|
||||
})
|
||||
|
@ -107,12 +107,12 @@ export default {
|
||||
/* eslint-disable vue/no-side-effects-in-computed-properties */
|
||||
return [
|
||||
{
|
||||
label: t('Organisation'),
|
||||
label: t`Organisation`,
|
||||
|
||||
items: [
|
||||
{
|
||||
key: 'Invoice',
|
||||
label: t('Invoice'),
|
||||
label: t`Invoice`,
|
||||
icon: 'invoice',
|
||||
description:
|
||||
'Customize your invoices by adding a logo and address details',
|
||||
@ -123,7 +123,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'General',
|
||||
label: t('General'),
|
||||
label: t`General`,
|
||||
icon: 'general',
|
||||
description:
|
||||
'Setup your company information, email, country and fiscal year',
|
||||
@ -134,7 +134,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'System',
|
||||
label: t('System'),
|
||||
label: t`System`,
|
||||
icon: 'system',
|
||||
description:
|
||||
'Setup system defaults like date format and display precision',
|
||||
@ -146,12 +146,12 @@ export default {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: t('Accounts'),
|
||||
label: t`Accounts`,
|
||||
|
||||
items: [
|
||||
{
|
||||
key: 'Review Accounts',
|
||||
label: t('Review Accounts'),
|
||||
label: t`Review Accounts`,
|
||||
icon: 'review-ac',
|
||||
description:
|
||||
'Review your chart of accounts, add any account or tax heads as needed',
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Opening Balances',
|
||||
label: t('Opening Balances'),
|
||||
label: t`Opening Balances`,
|
||||
icon: 'opening-ac',
|
||||
fieldname: 'openingBalanceChecked',
|
||||
description:
|
||||
@ -174,7 +174,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Add Taxes',
|
||||
label: t('Add Taxes'),
|
||||
label: t`Add Taxes`,
|
||||
icon: 'percentage',
|
||||
fieldname: 'taxesAdded',
|
||||
description:
|
||||
@ -186,12 +186,12 @@ export default {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: t('Sales'),
|
||||
label: t`Sales`,
|
||||
|
||||
items: [
|
||||
{
|
||||
key: 'Add Sales Items',
|
||||
label: t('Add Items'),
|
||||
label: t`Add Items`,
|
||||
icon: 'item',
|
||||
description:
|
||||
'Add products or services that you sell to your customers',
|
||||
@ -202,7 +202,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Add Customers',
|
||||
label: t('Add Customers'),
|
||||
label: t`Add Customers`,
|
||||
icon: 'customer',
|
||||
description: 'Add a few customers to create your first invoice',
|
||||
action: () => routeTo('/list/Customer'),
|
||||
@ -212,7 +212,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Create Invoice',
|
||||
label: t('Create Invoice'),
|
||||
label: t`Create Invoice`,
|
||||
icon: 'sales-invoice',
|
||||
description:
|
||||
'Create your first invoice and mail it to your customer',
|
||||
@ -223,12 +223,12 @@ export default {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: t('Purchase'),
|
||||
label: t`Purchase`,
|
||||
|
||||
items: [
|
||||
{
|
||||
key: 'Add Purchase Items',
|
||||
label: t('Add Items'),
|
||||
label: t`Add Items`,
|
||||
icon: 'item',
|
||||
description:
|
||||
'Add products or services that you buy from your suppliers',
|
||||
@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Add Suppliers',
|
||||
label: t('Add Suppliers'),
|
||||
label: t`Add Suppliers`,
|
||||
icon: 'supplier',
|
||||
description: 'Add a few suppliers to create your first bill',
|
||||
action: () => routeTo('/list/Supplier'),
|
||||
@ -245,7 +245,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: 'Create Bill',
|
||||
label: t('Create Bill'),
|
||||
label: t`Create Bill`,
|
||||
icon: 'purchase-invoice',
|
||||
description:
|
||||
'Create your first bill and mail it to your supplier',
|
||||
|
@ -290,19 +290,19 @@ export default {
|
||||
onSubmitClick() {
|
||||
let message =
|
||||
this.doctype === 'SalesInvoice'
|
||||
? this.t('Are you sure you want to submit this Invoice?')
|
||||
: this.t('Are you sure you want to submit this Bill?');
|
||||
? this.t`Are you sure you want to submit this Invoice?`
|
||||
: this.t`Are you sure you want to submit this Bill?`;
|
||||
showMessageDialog({
|
||||
message,
|
||||
buttons: [
|
||||
{
|
||||
label: this.t('Yes'),
|
||||
label: this.t`Yes`,
|
||||
action: () => {
|
||||
this.doc.submit().catch(this.handleError);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.t('No'),
|
||||
label: this.t`No`,
|
||||
action() {},
|
||||
},
|
||||
],
|
||||
|
@ -198,16 +198,16 @@ export default {
|
||||
},
|
||||
async onSubmitClick() {
|
||||
showMessageDialog({
|
||||
message: this.t('Are you sure you want to submit this Journal Entry?'),
|
||||
message: this.t`Are you sure you want to submit this Journal Entry?`,
|
||||
buttons: [
|
||||
{
|
||||
label: this.t('Yes'),
|
||||
label: this.t`Yes`,
|
||||
action: () => {
|
||||
this.doc.submit().catch(this.handleError);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.t('No'),
|
||||
label: this.t`No`,
|
||||
action() {},
|
||||
},
|
||||
],
|
||||
|
@ -100,7 +100,7 @@ export default {
|
||||
},
|
||||
async getSavePath() {
|
||||
const options = {
|
||||
title: this.t('Select folder'),
|
||||
title: this.t`Select folder`,
|
||||
defaultPath: `${this.name}.pdf`,
|
||||
};
|
||||
|
||||
|
@ -196,7 +196,7 @@ export default {
|
||||
});
|
||||
});
|
||||
this.doc.on('beforeUpdate', () => {
|
||||
this.statusText = t('Saving...');
|
||||
this.statusText = t`Saving...`;
|
||||
});
|
||||
this.doc.on('afterUpdate', () => {
|
||||
setTimeout(() => {
|
||||
|
@ -302,7 +302,7 @@ export default {
|
||||
})
|
||||
) ?? []),
|
||||
{
|
||||
label: this.t('Reset Filters'),
|
||||
label: this.t`Reset Filters`,
|
||||
action: this.resetFilters,
|
||||
},
|
||||
];
|
||||
|
@ -80,17 +80,17 @@ export default {
|
||||
fieldsChanged: [],
|
||||
tabs: [
|
||||
{
|
||||
label: t('Invoice'),
|
||||
label: t`Invoice`,
|
||||
icon: 'invoice',
|
||||
component: markRaw(TabInvoice),
|
||||
},
|
||||
{
|
||||
label: t('General'),
|
||||
label: t`General`,
|
||||
icon: 'general',
|
||||
component: markRaw(TabGeneral),
|
||||
},
|
||||
{
|
||||
label: t('System'),
|
||||
label: t`System`,
|
||||
icon: 'system',
|
||||
component: markRaw(TabSystem),
|
||||
},
|
||||
|
@ -131,7 +131,7 @@ export default {
|
||||
},
|
||||
async submit() {
|
||||
if (!this.allValuesFilled()) {
|
||||
showMessageDialog({ message: this.t('Please fill all values') });
|
||||
showMessageDialog({ message: this.t`Please fill all values` });
|
||||
return;
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ export default {
|
||||
return this.meta.getQuickEditFields();
|
||||
},
|
||||
buttonText() {
|
||||
return this.loading ? this.t('Setting Up...') : this.t('Submit');
|
||||
return this.loading ? this.t`Setting Up...` : this.t`Submit`;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user