feat(i18n): enhance notification templates with raw message handling
Updated the notification system to utilize the `tm` function for template resolution, ensuring that placeholders like `{name}` and `{role}` remain intact for proper rendering. This change improves the display of workspace and role information in login and tenant switch notifications, allowing for better localization and visual consistency across the application. Adjustments were made in `App.vue`, `Login.vue`, and related utility functions to accommodate the new template handling.
This commit is contained in:
@@ -390,7 +390,7 @@ import screenshot4 from '@/assets/img/screenshot-4.svg'
|
||||
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
const { t, locale } = useI18n()
|
||||
const { t, tm, locale } = useI18n()
|
||||
const { formatRole, roleIcon } = useRoleLabel()
|
||||
|
||||
// Swiper modules
|
||||
@@ -666,7 +666,7 @@ const handleLogin = async () => {
|
||||
|
||||
if (response.success) {
|
||||
await persistLoginResponse(response)
|
||||
notifyLoginSuccess(response, t, formatRole, roleIcon)
|
||||
notifyLoginSuccess(response, t, tm, formatRole, roleIcon)
|
||||
} else {
|
||||
MessagePlugin.error(response.message || t('auth.loginError'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user