Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add german translation #2692

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 6 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"fr": {
"translation": "src/locale/messages.fr.xlf",
"baseHref": ""
},
"de": {
"translation": "src/locale/messages.de.xlf",
"baseHref": ""
}
}
},
Expand All @@ -34,7 +38,7 @@
"outputPath": "dist",
"index": "src/index.html",
"i18nMissingTranslation": "warning",
"localize": ["en"],
"localize": false,
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
Expand Down Expand Up @@ -64,11 +68,8 @@
"scripts": []
},
"configurations": {
"fr": {
"localize": ["fr"]
},
"production": {
"localize": ["en", "fr"],
"localize": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down Expand Up @@ -112,9 +113,6 @@
"browserTarget": "OctoDash:build"
},
"configurations": {
"fr": {
"browserTarget": "OctoDash:build:fr"
},
"production": {
"browserTarget": "OctoDash:build:production"
},
Expand Down
2 changes: 0 additions & 2 deletions helper/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ function updateLocales() {
});
});
}
// remove extracted messages
fs.unlinkSync('./src/locale/messages.xlf');
});
}

Expand Down
20 changes: 7 additions & 13 deletions src/app/config/setup/setup.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,25 @@
(changeURLEntryMethod)="changeURLEntryMethod($event)"
[(octoprintHost)]="config.octoprint.urlSplit.host"
[(octoprintPort)]="config.octoprint.urlSplit.port"
*ngIf="page === 1"
></app-config-setup-discover-octoprint>
*ngIf="page === 1"></app-config-setup-discover-octoprint>

<app-config-setup-octoprint-authentication
[octoprintURL]="getOctoprintURL().replace('api/', '')"
(increasePage)="increasePage()"
[(accessToken)]="config.octoprint.accessToken"
*ngIf="page === 2"
></app-config-setup-octoprint-authentication>
*ngIf="page === 2"></app-config-setup-octoprint-authentication>

<app-config-setup-personalization
[octoprintURL]="getOctoprintURL()"
[apiKey]="config.octoprint.accessToken"
[(printerName)]="config.printer.name"
[(useTouchscreen)]="config.octodash.touchscreen"
*ngIf="page === 3"
></app-config-setup-personalization>
*ngIf="page === 3"></app-config-setup-personalization>

<app-config-setup-extruder-information
[(feedLength)]="config.filament.feedLength"
[(feedSpeed)]="config.filament.feedSpeed"
*ngIf="page === 4"
></app-config-setup-extruder-information>
*ngIf="page === 4"></app-config-setup-extruder-information>

<app-config-setup-plugins
*ngIf="page === 5"
Expand All @@ -64,18 +60,16 @@
[(ophomPlugin)]="config.plugins.ophom.enabled"
[(tpLinkSmartPlugPlugin)]="config.plugins.tpLinkSmartPlug.enabled"
[(tasmotaPlugin)]="config.plugins.tasmota.enabled"
[(tasmotaMqttPlugin)]="config.plugins.tasmotaMqtt.enabled"
></app-config-setup-plugins>
[(tasmotaMqttPlugin)]="config.plugins.tasmotaMqtt.enabled"></app-config-setup-plugins>

<div *ngIf="page === 6">
<span class="setup__text" i18n="@@checking">Great! I'll check everything.</span>
<div class="setup__validation-check-wrapper">
<span class="setup__validation-check">
<img
[src]="octoprintConnection ? 'assets/checkmark.svg' : 'assets/error.svg'"
class="setup__validation-check-icon"
/>
<ng-container i18n="@@checking-octoprint-connection"> Octoprint Connection </ng-container>
class="setup__validation-check-icon" />
<ng-container i18n="@@checking-octoprint-connection"> OctoPrint Connection </ng-container>
</span>
<div *ngIf="octoprintConnection">
<span class="setup__validation-check">
Expand Down
10 changes: 1 addition & 9 deletions src/app/services/socket/socket.octoprint.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class OctoPrintSocketService implements SocketService {
newState = PrinterEvent.CLOSED;
if (state.event.payload) {
this.notificationService.setNotification({
heading: $localize`:@@printer-information:Printer error`,
heading: $localize`:@@printer-error:Printer error`,
text: state.event.payload.error,
type: NotificationType.ERROR,
time: new Date(),
Expand Down Expand Up @@ -359,14 +359,6 @@ export class OctoPrintSocketService implements SocketService {
callback: this.callbackFunction.bind(this),
sticky: true,
} as Notification);
} else if (notification.choices?.length == 0) {
this.notificationService.setNotification({
heading: $localize`:@@printer-information:Printer information`,
text: notification.text ?? notification.message,
type: NotificationType.WARN,
time: new Date(),
sticky: true,
} as Notification);
} else if (notification.text || notification.message) {
this.notificationService.setNotification({
heading: $localize`:@@printer-information:Printer information`,
Expand Down