diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 10 | ||||
| -rw-r--r-- | src/invidious/comments.cr | 2 | ||||
| -rw-r--r-- | src/invidious/helpers/tokens.cr | 4 | ||||
| -rw-r--r-- | src/invidious/playlists.cr | 4 | ||||
| -rw-r--r-- | src/invidious/videos.cr | 2 | ||||
| -rw-r--r-- | src/invidious/views/login.ecr | 10 | ||||
| -rw-r--r-- | src/invidious/views/preferences.ecr | 2 | ||||
| -rw-r--r-- | src/invidious/views/subscription_manager.ecr | 2 | ||||
| -rw-r--r-- | src/invidious/views/template.ecr | 4 | ||||
| -rw-r--r-- | src/invidious/views/watch.ecr | 4 |
10 files changed, 22 insertions, 22 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 57db7e28..878f9d4c 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -944,7 +944,7 @@ post "/login" do |env| # Voice or text message tfa_req = %(["#{user_hash}",null,2,null,[9,null,null,null,null,null,null,null,[null,"#{tfa_code}",false,2]]]) else - error_message = "Unable to login, make sure two-factor authentication (Authenticator or SMS) is enabled." + error_message = translate(locale, "Unable to log in, make sure two-factor authentication (Authenticator or SMS) is turned on.") next templated "error" end @@ -1010,7 +1010,7 @@ post "/login" do |env| env.redirect referer rescue ex - error_message = translate(locale, "Login failed. This may be because two-factor authentication is not enabled on your account.") + error_message = translate(locale, "Login failed. This may be because two-factor authentication is not turned on for your account.") next templated "error" end when "invidious" @@ -1028,7 +1028,7 @@ post "/login" do |env| if user if !user.password - error_message = translate(locale, "Please sign in using 'Sign in with Google'") + error_message = translate(locale, "Please sign in using 'Log in with Google'") next templated "error" end @@ -1050,7 +1050,7 @@ post "/login" do |env| secure: secure, http_only: true) end else - error_message = translate(locale, "Invalid username or password") + error_message = translate(locale, "Wrong username or password") next templated "error" end @@ -1111,7 +1111,7 @@ post "/login" do |env| found_valid_captcha = false - error_message = translate(locale, "Invalid CAPTCHA") + error_message = translate(locale, "Erroneous CAPTCHA") tokens.each_with_index do |token, i| begin validate_request(token, answer, env.request, HMAC_KEY, PG_DB, locale) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 645ca2a8..e1d8604d 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -319,7 +319,7 @@ def template_youtube_comments(comments, locale, thin_mode) <p style="white-space:pre-wrap">#{child["contentHtml"]}</p> <span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span> | - <a href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "Youtube permalink of the comment")}">[YT]</a> + <a href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a> | <i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])} END_HTML diff --git a/src/invidious/helpers/tokens.cr b/src/invidious/helpers/tokens.cr index 6841127a..ba41cba3 100644 --- a/src/invidious/helpers/tokens.cr +++ b/src/invidious/helpers/tokens.cr @@ -81,14 +81,14 @@ def validate_request(token, session, request, key, db, locale = nil) end if token["session"] != session - raise translate(locale, "Invalid token") + raise translate(locale, "Erroneous token") end if token["nonce"]? && (nonce = db.query_one?("SELECT * FROM nonces WHERE nonce = $1", token["nonce"], as: {String, Time})) if nonce[1] > Time.now db.exec("UPDATE nonces SET expire = $1 WHERE nonce = $2", Time.new(1990, 1, 1), nonce[0]) else - raise translate(locale, "Invalid token") + raise translate(locale, "Erroneous token") end end diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 73c9ac69..1279486e 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -49,7 +49,7 @@ def fetch_playlist_videos(plid, page, video_count, continuation = nil, locale = response = client.get(url) response = JSON.parse(response.body) if !response["content_html"]? || response["content_html"].as_s.empty? - raise translate(locale, "Playlist is empty") + raise translate(locale, "Empty playlist") end document = XML.parse_html(response["content_html"].as_s) @@ -174,7 +174,7 @@ def fetch_playlist(plid, locale) response = client.get("/playlist?list=#{plid}&hl=en&disable_polymer=1") if response.status_code != 200 - raise translate(locale, "Invalid playlist.") + raise translate(locale, "Not a playlist.") end body = response.body.gsub(/<button[^>]+><span[^>]+>\s*less\s*<img[^>]+>\n<\/span><\/button>/, "") diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 2ad6cdaa..3bd30af5 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -67,7 +67,7 @@ CAPTION_LANGUAGES = { "Marathi", "Mongolian", "Nepali", - "Norwegian", + "Norwegian Bokmål", "Nyanja", "Pashto", "Persian", diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr index f6a131f9..3acb2501 100644 --- a/src/invidious/views/login.ecr +++ b/src/invidious/views/login.ecr @@ -1,5 +1,5 @@ <% content_for "header" do %> -<title><%= translate(locale, "Login") %> - Invidious</title> +<title><%= translate(locale, "Log in") %> - Invidious</title> <% end %> <div class="pure-g"> @@ -9,12 +9,12 @@ <div class="pure-g"> <div class="pure-u-1-2"> <a class="pure-button <% if account_type == "invidious" %>pure-button-disabled<% end %>" href="/login?type=invidious"> - <%= translate(locale, "Login/Register") %> + <%= translate(locale, "Log in/register") %> </a> </div> <div class="pure-u-1-2"> <a class="pure-button <% if account_type == "google" %>pure-button-disabled<% end %>" href="/login?type=google"> - <%= translate(locale, "Login to Google") %> + <%= translate(locale, "Log in with Google") %> </a> </div> </div> @@ -88,8 +88,8 @@ <% if email %> <input name="email" type="hidden" value="<%= email %>"> <% else %> - <label for="email"><%= translate(locale, "Email") %> :</label> - <input required class="pure-input-1" name="email" type="email" placeholder="<%= translate(locale, "Email") %>"> + <label for="email"><%= translate(locale, "E-mail") %> :</label> + <input required class="pure-input-1" name="email" type="email" placeholder="<%= translate(locale, "E-mail") %>"> <% end %> <% if password %> diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr index 3984a4ab..1af53488 100644 --- a/src/invidious/views/preferences.ecr +++ b/src/invidious/views/preferences.ecr @@ -214,7 +214,7 @@ function update_value(element) { </div> <div class="pure-control-group"> - <a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/Export data") %></a> + <a href="/data_control?referer=<%= URI.escape(referer) %>"><%= translate(locale, "Import/export data") %></a> </div> <div class="pure-control-group"> diff --git a/src/invidious/views/subscription_manager.ecr b/src/invidious/views/subscription_manager.ecr index 54fbb70e..ad572968 100644 --- a/src/invidious/views/subscription_manager.ecr +++ b/src/invidious/views/subscription_manager.ecr @@ -15,7 +15,7 @@ </div> <div class="pure-u-1-3" style="text-align:right"> <h3> - <a href="/data_control?referer=<%= referer %>"><%= translate(locale, "Import/Export") %></a> + <a href="/data_control?referer=<%= referer %>"><%= translate(locale, "Import/export") %></a> </h3> </div> </div> diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 89780ef7..1b8fc292 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -72,7 +72,7 @@ <form action="/signout?referer=<%= env.get?("current_page") %>" method="post"> <input type="hidden" name="csrf_token" value="<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>"> <a class="pure-menu-heading" href="#"> - <input style="all:unset" type="submit" value="<%= translate(locale, "Sign out") %>"> + <input style="all:unset" type="submit" value="<%= translate(locale, "Log out") %>"> </a> </form> </div> @@ -94,7 +94,7 @@ <% if config.login_enabled %> <div class="pure-u-1-3"> <a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading"> - <%= translate(locale, "Login") %> + <%= translate(locale, "Log in") %> </a> </div> <% end %> diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index accbca52..fb5186c5 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -55,7 +55,7 @@ <div class="pure-g"> <div class="pure-u-1 pure-u-lg-1-5"> <div class="h-box"> - <p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p> + <p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch on YouTube") %></a></p> <% if CONFIG.dmca_content.includes? video.id %> <p>Download is disabled.</p> @@ -146,7 +146,7 @@ <% else %> <noscript> <a href="/watch?<%= env.params.query %>&nojs=1"> - <%= translate(locale, "Hi! Looks like you have JavaScript disabled. Click here to view comments, keep in mind it may take a bit longer to load.") %> + <%= translate(locale, "Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.") %> </a> </noscript> <% end %> |
