From e3d6d222453072451d54561bf90c5dcd51f6a3dd Mon Sep 17 00:00:00 2001 From: 4gray Date: Wed, 17 Feb 2021 23:27:48 +0100 Subject: [PATCH] refactor: localization of home module --- .../file-upload/file-upload.component.html | 8 ++-- src/app/home/home.component.html | 44 ++++++++++++++----- .../playlist-info.component.html | 22 +++++++--- .../recent-playlists.component.html | 19 ++++---- .../home/url-upload/url-upload.component.html | 4 +- src/assets/i18n/en.json | 38 ++++++++++++++-- 6 files changed, 101 insertions(+), 34 deletions(-) diff --git a/src/app/home/file-upload/file-upload.component.html b/src/app/home/file-upload/file-upload.component.html index 075613e7d..b9ac03d07 100644 --- a/src/app/home/file-upload/file-upload.component.html +++ b/src/app/home/file-upload/file-upload.component.html @@ -6,8 +6,8 @@ [uploadInput]="uploadInput" > save_alt -

Drag & drop files here

-

or

+

{{ 'HOME.FILE_UPLOAD.DRAG_DROP' | translate }}

+

{{ 'HOME.FILE_UPLOAD.OR' | translate }}

- + diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 546ead40e..c22a247b5 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,35 +1,57 @@ - - + +
- + - list Recently added playlists + list + {{ 'HOME.TABS.RECENTLY_ADDED' | translate }} - + - attach_file Add via file upload + attach_file + {{ 'HOME.TABS.FILE_UPLOAD' | translate }} - + - link Add via URL + link + {{ 'HOME.TABS.URL_UPLOAD' | translate }} - +
- \ No newline at end of file + + + diff --git a/src/app/home/recent-playlists/playlist-info/playlist-info.component.html b/src/app/home/recent-playlists/playlist-info/playlist-info.component.html index 3a107f081..e777ffc7e 100644 --- a/src/app/home/recent-playlists/playlist-info/playlist-info.component.html +++ b/src/app/home/recent-playlists/playlist-info/playlist-info.component.html @@ -1,24 +1,34 @@ -

Playlist details

+

+ {{ 'HOME.PLAYLISTS.INFO_DIALOG.PLAYLIST_DETAILS' | translate }} +

- Title + {{ + 'HOME.PLAYLISTS.INFO_DIALOG.TITLE' | translate + }} - Added from the URL + {{ + 'HOME.PLAYLISTS.INFO_DIALOG.FROM_URL' | translate + }} - Import date + {{ + 'HOME.PLAYLISTS.INFO_DIALOG.IMPORT_DATE' | translate + }} - Number of channels + {{ + 'HOME.PLAYLISTS.INFO_DIALOG.CHANNELS' | translate + }} diff --git a/src/app/home/recent-playlists/recent-playlists.component.html b/src/app/home/recent-playlists/recent-playlists.component.html index 3eb339706..0965db4bd 100644 --- a/src/app/home/recent-playlists/recent-playlists.component.html +++ b/src/app/home/recent-playlists/recent-playlists.component.html @@ -1,9 +1,9 @@ cloud -
No playlists were added
+
{{ 'HOME.PLAYLISTS.NO_PLAYLISTS' | translate }}
- Please add your first playlist from the other tab + {{ 'HOME.PLAYLISTS.ADD_FIRST' | translate }}
cloud folder
{{ item.title || item.filename }}
- Channels: {{ item.count }} + {{ 'HOME.PLAYLISTS.CHANNELS' | translate }}: {{ item.count }} - | Added: {{ item.importDate | date }} + | {{ 'HOME.PLAYLISTS.ADDED' | translate }}: + {{ item.importDate | date }}
@@ -42,7 +45,7 @@ mat-icon-button color="primary" (click)="$event.stopPropagation(); removeClicked.emit(item._id)" - matTooltip="Remove playlist" + [matTooltip]="'HOME.PLAYLISTS.REMOVE' | translate" > delete diff --git a/src/app/home/url-upload/url-upload.component.html b/src/app/home/url-upload/url-upload.component.html index 8522ec7b6..63a2021d3 100644 --- a/src/app/home/url-upload/url-upload.component.html +++ b/src/app/home/url-upload/url-upload.component.html @@ -3,7 +3,7 @@ @@ -13,6 +13,6 @@ color="primary" type="submit" > - Add playlist + {{ 'HOME.URL_UPLOAD.ADD_PLAYLIST' | translate }} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index dd04681f6..fbc42958d 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1,8 +1,38 @@ { - "PAGES": { "HOME": { - "TITLE": "App works !", - "GO_TO_DETAIL": "Go to Detail" + "TITLE": "IPTVnator", + "SUBTITLE": "Please select a playlist from the list or add a new playlist via file upload or via url", + "TABS": { + "RECENTLY_ADDED": "Recently added playlists", + "FILE_UPLOAD": "Add via file upload", + "URL_UPLOAD": "Add via URL" + }, + "PLAYLISTS": { + "NO_PLAYLISTS": "No playlists were added", + "ADD_FIRST": "Please add your first playlist from the other tab", + "ADDED_VIA_URL": "Added via URL upload. URL:", + "ADDED_VIA_FILE": "Added via file upload", + "CHANNELS": "Channels", + "ADDED": "Added", + "SHOW_DETAILS": "Show playlist details", + "REMOVE": "Remove playlist", + "INFO_DIALOG": { + "PLAYLIST_DETAILS": "Playlist details", + "TITLE": "Title", + "FROM_URL": "Added from the URL", + "IMPORT_DATE": "Import date", + "CHANNELS": "Number of channels", + "CLOSE": "Close" + } + }, + "FILE_UPLOAD": { + "DRAG_DROP": "Drag & drop files here", + "OR": "or", + "CHOOSE_PLAYLIST": "Choose a playlist" + }, + "URL_UPLOAD": { + "PLAYLIST_URL": "Playlist URL (m3u, m3u8)", + "ADD_PLAYLIST": "Add playlist" + } } - } } \ No newline at end of file