[i18n] Translate toast messages (#3228)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-24 22:22:17 -04:00
committed by GitHub
parent 6c18781663
commit 24dcaa7f72
16 changed files with 191 additions and 43 deletions

View File

@@ -5,6 +5,7 @@ import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'
import { STLLoader } from 'three/examples/jsm/loaders/STLLoader'
import { t } from '@/i18n'
import { useToastStore } from '@/stores/toastStore'
import {
@@ -67,7 +68,7 @@ export class LoaderManager implements LoaderManagerInterface {
}
if (!fileExtension) {
useToastStore().addAlert('Could not determine file type')
useToastStore().addAlert(t('toastMessages.couldNotDetermineFileType'))
return
}
@@ -81,7 +82,7 @@ export class LoaderManager implements LoaderManagerInterface {
} catch (error) {
this.eventManager.emitEvent('modelLoadingEnd', null)
console.error('Error loading model:', error)
useToastStore().addAlert('Error loading model')
useToastStore().addAlert(t('toastMessages.errorLoadingModel'))
}
}