18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/trip_advisor/translation_tool.rb', line 18
def localizations_from_doc(doc)
Array.new.tap do |localizations|
doc.each { |localization|
locale_string = localization["lang"]["locale"]
localized_string = localization["displayedValue"]
status = localization["isTranslatedValue"]
language_name = localization["lang"]["localizedDisplayName"]
locale_identifier = localization["lang"]["locale"]
localizations << Translation::Localization.new(locale_identifier: locale_identifier, language_name: language_name, string: localized_string, status: status, )
}
end
end
|