You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(plugin-ecommerce): variant options validation shows raw translation keys #19021
The variant options validation of the ecommerce plugin shows raw translation keys instead of messages. When an editor saves a variant whose options combination is already in use, the error under "Variant options" reads ecommerce:variantOptionsAlreadyExists, and the server logs key not found: ecommerce:variantOptionsAlreadyExists.
validateOptions calls t('ecommerce:…'), but the plugin registers its translations under plugin-ecommerce, and the rest of the plugin uses t('plugin-ecommerce:…'). The translations themselves exist. All four messages in validateOptions are affected: variantOptionsRequired, productRequired, variantOptionsRequiredAll and variantOptionsAlreadyExists.
This affects both v3 and v4: the same keys are used in 4.0.0-beta.4 and on main.
Clone this repo and open the variant-options-validation-untranslated-keys/ directory
pnpm install
pnpm test:int: the test creates two variants with the same options and checks the validation message of the second.
key not found: ecommerce:variantOptionsAlreadyExists
× returns the translated message for a duplicate options combination
Expected: "This variant combo is already in use by another variant. Please select different options."
Received: "ecommerce:variantOptionsAlreadyExists"
Activity