carbon-fields icon indicating copy to clipboard operation
carbon-fields copied to clipboard

UI Translations not working

Open MaxGruson opened this issue 8 months ago • 0 comments

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?

MaxGruson avatar Jun 07 '24 14:06 MaxGruson