"Translation Missing" with Metafields

We use custom metafields on our products that are used in the product card on collection pages, like in the image below. This has been working fine for months with no changes on our end, but suddenly we are getting “translation missing. en:” where the metafields appear on the card. The highlighted metafields are called “custom.tasting_notes” and “custom.roast_style”. Live collection page here

I’ve looked this up on other support threads and seen this happen with other fields that had no value listed in the language editor (Via Online Store->Themes->…->Edit Default Theme Content), but I can’t find anything related to how this works with metafields.

I tried adding these metafields into Locales\en.default.json, but wasn’t able to make any difference.

Hi @fazenda ,

First, make sure your metafields are correctly set up for your products in the Shopify admin. Check if the metafield keys (“custom.tasting_notes” and “custom.roast_style”) and their corresponding values are assigned properly.

To address the translation issue, follow these steps:

  1. Go to “Online Store” → “Themes” in your Shopify admin.
  2. Select your active theme and choose “Edit languages”.
  3. Search for the metafield keys (“custom.tasting_notes” and “custom.roast_style”) in the language editor.
  4. If you find matching translations, ensure they are filled in correctly. If not, update them accordingly.

If the metafield keys are not found in the language editor, we can manually add the translations:

  1. In the language editor, switch to the “JSON” tab.
  2. Locate the “en.default.json” file.
  3. Add the metafield keys and their translations in the JSON structure.

For example:

{
  "custom.tasting_notes": "Your tasting notes translation here",
  "custom.roast_style": "Your roast style translation here"
}

Make sure to replace “Your tasting notes translation here” and “Your roast style translation here” with the actual translations.

Save the changes and check your collection page again to see if the issue is resolved. If not, consider reaching out to Shopify’s support team or a Shopify Expert for further assistance.

I hope this helps! Feel free to ask if you have any more questions.

This did not resolve the issue.

I did some more digging and found that at some point recently Shopify injected the field for translations (“| t”) at the end of all metadata entries - in this case, in card-product.liquid. Deleted that and it stopped trying to translate. There still seems to be no way to add a metafield to the translation file, tried multiple different formats.