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

9
package-lock.json generated
View File

@ -3260,8 +3260,7 @@
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true, "dev": true
"optional": true
}, },
"coa": { "coa": {
"version": "2.0.2", "version": "2.0.2",
@ -9031,8 +9030,7 @@
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true, "dev": true
"optional": true
}, },
"pify": { "pify": {
"version": "4.0.1", "version": "4.0.1",
@ -10567,8 +10565,7 @@
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true, "dev": true
"optional": true
}, },
"rx-lite-aggregates": { "rx-lite-aggregates": {
"version": "4.0.8", "version": "4.0.8",

View File

@ -4,20 +4,22 @@
"done": "Done", "done": "Done",
"create": "Create", "create": "Create",
"loading": "Loading", "loading": "Loading",
"tabs": {
"general": "General",
"invoicing": "Invoicing",
"address": "Address"
},
"general": { "general": {
"title": "General",
"company_name": "Company name", "company_name": "Company name",
"invoice_email": "Email" "invoice_email": "Email"
}, },
"invoicing": { "invoicing": {
"title": "Invoicing",
"currency": "Currency", "currency": "Currency",
"rate": "Hourly rate", "rate": "Hourly rate",
"has_tax": "Apply taxes", "has_tax": "Apply taxes",
"bank_account": "Bank account" "bank_account": "Bank account"
}, },
"address": { "address": {
"title": "Address",
"company_address": "Company address", "company_address": "Company address",
"company_postal_code": "Postal code", "company_postal_code": "Postal code",
"company_city": "City", "company_city": "City",

View File

@ -4,16 +4,9 @@
"download_pdf": "Download PDF", "download_pdf": "Download PDF",
"delete": "Delete", "delete": "Delete",
"delete_modal": { "delete_modal": {
"title": "Delete client", "title": "Delete invoice",
"ok_title": "Delete", "ok_title": "Delete",
"cancel_title": "Dismiss" "cancel_title": "Dismiss"
}, },
"statuses": {
"draft": "draft",
"booked": "booked",
"sent": "sent",
"paid": "paid",
"cancelled": "cancelled"
},
"notification_deleted": "Deleted" "notification_deleted": "Deleted"
} }

View File

@ -2,9 +2,9 @@
"invoice_title": "Invoice ", "invoice_title": "Invoice ",
"invoice_number": "No.", "invoice_number": "No.",
"issued_at": "Issued at: ", "issued_at": "Issued at: ",
"due_at": "Due at", "due_at": "Due at:",
"late_fee": "Late fee:", "late_fee": "Late fee:",
"add_late_fee": "Add late fee", "add_late_fee": "Add late fee",
"modal_issued_at_title": "Issued at" "modal_issued_at_title": "Issued at",
"modal_due_at_title": "Due at"
} }

View File

@ -0,0 +1,7 @@
{
"draft": "draft",
"booked": "booked",
"sent": "sent",
"paid": "paid",
"cancelled": "cancelled"
}

View File

@ -1,24 +1,27 @@
{ {
"title": "Team", "title": "Your company",
"done": "Done", "done": "Done",
"updated": "Updated", "updated": "Updated",
"loading": "Loading", "loading": "Loading",
"tabs": {
"general": "General",
"invoicing": "Invoicing",
"address": "Address",
"taxes": "Taxes"
},
"general": { "general": {
"title": "General", "company_name": "Company name",
"company_name": "Company Name",
"contact_email": "Email", "contact_email": "Email",
"contact_phone": "Phone", "contact_phone": "Phone",
"website": "Website" "website": "Website"
}, },
"invoicing": { "invoicing": {
"title": "Invoicing",
"invoice_late_fee": "Late fee (%)", "invoice_late_fee": "Late fee (%)",
"invoice_due_days": "Payment terms, days", "invoice_due_days": "Payment terms, days",
"currency": "Default currency" "currency": "Default currency"
}, },
"address": { "address": {
"title": "Address", "company_address": "Company address",
"company_address": "Company Address",
"company_postal_code": "Postal code", "company_postal_code": "Postal code",
"company_city": "City", "company_city": "City",
"company_county": "County/State", "company_county": "County/State",

View File

@ -1,7 +1,7 @@
{ {
"modal_title": "Choose logo", "modal_title": "Choose logo",
"button_text": "Select from files", "button_text": "Select from files",
"logo_url": "Insert web url", "logo_url": "Insert image web url",
"logo_url_err": "Logo has to be under 512kb.", "logo_url_err": "Logo has to be under 512kb.",
"or": "or" "or": "or"
} }

View File

@ -1,5 +1,6 @@
{ {
"lights": "Lights", "lights-on": "Lights on",
"lights-off": "Lights off",
"title": "All your data is saved in your browser and not on any server.\n This application is truly serverless and only you have access to your data.", "title": "All your data is saved in your browser and not on any server.\n This application is truly serverless and only you have access to your data.",
"what_about_my_data": "What about my data? ", "what_about_my_data": "What about my data? ",
"made_with": "Made with", "made_with": "Made with",

View File

@ -1,7 +1,7 @@
<template> <template>
<footer class="col-12 d-flex justify-content-between align-items-center text-secondary px-0 mt-3 d-print-none"> <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"> <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"> <i class="material-icons material-icons-round md-14 align-text-bottom ml-1">
{{ theme === 'dark' ? 'wb_sunny' : 'brightness_2' }} {{ theme === 'dark' ? 'wb_sunny' : 'brightness_2' }}
</i> </i>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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