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

[I18n] Fix plugin internationalization #430

Merged
merged 17 commits into from
Jul 28, 2023
Merged

Conversation

pedro-mendonca
Copy link
Contributor

This PR addresses many i18n issues:

  • Fix missing wp_set_script_translations() to translate JavaScript scripts
  • Fix missing gettext wrappers
  • Fix missing text domains
  • Fix extra leading slash on form assets path
  • Add i18n to Font Styles (Normal/Italic)
  • Use correct i18n for strings with plurals - include variable on string ( %d Variant / %d Variants )

Solves issue reported on https://wordpress.org/support/topic/the-screen-manage-theme-fonts-is-not-translated/

@vcanales vcanales self-assigned this Jul 28, 2023
Copy link
Member

@vcanales vcanales left a comment

Choose a reason for hiding this comment

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

This is a great improvement; thanks for taking the time to implement it @pedro-mendoca!

We should address any further improvements and as a follow-up, in order to get translations out ASAP.
You mentioned in slack that /assets/boilerplate/theme.json isn't being parsed; we should add an issue to get to that later.

Salve for the small naming nitpick, this is good to go.

src/utils.js Outdated Show resolved Hide resolved
@@ -223,7 +223,10 @@ public static function create_admin_form_page() {
}

public static function form_script() {
Copy link
Member

Choose a reason for hiding this comment

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

This is a great catch; it was frustrating me quite a bit, as it wasn't working with the extra / present.

It's working for me now.

@vcanales vcanales merged commit e9c82db into WordPress:trunk Jul 28, 2023
1 check passed
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.

2 participants