Skip to content

Administration: Make the Community Events "requires JavaScript" notice translatable#12680

Draft
mukeshpanchal27 wants to merge 1 commit into
WordPress:trunkfrom
mukeshpanchal27:fix/65705
Draft

Administration: Make the Community Events "requires JavaScript" notice translatable#12680
mukeshpanchal27 wants to merge 1 commit into
WordPress:trunkfrom
mukeshpanchal27:fix/65705

Conversation

@mukeshpanchal27

Copy link
Copy Markdown
Member

Trac ticket: https://core.trac.wordpress.org/ticket/65705

The no-JavaScript fallback notice in wp_print_community_events_markup() wrapped its string in bare parentheses instead of __(), so the message was never sent through translation:

- $community_events_notice = '<p class="hide-if-js">' . ( 'This widget requires JavaScript.' ) . '</p>';
+ $community_events_notice = '<p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';

Use of AI Tools

N/A


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copilot AI review requested due to automatic review settings July 24, 2026 11:41
@mukeshpanchal27 mukeshpanchal27 self-assigned this Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Makes the Community Events “requires JavaScript” fallback notice in the Events & News dashboard widget translatable by ensuring the string is passed through core i18n.

Changes:

  • Wrap the “This widget requires JavaScript.” notice string in __() inside wp_print_community_events_markup() so it can be translated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@hbhalodia

Copy link
Copy Markdown

@mukeshpanchal27 Thanks,

Though I have addressed this as a part of this PR - https://github.com/WordPress/wordpress-develop/pull/12677/changes 😅

@mukeshpanchal27

Copy link
Copy Markdown
Member Author

Though I have addressed this as a part of this PR - https://github.com/WordPress/wordpress-develop/pull/12677/changes 😅

I missed that. 😄

Let's keep the translation fix in this PR since I opened a dedicated ticket for it. your PR seems to be expanding the scope, so I'd suggest handling only the translation issue here and keeping the no-js related changes in that PR.

WDYT?

@hbhalodia

Copy link
Copy Markdown

Though I have addressed this as a part of this PR - https://github.com/WordPress/wordpress-develop/pull/12677/changes 😅

I missed that. 😄

Let's keep the translation fix in this PR since I opened a dedicated ticket for it. your PR seems to be expanding the scope, so I'd suggest handling only the translation issue here and keeping the no-js related changes in that PR.

WDYT?

Makes sense, let's fix the translation issue with this ticket.

I will update the my PR once this get's merged to trunk. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants