From 9fdcbcb71a833f45c06ecefa7c43de45869d94f9 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Thu, 19 Oct 2023 14:27:17 -0700 Subject: [PATCH] refactor(i18n): pass locale to help/versions check --- .../navbar/resources/helper-functions/helpResources.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/sanity/src/core/studio/components/navbar/resources/helper-functions/helpResources.ts b/packages/sanity/src/core/studio/components/navbar/resources/helper-functions/helpResources.ts index 01bcc32b4b5..642f5984396 100644 --- a/packages/sanity/src/core/studio/components/navbar/resources/helper-functions/helpResources.ts +++ b/packages/sanity/src/core/studio/components/navbar/resources/helper-functions/helpResources.ts @@ -11,7 +11,6 @@ export function getHelpResources( client: SanityClient, locale: string, ): Observable { - // @todo: Send `locale` as query parameter once API supports it return client.withConfig({apiVersion: '1'}).observable.request({ url: '/help', /* @@ -19,7 +18,7 @@ export function getHelpResources( Builds to: `{m: ['sanity@3.0.2']}' and serializes to: `?m=sanity@3.0.2`. Final format will be e.g. https://api.sanity.io/v1/help?tag=sanity.studio.module.version-check&m=sanity%403.0.2 */ - query: {m: [`sanity@${SANITY_VERSION}`]}, + query: {m: [`sanity@${SANITY_VERSION}`], locale}, tag: 'module.version-check', json: true, })