Initial Drupal 11 with DDEV setup
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
id: d6_custom_block_translation
|
||||
label: Content block translations
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d6_box_translation
|
||||
process:
|
||||
id:
|
||||
plugin: migration_lookup
|
||||
migration: d6_custom_block
|
||||
source:
|
||||
- bid
|
||||
langcode: language
|
||||
info:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- title_translated
|
||||
- title
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
'body/value':
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- body_translated
|
||||
- body
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
'body/format':
|
||||
plugin: migration_lookup
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
destination:
|
||||
plugin: entity:block_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_filter_format
|
||||
- block_content_body_field
|
||||
- d6_custom_block
|
||||
- language
|
||||
@ -0,0 +1,30 @@
|
||||
id: d6_entity_reference_translation
|
||||
label: Entity reference translations
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Multilingual
|
||||
- Follow-up migration
|
||||
deriver: Drupal\migrate_drupal\Plugin\migrate\EntityReferenceTranslationDeriver
|
||||
provider:
|
||||
- content_translation
|
||||
- migrate_drupal
|
||||
# Supported target types for entity reference translation migrations. The array
|
||||
# keys are the supported target types and the values are arrays of migrations
|
||||
# to lookup for the translated entity IDs.
|
||||
target_types:
|
||||
node:
|
||||
- d6_node_translation
|
||||
- d6_node_complete
|
||||
# The source plugin will be set by the deriver.
|
||||
source:
|
||||
plugin: empty
|
||||
key: default
|
||||
target: default
|
||||
# The process pipeline will be set by the deriver.
|
||||
process: []
|
||||
# The destination plugin will be set by the deriver.
|
||||
destination:
|
||||
plugin: null
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
@ -0,0 +1,63 @@
|
||||
# cspell:ignore newnode
|
||||
id: d6_language_content_comment_settings
|
||||
label: Drupal 6 language content comment settings
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Configuration
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d6_language_content_settings
|
||||
constants:
|
||||
target_type: comment
|
||||
id_prefix: comment_node_
|
||||
label_suffix: comment
|
||||
process:
|
||||
# Ignore i18n_node_options_[node_type] options not available in Drupal 8,
|
||||
# i18n_required_node and i18n_newnode_current
|
||||
target_bundle:
|
||||
-
|
||||
plugin: concat
|
||||
source:
|
||||
- constants/id_prefix
|
||||
- type
|
||||
-
|
||||
plugin: static_map
|
||||
bypass: true
|
||||
# The Forum module provides its own comment type (comment_forum), which we
|
||||
# want to reuse if it exists.
|
||||
map:
|
||||
comment_node_forum: comment_forum
|
||||
target_entity_type_id: constants/target_type
|
||||
default_langcode:
|
||||
-
|
||||
plugin: static_map
|
||||
source: language_content_type
|
||||
map:
|
||||
0: site_default
|
||||
1: current_interface
|
||||
2: current_interface
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
language_alterable:
|
||||
plugin: static_map
|
||||
source: language_content_type
|
||||
map:
|
||||
0: false
|
||||
1: true
|
||||
2: true
|
||||
'third_party_settings/content_translation/enabled':
|
||||
plugin: static_map
|
||||
source: language_content_type
|
||||
map:
|
||||
# In the case of being 0, it will be skipped. We are not actually setting
|
||||
# a null value.
|
||||
0: NULL
|
||||
1: false
|
||||
2: false
|
||||
destination:
|
||||
plugin: entity:language_content_settings
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d6_comment_type
|
||||
@ -0,0 +1,70 @@
|
||||
# cspell:ignore mlid plid
|
||||
id: d6_menu_links_localized
|
||||
label: Menu links localized
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: menu_link
|
||||
constants:
|
||||
bundle: menu_link_content
|
||||
process:
|
||||
skip_not_localized:
|
||||
plugin: skip_on_empty
|
||||
source: is_localized
|
||||
method: row
|
||||
id: mlid
|
||||
title: link_title
|
||||
description: description
|
||||
langcode: language
|
||||
menu_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
# The menu migration is in the system module.
|
||||
migration: d6_menu
|
||||
source: menu_name
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: static_map
|
||||
map:
|
||||
management: admin
|
||||
bypass: true
|
||||
'link/uri':
|
||||
plugin: link_uri
|
||||
source: link_path
|
||||
'link/options':
|
||||
plugin: link_options
|
||||
source: options
|
||||
route:
|
||||
plugin: route
|
||||
source:
|
||||
- link_path
|
||||
- options
|
||||
route_name: '@route/route_name'
|
||||
route_parameters: '@route/route_parameters'
|
||||
url: '@route/url'
|
||||
options: '@route/options'
|
||||
external: external
|
||||
weight: weight
|
||||
expanded: expanded
|
||||
enabled: enabled
|
||||
parent:
|
||||
plugin: menu_link_parent
|
||||
source:
|
||||
- plid
|
||||
- '@menu_name'
|
||||
- parent_link_path
|
||||
changed: updated
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d6_language_content_menu_settings
|
||||
- d6_menu_links
|
||||
@ -0,0 +1,56 @@
|
||||
# cspell:ignore mlid
|
||||
id: d6_menu_links_translation
|
||||
label: Menu links
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d6_menu_link_translation
|
||||
process:
|
||||
id: mlid
|
||||
langcode: language
|
||||
title:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- title_translated
|
||||
- link_title
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
description:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- description_translated
|
||||
- description
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
menu_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
# The menu migration is in the system module.
|
||||
migration: d6_menu
|
||||
source: menu_name
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: static_map
|
||||
map:
|
||||
management: admin
|
||||
bypass: true
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
default_bundle: menu_link_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d6_menu
|
||||
- d6_menu_links
|
||||
@ -0,0 +1,60 @@
|
||||
# cspell:ignore tnid
|
||||
id: d6_node_translation
|
||||
label: Node translations
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- translation
|
||||
- Content
|
||||
- Multilingual
|
||||
class: Drupal\node\Plugin\migrate\D6NodeTranslation
|
||||
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
|
||||
source:
|
||||
plugin: d6_node
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the nid field to allow incremental migrations.
|
||||
nid: tnid
|
||||
type: type
|
||||
langcode:
|
||||
plugin: default_value
|
||||
source: language
|
||||
default_value: "und"
|
||||
title: title
|
||||
uid: node_uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
promote: promote
|
||||
sticky: sticky
|
||||
'body/format':
|
||||
plugin: migration_lookup
|
||||
migration: d6_filter_format
|
||||
source: format
|
||||
'body/value': body
|
||||
'body/summary': teaser
|
||||
revision_uid: revision_uid
|
||||
revision_log: log
|
||||
revision_timestamp: timestamp
|
||||
content_translation_source: source_langcode
|
||||
|
||||
# unmapped d6 fields.
|
||||
# translate
|
||||
# moderate
|
||||
# comment
|
||||
|
||||
destination:
|
||||
plugin: entity:node
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_user
|
||||
- d6_node_type
|
||||
- d6_node_settings
|
||||
- d6_filter_format
|
||||
- language
|
||||
optional:
|
||||
- d6_field_instance_widget_settings
|
||||
- d6_field_formatter_settings
|
||||
- d6_upload_field_instance
|
||||
@ -0,0 +1,45 @@
|
||||
id: d6_taxonomy_term_localized_translation
|
||||
label: Taxonomy localized term translations
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d6_term_localized_translation
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the tid field to allow incremental migrations.
|
||||
tid: tid
|
||||
langcode: language
|
||||
vid:
|
||||
plugin: migration_lookup
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
name:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- name_translated
|
||||
- name
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
description:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- description_translated
|
||||
- description
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_taxonomy_term
|
||||
- language
|
||||
@ -0,0 +1,43 @@
|
||||
id: d6_taxonomy_term_translation
|
||||
label: Taxonomy terms
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d6_taxonomy_term
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the tid field to allow incremental migrations.
|
||||
tid: tid
|
||||
langcode: language
|
||||
vid:
|
||||
plugin: migration_lookup
|
||||
migration: d6_taxonomy_vocabulary
|
||||
source: vid
|
||||
name: name
|
||||
description: description
|
||||
weight: weight
|
||||
# Only attempt to stub real (non-zero) parents.
|
||||
parent_id:
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: process
|
||||
source: parent
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d6_taxonomy_term
|
||||
parent:
|
||||
plugin: default_value
|
||||
default_value: 0
|
||||
source: '@parent_id'
|
||||
changed: timestamp
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_taxonomy_vocabulary
|
||||
- d6_taxonomy_term
|
||||
- language
|
||||
@ -0,0 +1,50 @@
|
||||
id: d6_term_node_translation
|
||||
label: Term/node translation relationships
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Content
|
||||
- Multilingual
|
||||
deriver: Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver
|
||||
source:
|
||||
plugin: d6_term_node
|
||||
process:
|
||||
dest_nid:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration:
|
||||
- d6_node_complete
|
||||
- d6_node_translation
|
||||
source: nid
|
||||
-
|
||||
plugin: node_complete_node_translation_lookup
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
nid:
|
||||
-
|
||||
plugin: extract
|
||||
index: [0]
|
||||
source: '@dest_nid'
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
langcode:
|
||||
-
|
||||
plugin: extract
|
||||
index: [1]
|
||||
source: '@dest_nid'
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
type: type
|
||||
# The actual field name is dynamic and will be added by the builder.
|
||||
destination:
|
||||
plugin: entity:node
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d6_vocabulary_entity_display
|
||||
- d6_vocabulary_entity_form_display
|
||||
- d6_node
|
||||
- d6_node_translation
|
||||
- language
|
||||
@ -0,0 +1,28 @@
|
||||
id: d7_comment_entity_translation
|
||||
label: Comment entity translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- translation
|
||||
- Content
|
||||
class: Drupal\comment\Plugin\migrate\D7Comment
|
||||
source:
|
||||
plugin: d7_comment_entity_translation
|
||||
process:
|
||||
cid: entity_id
|
||||
subject: subject
|
||||
langcode: language
|
||||
uid: uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
content_translation_source: source
|
||||
content_translation_outdated: translate
|
||||
destination:
|
||||
plugin: entity:comment
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_entity_translation_settings
|
||||
- d7_comment
|
||||
@ -0,0 +1,50 @@
|
||||
id: d7_custom_block_translation
|
||||
label: Content block translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_block_custom_translation
|
||||
process:
|
||||
id:
|
||||
plugin: migration_lookup
|
||||
migration: d7_custom_block
|
||||
source:
|
||||
- bid
|
||||
langcode: language
|
||||
info:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- title_translated
|
||||
- title
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
'body/value':
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- body_translated
|
||||
- body
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
'body/format':
|
||||
plugin: migration_lookup
|
||||
migration: d7_filter_format
|
||||
source: format
|
||||
destination:
|
||||
plugin: entity:block_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d7_filter_format
|
||||
- block_content_body_field
|
||||
- d7_custom_block
|
||||
- language
|
||||
@ -0,0 +1,30 @@
|
||||
id: d7_entity_reference_translation
|
||||
label: Entity reference translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Multilingual
|
||||
- Follow-up migration
|
||||
deriver: Drupal\migrate_drupal\Plugin\migrate\EntityReferenceTranslationDeriver
|
||||
provider:
|
||||
- content_translation
|
||||
- migrate_drupal
|
||||
# Supported target types for entity reference translation migrations. The array
|
||||
# keys are the supported target types and the values are arrays of migrations
|
||||
# to lookup for the translated entity IDs.
|
||||
target_types:
|
||||
node:
|
||||
- d7_node_translation
|
||||
- d7_node_complete
|
||||
# The source plugin will be set by the deriver.
|
||||
source:
|
||||
plugin: empty
|
||||
key: default
|
||||
target: default
|
||||
# The process pipeline will be set by the deriver.
|
||||
process: []
|
||||
# The destination plugin will be set by the deriver.
|
||||
destination:
|
||||
plugin: null
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
@ -0,0 +1,34 @@
|
||||
id: d7_entity_translation_settings
|
||||
label: Drupal 7 Entity Translation settings
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_entity_translation_settings
|
||||
process:
|
||||
id: id
|
||||
target_entity_type_id: target_entity_type_id
|
||||
target_bundle: target_bundle
|
||||
default_langcode:
|
||||
plugin: static_map
|
||||
source: default_langcode
|
||||
bypass: true
|
||||
map:
|
||||
xx-et-default: site_default
|
||||
xx-et-current: current_interface
|
||||
xx-et-author: authors_default
|
||||
language_alterable: language_alterable
|
||||
third_party_settings/content_translation/enabled:
|
||||
plugin: default_value
|
||||
default_value: true
|
||||
third_party_settings/content_translation/bundle_settings/untranslatable_fields_hide: untranslatable_fields_hide
|
||||
destination:
|
||||
plugin: entity:language_content_settings
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
optional:
|
||||
- d7_comment_type
|
||||
- d7_node_type
|
||||
- d7_taxonomy_vocabulary
|
||||
@ -0,0 +1,55 @@
|
||||
id: d7_language_content_comment_settings
|
||||
label: Drupal 7 language content comment settings
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_language_content_settings
|
||||
constants:
|
||||
target_type: comment
|
||||
process:
|
||||
target_bundle:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_comment_type
|
||||
no_stub: true
|
||||
source:
|
||||
- type
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
target_entity_type_id: constants/target_type
|
||||
default_langcode:
|
||||
-
|
||||
plugin: static_map
|
||||
source: language_content_type
|
||||
map:
|
||||
0: site_default
|
||||
1: current_interface
|
||||
2: current_interface
|
||||
4: current_interface
|
||||
default_value: NULL
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
language_alterable:
|
||||
plugin: static_map
|
||||
source: language_content_type
|
||||
map:
|
||||
0: false
|
||||
1: true
|
||||
2: true
|
||||
4: true
|
||||
third_party_settings/content_translation/enabled:
|
||||
plugin: content_translation_enabled_setting
|
||||
source:
|
||||
- language_content_type
|
||||
- entity_translation_entity_types
|
||||
- constants/target_type
|
||||
destination:
|
||||
plugin: entity:language_content_settings
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_comment_type
|
||||
@ -0,0 +1,46 @@
|
||||
# cspell:ignore mlid
|
||||
id: d7_menu_links_localized
|
||||
label: Menu links
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_menu_link_localized
|
||||
constants:
|
||||
bundle: menu_link_content
|
||||
process:
|
||||
skip_translation:
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
source: skip_source_translation
|
||||
exists:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_menu_links
|
||||
source: mlid
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
id: mlid
|
||||
langcode: language
|
||||
title: link_title
|
||||
description: description
|
||||
menu_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_menu
|
||||
source: menu_name
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_language_content_menu_settings
|
||||
- d7_menu_links
|
||||
@ -0,0 +1,51 @@
|
||||
# cspell:ignore mlid
|
||||
id: d7_menu_links_translation
|
||||
label: Menu links
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_menu_link_translation
|
||||
process:
|
||||
exists:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_menu_links
|
||||
source: mlid
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
id: mlid
|
||||
# Use the language from the locales_target table.
|
||||
langcode: language
|
||||
title:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- title_translated
|
||||
- link_title
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
description:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- description_translated
|
||||
- description
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
default_bundle: menu_link_content
|
||||
no_stub: true
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_language_content_menu_settings
|
||||
- d7_menu_links
|
||||
@ -0,0 +1,36 @@
|
||||
id: d7_node_entity_translation
|
||||
label: Node entity translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- translation
|
||||
- Content
|
||||
- Multilingual
|
||||
deriver: Drupal\node\Plugin\migrate\D7NodeDeriver
|
||||
source:
|
||||
plugin: d7_node_entity_translation
|
||||
process:
|
||||
nid: entity_id
|
||||
type: type
|
||||
langcode: language
|
||||
title: title
|
||||
uid: uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
promote: promote
|
||||
sticky: sticky
|
||||
revision_uid: revision_uid
|
||||
revision_log: log
|
||||
revision_timestamp: timestamp
|
||||
content_translation_source: source
|
||||
# Boolean indicating whether this translation needs to be updated.
|
||||
content_translation_outdated: translate
|
||||
destination:
|
||||
plugin: entity:node
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_entity_translation_settings
|
||||
- d7_node
|
||||
@ -0,0 +1,44 @@
|
||||
# cspell:ignore tnid
|
||||
id: d7_node_translation
|
||||
label: Node translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- translation
|
||||
- Content
|
||||
- Multilingual
|
||||
class: Drupal\node\Plugin\migrate\D7NodeTranslation
|
||||
deriver: Drupal\node\Plugin\migrate\D7NodeDeriver
|
||||
source:
|
||||
plugin: d7_node
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the nid field to allow incremental migrations.
|
||||
nid: tnid
|
||||
type: type
|
||||
langcode:
|
||||
plugin: default_value
|
||||
source: language
|
||||
default_value: "und"
|
||||
title: title
|
||||
uid: node_uid
|
||||
status: status
|
||||
created: created
|
||||
changed: changed
|
||||
promote: promote
|
||||
sticky: sticky
|
||||
revision_uid: revision_uid
|
||||
revision_log: log
|
||||
revision_timestamp: timestamp
|
||||
content_translation_source: source_langcode
|
||||
destination:
|
||||
plugin: entity:node
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- d7_user
|
||||
- d7_node_type
|
||||
- language
|
||||
optional:
|
||||
- d7_field_instance
|
||||
@ -0,0 +1,33 @@
|
||||
id: d7_taxonomy_term_entity_translation
|
||||
label: Taxonomy term entity translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- translation
|
||||
- Content
|
||||
- Multilingual
|
||||
deriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver
|
||||
source:
|
||||
plugin: d7_taxonomy_term_entity_translation
|
||||
process:
|
||||
tid: entity_id
|
||||
name: name
|
||||
description/value: description
|
||||
description/format: format
|
||||
langcode: language
|
||||
status: status
|
||||
content_translation_source: source
|
||||
content_translation_outdated: translate
|
||||
content_translation_uid: uid
|
||||
content_translation_created: created
|
||||
changed: changed
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_entity_translation_settings
|
||||
- d7_taxonomy_term
|
||||
optional:
|
||||
- d7_language_content_taxonomy_vocabulary_settings
|
||||
@ -0,0 +1,49 @@
|
||||
# cspell:ignore ltlanguage
|
||||
id: d7_taxonomy_term_localized_translation
|
||||
label: Taxonomy localized term translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_term_localized_translation
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the tid field to allow incremental migrations.
|
||||
tid: tid
|
||||
# Use the language from the locales_target table.
|
||||
langcode: ltlanguage
|
||||
vid:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_vocabulary
|
||||
source: vid
|
||||
name:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- name_translated
|
||||
- name
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
description:
|
||||
-
|
||||
plugin: callback
|
||||
source:
|
||||
- description_translated
|
||||
- description
|
||||
callable: array_filter
|
||||
-
|
||||
plugin: callback
|
||||
callable: current
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_taxonomy_term
|
||||
optional:
|
||||
- d7_language_content_taxonomy_vocabulary_settings
|
||||
@ -0,0 +1,46 @@
|
||||
id: d7_taxonomy_term_translation
|
||||
label: Taxonomy terms
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: d7_taxonomy_term_translation
|
||||
translations: true
|
||||
process:
|
||||
# If you are using this file to build a custom migration consider removing
|
||||
# the tid field to allow incremental migrations.
|
||||
tid: tid
|
||||
langcode: language
|
||||
vid:
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_vocabulary
|
||||
source: vid
|
||||
name: name
|
||||
'description/value': description
|
||||
'description/format': format
|
||||
weight: weight
|
||||
# Only attempt to stub real (non-zero) parents.
|
||||
parent_id:
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: process
|
||||
source: parent
|
||||
-
|
||||
plugin: migration_lookup
|
||||
migration: d7_taxonomy_term
|
||||
parent:
|
||||
plugin: default_value
|
||||
default_value: 0
|
||||
source: '@parent_id'
|
||||
changed: timestamp
|
||||
destination:
|
||||
plugin: entity:taxonomy_term
|
||||
destination_module: content_translation
|
||||
translations: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_taxonomy_term
|
||||
optional:
|
||||
- d7_language_content_taxonomy_vocabulary_settings
|
||||
@ -0,0 +1,27 @@
|
||||
id: d7_user_entity_translation
|
||||
label: User accounts entity translations
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- translation
|
||||
- Content
|
||||
- Multilingual
|
||||
class: Drupal\user\Plugin\migrate\User
|
||||
source:
|
||||
plugin: d7_user_entity_translation
|
||||
process:
|
||||
uid: entity_id
|
||||
langcode: language
|
||||
content_translation_source: source
|
||||
content_translation_uid: uid
|
||||
content_translation_status: status
|
||||
content_translation_outdated: translate
|
||||
content_translation_created: created
|
||||
destination:
|
||||
plugin: entity:user
|
||||
translations: true
|
||||
destination_module: content_translation
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
- d7_entity_translation_settings
|
||||
- d7_user
|
||||
@ -0,0 +1,126 @@
|
||||
# cspell:ignore mlid plid
|
||||
id: node_translation_menu_links
|
||||
label: Node Translations Menu links
|
||||
audit: true
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Drupal 7
|
||||
- Content
|
||||
- Multilingual
|
||||
source:
|
||||
plugin: menu_link
|
||||
constants:
|
||||
entity_prefix: 'entity:'
|
||||
node_prefix: 'node/'
|
||||
process:
|
||||
id: mlid
|
||||
title: link_title
|
||||
description: description
|
||||
menu_name:
|
||||
-
|
||||
plugin: migration_lookup
|
||||
# The menu migration is in the system module.
|
||||
migration:
|
||||
- d6_menu
|
||||
- d7_menu
|
||||
source: menu_name
|
||||
-
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
plugin: static_map
|
||||
map:
|
||||
management: admin
|
||||
bypass: true
|
||||
# In this process pipeline, given a menu link path that might be for a
|
||||
# translated node which has been merged with the default language node, we are
|
||||
# trying to determine the new node ID, that is the ID of the default language
|
||||
# node.
|
||||
new_nid:
|
||||
-
|
||||
# If the path is of the form "node/<ID>" and is not routed, we will get
|
||||
# back a URI of the form "base:node/<ID>".
|
||||
plugin: link_uri
|
||||
source: link_path
|
||||
validate_route: false
|
||||
-
|
||||
# Isolate the node ID.
|
||||
plugin: explode
|
||||
delimiter: 'base:node/'
|
||||
-
|
||||
# Extract the node ID.
|
||||
plugin: extract
|
||||
default: false
|
||||
index:
|
||||
- 1
|
||||
-
|
||||
# Skip row if node ID is empty.
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
# With the old node ID in hand, lookup in the d6_node_translation or
|
||||
# d7_node_translation mapping tables to find the new node ID.
|
||||
plugin: migration_lookup
|
||||
migration:
|
||||
- d6_node_complete
|
||||
- d7_node_complete
|
||||
- d6_node_translation
|
||||
- d7_node_translation
|
||||
no_stub: true
|
||||
-
|
||||
# Skip row if the new node ID is empty.
|
||||
plugin: skip_on_empty
|
||||
method: row
|
||||
-
|
||||
# Extract the node ID. The migration lookup will return an array with two
|
||||
# items, the new node ID and the translation langcode. We need the node ID
|
||||
# which is at index 0.
|
||||
plugin: extract
|
||||
index:
|
||||
- 0
|
||||
# This will be used in the "link/uri" and "route" processes below.
|
||||
link_path:
|
||||
plugin: concat
|
||||
source:
|
||||
- 'constants/node_prefix'
|
||||
- '@new_nid'
|
||||
link/uri:
|
||||
plugin: concat
|
||||
source:
|
||||
- 'constants/entity_prefix'
|
||||
- '@link_path'
|
||||
link/options: options
|
||||
route:
|
||||
plugin: route
|
||||
source:
|
||||
- '@link_path'
|
||||
- options
|
||||
route_name: '@route/route_name'
|
||||
route_parameters: '@route/route_parameters'
|
||||
url: '@route/url'
|
||||
options: '@route/options'
|
||||
external: external
|
||||
weight: weight
|
||||
expanded: expanded
|
||||
enabled: enabled
|
||||
parent:
|
||||
plugin: menu_link_parent
|
||||
source:
|
||||
- plid
|
||||
- '@menu_name'
|
||||
- parent_link_path
|
||||
changed: updated
|
||||
destination:
|
||||
plugin: entity:menu_link_content
|
||||
default_bundle: menu_link_content
|
||||
no_stub: true
|
||||
migration_dependencies:
|
||||
required:
|
||||
- language
|
||||
optional:
|
||||
- d6_menu
|
||||
- d6_menu_links
|
||||
- d6_node_translation
|
||||
- d7_menu
|
||||
- d7_menu_links
|
||||
- d7_node_translation
|
||||
@ -0,0 +1,35 @@
|
||||
finished:
|
||||
6:
|
||||
i18n: content_translation
|
||||
i18nblocks:
|
||||
- block
|
||||
- block_content
|
||||
- content_translation
|
||||
i18ncontent: content_translation
|
||||
i18nmenu:
|
||||
- content_translation
|
||||
- menu_link_content
|
||||
i18npoll: content_translation
|
||||
i18nstrings: content_translation
|
||||
i18nsync: content_translation
|
||||
i18ntaxonomy: content_translation
|
||||
locale: content_translation
|
||||
menu: content_translation
|
||||
# Node revision translations.
|
||||
node: content_translation
|
||||
taxonomy: content_translation
|
||||
7:
|
||||
entity_translation: content_translation
|
||||
i18n: content_translation
|
||||
i18n_block:
|
||||
- block
|
||||
- block_content
|
||||
- content_translation
|
||||
locale: content_translation
|
||||
menu: content_translation
|
||||
# menu links.
|
||||
i18n_menu: content_translation
|
||||
i18n_string: content_translation
|
||||
i18n_taxonomy: content_translation
|
||||
# Node revision translations.
|
||||
node: content_translation
|
||||
Reference in New Issue
Block a user