mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-17 02:18:51 +00:00
Fix typos
This commit is contained in:
@@ -135,7 +135,7 @@ def translate_count(locale : String, key : String, count : Int, format = NumberF
|
||||
# Try #2: Fallback to english
|
||||
translation = translate_count("en-US", key, count)
|
||||
else
|
||||
# Return key if we're already in english, as the tranlation is missing
|
||||
# Return key if we're already in english, as the translation is missing
|
||||
LOGGER.warn("i18n: Missing translation key \"#{key}\"")
|
||||
return key
|
||||
end
|
||||
|
||||
@@ -44,7 +44,7 @@ def sign_token(key, hash)
|
||||
|
||||
# TODO: figure out which "key" variable is used
|
||||
# Ameba reports a warning for "Lint/ShadowingOuterLocalVar" on this
|
||||
# variable, but its preferrable to not touch that (works fine atm).
|
||||
# variable, but it's preferable to not touch that (works fine atm).
|
||||
hash.each do |key, value|
|
||||
next if key == "signature"
|
||||
|
||||
|
||||
@@ -161,11 +161,11 @@ def short_text_to_number(short_text : String) : Int32
|
||||
end
|
||||
|
||||
def number_to_short_text(number)
|
||||
seperated = number_with_separator(number).gsub(",", ".").split("")
|
||||
text = seperated.first(2).join
|
||||
separated = number_with_separator(number).gsub(",", ".").split("")
|
||||
text = separated.first(2).join
|
||||
|
||||
if seperated[2]? && seperated[2] != "."
|
||||
text += seperated[2]
|
||||
if separated[2]? && separated[2] != "."
|
||||
text += separated[2]
|
||||
end
|
||||
|
||||
text = text.rchop(".0")
|
||||
@@ -323,8 +323,8 @@ def fetch_random_instance
|
||||
instance_list.each do |data|
|
||||
# TODO Check if current URL is onion instance and use .onion types if so.
|
||||
if data[1]["type"] == "https"
|
||||
# Instances can have statisitics disabled, which is an requirement of version validation.
|
||||
# as_nil? doesn't exist. Thus we'll have to handle the error rasied if as_nil fails.
|
||||
# Instances can have statistics disabled, which is an requirement of version validation.
|
||||
# as_nil? doesn't exist. Thus we'll have to handle the error raised if as_nil fails.
|
||||
begin
|
||||
data[1]["stats"].as_nil
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user