From 21797f39018e5ccfa6cfdb5cc17d2c466d9c28e6 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Sat, 14 Mar 2020 17:32:52 -0400 Subject: [PATCH] Added preliminary localization support to almost all strings in the program --- package.json | 1 + src/app/app.component.html | 8 +- .../create-playlist.component.html | 7 +- .../subscribe-dialog.component.html | 16 +-- .../subscription-info-dialog.component.html | 14 +- .../download-item.component.html | 2 +- src/app/file-card/file-card.component.html | 4 +- .../input-dialog/input-dialog.component.html | 1 + src/app/main/main.component.html | 122 +++++++++++++----- src/app/player/player.component.html | 2 +- src/app/settings/settings.component.html | 98 +++++++------- .../subscription-file-card.component.html | 6 +- .../subscription/subscription.component.html | 4 +- .../subscriptions.component.html | 20 +-- src/polyfills.ts | 4 + 15 files changed, 189 insertions(+), 120 deletions(-) diff --git a/package.json b/package.json index 73966f1..2801163 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@angular/core": "^8.2.11", "@angular/forms": "^8.2.11", "@angular/http": "^7.2.15", + "@angular/localize": "^9.0.6", "@angular/material": "^8.2.3", "@angular/platform-browser": "^8.2.11", "@angular/platform-browser-dynamic": "^8.2.11", diff --git a/src/app/app.component.html b/src/app/app.component.html index fb2927b..9403aeb 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -14,12 +14,12 @@ @@ -30,8 +30,8 @@ - Home - Subscriptions + Home + Subscriptions diff --git a/src/app/create-playlist/create-playlist.component.html b/src/app/create-playlist/create-playlist.component.html index 5447200..c361625 100644 --- a/src/app/create-playlist/create-playlist.component.html +++ b/src/app/create-playlist/create-playlist.component.html @@ -1,13 +1,14 @@ -

Create a playlist

+

Create a playlist

- +
- {{(type === 'audio') ? 'Audio files' : 'Videos'}} + Audio files + Videos {{file.id}} diff --git a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html index 7e8d004..10f81b7 100644 --- a/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html +++ b/src/app/dialogs/subscribe-dialog/subscribe-dialog.component.html @@ -1,25 +1,25 @@ -

Subscribe to playlist or channel

+

Subscribe to playlist or channel

- - The playlist or channel URL + + The playlist or channel URL
- - This is optional + + This is optional
- Download all uploads + Download all uploads
- Download videos uploaded in the last + Download videos uploaded in the last @@ -34,7 +34,7 @@ - +
diff --git a/src/app/dialogs/subscription-info-dialog/subscription-info-dialog.component.html b/src/app/dialogs/subscription-info-dialog/subscription-info-dialog.component.html index eec94eb..1ebff5a 100644 --- a/src/app/dialogs/subscription-info-dialog/subscription-info-dialog.component.html +++ b/src/app/dialogs/subscription-info-dialog/subscription-info-dialog.component.html @@ -2,26 +2,26 @@
- Type: + Type:  {{(sub.isPlaylist ? 'Playlist' : 'Channel')}}
- URL: + URL:  {{sub.url}}
- ID: + ID:  {{sub.id}}
- Archive: + Archive:  {{sub.archive}}
- - + + - + \ No newline at end of file diff --git a/src/app/download-item/download-item.component.html b/src/app/download-item/download-item.component.html index 3ca4144..5c5a02f 100644 --- a/src/app/download-item/download-item.component.html +++ b/src/app/download-item/download-item.component.html @@ -4,7 +4,7 @@
{{queueNumber}}.
-
ID: {{url_id}}
+
ID: {{url_id}}
diff --git a/src/app/file-card/file-card.component.html b/src/app/file-card/file-card.component.html index 5dc8773..39184ce 100644 --- a/src/app/file-card/file-card.component.html +++ b/src/app/file-card/file-card.component.html @@ -3,8 +3,8 @@
{{title}}
- ID: {{name}} -
Count: {{count}}
+ ID: {{name}} +
Count: {{count}}
Thumbnail diff --git a/src/app/input-dialog/input-dialog.component.html b/src/app/input-dialog/input-dialog.component.html index a636cf6..09acfb5 100644 --- a/src/app/input-dialog/input-dialog.component.html +++ b/src/app/input-dialog/input-dialog.component.html @@ -7,6 +7,7 @@
+ diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html index 4c6807a..110b1d0 100644 --- a/src/app/main/main.component.html +++ b/src/app/main/main.component.html @@ -2,7 +2,7 @@
- Youtube Downloader + Youtube Downloader
@@ -12,13 +12,19 @@
- Please enter a valid URL! + + Please enter a valid URL! +
- Quality + + + Quality + + @@ -42,22 +48,43 @@
{{result.uploaded}}
- - + +

- Only Audio - Multi-download mode + + + Only Audio + + + + + Multi-download Mode + +
- - + +
@@ -66,35 +93,60 @@ - Advanced + + Advanced + -

Simulated command: {{this.simulatedOutput}}

+

+ + Simulated command: + +  {{this.simulatedOutput}}

- Use custom args + + + Use custom args + + - - No need to include URL, just everything after. + + + + No need to include URL, just everything after. + +
- Use custom output + + + Use custom output + + - - Documentation. Path is relative to the config download path. Don't include extension. + + + Documentation. + Path is relative to the config download path. Don't include extension. +
- Use authentication + + + Use authentication + + - +
- +
@@ -138,10 +190,14 @@ - Audio + + Audio + - Your audio files are here + + Your audio files are here +
@@ -154,7 +210,7 @@
-
Playlists
+
Playlists
@@ -165,7 +221,9 @@
- No playlists available. Create one from your downloading audio files by clicking the blue plus button. + + No playlists available. Create one from your downloading audio files by clicking the blue plus button. +
@@ -173,10 +231,14 @@ - Video + + Video + - Your video files are here + + Your video files are here +
@@ -190,7 +252,7 @@
-
Playlists
+
Playlists
@@ -203,7 +265,9 @@
- No playlists available. Create one from your downloading video files by clicking the blue plus button. + + No playlists available. Create one from your downloading video files by clicking the blue plus button. +
diff --git a/src/app/player/player.component.html b/src/app/player/player.component.html index f424988..10b9f56 100644 --- a/src/app/player/player.component.html +++ b/src/app/player/player.component.html @@ -19,7 +19,7 @@
- +
diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index 6594c44..ec76f1c 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -1,25 +1,25 @@ -

Settings

- +

Settings

+ - Host + Host
- - Base URL this app will be accessed from, without the port. + + URL this app will be accessed from, without the port.
- - The desired port. Default is 17442. + + The desired port. Default is 17442.
@@ -31,24 +31,24 @@ - Encryption + Encryption
- Use encryption + Use encryption
- +
- +
@@ -59,29 +59,29 @@ - Downloader + Downloader
- - Path for audio only downloads. It is relative to YTDL-Material's root folder. + + Path for audio only downloads. It is relative to YTDL-Material's root folder.
- - Path for video downloads. It is relative to YTDL-Material's root folder. + + Path for video downloads. It is relative to YTDL-Material's root folder.
- - Global custom args for downloads on the home page. + + Global custom args for downloads on the home page.
@@ -92,28 +92,28 @@ - Extra + Extra
- +
- File manager enabled + File manager enabled
- Allow quality select + Allow quality select
- Download only mode + Download only mode
- Allow multi-download mode + Allow multi-download mode
@@ -123,18 +123,18 @@ - API + API
- Use YouTube API + Use YouTube API
@@ -145,20 +145,20 @@ - Themes + Themes
- Default - Dark + Default + Dark
- Allow theme change + Allow theme change
@@ -168,30 +168,30 @@ - Subscriptions + Subscriptions
- Allow subscriptions + Allow subscriptions
- - Base path for videos from your subscribed channels and playlists. It is relative to YTDL-Material's root folder. + + Base path for videos from your subscribed channels and playlists. It is relative to YTDL-Material's root folder.
- - Unit is seconds, only include numbers. + + Unit is seconds, only include numbers.
- Use youtube-dl archive -

With youtube-dl's archive feature, downloaded videos from your subscriptions get recorded in a text file in the subscriptions archive sub-directory.

-

This enables the ability to permanently delete videos from your subscriptions without unsubscribing, and allows you to record which videos you downloaded in case of data loss.

+ Use youtube-dl archive +

With youtube-dl's archive feature, downloaded videos from your subscriptions get recorded in a text file in the subscriptions archive sub-directory.

+

This enables the ability to permanently delete videos from your subscriptions without unsubscribing, and allows you to record which videos you downloaded in case of data loss.

@@ -201,22 +201,22 @@ - Advanced + Advanced
- Use default downloading agent + Use default downloading agent
- +
- Allow advanced download + Allow advanced download
@@ -225,7 +225,11 @@
- - + +
\ No newline at end of file diff --git a/src/app/subscription/subscription-file-card/subscription-file-card.component.html b/src/app/subscription/subscription-file-card/subscription-file-card.component.html index 32ab2c7..4537dd6 100644 --- a/src/app/subscription/subscription-file-card/subscription-file-card.component.html +++ b/src/app/subscription/subscription-file-card/subscription-file-card.component.html @@ -1,11 +1,11 @@
- Length: {{formattedDuration}} + Length: {{formattedDuration}}
- - + +
diff --git a/src/app/subscription/subscription/subscription.component.html b/src/app/subscription/subscription/subscription.component.html index bb4c5d5..d94a0a4 100644 --- a/src/app/subscription/subscription/subscription.component.html +++ b/src/app/subscription/subscription/subscription.component.html @@ -12,11 +12,11 @@
-

Videos

+

Videos

- + search
diff --git a/src/app/subscriptions/subscriptions.component.html b/src/app/subscriptions/subscriptions.component.html index 80572fd..5bf76bb 100644 --- a/src/app/subscriptions/subscriptions.component.html +++ b/src/app/subscriptions/subscriptions.component.html @@ -1,20 +1,17 @@
-

Your subscriptions

+

Your subscriptions


-

Channels

+

Channels

{{ sub.name }}
- Name not available. Channel retrieval in progress. - - - + Name not available. Channel retrieval in progress.