Problem/Motivation

When you try to translate a string using the 'User interface translation', you will see a notice that you need to submit the form to save the values.

Changes made in this table will not be saved until the form is submitted.

An asterisk is appended to the original piece of text (without space and without any color variation). This made me type the asterisk in the Translation field too.

Steps to reproduce

  1. Enable the Language and Interface Translation modules.
  2. Go to /admin/config/regional/language and add a new language.
  3. Go to /admin/config/regional/translate to translate interface text.
  4. Update the translation string value for anything.
  5. Note the asterisk next to the Source string.

Proposed resolution

My suggestion would be to give the asterisk a color and add some spacing between the asterisk and the text. See screenshot for the current situation and my proposal.

Current

The current User interface translation screen

Proposal

The proposed User interface translation screen

Remaining tasks

  1. Create patch
  2. Review patch
  3. Test patch
  4. Commit

User interface changes

Asterisk will be differentiated from the text to be translated.

API changes

Data model changes

Release notes snippet

Comments

BarisW created an issue. See original summary.

BarisW’s picture

Status: Active » Needs review
StatusFileSize
new822 bytes

This probably needs to get into the 'stable' team.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

kristen pol’s picture

Category: Bug report » Task
Status: Needs review » Needs work
Issue tags: +Bug Smash Initiative

Thanks for the patch. Not sure this is a bug so switched it to task.

1) I tested without and with the patch and got the same behavior as the original screenshots.

2) Patch applies cleanly to 9.1.x.

3) CSS change seems fine and I see #f00 used in various other places in core.

4) Kicked off tests on 9.1.x.

5) From what I understand though, stable cannot be changed so that CSS change should be removed. https://www.drupal.org/docs/8/core/themes/stable-theme

Back to "Needs work" for item 5.

kristen pol’s picture

StatusFileSize
new78.68 KB
new80.95 KB

Forgot to add my screenshots.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joshua1234511’s picture

StatusFileSize
new93.15 KB

Could not replicate the issue on 9.4.x-dev
Steps followed to validate the issue.

- Enable the Language and Interface Translation module
- Got to Languages "/admin/config/regional/language" and add a new language.
- Next go to User interface translation "/admin/config/regional/translate".
- Try to add/update the translation string value.

Am I missing anything as I can see the form does not update the values in Ajax. If its not an Ajax form anymore this won't be an issue.
User interface translation

kristen pol’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

The patch in #2 applies cleanly to Drupal 9.3, 9.4, and 10.

Since @joshua1234511 wasn't able to reproduce in #16, tagging for steps to reproduce and moving to postponed.

kristen pol’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Postponed
Issue tags: -Needs steps to reproduce

I have confirmed that the Changes made in this table will not be saved until the form is submitted. text and the asterisks are no longer showing up. I tested with all themes. Not sure why it's not showing up anymore. The code is still in 9.4:

  $.extend(Drupal.theme, {
    localeTranslateChangedMarker: function localeTranslateChangedMarker() {
      return "<abbr class=\"warning ajax-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr>");
    },
    localeTranslateChangedWarning: function localeTranslateChangedWarning() {
      return "<div class=\"clearfix messages messages--warning\">".concat(Drupal.theme('localeTranslateChangedMarker'), " ").concat(Drupal.t('Changes made in this table will not be saved until the form is submitted.'), "</div>");
    }
  });

Marking this as postponed for now. I did update the issue summary to include steps to reproduce and use the template.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.