diff --git a/web/package.json b/web/package.json index 7e815a42a..ce4c68031 100644 --- a/web/package.json +++ b/web/package.json @@ -47,7 +47,7 @@ "sortablejs": "1.15.6", "vaul-vue": "^0.3.0", "vue": "^3.5.13", - "vue-i18n": "11.1.2", + "vue-i18n": "^11.1.2", "vue-m-message": "^4.0.2", "vue-router": "^4.5.0", "vue3-sfc-loader": "^0.9.5", diff --git a/web/src/hooks/auto-imports/useTrans.ts b/web/src/hooks/auto-imports/useTrans.ts index 887515670..a07e63269 100644 --- a/web/src/hooks/auto-imports/useTrans.ts +++ b/web/src/hooks/auto-imports/useTrans.ts @@ -24,6 +24,11 @@ export function useTrans(key: any | null = null): TransType | string | any { }) if (key === null) { + /** + * @deprecated This usage is not recommended. Please use useTrans('key') instead. + * Returning both global and local translation functions is discouraged. + * This helps avoid duplicate useI18n() calls and improves performance. + */ return { localTrans: local.t, globalTrans: global.t,