Skip to content
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

Notifications shown in Romanian (ro) instead of Romansh (roh) #40969

Open
swissspidy opened this issue Jan 10, 2025 · 3 comments · May be fixed by #40973
Open

Notifications shown in Romanian (ro) instead of Romansh (roh) #40969

swissspidy opened this issue Jan 10, 2025 · 3 comments · May be fixed by #40973
Assignees
Labels
[Experiment] AI labels added [Feature Group] Support All things related to customer support. [Feature] Jetpack [Feature] Notifications Needs triage Ticket needs to be triaged [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Auto-allocated [Status] Escalated to Product Ambassadors [Status] In Progress [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack [Type] Bug When a feature is broken and / or not performing as intended

Comments

@swissspidy
Copy link
Contributor

Impacted plugin

Jetpack

Quick summary

Romansh and Romanian are two completely separate languages.

The reason for this bug is this mistake here where only the two first letters of a locale are used:

'html' => '<div id="wpnt-notes-panel2" class="intrinsic-ignore" style="display:none" lang="' . esc_attr( strtolower( substr( $user_locale, 0, 2 ) ) ) . '" dir="' . ( is_rtl() ? 'rtl' : 'ltr' ) . '"><div class="wpnt-notes-panel-header"><span class="wpnt-notes-header">' . __( 'Notifications', 'jetpack' ) . '</span><span class="wpnt-notes-panel-link"></span></div></div>' . $third_party_cookie_check_iframe,

Not every locale has just 2 letters ⚠

At least split by _ or something, but don't just take the first two letters...

Steps to reproduce

  1. Set locale to roh (Romansh) in WordPress
  2. Enable Notifications widget
  3. Wonder why translation is in Romanian instead of Romansh

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

One

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

@swissspidy swissspidy added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged labels Jan 10, 2025
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High labels Jan 10, 2025
Copy link
Contributor

OpenAI suggested the following labels for this issue:

  • [Feature Group] Support: The issue pertains to a bug that affects how users receive notifications, which is a common area for support queries.
  • [Feature] Notifications: The problem directly involves the Notifications feature where wrong language translations are being displayed.
  • [Feature] Jetpack: Since the issue is specifically related to the Jetpack plugin, it is important to label it as such to indicate that the problem is within this plugin's functionality.

@tbradsha
Copy link
Contributor

I'm not sure what standard WordPress uses for languages, and I don't see roh as a language option on my end. I'll note that ISO 639-1 uses two-letter codes.

That said:

This does indeed appear to be a valid bug.

@swissspidy
Copy link
Contributor Author

You don‘t see Romansh by default on the Settings oage because it‘s not fully translated. You can see all locales supported by WordPress and their codes at https://translate.wordpress.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Experiment] AI labels added [Feature Group] Support All things related to customer support. [Feature] Jetpack [Feature] Notifications Needs triage Ticket needs to be triaged [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Status] Auto-allocated [Status] Escalated to Product Ambassadors [Status] In Progress [Status] Priority Review Triggered The guild in charge of triage has been notified of this issue in Slack [Type] Bug When a feature is broken and / or not performing as intended
Projects
3 participants