add English hint for language option when current language is not English
This commit is contained in:
@@ -20,6 +20,7 @@ import { getCategorizedAccounts } from '@/lib/account.ts';
|
|||||||
|
|
||||||
export function useUserProfilePageBase() {
|
export function useUserProfilePageBase() {
|
||||||
const {
|
const {
|
||||||
|
tt,
|
||||||
getDefaultCurrency,
|
getDefaultCurrency,
|
||||||
getDefaultFirstDayOfWeek,
|
getDefaultFirstDayOfWeek,
|
||||||
getAllLanguageOptions,
|
getAllLanguageOptions,
|
||||||
@@ -72,6 +73,16 @@ export function useUserProfilePageBase() {
|
|||||||
const allIncomeAmountColorTypes = computed<TypeAndDisplayName[]>(() => getAllIncomeAmountColors());
|
const allIncomeAmountColorTypes = computed<TypeAndDisplayName[]>(() => getAllIncomeAmountColors());
|
||||||
const allTransactionEditScopeTypes = computed<TypeAndDisplayName[]>(() => getAllTransactionEditScopeTypes());
|
const allTransactionEditScopeTypes = computed<TypeAndDisplayName[]>(() => getAllTransactionEditScopeTypes());
|
||||||
|
|
||||||
|
const languageTitle = computed<string>(() => {
|
||||||
|
const languageInCurrentLanguage = tt('Language');
|
||||||
|
|
||||||
|
if (languageInCurrentLanguage !== 'Language') {
|
||||||
|
return `${languageInCurrentLanguage} / Language`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return languageInCurrentLanguage;
|
||||||
|
});
|
||||||
|
|
||||||
const supportDigitGroupingSymbol = computed<boolean>(() => {
|
const supportDigitGroupingSymbol = computed<boolean>(() => {
|
||||||
for (const digitGroupingType of allDigitGroupingTypes.value) {
|
for (const digitGroupingType of allDigitGroupingTypes.value) {
|
||||||
if (digitGroupingType.type === newProfile.value.digitGrouping) {
|
if (digitGroupingType.type === newProfile.value.digitGrouping) {
|
||||||
@@ -195,6 +206,7 @@ export function useUserProfilePageBase() {
|
|||||||
allExpenseAmountColorTypes,
|
allExpenseAmountColorTypes,
|
||||||
allIncomeAmountColorTypes,
|
allIncomeAmountColorTypes,
|
||||||
allTransactionEditScopeTypes,
|
allTransactionEditScopeTypes,
|
||||||
|
languageTitle,
|
||||||
supportDigitGroupingSymbol,
|
supportDigitGroupingSymbol,
|
||||||
inputIsNotChangedProblemMessage,
|
inputIsNotChangedProblemMessage,
|
||||||
inputInvalidProblemMessage,
|
inputInvalidProblemMessage,
|
||||||
|
|||||||
@@ -120,8 +120,8 @@
|
|||||||
item-value="languageTag"
|
item-value="languageTag"
|
||||||
persistent-placeholder
|
persistent-placeholder
|
||||||
:disabled="loading || saving"
|
:disabled="loading || saving"
|
||||||
:label="tt('Language')"
|
:label="languageTitle"
|
||||||
:placeholder="tt('Language')"
|
:placeholder="languageTitle"
|
||||||
:items="allLanguages"
|
:items="allLanguages"
|
||||||
v-model="newProfile.language"
|
v-model="newProfile.language"
|
||||||
/>
|
/>
|
||||||
@@ -381,6 +381,7 @@ const {
|
|||||||
allExpenseAmountColorTypes,
|
allExpenseAmountColorTypes,
|
||||||
allIncomeAmountColorTypes,
|
allIncomeAmountColorTypes,
|
||||||
allTransactionEditScopeTypes,
|
allTransactionEditScopeTypes,
|
||||||
|
languageTitle,
|
||||||
supportDigitGroupingSymbol,
|
supportDigitGroupingSymbol,
|
||||||
inputIsNotChangedProblemMessage,
|
inputIsNotChangedProblemMessage,
|
||||||
inputInvalidProblemMessage,
|
inputInvalidProblemMessage,
|
||||||
|
|||||||
@@ -128,9 +128,9 @@
|
|||||||
<f7-list form strong inset dividers class="margin-vertical" v-if="!loading">
|
<f7-list form strong inset dividers class="margin-vertical" v-if="!loading">
|
||||||
<f7-list-item
|
<f7-list-item
|
||||||
class="list-item-with-header-and-title list-item-no-item-after"
|
class="list-item-with-header-and-title list-item-no-item-after"
|
||||||
:header="tt('Language')"
|
:header="languageTitle"
|
||||||
:title="currentLanguageName"
|
:title="currentLanguageName"
|
||||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Language'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Language'), popupCloseLinkText: tt('Done') }">
|
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: languageTitle, searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: languageTitle, popupCloseLinkText: tt('Done') }">
|
||||||
<select v-model="newProfile.language">
|
<select v-model="newProfile.language">
|
||||||
<option :value="language.languageTag"
|
<option :value="language.languageTag"
|
||||||
:key="language.languageTag"
|
:key="language.languageTag"
|
||||||
@@ -379,6 +379,7 @@ const {
|
|||||||
allExpenseAmountColorTypes,
|
allExpenseAmountColorTypes,
|
||||||
allIncomeAmountColorTypes,
|
allIncomeAmountColorTypes,
|
||||||
allTransactionEditScopeTypes,
|
allTransactionEditScopeTypes,
|
||||||
|
languageTitle,
|
||||||
supportDigitGroupingSymbol,
|
supportDigitGroupingSymbol,
|
||||||
inputIsNotChangedProblemMessage,
|
inputIsNotChangedProblemMessage,
|
||||||
inputInvalidProblemMessage,
|
inputInvalidProblemMessage,
|
||||||
|
|||||||
Reference in New Issue
Block a user