-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(i18n): pass locale to help/versions check
- Loading branch information
Showing
1 changed file
with
1 addition
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,14 @@ export function getHelpResources( | |
client: SanityClient, | ||
locale: string, | ||
): Observable<ResourcesResponse> { | ||
// @todo: Send `locale` as query parameter once API supports it | ||
return client.withConfig({apiVersion: '1'}).observable.request<ResourcesResponse>({ | ||
url: '/help', | ||
/* | ||
query and tag is used by analytics for tracking. | ||
Builds to: `{m: ['[email protected]']}' and serializes to: `[email protected]`. | ||
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, | ||
}) | ||
|