Class: PolyglotIos::Resource::TranslationKey
- Inherits:
-
Base
- Object
- JsonApiClient::Resource
- Base
- PolyglotIos::Resource::TranslationKey
show all
- Defined in:
- lib/ios_polyglot_cli/api/translation_key.rb
Constant Summary
Helper::Depaginate::PER_PAGE
Instance Method Summary
collapse
Methods inherited from Base
api_url, depaginate, token
#depaginate_query
Instance Method Details
#clean_translation(language) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/ios_polyglot_cli/api/translation_key.rb', line 5
def clean_translation(language)
translation_value = name
translation = (translations || []).find { |key| key.language.id == language.id }
if translation && translation.value
translation_value = translation.value
end
escape_translation(translation_value)
end
|