Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(i18n): pass locale to help/versions check #5022

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the above todo comment now be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks - yes! - missed it 😅

tag: 'module.version-check',
json: true,
})
Expand Down
Loading