Improve locale keys for comments disabled messages

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
syeopite 2023-09-17 11:37:27 -07:00 committed by Fijxu
parent 7a55db322d
commit b89f864938
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4
3 changed files with 10 additions and 10 deletions

View File

@ -76,10 +76,10 @@ function get_youtube_comments() {
if (!video_data.comments_enabled) { if (!video_data.comments_enabled) {
comments.innerHTML = ` comments.innerHTML = `
<div id="comments-turned-off-on-video-message" class="h-box v-box"> <div id="comments-turned-off-on-video-message" class="h-box v-box">
<p><b>${video_data.youtube_comments_disabled_text}</b></p> <p><b>${video_data.comments_youtube_disabled_text}</b></p>
<p><b><a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link"> <p><b><a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link">
${video_data.youtube_comments_disabled_try_reddit} ${video_data.comments_youtube_disabled_try_reddit}
</a></b></p> </a></b></p>
</div>`; </div>`;

View File

@ -222,9 +222,9 @@
"View Reddit comments": "View Reddit comments", "View Reddit comments": "View Reddit comments",
"Hide replies": "Hide replies", "Hide replies": "Hide replies",
"Show replies": "Show replies", "Show replies": "Show replies",
"youtube_comments_disabled_text": "Comments are turned off on this video", "comments_youtube_disabled_text": "Youtube comments are disabled on this video",
"youtube_comments_disabled_try_reddit": "Try reddit comments?", "comments_youtube_disabled_try_reddit": "Try reddit comments?",
"invidious_comments_disabled_text": "Comments are hidden as per configuration", "comments_invidious_disabled_text": "Comments are hidden as per user preferences",
"Incorrect password": "Incorrect password", "Incorrect password": "Incorrect password",
"Wrong answer": "Wrong answer", "Wrong answer": "Wrong answer",
"Erroneous CAPTCHA": "Erroneous CAPTCHA", "Erroneous CAPTCHA": "Erroneous CAPTCHA",

View File

@ -60,8 +60,8 @@ we're going to need to do it here in order to allow for translations.
"play_next" => !video.related_videos.empty? && !plid && params.continue, "play_next" => !video.related_videos.empty? && !plid && params.continue,
"next_video" => video.related_videos.select { |rv| rv["id"]? }[0]?.try &.["id"], "next_video" => video.related_videos.select { |rv| rv["id"]? }[0]?.try &.["id"],
"youtube_comments_text" => HTML.escape(I18n.translate(locale, "View YouTube comments")), "youtube_comments_text" => HTML.escape(I18n.translate(locale, "View YouTube comments")),
"youtube_comments_disabled_text" => HTML.escape(I18n.translate(locale, "youtube_comments_disabled_text")), "comments_youtube_disabled_text" => HTML.escape(I18n.translate(locale, "comments_youtube_disabled_text")),
"youtube_comments_disabled_try_reddit" => HTML.escape(I18n.translate(locale, "youtube_comments_disabled_try_reddit")), "comments_youtube_disabled_try_reddit" => HTML.escape(I18n.translate(locale, "comments_youtube_disabled_try_reddit")),
"reddit_comments_text" => HTML.escape(I18n.translate(locale, "View Reddit comments")), "reddit_comments_text" => HTML.escape(I18n.translate(locale, "View Reddit comments")),
"reddit_permalink_text" => HTML.escape(I18n.translate(locale, "View more comments on Reddit")), "reddit_permalink_text" => HTML.escape(I18n.translate(locale, "View more comments on Reddit")),
"comments_text" => HTML.escape(I18n.translate(locale, "View `x` comments", "{commentCount}")), "comments_text" => HTML.escape(I18n.translate(locale, "View `x` comments", "{commentCount}")),
@ -300,7 +300,7 @@ we're going to need to do it here in order to allow for translations.
<div id="comments" class="comments"> <div id="comments" class="comments">
<% if (params.comments <=> ["", ""]) == 0 %> <% if (params.comments <=> ["", ""]) == 0 %>
<div id="comments-disabled-message" class="h-box v-box"> <div id="comments-disabled-message" class="h-box v-box">
<p><b><%= HTML.escape(I18n.translate(locale, "invidious_comments_disabled_text")) %></b></p> <p><b><%= HTML.escape(I18n.translate(locale, "comments_invidious_disabled_text")) %></b></p>
</div> </div>
<% else %> <% else %>
<% if video.comments? %> <% if video.comments? %>
@ -315,12 +315,12 @@ we're going to need to do it here in order to allow for translations.
<% end %> <% end %>
<% else %> <% else %>
<div id="comments-turned-off-on-video-message" class="h-box v-box"> <div id="comments-turned-off-on-video-message" class="h-box v-box">
<p><b><%= HTML.escape(I18n.translate(locale, "youtube_comments_disabled_text")) %></b></p> <p><b><%= HTML.escape(I18n.translate(locale, "comments_youtube_disabled_text")) %></b></p>
<p> <p>
<b> <b>
<a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link"> <a href="javascript:void(0)" data-comments="reddit" id="try-reddit-comments-link">
<%=HTML.escape(I18n.translate(locale, "youtube_comments_disabled_try_reddit"))%> <%= HTML.escape(I18n.translate(locale, "comments_youtube_disabled_try_reddit")) %>
</a> </a>
</b> </b>
</p> </p>