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
