Small bug: translation locale lower/upper case

Hi ShopifyDevStaf,

I noticed a small bug ( inconsistent ) in specifying the translations using the locale enum. When I use uppercase under Products > translations(locale:"FR") it works but under translatableResourcesByIds I need to specify this in lowercase.

Note: did not test with other translatable resources, only product recourse.

#Works:

query ProductsWithTranslations {
  products(first:10){
    edges {
      node {
        id
        handle
        translations(locale:"FR"){
          key
          value
        }
      }
    }
  }
}

#Does not work:

query GetTranslateblesResourcesByID {
  translatableResourcesByIds(
    resourceIds: ["gid://shopify/Product/000000000"]
    first: 1
  ) {
    edges {
      node {
        resourceId
        translations(locale: "FR") { // needs to be lowercase
          key
          locale
          outdated
          updatedAt
          value
        }
        translatableContent {
          key
          value
          digest
          locale
          type
        }
      }
    }
  }
}

1 Like

Hey @AdminGh, thanks for reporting that.

I’ve tested on my end as well and I do see the same as you. I did notice that lowercase does work in both instances, so sticking to that in the meantime should resolve this for you.

I’ll consult with our team here and report back on what I find.