mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-20 05:41:21 +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:
@@ -2,7 +2,7 @@
|
||||
|
||||
module Invidious::Routes::Embed
|
||||
def self.redirect(env)
|
||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
if plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||
begin
|
||||
@@ -26,7 +26,7 @@ module Invidious::Routes::Embed
|
||||
end
|
||||
|
||||
def self.show(env)
|
||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
id = env.params.url["id"]
|
||||
|
||||
plid = env.params.query["list"]?.try &.gsub(/[^a-zA-Z0-9_-]/, "")
|
||||
|
||||
Reference in New Issue
Block a user