2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

refactor: convert template instances of t(' → t`

This commit is contained in:
18alantom 2022-02-14 10:45:26 +05:30 committed by Alan
parent 5ffaa39ff6
commit 53ce50bb1e
30 changed files with 75 additions and 76 deletions

View File

@ -5,7 +5,7 @@
<f-button
primary
@click="$emit('makePDF', $refs.printComponent.innerHTML)"
>{{ t('PDF') }}</f-button
>{{ t`PDF` }}</f-button
>
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="py-4" v-if="pendingInvoices.length">
<div class="px-4 text-sm text-gray-600 mb-1">
{{ t('Recent Invoices') }}
{{ t`Recent Invoices` }}
</div>
<div
class="px-4 py-3 border-b hover:bg-gray-100 cursor-pointer"

View File

@ -6,15 +6,15 @@
<f-button
primary
@click="$emit('send', $refs.printComponent.innerHTML)"
>{{ t('Send') }}</f-button
>{{ t`Send` }}</f-button
>
<f-button secondary @click="toggleCustomizer">{{
t('Customize')
t`Customize`
}}</f-button>
<f-button
secondary
@click="$emit('makePDF', $refs.printComponent.innerHTML)"
>{{ t('PDF') }}</f-button
>{{ t`PDF` }}</f-button
>
</div>
</div>

View File

@ -96,7 +96,7 @@
</div>
<div class="w-1/2">
<div class="flex pl-2 justify-between py-3 border-b">
<div>{{ t('Subtotal') }}</div>
<div>{{ t`Subtotal` }}</div>
<div>{{ frappe.format(doc.netTotal, 'Currency') }}</div>
</div>
<div
@ -110,7 +110,7 @@
<div
class="flex pl-2 justify-between py-3 border-t text-green-600 font-semibold text-base"
>
<div>{{ t('Grand Total') }}</div>
<div>{{ t`Grand Total` }}</div>
<div>{{ frappe.format(doc.grandTotal, 'Currency') }}</div>
</div>
</div>

View File

@ -82,7 +82,7 @@
<div class="flex -mx-3">
<div class="flex justify-end flex-1 p-3 bg-gray-100">
<div class="text-right">
<div class="text-gray-800">{{ t('Subtotal') }}</div>
<div class="text-gray-800">{{ t`Subtotal` }}</div>
<div class="text-xl mt-2">
{{ frappe.format(doc.netTotal, 'Currency') }}
</div>
@ -105,7 +105,7 @@
:style="{ backgroundColor: printSettings.color }"
>
<div>
<div>{{ t('Grand Total') }}</div>
<div>{{ t`Grand Total` }}</div>
<div class="text-2xl mt-2 font-semibold">
{{ frappe.format(doc.grandTotal, 'Currency') }}
</div>

View File

@ -103,7 +103,7 @@
</div>
<div class="w-1/2 text-lg">
<div class="flex pl-2 justify-between py-1">
<div>{{ t('Subtotal') }}</div>
<div>{{ t`Subtotal` }}</div>
<div>{{ frappe.format(doc.netTotal, 'Currency') }}</div>
</div>
<div
@ -118,7 +118,7 @@
class="flex pl-2 justify-between py-1 font-semibold"
:style="{ color: printSettings.color }"
>
<div>{{ t('Grand Total') }}</div>
<div>{{ t`Grand Total` }}</div>
<div>{{ frappe.format(doc.grandTotal, 'Currency') }}</div>
</div>
</div>

View File

@ -4,6 +4,6 @@
@click="$router.back()"
>
<feather-icon name="chevron-left" class="w-5 h-5" />
<span class="ml-1">{{ t('Back') }}</span>
<span class="ml-1">{{ t`Back` }}</span>
</a>
</template>

View File

@ -50,7 +50,7 @@
v-show="showEdit"
class="absolute bottom-0 text-gray-500 text-center text-xs pt-3 pb-1"
>
{{ t('Edit') }}
{{ t`Edit` }}
</div>
</div>
</template>

View File

@ -41,7 +41,7 @@
<div class="mt-3 w-28">
<input
type="text"
:placeholder="t('Custom Hex')"
:placeholder="t`Custom Hex`"
:class="inputClasses"
:value="value"
@change="(e) => setColorValue(e.target.value)"

View File

@ -67,11 +67,10 @@ export default {
value: 'Create',
action: () => this.openNewDoc(),
component: markRaw({
template: `
<div class="flex items-center font-semibold">{{ t('Create') }}
<Badge color="blue" class="ml-2" v-if="isNewValue">{{ linkValue }}</Badge>
</div>
`,
template:
'<div class="flex items-center font-semibold">{{ t`Create` }}' +
'<Badge color="blue" class="ml-2" v-if="isNewValue">{{ linkValue }}</Badge>' +
'</div>',
computed: {
linkValue: () => this.linkValue,
isNewValue: () => {

View File

@ -43,7 +43,7 @@
'px-3 py-4': size !== 'small',
}"
>
{{ t('Add Row') }}
{{ t`Add Row` }}
</div>
<div v-for="i in ratio.slice(3).length" :key="i"></div>
<div

View File

@ -18,7 +18,7 @@
<div class="bg-white rounded w-full min-w-40">
<div class="p-1 max-h-64 overflow-auto text-sm">
<div v-if="isLoading" class="p-2 text-gray-600 italic">
{{ t('Loading...') }}
{{ t`Loading...` }}
</div>
<div
v-if="!isLoading && dropdownItems.length === 0"

View File

@ -9,7 +9,7 @@
{{ filterAppliedMessage }}
</template>
<template v-else>
{{ t('Filter') }}
{{ t`Filter` }}
</template>
</span>
</span>
@ -89,7 +89,7 @@
</template>
<template v-else>
<span class="text-base text-gray-600">{{
t('No filters selected')
t`No filters selected`
}}</span>
</template>
</div>
@ -108,7 +108,7 @@
@click="addNewFilter"
>
<feather-icon name="plus" class="w-4 h-4" />
<span class="ml-2">{{ t('Add a filter') }}</span>
<span class="ml-2">{{ t`Add a filter` }}</span>
</div>
</div>
</template>

View File

@ -7,7 +7,7 @@
</div>
<div class="col-6 text-right">
<f-button secondary @click="saveAndClose">{{
t('Save & Close')
t`Save & Close`
}}</f-button>
</div>
</div>
@ -17,7 +17,7 @@
<sketch-picker v-model="color" class="shadow-none" />
<div class="mt-3">
<f-button secondary @click="openCompanySettings">{{
t('Company Settings')
t`Company Settings`
}}</f-button>
</div>
</div>

View File

@ -25,14 +25,14 @@
/>
<div class="flex px-4 pb-2">
<Button class="w-1/2 text-gray-900" @click="inlineEditField = null">
{{ t('Cancel') }}
{{ t`Cancel` }}
</Button>
<Button
type="primary"
class="ml-2 w-1/2 text-white"
@click="() => saveInlineEditDoc(df)"
>
{{ df.inlineSaveText || t('Save') }}
{{ df.inlineSaveText || t`Save` }}
</Button>
</div>
</div>

View File

@ -3,7 +3,7 @@
<PageHeader>
<template #title>
<h1 class="text-2xl font-bold">
{{ t('Chart of Accounts') }}
{{ t`Chart of Accounts` }}
</h1>
</template>
<template #actions>
@ -50,7 +50,7 @@
"
@click="addAccount(account, 'addingAccount')"
>
{{ t('Add Account') }}
{{ t`Add Account` }}
</button>
<button
class="
@ -61,7 +61,7 @@
"
@click="addAccount(account, 'addingGroupAccount')"
>
{{ t('Add Group') }}
{{ t`Add Group` }}
</button>
</div>
</div>
@ -93,7 +93,7 @@
<input
class="focus:outline-none bg-transparent"
:class="{ 'text-gray-600': insertingAccount }"
:placeholder="t('New Account')"
:placeholder="t`New Account`"
:ref="account.name"
@keydown.esc="cancelAddingAccount(account)"
@keydown.enter="
@ -117,7 +117,7 @@
"
@click="cancelAddingAccount(account)"
>
{{ t('Cancel') }}
{{ t`Cancel` }}
</button>
</div>
</div>

View File

@ -2,15 +2,15 @@
<div class="mx-4">
<template v-if="hasData">
<div class="flex items-center justify-between">
<div class="font-medium">{{ t('Cashflow') }}</div>
<div class="font-medium">{{ t`Cashflow` }}</div>
<div class="flex text-base">
<div class="flex items-center">
<span class="w-3 h-3 rounded-sm inline-block bg-blue-500"></span>
<span class="ml-2 text-gray-900">{{ t('Inflow') }}</span>
<span class="ml-2 text-gray-900">{{ t`Inflow` }}</span>
</div>
<div class="flex items-center ml-6">
<span class="w-3 h-3 rounded-sm inline-block bg-gray-500"></span>
<span class="ml-2 text-gray-900">{{ t('Outflow') }}</span>
<span class="ml-2 text-gray-900">{{ t`Outflow` }}</span>
</div>
</div>
<PeriodSelector
@ -43,7 +43,7 @@
</defs>
<g fill="none" fill-rule="evenodd">
<text fill="#112B42" class="font-medium">
<tspan y="16">{{ t('Cashflow') }}</tspan>
<tspan y="16">{{ t`Cashflow` }}</tspan>
</text>
<g fill="#E9E9ED">
<path d="M371 2h12v12h-12zM391 2h53v12h-53z" />

View File

@ -2,7 +2,7 @@
<div class="flex flex-col">
<PageHeader>
<template #title>
<h1 class="text-2xl font-bold">{{ t('Dashboard') }}</h1>
<h1 class="text-2xl font-bold">{{ t`Dashboard` }}</h1>
</template>
<template #actions>
<SearchBar class="ml-2" />

View File

@ -1,7 +1,7 @@
<template>
<div class="flex flex-col h-full">
<SectionHeader>
<template #title>{{ t('Top Expenses') }}</template>
<template #title>{{ t`Top Expenses` }}</template>
<template #action>
<PeriodSelector :value="period" @change="(value) => (period = value)" />
</template>
@ -32,7 +32,7 @@
:thickness="11.5"
:text-offset-x="6.5"
:value-formatter="(value) => frappe.format(value, 'Currency')"
:total-label="t('Total Spending')"
:total-label="t`Total Spending`"
@change="(value) => (active = value)"
/>
</div>
@ -41,7 +41,7 @@
class="flex-1 w-full h-full flex-center my-20"
>
<span class="text-base text-gray-600">
{{ t('No expenses in this period') }}
{{ t`No expenses in this period` }}
</span>
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="flex flex-col h-full">
<SectionHeader>
<template #title>{{ t('Profit and Loss') }}</template>
<template #title>{{ t`Profit and Loss` }}</template>
<template #action>
<PeriodSelector
:value="period"
@ -22,7 +22,7 @@
/>
<div class="flex-1 w-full h-full flex-center my-20" v-else>
<span class="text-base text-gray-600">
{{ t('No transactions yet') }}
{{ t`No transactions yet` }}
</span>
</div>
</div>

View File

@ -31,7 +31,7 @@
>
{{ frappe.format(invoice.paid, 'Currency') }}
<span :class="{ 'text-gray-900': invoice.hasData }">{{
t('Paid')
t`Paid`
}}</span>
</div>
<div
@ -40,7 +40,7 @@
>
{{ frappe.format(invoice.unpaid, 'Currency') }}
<span :class="{ 'text-gray-900': invoice.hasData }">{{
t('Unpaid')
t`Unpaid`
}}</span>
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="p-4">
<h4 class="pb-2">{{ t('Data Import') }}</h4>
<h4 class="pb-2">{{ t`Data Import` }}</h4>
<frappe-control
:docfield="{
fieldtype: 'Select',

View File

@ -9,15 +9,15 @@
<div class="w-full">
<div class="px-12">
<h1 class="text-2xl font-semibold">
{{ t('Welcome to Frappe Books') }}
{{ t`Welcome to Frappe Books` }}
</h1>
<p class="text-gray-600 text-base" v-if="!showFiles">
{{
t('Create a new file or select an existing one from your computer')
t`Create a new file or select an existing one from your computer`
}}
</p>
<p class="text-gray-600 text-base" v-if="showFiles">
{{ t('Select a file to load the company transactions') }}
{{ t`Select a file to load the company transactions` }}
</p>
</div>
<div class="px-12 mt-10 window-no-drag" v-if="!showFiles">
@ -49,14 +49,14 @@
<template
v-if="loadingDatabase && fileSelectedFrom === 'New File'"
>
{{ t('Loading...') }}
{{ t`Loading...` }}
</template>
<template v-else>
{{ t('New File') }}
{{ t`New File` }}
</template>
</div>
<div class="mt-2 text-sm text-gray-600 text-center">
{{ t('Create a new file and store it in your computer.') }}
{{ t`Create a new file and store it in your computer.` }}
</div>
</div>
<div
@ -85,14 +85,14 @@
<template
v-if="loadingDatabase && fileSelectedFrom === 'Existing File'"
>
{{ t('Loading...') }}
{{ t`Loading...` }}
</template>
<template v-else>
{{ t('Existing File') }}
{{ t`Existing File` }}
</template>
</div>
<div class="mt-2 text-sm text-gray-600 text-center">
{{ t('Load an existing .db file from your computer.') }}
{{ t`Load an existing .db file from your computer.` }}
</div>
</div>
</div>
@ -127,7 +127,7 @@
<div class="flex items-baseline">
<span>
<template v-if="loadingDatabase && fileSelectedFrom === file">
{{ t('Loading...') }}
{{ t`Loading...` }}
</template>
<template v-else>
{{ file.companyName }}

View File

@ -3,7 +3,7 @@
<PageHeader>
<template #title>
<h1 class="text-2xl font-bold">
{{ t('Setup your workspace') }}
{{ t`Setup your workspace` }}
</h1>
</template>
</PageHeader>
@ -61,7 +61,7 @@
@click="handleAction(item)"
>
<span class="text-base text-white">
{{ item.actionLabel || t('Setup') }}
{{ item.actionLabel || t`Setup` }}
</span>
</Button>
<Button
@ -71,7 +71,7 @@
@click="handleDocumentation(item)"
>
<span class="text-base">
{{ t('Documentation') }}
{{ t`Documentation` }}
</span>
</Button>
</div>

View File

@ -21,14 +21,14 @@
class="text-white text-xs ml-2"
@click="onSaveClick"
>
{{ t('Save') }}
{{ t`Save` }}
</Button>
<Button
v-if="!doc._dirty && !doc._notInserted && !doc.submitted"
type="primary"
class="text-white text-xs ml-2"
@click="onSubmitClick"
>{{ t('Submit') }}</Button
>{{ t`Submit` }}</Button
>
</template>
</PageHeader>
@ -65,8 +65,8 @@
{{
doc._notInserted
? doc.doctype === 'SalesInvoice'
? t('New Invoice')
: t('New Bill')
? t`New Invoice`
: t`New Bill`
: doc.name
}}
</h1>
@ -134,7 +134,7 @@
</div>
<div class="w-64">
<div class="flex pl-2 justify-between py-3 border-b">
<div>{{ t('Subtotal') }}</div>
<div>{{ t`Subtotal` }}</div>
<div>{{ formattedValue('netTotal') }}</div>
</div>
<div
@ -164,7 +164,7 @@
text-base
"
>
<div>{{ t('Grand Total') }}</div>
<div>{{ t`Grand Total` }}</div>
<div>{{ formattedValue('grandTotal') }}</div>
</div>
<div
@ -180,7 +180,7 @@
text-base
"
>
<div>{{ t('Outstanding Amount') }}</div>
<div>{{ t`Outstanding Amount` }}</div>
<div>{{ formattedValue('outstandingAmount') }}</div>
</div>
</div>

View File

@ -13,7 +13,7 @@
class="text-white text-xs ml-2"
@click="onSaveClick"
>
{{ t('Save') }}
{{ t`Save` }}
</Button>
<Button
v-if="!doc._dirty && !doc._notInserted && !doc.submitted"
@ -21,7 +21,7 @@
class="text-white text-xs ml-2"
@click="onSubmitClick"
>
{{ t('Submit') }}
{{ t`Submit` }}
</Button>
</template>
</PageHeader>
@ -33,7 +33,7 @@
<div>
<div class="mt-8 px-6">
<h1 class="text-2xl font-semibold">
{{ doc._notInserted ? t('New Journal Entry') : doc.name }}
{{ doc._notInserted ? t`New Journal Entry` : doc.name }}
</h1>
<div class="flex justify-between mt-2">
<div class="w-1/3">

View File

@ -10,10 +10,10 @@
class="text-gray-900 text-xs ml-2"
@click="showCustomiser = !showCustomiser"
>
{{ t('Customise') }}
{{ t`Customise` }}
</Button>
<Button class="text-gray-900 text-xs ml-2" @click="makePDF">
{{ t('Save as PDF') }}
{{ t`Save as PDF` }}
</Button>
</template>
</PageHeader>
@ -41,7 +41,7 @@
</div>
<div class="border-l w-80" v-if="showCustomiser">
<div class="mt-4 px-4 flex items-center justify-between">
<h2 class="font-semibold">{{ t('Customise') }}</h2>
<h2 class="font-semibold">{{ t`Customise` }}</h2>
<Button :icon="true" @click="showCustomiser = false">
<feather-icon name="x" class="w-4 h-4" />
</Button>

View File

@ -19,7 +19,7 @@
v-if="doc && doc._notInserted"
class="ml-2 text-white text-xs"
>
{{ t('Save') }}
{{ t`Save` }}
</Button>
<Button
:icon="true"
@ -35,7 +35,7 @@
"
class="ml-2 text-white text-xs"
>
{{ t('Submit') }}
{{ t`Submit` }}
</Button>
</div>
</div>

View File

@ -3,7 +3,7 @@
<PageHeader>
<template #title>
<h1 class="text-2xl font-bold">
{{ t('Settings') }}
{{ t`Settings` }}
</h1>
</template>
</PageHeader>

View File

@ -6,7 +6,7 @@
}"
>
<div class="px-12">
<h1 class="text-2xl font-semibold">{{ t('Setup your organization') }}</h1>
<h1 class="text-2xl font-semibold">{{ t`Setup your organization` }}</h1>
</div>
<div class="px-8 mt-5 window-no-drag" v-if="doc">
<div class="flex items-center px-6 py-5 mb-4 border bg-brand rounded-xl">