Fix typos

This commit is contained in:
Dimitris Apostolou
2022-02-07 14:57:14 +02:00
parent df599c0fc3
commit 7e4690e43c
11 changed files with 35 additions and 35 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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