From f29ab53aff8ae0d8dd275a61e4abe1cca1ab5918 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 15 Nov 2021 17:17:49 +0100 Subject: [PATCH] Add other missing translations * on watch page and video cards (search results, playlists, etc...) * on /feed/playlists * in search filters (not normalized in order to avoid collisions with an existing PR that reworks the search filters) --- locales/en-US.json | 14 +++++++++++++- .../views/components/video-context-buttons.ecr | 2 +- src/invidious/views/feeds/playlists.ecr | 4 ++-- src/invidious/views/watch.ecr | 10 +++++----- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index de3b375d..a9ae042d 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -90,6 +90,7 @@ "preferences_comments_label": "Default comments: ", "youtube": "YouTube", "reddit": "Reddit", + "invidious": "Invidious", "preferences_captions_label": "Default captions: ", "Fallback captions: ": "Fallback captions: ", "preferences_related_videos_label": "Show related videos: ", @@ -439,6 +440,8 @@ "4k": "4K", "location": "Location", "hdr": "HDR", + "purchased" : "Purchased", + "360" : "360°", "filter": "Filter", "Current version: ": "Current version: ", "next_steps_error_message": "After which you should try to: ", @@ -449,5 +452,14 @@ "footer_source_code": "Source code", "footer_original_source_code": "Original source code", "footer_modfied_source_code": "Modified Source code", - "adminprefs_modified_source_code_url_label": "URL to modified source code repository" + "adminprefs_modified_source_code_url_label": "URL to modified source code repository", + "none": "none", + "videoinfo_started_streaming_x_ago": "Started streaming `x` ago", + "videoinfo_watch_on_youTube": "Watch on YouTube", + "videoinfo_youTube_embed_link": "Embed", + "videoinfo_invidious_embed_link": "Embed Link", + "download_subtitles": "Subtitles - `x` (.vtt)", + "user_created_playlists": "`x` created playlists", + "user_saved_playlists": "`x` saved playlists", + "Video unavailable": "Video unavailable" } diff --git a/src/invidious/views/components/video-context-buttons.ecr b/src/invidious/views/components/video-context-buttons.ecr index daa107f0..ddb6c983 100644 --- a/src/invidious/views/components/video-context-buttons.ecr +++ b/src/invidious/views/components/video-context-buttons.ecr @@ -1,6 +1,6 @@
- " href="https://www.youtube.com/watch<%=endpoint_params%>"> + " href="https://www.youtube.com/watch<%=endpoint_params%>"> " href="/watch<%=endpoint_params%>&listen=1"> diff --git a/src/invidious/views/feeds/playlists.ecr b/src/invidious/views/feeds/playlists.ecr index 868cfeda..a59344c4 100644 --- a/src/invidious/views/feeds/playlists.ecr +++ b/src/invidious/views/feeds/playlists.ecr @@ -6,7 +6,7 @@
-

<%= translate(locale, "`x` created playlists", %(#{items_created.size})) %>

+

<%= translate(locale, "user_created_playlists", %(#{items_created.size})) %>

@@ -23,7 +23,7 @@
-

<%= translate(locale, "`x` saved playlists", %(#{items_saved.size})) %>

+

<%= translate(locale, "user_saved_playlists", %(#{items_saved.size})) %>

diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 9cf00393..b85ea59d 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -103,7 +103,7 @@ we're going to need to do it here in order to allow for translations.

<% elsif video.live_now %>

- <%= video.premiere_timestamp.try { |t| translate(locale, "Started streaming `x` ago", recode_date((Time.utc - t).ago, locale)) } %> + <%= video.premiere_timestamp.try { |t| translate(locale, "videoinfo_started_streaming_x_ago", recode_date((Time.utc - t).ago, locale)) } %>

<% end %>
@@ -112,8 +112,8 @@ we're going to need to do it here in order to allow for translations.
- <%= translate(locale, "Watch on YouTube") %> - (<%= translate(locale, "Embed") %>) + <%= translate(locale, "videoinfo_watch_on_youTube") %> + (<%= translate(locale, "videoinfo_youTube_embed_link") %>)

<% if env.get("preferences").as(Preferences).automatic_instance_redirect%> @@ -123,7 +123,7 @@ we're going to need to do it here in order to allow for translations. <% end %>

<% if params.annotations %> @@ -189,7 +189,7 @@ we're going to need to do it here in order to allow for translations. <% end %> <% captions.each do |caption| %> <% end %>