Skip to content

Commit

Permalink
add german translation (#2692)
Browse files Browse the repository at this point in the history
* add german translation

* rename file
  • Loading branch information
UnchartedBull authored Feb 22, 2022
1 parent 99edd17 commit f1358b9
Show file tree
Hide file tree
Showing 7 changed files with 4,493 additions and 157 deletions.
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
Loading

0 comments on commit f1358b9

Please sign in to comment.