Translate value for 'familyFriendly'

This commit is contained in:
Omar Roth
2019-04-28 14:56:06 -05:00
parent 6cdb6ec711
commit ef309bd8d0
2 changed files with 10 additions and 1 deletions

View File

@@ -33,3 +33,12 @@ def translate(locale : Hash(String, JSON::Any) | Nil, translation : String, text
return translation
end
def translate_bool(locale : Hash(String, JSON::Any) | Nil, translation : Bool)
case translation
when true
return translate(locale, "Yes")
when false
return translate(locale, "No")
end
end