Skip to content

Commit

Permalink
refactor(i18n): use kebabcased resource names for "help & resources"
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 17, 2023
1 parent f1f30b0 commit 65a942d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions dev/test-studio/plugins/locale-no-nb/bundles/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,31 +662,31 @@ const studioResources: Record<StudioLocaleResourceKeys, string> = {
/** --- Help & Resources Menu --- */

/** Title for help and resources menus */
'helpResources.title': 'Hjelp og ressurser',
'help-resources.title': 'Hjelp og ressurser',

/** Information for what studio version the current studio is running */
'helpResources.studio-version': `Sanity Studio versjon {{studioVersion}}`,
'help-resources.studio-version': `Sanity Studio versjon {{studioVersion}}`,

/** Information for what the latest sanity version is */
'helpResources.latest-sanity-version': `Siste versjon er {{latestVersion}}`,
'help-resources.latest-sanity-version': `Siste versjon er {{latestVersion}}`,

/**
* Label for "join our community" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.join-our-community': `Bli med i vårt community`,
'help-resources.action.join-our-community': `Bli med i vårt community`,

/**
* Label for "help and support" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.help-and-support': `Hjelp og støtte`,
'help-resources.action.help-and-support': `Hjelp og støtte`,

/**
* Label for "contact sales" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.contact-sales': `Kontakt salg`,
'help-resources.action.contact-sales': `Kontakt salg`,

/** --- User Menu --- */

Expand Down
12 changes: 6 additions & 6 deletions packages/sanity/src/core/i18n/bundles/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,31 +691,31 @@ export const studioLocaleStrings = {
/** --- Help & Resources Menu --- */

/** Title for help and resources menus */
'helpResources.title': 'Help and resources',
'help-resources.title': 'Help and resources',

/** Information for what studio version the current studio is running */
'helpResources.studio-version': `Sanity Studio version {{studioVersion}}`,
'help-resources.studio-version': `Sanity Studio version {{studioVersion}}`,

/** Information for what the latest sanity version is */
'helpResources.latest-sanity-version': `Latest version is {{latestVersion}}`,
'help-resources.latest-sanity-version': `Latest version is {{latestVersion}}`,

/**
* Label for "join our community" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.join-our-community': `Join our community`,
'help-resources.action.join-our-community': `Join our community`,

/**
* Label for "help and support" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.help-and-support': `Help and support`,
'help-resources.action.help-and-support': `Help and support`,

/**
* Label for "contact sales" call to action
* These are titles for fallback links in the event the help & resources endpoint isn't able to be fetched
*/
'helpResources.action.contact-sales': `Contact sales`,
'help-resources.action.contact-sales': `Contact sales`,

/** --- User Menu --- */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function ResourcesButton() {
<Tooltip
content={
<Box padding={2}>
<Text size={1}>{t('helpResources.title')}</Text>
<Text size={1}>{t('help-resources.title')}</Text>
</Box>
}
scheme={scheme}
Expand All @@ -39,7 +39,7 @@ export function ResourcesButton() {
<MenuButton
button={
<Button
aria-label={t('helpResources.title')}
aria-label={t('help-resources.title')}
icon={HelpCircleIcon}
mode="bleed"
fontSize={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemP
<>
<MenuItem
as="a"
text={t('helpResources.action.join-our-community')}
text={t('help-resources.action.join-our-community')}
size={0}
href="https://www.sanity.io/exchange/community"
target="_blank"
muted={false}
/>
<MenuItem
as="a"
text={t('helpResources.action.help-and-support')}
text={t('help-resources.action.help-and-support')}
size={0}
href="https://www.sanity.io/contact/support"
target="_blank"
muted={false}
/>
<MenuItem
as="a"
text={t('helpResources.action.contact-sales')}
text={t('help-resources.action.contact-sales')}
size={0}
href="https://www.sanity.io/contact/sales?ref=studio"
target="_blank"
Expand All @@ -67,12 +67,12 @@ export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemP
{/* Studio version information */}
<Box padding={3}>
<Text size={1} muted weight="medium" textOverflow="ellipsis">
{t('helpResources.studio-version', {studioVersion: SANITY_VERSION})}
{t('help-resources.studio-version', {studioVersion: SANITY_VERSION})}
</Text>
{!error && latestStudioVersion && (
<Box paddingTop={2}>
<Text size={1} muted textOverflow="ellipsis">
{t('helpResources.latest-sanity-version', {
{t('help-resources.latest-sanity-version', {
latestVersion: latestStudioVersion,
})}
</Text>
Expand Down

0 comments on commit 65a942d

Please sign in to comment.