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() {
|
||||
const {
|
||||
tt,
|
||||
getDefaultCurrency,
|
||||
getDefaultFirstDayOfWeek,
|
||||
getAllLanguageOptions,
|
||||
@@ -72,6 +73,16 @@ export function useUserProfilePageBase() {
|
||||
const allIncomeAmountColorTypes = computed<TypeAndDisplayName[]>(() => getAllIncomeAmountColors());
|
||||
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>(() => {
|
||||
for (const digitGroupingType of allDigitGroupingTypes.value) {
|
||||
if (digitGroupingType.type === newProfile.value.digitGrouping) {
|
||||
@@ -195,6 +206,7 @@ export function useUserProfilePageBase() {
|
||||
allExpenseAmountColorTypes,
|
||||
allIncomeAmountColorTypes,
|
||||
allTransactionEditScopeTypes,
|
||||
languageTitle,
|
||||
supportDigitGroupingSymbol,
|
||||
inputIsNotChangedProblemMessage,
|
||||
inputInvalidProblemMessage,
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
item-value="languageTag"
|
||||
persistent-placeholder
|
||||
:disabled="loading || saving"
|
||||
:label="tt('Language')"
|
||||
:placeholder="tt('Language')"
|
||||
:label="languageTitle"
|
||||
:placeholder="languageTitle"
|
||||
:items="allLanguages"
|
||||
v-model="newProfile.language"
|
||||
/>
|
||||
@@ -381,6 +381,7 @@ const {
|
||||
allExpenseAmountColorTypes,
|
||||
allIncomeAmountColorTypes,
|
||||
allTransactionEditScopeTypes,
|
||||
languageTitle,
|
||||
supportDigitGroupingSymbol,
|
||||
inputIsNotChangedProblemMessage,
|
||||
inputInvalidProblemMessage,
|
||||
|
||||
@@ -128,9 +128,9 @@
|
||||
<f7-list form strong inset dividers class="margin-vertical" v-if="!loading">
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
:header="tt('Language')"
|
||||
:header="languageTitle"
|
||||
: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">
|
||||
<option :value="language.languageTag"
|
||||
:key="language.languageTag"
|
||||
@@ -379,6 +379,7 @@ const {
|
||||
allExpenseAmountColorTypes,
|
||||
allIncomeAmountColorTypes,
|
||||
allTransactionEditScopeTypes,
|
||||
languageTitle,
|
||||
supportDigitGroupingSymbol,
|
||||
inputIsNotChangedProblemMessage,
|
||||
inputInvalidProblemMessage,
|
||||
|
||||
Reference in New Issue
Block a user