Skip to content

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

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

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. 👍

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. I'd like to commit this ahead of #12681.

@t-hamano
t-hamano marked this pull request as ready for review July 25, 2026 02:27
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props mukesh27, wildworks, hbhalodia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 62848
GitHub commit: 3300b8b

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Jul 25, 2026
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.

4 participants