Review and fix translations.

This commit is contained in:
HenriT
2021-04-22 10:55:50 +03:00
parent fbae01cab8
commit cdd5a64a1b
15 changed files with 53 additions and 51 deletions

View File

@ -1,7 +1,7 @@
<template>
<footer class="col-12 d-flex justify-content-between align-items-center text-secondary px-0 mt-3 d-print-none">
<button class="btn btn-sm text-secondary" @click="toggleTheme">
{{ $t('lights') }}{{ theme === 'dark' ? 'on' : 'off' }}
{{ theme === 'dark' ? $t('lights-on') : $t('lights-off') }}
<i class="material-icons material-icons-round md-14 align-text-bottom ml-1">
{{ theme === 'dark' ? 'wb_sunny' : 'brightness_2' }}
</i>

View File

@ -2,7 +2,7 @@
<div>
<div class="row">
<div class="col-12">
<h4>{{ $t('bank_account') }}</h4>
<h4>{{ $t('title') }}</h4>
</div>
</div>
<div v-if="bankAccount" class="row">

View File

@ -24,7 +24,7 @@
</div>
<b-tabs v-if="client" nav-class="nav-tabs--simple mb-4" active-tab-class="active" class="row">
<b-tab :title="$t('general.title')" class="col-12">
<b-tab :title="$t('tabs.general')" class="col-12">
<div class="row">
<AppInput :value="client.company_name" @change="updateProp({ company_name: $event })"
:label="$t('general.company_name')" field="company_name" :errors="errors" class="col-12"/>
@ -36,7 +36,7 @@
<ClientFields class="row" :client="client"/>
</b-tab>
<b-tab :title="$t('invoicing.title')" class="col-12">
<b-tab :title="$t('tabs.invoicing')" class="col-12">
<div class="row">
<AppInput :value="client.currency" @change="updateProp({ currency: $event })"
:label="$t('invoicing.currency')" field="currency" :errors="errors" class="col-sm-4"/>
@ -54,7 +54,7 @@
</div>
</b-tab>
<b-tab :title="$t('address.title')" class="col-12">
<b-tab :title="$t('tabs.address')" class="col-12">
<div class="row">
<AppInput :value="client.company_address" @change="updateProp({ company_address: $event })"
:label="$t('address.company_address')" field="company_address" :errors="errors"
@ -170,9 +170,9 @@ export default {
},
async deleteClient() {
const confirmed = await this.$bvModal.msgBoxConfirm(`${this.$t('delete_modal.title')} ${this.client.company_name}?`, {
okTitle: this.$t('ok_title'),
okTitle: this.$t('delete_modal.ok_title'),
okVariant: 'danger',
cancelTitle: this.$t('cancel_title'),
cancelTitle: this.$t('delete_modal.cancel_title'),
cancelVariant: 'btn-link',
contentClass: 'bg-base dp--24',
});

View File

@ -35,7 +35,7 @@ import { BDropdown, BDropdownItemButton } from 'bootstrap-vue';
import AppSelect from '@/components/form/AppSelect';
export default {
i18nOptions: { namespaces: 'invoice-controls' },
i18nOptions: { namespaces: ['invoice-controls', 'statuses'] },
components: {
BDropdown,
BDropdownItemButton,
@ -46,9 +46,8 @@ export default {
invoice: 'invoices/invoice',
}),
getStatusObj() {
const test = this.invoiceStatuses
return this.invoiceStatuses
.find(obj => obj.value === this.invoice.status);
return test;
},
invoiceStatuses() {
return [{

View File

@ -22,12 +22,12 @@
:inline="true"
field="issued_at"/>
</BModal>
<br>{{ $t('due_at') }}:
<br>{{ $t('due_at') }}
<span class="editable__item"
v-b-modal.modal_due_at>{{ invoice.due_at | date('D. MMM YYYY', 'YYYY-MM-DD') }}</span>
<BModal id="modal_due_at"
centered
:title="$t('due_at')"
:title="$t('modal_due_at_title')"
hide-footer
size="sm"
content-class="bg-base dp--24">
@ -37,7 +37,7 @@
:inline="true"
field="due_at"/>
</BModal>
<br>{{ $t('due_at') }}
<br>{{ $t('late_fee') }}
<AppEditable :value="invoice.late_fee | currency"
:errors="errors"
suffix="%"

View File

@ -1,4 +1,4 @@
<template>
<template>
<div>
<div v-if="!invoices" class="col-12">{{ $t('loading') }}</div>
<table class="table table--card table-hover" v-else-if="invoices && invoices.length > 0">
@ -29,7 +29,7 @@
v-b-tooltip.hover title="Overdue">warning</i>
<i class="material-icons material-icons-round md-18 mr-2 text-success"
v-else-if="invoice.status === 'paid'">done</i>
{{ invoice.status }}
{{ $t(`statuses.${invoice.status}`) }}
</td>
</tr>
</tbody>
@ -46,7 +46,7 @@ import dayjs from 'dayjs';
import { VBTooltip } from 'bootstrap-vue';
export default {
i18nOptions: { namespaces: 'invoices-list' },
i18nOptions: { namespaces: ['invoices-list', 'statuses'] },
components: {
EmptyState,
},

View File

@ -12,7 +12,7 @@
</div>
<b-tabs v-if="team" nav-class="nav-tabs--simple mb-4" active-tab-class="active" class="row">
<b-tab :title="$t('general.title')" class="col-12">
<b-tab :title="$t('tabs.general')" class="col-12">
<div class="row">
<TeamLogo :errors="errors" class="col-sm-4"/>
</div>
@ -20,17 +20,17 @@
<AppInput :value="team.company_name" @change="updateProp({ company_name: $event })"
:label="$t('general.company_name')" field="company_name" :errors="errors" class="col-12"/>
<AppInput :value="team.contact_email" @change="updateProp({ contact_email: $event })"
:label="$t('email')" field="contact_email" :errors="errors" class="col-sm-7"/>
:label="$t('general.contact_email')" field="contact_email" :errors="errors" class="col-sm-7"/>
<AppInput :value="team.contact_phone" @change="updateProp({ contact_phone: $event })"
:label="$t('contact_phone')" field="contact_phone" :errors="errors" class="col-sm-7"/>
:label="$t('general.contact_phone')" field="contact_phone" :errors="errors" class="col-sm-7"/>
<AppInput :value="team.website" @change="updateProp({ website: $event })"
:label="$t('website')" field="website" :errors="errors" class="col-sm-7"/>
:label="$t('general.website')" field="website" :errors="errors" class="col-sm-7"/>
</div>
<TeamFields class="row" :team="team"/>
</b-tab>
<b-tab :title="$t('invoicing.title')" class="col-12">
<b-tab :title="$t('tabs.invoicing')" class="col-12">
<div class="row">
<AppInput :value="team.invoice_late_fee" @change="updateProp({ invoice_late_fee: $event })"
type="number"
@ -43,7 +43,7 @@
</div>
</b-tab>
<b-tab :title="$t('address.title')" class="col-12">
<b-tab :title="$t('tabs.address')" class="col-12">
<div class="row">
<AppInput :value="team.company_address" @change="updateProp({ company_address: $event })"
:label="$t('address.company_address')" field="company_address" :errors="errors"
@ -61,7 +61,7 @@
</div>
</b-tab>
<b-tab title="Taxes" class="col-12">
<b-tab :title="$t('tabs.taxes')" class="col-12">
<TeamTaxes class="row"/>
</b-tab>