refactor: i18n

This commit is contained in:
puriphatt 2024-08-26 17:18:15 +07:00
parent c681b19e39
commit 7c1e77a428
2 changed files with 16 additions and 14 deletions

View file

@ -137,7 +137,7 @@ async function downloadImage(url: string) {
flat
:color="$q.dark.isActive ? 'grey-9' : 'grey-4'"
:text-color="$q.dark.isActive ? 'grey-1' : 'grey-10'"
:label="$t('clear')"
:label="$t('general.clear')"
@click="
inputFile && (inputFile.value = ''),
(imageUrl = defaultUrl || fallbackUrl || ''),

View file

@ -626,7 +626,7 @@ function changeTitle(
const _type =
typeBranch === 'headOffice'
? 'branch.card.branchHQLabel'
: 'branch.card.branchHQLabel';
: 'branch.card.branchLabel';
return formType === 'create'
? t('form.title.create', { name: t(_type) })
@ -637,10 +637,10 @@ function changeTitle(
function handleHold(node: BranchWithChildren) {
if ($q.screen.gt.xs) return;
return function () {
holdDialog.value = true;
currentNode.value = node;
};
holdDialog.value = true;
currentNode.value = node;
// return function () {
// };
}
watch(
@ -1389,8 +1389,8 @@ watch(currentHq, () => {
: `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}`,
branchLabelType: $t(
props.row.isHeadOffice
? 'branch.branchHQLabel'
: 'branch.branchLabel',
? 'branch.card.branchHQLabel'
: 'branch.card.branchLabel',
),
branchImgUrl: `/branch/${props.row.id}/branch-image`,
}"
@ -1697,7 +1697,7 @@ watch(currentHq, () => {
outlined
separator
prefix-id="default"
:title="$t('form.address')"
:title="'form.address'"
v-model:address="formData.address"
v-model:addressEN="formData.addressEN"
v-model:province-id="formData.provinceId"
@ -1922,7 +1922,7 @@ watch(currentHq, () => {
outlined
separator
prefix-id="default"
:title="$t('form.address')"
:title="'form.address'"
:readonly="formType === 'view'"
v-model:address="formData.address"
v-model:addressEN="formData.addressEN"
@ -1997,7 +1997,9 @@ watch(currentHq, () => {
<q-icon name="mdi-file-plus-outline" class="app-text-muted-2" />
</q-item-section>
<q-item-section>
{{ $t('formDialogTitleCreateSubBranch') }}
{{
$t('form.title.create', { name: $t('branch.card.branchLabel') })
}}
</q-item-section>
</q-item>
@ -2024,7 +2026,7 @@ watch(currentHq, () => {
style="color: hsl(var(--green-6-hsl))"
/>
</q-item-section>
<q-item-section>{{ $t('viewDetail') }}</q-item-section>
<q-item-section>{{ $t('general.viewDetail') }}</q-item-section>
</q-item>
<q-item
@ -2054,7 +2056,7 @@ watch(currentHq, () => {
style="color: hsl(var(--cyan-6-hsl))"
/>
</q-item-section>
<q-item-section>{{ $t('edit') }}</q-item-section>
<q-item-section>{{ $t('general.edit') }}</q-item-section>
</q-item>
<q-item
@ -2066,7 +2068,7 @@ watch(currentHq, () => {
<q-item-section avatar>
<q-icon name="mdi-trash-can-outline" class="app-text-negative" />
</q-item-section>
<q-item-section>{{ $t('delete') }}</q-item-section>
<q-item-section>{{ $t('general.delete') }}</q-item-section>
</q-item>
<q-item clickable v-ripple>