Hello,
Right now, it is extremely hard to know if a resource (let’s say a metaobject) has outdated translations. This is useful to instruct a merchant that they must update translations in one or more languages.
To know if a resource has at least one outdated translations, this currently requires two steps:
- Retrieving all the locales of a store.
- Manually generate a request for each locales:
// Query 1: get all the shop locales
query {
shopLocales {
locale
}
}
// Query 2: based on retrieved locales, generate another query
query {
translatableResource(resourceId: "gid://shopify/Collection/1007901140") {
resourceId
fr: translations(locale: "fr") {
outdated
}
de: translations(locale: "de") {
outdated
}
it: translations(locale: "it") {
outdated
}
}
}
Those queries can’t be parallelized as query 2 needs to wait for query 1, and manually generating a GraphQL string is cumbersome.
To make it easier, it would be nice if the translatableResource would offer a convenient to get outdatedLocales:
query {
translatableResource(resourceId: "gid://shopify/Collection/1007901140") {
resourceId
outdatedLocales {
locale
}
}
}
An outdated locale would be a translatable resource with at least one outdated translation.
Thanks.