Update message that displays when configuration translation is saved without changes

Created on 13 May 2015, over 9 years ago
Updated 21 November 2024, about 1 month ago

Problem/Motivation

If you add and save a configuration translation without modifying anything, the success message indicates the changes were saved, which may be confusing since nothing is actually added. The translation is not added unless you modify something.

Steps to reproduce

  1. Install Drupal
  2. Enable Language and Configuration Translation
  3. Add a language that does not come with configuration translation (e.g. Tuvan)
  4. Go to /admin/structure/menu/manage/main/translate
  5. Click Add for Tuvan
  6. Save without making any changes
  7. Message says 'Successfully saved Tuvan translation.' but the translation is not saved because nothing was changed (he button still says Add)
  8. Click Add again
  9. Make a change and save
  10. Same message but now the translation is saved, and the button shows Edit

Proposed resolution

If the translation is not modified and therefore not added, show a different message:
@language translation was not added. To add a translation, you must modify the configuration.

Remaining tasks

  1. Agree on proposed approach
  2. Write patch with tests
  3. Review

User interface changes

Updated error message

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

πŸ› Bug report
Status

Fixed

Version

10.3 ✨

Component

config_translation.module

Created by

πŸ‡ΊπŸ‡ΈUnited States mikemadison Seattle, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France erwangel

    Sorry to reopen this but I find this wording very confusing: To add a translation, you must modify the configuration. Which configuration ? I had to check all kind of settings/configurations, in structure (content type, content type field), in settings (region and languages, content language and translation, configuration translation), in module settings (I faced this problem while translating meta settings with metatag module) etc., before I realize that I just had to change something in a field of the present form!

    So I suggest to change this message to To add a translation, you must modify at least a field on this form.

Production build 0.71.5 2024