diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2018-10-25 22:48:13 +0200 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2018-10-25 22:48:13 +0200 |
commit | a007373c93ea61b766ef5e4c23fbf4525fe3cf8f (patch) | |
tree | 4119b8cc1d4ce8177ccf60740f75c1c698dab06d /core/modules/config_translation/migrations | |
parent | 4f89e9a91d3d6221b01f1d33f1022bc32642e122 (diff) | |
download | drupal-a007373c93ea61b766ef5e4c23fbf4525fe3cf8f.tar.gz drupal-a007373c93ea61b766ef5e4c23fbf4525fe3cf8f.zip |
Issue #2961114 by quietone, heddn, Gábor Hojtsy, maxocub, masipila: Migrate D6 i18n CCK field option translations
Diffstat (limited to 'core/modules/config_translation/migrations')
-rw-r--r-- | core/modules/config_translation/migrations/d6_field_instance_option_translation.yml | 178 | ||||
-rw-r--r-- | core/modules/config_translation/migrations/d6_field_option_translation.yml | 144 |
2 files changed, 322 insertions, 0 deletions
diff --git a/core/modules/config_translation/migrations/d6_field_instance_option_translation.yml b/core/modules/config_translation/migrations/d6_field_instance_option_translation.yml new file mode 100644 index 00000000000..7c59018d7be --- /dev/null +++ b/core/modules/config_translation/migrations/d6_field_instance_option_translation.yml @@ -0,0 +1,178 @@ +id: d6_field_instance_option_translation +label: Field instance option configuration translation +migration_tags: + - Drupal 6 + - Configuration + - Multilingual +source: + plugin: d6_field_instance_option_translation + skip_count: true + constants: + entity_type: node + property: settings +process: + # We skip field types that don't exist because they weren't migrated by the + # field migration. + field_type_exists: + - + plugin: migration_lookup + migration: d6_field + source: + - objectid + - + plugin: extract + index: + - 1 + - + plugin: skip_on_empty + method: row + # Use the process from d6_field to determine the field type. + type: + plugin: field_type + source: + - type + - widget_type + map: + userreference: + userreference_select: entity_reference + userreference_buttons: entity_reference + userreference_autocomplete: entity_reference + nodereference: + nodereference_select: entity_reference + number_integer: + number: integer + optionwidgets_select: list_integer + optionwidgets_buttons: list_integer + optionwidgets_onoff: boolean + number_decimal: + number: decimal + optionwidgets_select: list_float + optionwidgets_buttons: list_float + optionwidgets_onoff: boolean + number_float: + number: float + optionwidgets_select: list_float + optionwidgets_buttons: list_float + optionwidgets_onoff: boolean + email: + email_textfield: email + filefield: + imagefield_widget: image + filefield_widget: file + fr_phone: + phone_textfield: telephone + be_phone: + phone_textfield: telephone + it_phone: + phone_textfield: telephone + el_phone: + phone_textfield: telephone + ch_phone: + phone_textfield: telephone + ca_phone: + phone_textfield: telephone + cr_phone: + phone_textfield: telephone + pa_phone: + phone_textfield: telephone + gb_phone: + phone_textfield: telephone + ru_phone: + phone_textfield: telephone + ua_phone: + phone_textfield: telephone + es_phone: + phone_textfield: telephone + au_phone: + phone_textfield: telephone + cs_phone: + phone_textfield: telephone + hu_phone: + phone_textfield: telephone + pl_phone: + phone_textfield: telephone + nl_phone: + phone_textfield: telephone + se_phone: + phone_textfield: telephone + za_phone: + phone_textfield: telephone + il_phone: + phone_textfield: telephone + nz_phone: + phone_textfield: telephone + br_phone: + phone_textfield: telephone + cl_phone: + phone_textfield: telephone + cn_phone: + phone_textfield: telephone + hk_phone: + phone_textfield: telephone + mo_phone: + phone_textfield: telephone + ph_phone: + phone_textfield: telephone + sg_phone: + phone_textfield: telephone + jo_phone: + phone_textfield: telephone + eg_phone: + phone_textfield: telephone + pk_phone: + phone_textfield: telephone + int_phone: + phone_textfield: telephone + boolean_type: + - + plugin: static_map + source: '@type' + map: + boolean: boolean + default_value: false + - + plugin: skip_on_empty + method: row + bundle: + - + plugin: migration_lookup + migration: d6_node_type + source: type_name + - + plugin: skip_on_empty + method: row + langcode: + plugin: skip_on_empty + source: language + method: row + field_name: objectid + entity_type: 'constants/entity_type' + results: + plugin: d6_field_instance_option_translation + source: + - '@type' + - global_settings + translation: + - + plugin: extract + source: '@results' + index: [1] + - + plugin: skip_on_empty + method: row + property: + - + plugin: extract + source: '@results' + index: [0] + - + plugin: skip_on_empty + method: row +destination: + plugin: entity:field_config + translations: true +migration_dependencies: + required: + - d6_node_type + - d6_field_instance + - d6_field_option_translation diff --git a/core/modules/config_translation/migrations/d6_field_option_translation.yml b/core/modules/config_translation/migrations/d6_field_option_translation.yml new file mode 100644 index 00000000000..bea24a2562d --- /dev/null +++ b/core/modules/config_translation/migrations/d6_field_option_translation.yml @@ -0,0 +1,144 @@ +id: d6_field_option_translation +label: Field option configuration translation +migration_tags: + - Drupal 6 + - Configuration + - Multilingual +source: + plugin: d6_field_option_translation + skip_count: true + constants: + entity_type: node + allowed_values: settings +process: + entity_type: 'constants/entity_type' + status: active + langcode: + plugin: skip_on_empty + source: language + method: row + field_name: objectid + # Use the process from d6_field to determine the field type. + type: + plugin: field_type + source: + - type + - widget_type + map: + userreference: + userreference_select: entity_reference + userreference_buttons: entity_reference + userreference_autocomplete: entity_reference + nodereference: + nodereference_select: entity_reference + number_integer: + number: integer + optionwidgets_select: list_integer + optionwidgets_buttons: list_integer + optionwidgets_onoff: boolean + number_decimal: + number: decimal + optionwidgets_select: list_float + optionwidgets_buttons: list_float + optionwidgets_onoff: boolean + number_float: + number: float + optionwidgets_select: list_float + optionwidgets_buttons: list_float + optionwidgets_onoff: boolean + email: + email_textfield: email + filefield: + imagefield_widget: image + filefield_widget: file + fr_phone: + phone_textfield: telephone + be_phone: + phone_textfield: telephone + it_phone: + phone_textfield: telephone + el_phone: + phone_textfield: telephone + ch_phone: + phone_textfield: telephone + ca_phone: + phone_textfield: telephone + cr_phone: + phone_textfield: telephone + pa_phone: + phone_textfield: telephone + gb_phone: + phone_textfield: telephone + ru_phone: + phone_textfield: telephone + ua_phone: + phone_textfield: telephone + es_phone: + phone_textfield: telephone + au_phone: + phone_textfield: telephone + cs_phone: + phone_textfield: telephone + hu_phone: + phone_textfield: telephone + pl_phone: + phone_textfield: telephone + nl_phone: + phone_textfield: telephone + se_phone: + phone_textfield: telephone + za_phone: + phone_textfield: telephone + il_phone: + phone_textfield: telephone + nz_phone: + phone_textfield: telephone + br_phone: + phone_textfield: telephone + cl_phone: + phone_textfield: telephone + cn_phone: + phone_textfield: telephone + hk_phone: + phone_textfield: telephone + mo_phone: + phone_textfield: telephone + ph_phone: + phone_textfield: telephone + sg_phone: + phone_textfield: telephone + jo_phone: + phone_textfield: telephone + eg_phone: + phone_textfield: telephone + pk_phone: + phone_textfield: telephone + int_phone: + phone_textfield: telephone + results: + plugin: d6_field_option_translation + source: + - '@type' + - global_settings + translation: + - + plugin: extract + source: '@results' + index: [1] + - + plugin: skip_on_empty + method: row + property: + - + plugin: extract + source: '@results' + index: [0] + - + plugin: skip_on_empty + method: row +destination: + plugin: entity:field_storage_config + translations: true +migration_dependencies: + required: + - d6_field |