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

yoast-woo-seo translation namespace can't be translated #22076

Open
nbaosullivan opened this issue Feb 26, 2025 · 1 comment
Open

yoast-woo-seo translation namespace can't be translated #22076

nbaosullivan opened this issue Feb 26, 2025 · 1 comment

Comments

@nbaosullivan
Copy link

Any reasons why this isn't in the wordpress-seo namespace? With the built package on npm, it means this cannot be translated via the app.js instantiation. The wordpress-seo translations work with this configuration, but not yoast-woo-seo, and with the built version of the package, the i18n instance used in the assessment can't be used, seemingly making it untranslatable.

    const app = new App({
      callbacks: {
        getData: () => ({ text: 'dummy content' }),
      },
      targets: {
        snippet: 'yoast-seo-dummy-target',
      },
      translations: {
        domain: 'wordpress-seo',
        // eslint-disable-next-line camelcase
        locale_data: {
          'wordpress-seo': translations,
          // Add yoast-woo-seo domain translations
          'yoast-woo-seo': wooTranslations,
        },
      },
    });

@mhkuu
Copy link
Contributor

mhkuu commented Feb 27, 2025

Hey there! 👋 This yoast-woo-seo domain is a left-over in the unit tests after we moved our translation strings for that assessment to our Yoast WooCommerce plugin in #21567 (I'll make sure to remove the reference!). So, you can use the code for that assessment, but we only supply a default non-translatable feedback text instead in getFeedbackStrings (here). However, if you prefer, that can be overridden with a translation of your own making.

But also just wondering in general what you are trying to accomplish, maybe we can help you out? 😄

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

No branches or pull requests

2 participants