'For each field in field_names, attach a dict to the ES mapping
properties making "<field_name>_translations" an object containing
"string" and "lang" as non-indexed strings.
Used to store non-indexed, non-analyzed translations in ES that will be
sent back by the API for each item. It does not take care of the
indexed content for search, it\'s there only to store and return
raw translations.'

@classmethod
def attach_translation_mappings(cls, mapping, field_names):

    for field_name in field_names:
        mapping[cls.get_mapping_type_name()]['properties'].update({('%s_translations' % field_name): {'type': 'object', 'properties': {'lang': cls.string_not_indexed(), 'string': cls.string_not_indexed()}}})
    return mapping
