mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-136] add translations
This commit is contained in:
@@ -100,7 +100,7 @@ export class ModelsDownloaderService {
|
||||
}
|
||||
|
||||
public openDownloadModelsModal(version: BSVersion, type?: MSModelType, owned?: BsmLocalModel[]): Promise<ModalResponse<void>>{
|
||||
return this.modal.openModal(DownloadModelsModal, {version, type, owned}); // TODO MODELS
|
||||
return this.modal.openModal(DownloadModelsModal, {version, type, owned});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -118,12 +118,11 @@ export class ModelsManagerService {
|
||||
|
||||
this.progressBar.show(exportProgress$, true);
|
||||
|
||||
lastValueFrom(exportProgress$).catch(e => {
|
||||
this.notifications.notifyError({title: "notifications.types.error"});
|
||||
}).then(() => {
|
||||
// TODO TRANSLATE
|
||||
this.notifications.notifySuccess({title: "TODO TRANSLATE SUCCESS", duration: 3000});
|
||||
this.progressBar.complete();
|
||||
lastValueFrom(exportProgress$).then(() => {
|
||||
this.notifications.notifySuccess({title: "models.notifications.export-success.title", duration: 3000});
|
||||
}).catch(e => {
|
||||
this.notifications.notifyError({title: "notifications.types.error", desc: "notifications.common.msg.error-occurred", duration: 3000});
|
||||
}).finally(() => {
|
||||
this.progressBar.hide(true);
|
||||
})
|
||||
|
||||
@@ -158,8 +157,11 @@ export class ModelsManagerService {
|
||||
if(showProgressBar){ this.progressBar.show(progress$); }
|
||||
|
||||
return lastValueFrom(progress$)
|
||||
.catch(() => false)
|
||||
.then(() => true)
|
||||
.catch(() => {
|
||||
this.notifications.notifyError({title: "notifications.types.error", desc: "notifications.common.msg.error-occurred", duration: 3000});
|
||||
return false;
|
||||
})
|
||||
.finally(() => this.progressBar.hide(true));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user