Merge pull request #2576 from SamantazFox/fix-locales-handling

Fix locales handling
This commit is contained in:
Samantaz Fox
2021-12-12 22:26:22 +01:00
committed by GitHub
29 changed files with 225 additions and 181 deletions

View File

@@ -275,7 +275,7 @@ struct Video
end
end
def to_json(locale : Hash(String, JSON::Any) | Nil, json : JSON::Builder)
def to_json(locale : String?, json : JSON::Builder)
json.object do
json.field "type", "video"
@@ -475,7 +475,7 @@ struct Video
end
# TODO: remove the locale and follow the crystal convention
def to_json(locale : Hash(String, JSON::Any) | Nil, _json : Nil)
def to_json(locale : String?, _json : Nil)
JSON.build { |json| to_json(locale, json) }
end