Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -0,0 +1,70 @@
id: d6_block_translation
label: Block translations
migration_tags:
- Drupal 6
- Configuration
- Multilingual
source:
plugin: d6_block_translation
constants:
dest_label: 'settings/label'
process:
langcode: language
property: constants/dest_label
translation: title
id:
-
plugin: migration_lookup
migration: d6_block
source:
- module
- delta
-
plugin: skip_on_empty
method: row
plugin:
-
plugin: static_map
bypass: true
source:
- module
- delta
map:
book:
0: book_navigation
comment:
0: views_block:comments_recent-block_1
forum:
0: forum_active_block
1: forum_new_block
locale:
0: language_block
node:
0: node_syndicate_block
search:
0: search_form_block
statistics:
0: statistics_popular_block
system:
0: system_powered_by_block
user:
0: user_login_block
1: system_menu_block:tools
2: views_block:who_s_new-block_1
3: views_block:who_s_online-who_s_online_block
-
plugin: block_plugin_id
-
plugin: skip_on_empty
method: row
theme:
plugin: block_theme
source:
- theme
- default_theme
- admin_theme
destination:
plugin: entity:block
migration_dependencies:
required:
- d6_block

View file

@ -0,0 +1,50 @@
id: d6_custom_block_translation
label: Custom 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

View file

@ -0,0 +1,26 @@
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
# 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

View file

@ -0,0 +1,55 @@
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

View file

@ -0,0 +1,59 @@
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

View file

@ -0,0 +1,42 @@
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
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
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

View file

@ -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

View file

@ -0,0 +1,50 @@
id: d7_custom_block_translation
label: Custom 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

View file

@ -0,0 +1,26 @@
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
# 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

View file

@ -0,0 +1,37 @@
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
content_translation_update_definitions:
- comment
- node
- taxonomy_term
- user
migration_dependencies:
optional:
- d7_comment_type
- d7_node_type
- d7_taxonomy_vocabulary

View file

@ -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

View file

@ -0,0 +1,45 @@
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
content_translation_update_definitions:
- node
destination_module: content_translation
migration_dependencies:
required:
- d7_user
- d7_node_type
- language
optional:
- d7_field_instance

View file

@ -0,0 +1,32 @@
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
forum_container: is_container
destination:
plugin: entity:taxonomy_term
translations: true
destination_module: content_translation
migration_dependencies:
required:
- language
- d7_entity_translation_settings
- d7_taxonomy_term

View file

@ -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

View file

@ -0,0 +1,120 @@
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 an 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_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:
optional:
- d6_menu_links
- d6_node_translation
- d7_menu_links
- d7_node_translation

View file

@ -0,0 +1,35 @@
id: statistics_node_translation_counter
label: Node translation counter
migration_tags:
- Drupal 6
- Drupal 7
- Content
- Multilingual
source:
plugin: node_counter
process:
nid:
-
plugin: migration_lookup
migration:
- d6_node_translation
- d7_node_translation
source: nid
-
plugin: skip_on_empty
method: row
-
plugin: extract
index:
- 0
totalcount: totalcount
daycount: daycount
timestamp: timestamp
destination:
plugin: node_counter
migration_dependencies:
required:
- statistics_node_counter
optional:
- d6_node_translation
- d7_node_translation