diff --git a/package.json b/package.json index a746ff5..c6d663e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "e2e": "ng e2e", "electron": "ng build --base-href ./ && electron .", "generate": "openapi --input ./\"Public API v1.yaml\" --output ./src/api-types --exportCore false --exportServices false --exportModels true", - "i18n-source": "ng extract-i18n --output-path=src/assets/i18n" + "i18n-source": "ng extract-i18n --output-path=src/assets/i18n --out-file=messages.en.xlf" }, "engines": { "node": "12.3.1", diff --git a/src/app/components/custom-playlists/custom-playlists.component.ts b/src/app/components/custom-playlists/custom-playlists.component.ts index c2905c9..0fb30a8 100644 --- a/src/app/components/custom-playlists/custom-playlists.component.ts +++ b/src/app/components/custom-playlists/custom-playlists.component.ts @@ -53,9 +53,9 @@ export class CustomPlaylistsComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { if (result) { this.getAllPlaylists(); - this.postsService.openSnackBar($localize`Successfully created playlist!', '`); + this.postsService.openSnackBar($localize`Successfully created playlist!`); } else if (result === false) { - this.postsService.openSnackBar($localize`ERROR: failed to create playlist!', '`); + this.postsService.openSnackBar($localize`ERROR: failed to create playlist!`); } }); } @@ -75,6 +75,7 @@ export class CustomPlaylistsComponent implements OnInit { } } else { // playlist not found + // TODO: Make translatable console.error(`Playlist with ID ${playlistID} not found!`); } } @@ -96,7 +97,7 @@ export class CustomPlaylistsComponent implements OnInit { this.postsService.removePlaylist(playlistID).subscribe(res => { if (res['success']) { this.playlists.splice(index, 1); - this.postsService.openSnackBar($localize`Playlist successfully removed.', '`); + this.postsService.openSnackBar($localize`Playlist successfully removed.`); } this.getAllPlaylists(); }); diff --git a/src/assets/i18n/messages.en.xlf b/src/assets/i18n/messages.en.xlf index 1085678..e561642 100644 --- a/src/assets/i18n/messages.en.xlf +++ b/src/assets/i18n/messages.en.xlf @@ -94,25 +94,25 @@ Settings menu label - - Successfully created playlist!', ' + + Successfully created playlist! src/app/components/custom-playlists/custom-playlists.component.ts 56 - - ERROR: failed to create playlist!', ' + + ERROR: failed to create playlist! src/app/components/custom-playlists/custom-playlists.component.ts 58 - - Playlist successfully removed.', ' + + Playlist successfully removed. src/app/components/custom-playlists/custom-playlists.component.ts - 99 + 100