Problem/Motivation

In order to make #2506445: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests approachable, we need to break it up into smaller chunks. This issue address !placeholder in the Language module

File Bounds:

core/modules/language/*

See #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand for complete motivation on removal of !placeholder

Proposed resolution

Replace !placeholder with @placeholder in the Language module. See File bounds for scope.

Remaining tasks

  1. Replace !placeholder with @placeholder. Refer to patch in #2506445-85: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests as that patch should have related update
  2. Ensure tests come back clean
  3. Manually test the update and post screen shot after patch, review source for any difference in escaping.

User interface changes

Comments

justAChris created an issue. See original summary.

justachris’s picture

Title: Replace !placeholder with @placeholder in language module » Replace !placeholder with @placeholder in Language module
Issue summary: View changes
joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new19.44 KB
mile23’s picture

Status: Needs review » Reviewed & tested by the community

Looked for !placeholders in strings using NetBeans and my eyes. (!? as a wildcard expression)

Couldn't find any.

justachris’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs manual testing

Thanks @Mile23 for the code review.

Can we add manual testing for these? We need make sure there aren't any differences in the output, most commonly with double escaping.

sutharsan’s picture

Assigned: Unassigned » sutharsan

Working on manual test.

sutharsan’s picture

StatusFileSize
new18.04 KB

Rerolled patch #3.
The changes in NegotiationConfigureForm::configureFormTable() have been removed as the proper placeholder is already in place.

sutharsan’s picture

Issue summary: View changes
StatusFileSize
new63.37 KB
new36.26 KB

Manually tested the patch:
Language help page and Language negotiation help text only contains placeholders containing a URL. All links tested, they work.
Site's default language (@language): See screenshots. Using © as special character.
Language switcher (@type): Can not activate this string in the interface.
@name field is required.: Is part of test code.

sutharsan’s picture

Assigned: sutharsan » Unassigned
justachris’s picture

Status: Needs review » Postponed

Postponed on determining plan in parent #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand and then analyzing whether this individual issue still makes sense.

@Sutharsan: Again, very sorry that this was not postponed earlier. Thank you for manually reviewing that patch, please keep an eye on #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand, as I'm sure resulting issues and patches will have plenty to review.

justachris’s picture

Status: Postponed » Closed (duplicate)

Closing this, splitting by module was not the ideal approach to removing !placeholder. Marking as duplicate of #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand, since the chosen approach is / will be outlined there, please refer to it for any additional action.

xjm’s picture