Replace !placeholder with @placeholder where needed in JavaScript

Created on 17 September 2015, over 9 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

Following the !placeholder replacement in PHP code, we also should perform the same replacement for JavaScript.
This keeps placeholder usage in PHP and JavaScript consistent, which is good for DX.

Scripts use:

egrep -r '\.t\(.*![a-zA-Z]' core
egrep -r '\.formatPlural\(.*![a-zA-Z]' core
egrep -r '\.formatString\(.*![a-zA-Z]' core

Proposed resolution

Remaining tasks

t.b.d.

User interface changes

none

API changes

t.b.d.

Data model changes

none

📌 Task
Status

Needs review

Version

10.1

Component
Javascript 

Last updated 3 days ago

Created by

🇳🇱Netherlands sutharsan

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.

  • 🇮🇳India ankithashetty Karnataka, India

    Rerolled the patch against 10.1.x.

    Changes in the new patch:

    • Drupal 10 doesn't need to have the es6 code transpiled, so we can just copy the contents from .es6.js into .js file from the D9 patch and remove the .es6.js.
    • Compared the patch in #45 and #54, it included a change in core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php file. Removed that file in the new patch, as this issue focuses on only .js files (as mentioned in the issue title).

    Thanks!

Production build 0.71.5 2024