add English hint for language option when current language is not English

This commit is contained in:
MaysWind
2025-01-25 23:22:45 +08:00
parent acaad355ed
commit 99a2f40a4e
3 changed files with 18 additions and 4 deletions
@@ -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,