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

UI Translations not working #1235

Open
MaxGruson opened this issue Jun 7, 2024 · 0 comments
Open

UI Translations not working #1235

MaxGruson opened this issue Jun 7, 2024 · 0 comments

Comments

@MaxGruson
Copy link

Version

  • Carbon Fields: 3.6.3
  • WordPress: 6.5.4
  • PHP: 8.0.13

Expected Behavior

Carbon Fields UI gets translated according to currently set language.

Actual Behavior

Carbon Fields UI falls back to English. All fields don't seem to use carbon-fields-ui-[language domain].mo

Steps to Reproduce the Problem

  1. Set WordPress language to anything but English.
  2. Add a field.

Comments

Translation only seems to fail of strings defined in Carbon Fields's Javascript files, like carbon-fields/packages/core/fields/complex/group.js. A function like __( 'Duplicate', 'carbon-fields-ui' ) doesn't return a translated string. If I however use the same function in a random PHP file, the translation works fine. Might this have something to do with the absence of JSON translation files?

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

1 participant