@@ -254,12 +254,11 @@ async function onImportTargetSelected() {
254254
255255async function importProfile(targetProfileName : string , mods : ExportMod [], zipPath : string ) {
256256 activeStep .value = ' PROFILE_IS_BEING_IMPORTED' ;
257- importPhaseDescription .value = ' Downloading mods: 0%' ;
258- const progressCallback = (progress : number | string , modName : string , status : number ) => {
259- console .log (progress );
260- return typeof progress === " number"
261- ? importPhaseDescription .value = t (' translations.pages.profileSelection.importProfileModal.states.importInProgress.title.downloadingMods' , {progress: Math .floor (progress ), totalSize: FileUtils .humanReadableSize (profileTotalDownloadSize .value )})
262- : importPhaseDescription .value = t (` translations.pages.profileSelection.importProfileModal.states.importInProgress.title.${progress } ` , {progress: status , totalSize: FileUtils .humanReadableSize (profileTotalDownloadSize .value )})
257+ importPhaseDescription .value = t (' translations.pages.profileSelection.importProfileModal.states.importInProgress.title.downloadingMods' );
258+ const progressCallback = (state : number | string , modName : string , progress : number ) => {
259+ return typeof state === " number"
260+ ? importPhaseDescription .value = t (' translations.pages.profileSelection.importProfileModal.states.importInProgress.title.downloadingModsWithGoal' , {progress: Math .floor ((state / profileTotalDownloadSize .value ) * 100 ), totalSize: FileUtils .humanReadableSize (profileTotalDownloadSize .value ), modName: modName })
261+ : importPhaseDescription .value = t (` translations.pages.profileSelection.importProfileModal.states.importInProgress.title.${state } ` , {progress: progress , totalSize: FileUtils .humanReadableSize (profileTotalDownloadSize .value ), modName: modName })
263262 };
264263 const isUpdate = importUpdateSelection .value === ' UPDATE' ;
265264
@@ -268,8 +267,8 @@ async function importProfile(targetProfileName: string, mods: ExportMod[], zipPa
268267 profileTotalDownloadSize .value = await DownloadUtils .getTotalDownloadSizeInBytes (combos , store .state .download .ignoreCache );
269268
270269 await store .dispatch (' download/downloadToCache' , {combos , progressCallback });
271- await ProfileUtils .populateImportedProfile (combos , mods , targetProfileName , isUpdate , zipPath , (progress ) => {
272- importPhaseDescription .value = progress ;
270+ await ProfileUtils .populateImportedProfile (combos , mods , targetProfileName , isUpdate , zipPath , (status , modName , progress ) => {
271+ importPhaseDescription .value = t ( ` translations.pages.profileSelection.importProfileModal.states.importInProgress.title.${ status } ` , { progress: progress , modName: modName }) ;
273272 });
274273 } catch (e ) {
275274 await store .dispatch (' profiles/ensureProfileExists' );
0 commit comments