Sha256: 7959fb87a79e89cd684b05df161d8e151a8c50a7af695f3345b674586311aaad
Contents?: true
Size: 547 Bytes
Versions: 8
Compression:
Stored size: 547 Bytes
Contents
module PolyglotIos module Resource class TranslationKey < Base 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 private def escape_translation(translation) translation .gsub("\"", "\\\"") .gsub("%s", "%@") end end end end
Version data entries
8 entries across 8 versions & 1 rubygems