migrate preset dialog to composition API and typescript

This commit is contained in:
MaysWind
2025-01-18 18:11:47 +08:00
parent f22666e756
commit 20e95e35aa
2 changed files with 82 additions and 90 deletions
+5 -4
View File
@@ -167,10 +167,6 @@ export function useI18n() {
const userStore = useUserStore();
// private functions
function getLanguageInfo(languageKey: string): LanguageInfo | undefined {
return ALL_LANGUAGES[languageKey];
}
function getLanguageDisplayName(languageName: string): string {
return t(`language.${languageName}`);
}
@@ -950,6 +946,10 @@ export function useI18n() {
return availableExchangeRates;
}
function getLanguageInfo(languageKey: string): LanguageInfo | undefined {
return ALL_LANGUAGES[languageKey];
}
function getMonthShortName(monthName: string): string {
return t(`datetime.${monthName}.short`);
}
@@ -1337,6 +1337,7 @@ export function useI18n() {
getAllTransactionDefaultCategories,
getAllDisplayExchangeRates,
// get localized info
getLanguageInfo,
getMonthShortName,
getMonthLongName,
getMonthdayOrdinal,