mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-02-01 16:46:28 +00:00
i18n: pass only the ISO code string to 'translate()'
Don't use the whole Hash everywhere. Also fall back nicely to english string if no translation exists.
This commit is contained in:
@@ -104,7 +104,7 @@ module Invidious::Routes::Channels
|
||||
|
||||
# Redirects brand url channels to a normal /channel/:ucid route
|
||||
def self.brand_redirect(env)
|
||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
# /attribution_link endpoint needs both the `a` and `u` parameter
|
||||
# and in order to avoid detection from YouTube we should only send the required ones
|
||||
@@ -148,7 +148,7 @@ module Invidious::Routes::Channels
|
||||
end
|
||||
|
||||
private def self.fetch_basic_information(env)
|
||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
user = env.get? "user"
|
||||
if user
|
||||
|
||||
Reference in New Issue
Block a user