Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Untranslated Paragraph Warning

Security covered Obsolete

This module warns content managers when they are about to save a node with paragraphs that are present in the default language but not yet translated. It helps prevent accidentally publishing content containing untranslated paragraphs.

This module was created to warn content managers about paragraphs in the node form that have been attached to the node in the site's default language, but not yet translated.

The use case for this is to help prevent content managers from accidentally publishing content with untranslated paragraphs in them.

Imagine the following scenario:

  1. Content manager creates paragraph on the default language translation of a node and saves.
  2. This paragraph is not intended to be seen by multilingual users and there is already custom twig code to hide the paragraph on the node's translation.
  3. Content manager is later requested to update the node's translation. They do this as requested, but forget that there is an untranslated paragraph in the node form. They save.
  4. Saving tells drupal to classify the paragraph as being translated, meaning the twig logic no longer hides the paragraph.
  5. An untranslated paragraph sits on the node's translation indefinitely.

This module would intervene in step 3 with a warning message for the content manager reminding them to translate the untranslated paragraph.

Configuration (Required)

/admin/config/untranslated_paragraph_warning/untranslated_paragraph_warning

  • Required: Set the machine names of the paragraph fields this module should use to populate the warning message.
  • Optional: Customize the warning message to display on detection of an untranslated paragraph.

Twig Recommendation

This module should be used in conjunction with customized twig logic which compares the site's langcode with the langcode of the paragraph and hides the paragraph if the langcodes do not match.

E.g {% if language == content.field_test|field_value[0]['#langcode'] %}

Drupal 8–10 · not 11

Ask your assistant about Untranslated Paragraph Warning

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.0 Stable 8–10 Aug 2, 2023