Problem/Motivation

Follow-up to #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only
Follow-up to #2560783: Replace !placeholder with :placeholder for URLs in hook_help() implementations
While discussing the removal of !placeholder from most places core, it was determined that these updates would break already translated strings.
Now that most of these updates have been committed, we should determine the best ways to assist the translations teams or if it is possible to update these strings automatically.
Additionally, it should be noted that !placeholder is replaced with :placeholder in URLs and (generally) @placeholder in non-URL situations.
Also, the scope of these patches grew to include replacing @placeholder with :placeholder in URLs for consistency.

Proposed resolution

Discussions on this issue have already occurred in #2560783: Replace !placeholder with :placeholder for URLs in hook_help() implementations starting around comment #25, but since the breaking of translation strings has a larger scope, moving discussion here.
Some suggestions already provided include:

  • Creating a SQL query to replace any placeholders
  • Creating an update hook
  • Providing a list of updated strings to the translations groups and have them make the updates manually

To facilitate the process, a script has been started to determine and indicate which strings that have been updated affect which languages: https://github.com/justAChris/DrupalPlaceholderTranslations

Additionally, the committed patches affecting translated strings are being parsed to determine which strings have changed. These results will be provided soon.

Remaining tasks

Comments

justAChris created an issue. See original summary.

justachris’s picture

StatusFileSize
new9.84 KB

The current list of strings updated in #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only, with the associated child issue and patch link. List indicates the original string (-) and what the string became after the patch(+).

justachris’s picture

StatusFileSize
new161.52 KB
justachris’s picture

StatusFileSize
new161.52 KB

A few of the orderings got flipped

justachris’s picture

lomo’s picture

There are other such issues which make "trivial" changes to strings, e.g. https://www.drupal.org/node/2551453, which only changes occurrences of "e-mail" to "email". Clearly the .po files could just be updated with the same change and prevent translations getting "orphaned" and need for re-translation. I've seen some other "word inconsistencies" and grammar issues that I'd love to fix before string freeze, but I'd like to also track them. I've mentioned that issue in private with justAChris, but am hesitant to create a ticket/patch until we have further discussed how to deal with this so that it doesn't just make a lot more work for translators (the change I'm talking about would probably not require any changes to translated strings, whatsoever, as long as the original string is simply replaced in all .po files).

justachris’s picture

@LoMo opened #2574981: Fix grammar ("an URL" should be "a URL") and consistent use of URL (not "url" / "Url") in documentation only, part 1 for concerns about similar translation replacements. Hoping that lessons learned here can help with translation cleanup resulting from other patches.

Added !placeholder string updates from #2571935: Fix use of !placeholder for imploding in views.views.inc and #2572597: Replace !placeholder with @placeholder in mail code. Note that the views.views.inc is a weak example since the placeholder is removed from t() and appended outside.

justachris’s picture

StatusFileSize
new1.46 KB

Some additional !placeholder string updates, missed earlier or committed more recently.

justachris’s picture

Combined all of the string updates from all commited children of #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand into one file. Only a few occurrences of !placeholder in javascript files are still being worked on. This combination should include all of the above files.
Additionally, parsed this combined file to show only deletions, which represent strings as they should appear in the current translation files. Duplicates should already be removed.

justachris’s picture

Priority: Major » Normal
Issue tags: -SafeMarkup
StatusFileSize
new5.96 KB

Ran the list of original strings across all of the translation files for Drupal 8.0.0-beta16. Choose beta 15 instead of beta 16 since many of the strings are no longer in the translation files in beta 16. Additionally, some of these have been resolved in the beta 16 translation files. I've attached the overview results as coreBeta15overview.txt, but the details for each language as well as the scripts and source files used to create this are on github: https://github.com/justAChris/DrupalPlaceholderTranslations

Added a wrapper script to iterate through a set of languages including downloading the translation files from the server.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.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.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should 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.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should 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.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should 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.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should 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.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should 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.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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.

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

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

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

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should 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.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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: 9.5.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +stale-issue-cleanup

Thank you for creating this issue to improve Drupal.

We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

Thanks!

smustgrave’s picture

Wanted to bump 1 more time if still valid.

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.