Skip to content
Snippets Groups Projects
Commit c0491fd3 authored by Samuel Truman's avatar Samuel Truman
Browse files

Added German translations

parent 8e9cf865
No related branches found
No related tags found
No related merge requests found
......@@ -4,16 +4,20 @@ import { SpokeAPI } from './SpokeAPI'
export class SceneExport {
constructor() {
api.on(api.channels.fromMain.spokeExportScene, async () => SpokeAPI.Instance.postMessage(SpokeAPI.Messages.toSpoke.saveScene))
api.on(api.channels.fromMain.spokeProjectSavedSuccessfully, () => this.showSuccessToaster('Project has been saved successfully'))
api.on(api.channels.fromMain.saveProjectInProgress, () => this.showInfoToaster('Saving project, please wait...'))
api.on(api.channels.fromMain.spokeExportScene, () => SpokeAPI.Instance.postMessage(SpokeAPI.Messages.toSpoke.saveScene))
api.on(api.channels.fromMain.spokeProjectSavedSuccessfully, async () => await this.showSaveSuccessToaster())
api.on(api.channels.fromMain.saveProjectInProgress, async () => await this.showSaveInfoToaster())
}
private showSuccessToaster(message) {
toaster.success(message, { duration: 10 });
private async showSaveSuccessToaster() {
const language = await api.invoke(api.channels.toMain.getDefinitiveLanguage)
const message = language === 'de' ? 'Das Projekt wurde erfolgreich gespeichert.' : 'Project has been saved successfully'
toaster.success(message, { duration: 10 })
}
private showInfoToaster(message) {
toaster.notify(message, { duration: 10 });
private async showSaveInfoToaster() {
const language = await api.invoke(api.channels.toMain.getDefinitiveLanguage)
const message = language === 'de' ? 'Das Projekt wird gespeichert, bitte warten...' : 'Saving project, please wait...'
toaster.notify(message, { duration: 10 })
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment