Follow-up to #2570093: Replace !placeholder with @placeholder where needed in JavaScript

Problem/Motivation

Following the !placeholder replacement in PHP code, we also should perform the same replacement for JavaScript.

This issue deals with removing the !placeholder from Drupal.formatString().

Proposed resolution

Remaining tasks

t.b.d.

User interface changes

none

API changes

No longer support !placeholder in Drupal.t(), Drupal.formatPlural() and Drupal.formatString()

Data model changes

none

CommentFileSizeAuthor
#3 replace_placeholder-2570101-2.patch1.01 KBsutharsan

Comments

Sutharsan created an issue. See original summary.

sutharsan’s picture

Title: Replace !placeholder with @placeholder in JavaScript » Remove !placeholder support from Drupal.formatString
sutharsan’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

Remove !placeholder support from Drupal.formatString().

dawehner’s picture

IMHO the problem is much more tricky in javascript, because, well, even if Core doesn't have any usecases, contrib might have to deal with HTML,
and for HTML we don't have any replacement yet in place, in case we would just remove !placeholder.

effulgentsia’s picture

I agree with #4. See also #2570093-9: Replace !placeholder with @placeholder where needed in JavaScript . Are we sure about the issue summary's "should" in:

Following the !placeholder replacement in PHP code, we also should perform the same replacement for JavaScript.

Wouldn't that mean we'd need to also introduce a SafeString JavaScript class in order to have full parity with the PHP functions?

sutharsan’s picture

Are we sure about the issue summary's "should"

No, it was not decided, it is under discussion in #2570093: Replace !placeholder with @placeholder where needed in JavaScript .

nod_’s picture

Status: Needs review » Closed (won't fix)

Closing this one too since I closed the related one.

This is a problem space where we can't copy what's being done in PHP.