Skip to content

Social Link: Localize social service names for translations #70199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented May 23, 2025

What?

Closes #70193

Makes all social icon titles in the Social Icons block translatable by wrapping them with the __() internationalization function.

Why?

Currently, all social icon names are hardcoded in English, creating a poor user experience for non-English WordPress users. Words like "Link", "RSS Feed", and "Mail" are not proper nouns and should be translated into different languages. Even proper nouns may have different representations in some languages (e.g., "YouTube" appears as "يوتيوب" in Arabic translations).

This breaks the localized experience and makes the editor less accessible to non-English speakers who see English text mixed with their native language.

How?

  • Imported the __() function from @wordpress/i18n
  • Wrapped all title properties in the social icon variations with __() to make them translatable

@t-hamano t-hamano linked an issue May 26, 2025 that may be closed by this pull request
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended Internationalization (i18n) Issues or PRs related to internationalization efforts [Block] Social Affects the Social Block - used to display Social Media accounts labels May 26, 2025
@himanshupathak95 himanshupathak95 marked this pull request as ready for review May 27, 2025 07:56
Copy link

github-actions bot commented May 27, 2025

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @dracaryspierce.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: dracaryspierce.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>

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

@t-hamano
Copy link
Contributor

Thanks for the PR!

I think we should also localize the labels on the front end.

function block_core_social_link_services( $service = '', $field = '' ) {

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@t-hamano t-hamano merged commit dee3b84 into WordPress:trunk May 30, 2025
60 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.0 milestone May 30, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…s#70199)

* Social Link: Localize social service names for translations

* Localize social link service labels on the frontend

Unlinked contributors: dracaryspierce.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Social Icons: All icon names should be localizable.
2 participants