diff --git a/.changeset/silver-rocks-deliver.md b/.changeset/silver-rocks-deliver.md new file mode 100644 index 0000000000..eb132199f3 --- /dev/null +++ b/.changeset/silver-rocks-deliver.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-user-settings': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-adr': patch +--- + +Updated alpha translation message keys to use nested format and camel case. diff --git a/plugins/adr/alpha-api-report.md b/plugins/adr/alpha-api-report.md index 5740556904..3864c85697 100644 --- a/plugins/adr/alpha-api-report.md +++ b/plugins/adr/alpha-api-report.md @@ -17,9 +17,9 @@ export const AdrSearchResultListItemExtension: Extension<{ export const adrTranslationRef: TranslationRef< 'adr', { - readonly content_header_title: 'Architecture Decision Records'; - readonly failed_to_fetch: 'Failed to fetch ADRs'; - readonly no_adrs: 'No ADRs found'; + readonly contentHeaderTitle: 'Architecture Decision Records'; + readonly failedToFetch: 'Failed to fetch ADRs'; + readonly notFound: 'No ADRs found'; } >; diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index 261dd994fb..5c8d244d26 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -219,7 +219,7 @@ export const EntityAdrContent = (props: { return ( - + {appSupportConfigured && } @@ -230,7 +230,7 @@ export const EntityAdrContent = (props: { {loading && } {entityHasAdrs && !loading && error && ( - + )} {entityHasAdrs && @@ -257,7 +257,7 @@ export const EntityAdrContent = (props: { ) : ( - {t('no_adrs')} + {t('notFound')} ))} ); diff --git a/plugins/adr/src/translations.ts b/plugins/adr/src/translations.ts index cc0995f597..038b0fd064 100644 --- a/plugins/adr/src/translations.ts +++ b/plugins/adr/src/translations.ts @@ -19,8 +19,8 @@ import { createTranslationRef } from '@backstage/core-plugin-api/alpha'; export const adrTranslationRef = createTranslationRef({ id: 'adr', messages: { - content_header_title: 'Architecture Decision Records', - failed_to_fetch: 'Failed to fetch ADRs', - no_adrs: 'No ADRs found', + contentHeaderTitle: 'Architecture Decision Records', + failedToFetch: 'Failed to fetch ADRs', + notFound: 'No ADRs found', }, }); diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index 1f724d10fc..8dfc29f87f 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -62,11 +62,11 @@ export function BaseCatalogPage(props: BaseCatalogPageProps) { const { t } = useTranslationRef(catalogTranslationRef); return ( - + All your software catalog entities diff --git a/plugins/catalog/src/translation.ts b/plugins/catalog/src/translation.ts index 2d1e3f2c8a..bd27069fde 100644 --- a/plugins/catalog/src/translation.ts +++ b/plugins/catalog/src/translation.ts @@ -20,7 +20,9 @@ import { createTranslationRef } from '@backstage/core-plugin-api/alpha'; export const catalogTranslationRef = createTranslationRef({ id: 'catalog', messages: { - catalog_page_title: `{{orgName}} Catalog`, - catalog_page_create_button_title: 'Create', + indexPage: { + title: `{{orgName}} Catalog`, + createButtonTitle: 'Create', + }, }, }); diff --git a/plugins/user-settings/alpha-api-report.md b/plugins/user-settings/alpha-api-report.md index f375eadbee..adb609a2cb 100644 --- a/plugins/user-settings/alpha-api-report.md +++ b/plugins/user-settings/alpha-api-report.md @@ -20,16 +20,16 @@ export default _default; export const userSettingsTranslationRef: TranslationRef< 'user-settings', { - readonly language: 'Language'; - readonly change_the_language: 'Change the language'; - readonly theme: 'Theme'; - readonly theme_light: 'Light'; - readonly theme_dark: 'Dark'; - readonly theme_auto: 'Auto'; - readonly change_the_theme_mode: 'Change the theme mode'; - readonly select_theme: 'Select {{theme}}'; - readonly select_theme_auto: 'Select Auto Theme'; - readonly select_lng: 'Select language {{language}}'; + readonly 'languageToggle.select': 'Select language {{language}}'; + readonly 'languageToggle.title': 'Language'; + readonly 'languageToggle.description': 'Change the language'; + readonly 'themeToggle.select': 'Select theme {{theme}}'; + readonly 'themeToggle.title': 'Theme'; + readonly 'themeToggle.description': 'Change the theme mode'; + readonly 'themeToggle.names.auto': 'Auto'; + readonly 'themeToggle.names.dark': 'Dark'; + readonly 'themeToggle.names.light': 'Light'; + readonly 'themeToggle.selectAuto': 'Select Auto Theme'; } >; diff --git a/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx index 56756b2248..67519d24ae 100644 --- a/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx @@ -118,8 +118,8 @@ export const UserSettingsLanguageToggle = () => { > { return ( <>{language} diff --git a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx index ca57de3a78..37d91ecae0 100644 --- a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx @@ -130,8 +130,8 @@ export const UserSettingsThemeToggle = () => { > { const themeTitle = theme.title || (themeId === 'light' || themeId === 'dark' - ? t(`theme_${themeId}`) + ? t(`themeToggle.names.${themeId}`) : themeId); return ( <> @@ -165,9 +165,9 @@ export const UserSettingsThemeToggle = () => { ); })} - + - {t('theme_auto')}  + {t('themeToggle.names.auto')}  diff --git a/plugins/user-settings/src/translation.ts b/plugins/user-settings/src/translation.ts index 42fd8311e2..411ca1af51 100644 --- a/plugins/user-settings/src/translation.ts +++ b/plugins/user-settings/src/translation.ts @@ -20,15 +20,21 @@ import { createTranslationRef } from '@backstage/core-plugin-api/alpha'; export const userSettingsTranslationRef = createTranslationRef({ id: 'user-settings', messages: { - language: 'Language', - change_the_language: 'Change the language', - theme: 'Theme', - theme_light: 'Light', - theme_dark: 'Dark', - theme_auto: 'Auto', - change_the_theme_mode: 'Change the theme mode', - select_theme: 'Select {{theme}}', - select_theme_auto: 'Select Auto Theme', - select_lng: 'Select language {{language}}', + languageToggle: { + title: 'Language', + description: 'Change the language', + select: 'Select language {{language}}', + }, + themeToggle: { + title: 'Theme', + description: 'Change the theme mode', + select: 'Select theme {{theme}}', + selectAuto: 'Select Auto Theme', + names: { + light: 'Light', + dark: 'Dark', + auto: 'Auto', + }, + }, }, });