App reviews, troubleshooting, and recommendations
TranslatableContent returned by Shopify is an empty array, which means no digest. No digest means no translation possible. Some other resources (including product option values) in the shop have translatable just fine.
Why is the translatableContent empty and how to get around this?
query { translatableResourcesByIds(first: 10, resourceIds: ["gid://shopify/ProductOptionValue/5881291145563"]) { edges { node { resourceId translatableContent { key value digest locale } } } } }
output:
{ "data": { "translatableResourcesByIds": { "edges": [ { "node": { "resourceId": "gid://shopify/ProductOptionValue/5881291145563", "translatableContent": [] } } ] } }, }
of course this product option value exists and is returned when querying it by product id:
{ "id": "gid://shopify/ProductOptionValue/5881291145563", "name": "M", "translations": [] }
Moreover, i tried to create the digest myself, even if i was skeptical if this is going to work (I was right), so I hashed the original content using sha256 as:
import crypto from 'crypto'; const hash = crypto.createHash("sha256").update(contentInDefaultLocale).digest("hex");
Then doing this mutation
mutation translationsRegister($resourceId: ID!, $translations: [TranslationInput!]!) { translationsRegister(resourceId: $resourceId, translations: $translations) { userErrors { message field } translations { key value locale } } }
#data:
[{
gid : "gid://shopify/ProductOptionValue/5881291145563",
translations: [{
key : "name",
locale : "ro",
value : contentInDefaultLocale,
translatableContentDigest: hash,
}]
}]
i get this error:
[ { message: 'Key name is not a valid translatable field', field: [ 'translations', '0', 'key' ] } ]
"name" should be a valid key in this case 🥲
Dear shopify team, any help with this?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025