diff --git a/workspaces/quickstart/.changeset/i18n-quickstart-snackbar.md b/workspaces/quickstart/.changeset/i18n-quickstart-snackbar.md new file mode 100644 index 0000000000..6ed86b7ab1 --- /dev/null +++ b/workspaces/quickstart/.changeset/i18n-quickstart-snackbar.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-quickstart': patch +--- + +Localize the Quickstart help snackbar message. diff --git a/workspaces/quickstart/plugins/quickstart/report-alpha.api.md b/workspaces/quickstart/plugins/quickstart/report-alpha.api.md index c15e388b55..4b0d85125f 100644 --- a/workspaces/quickstart/plugins/quickstart/report-alpha.api.md +++ b/workspaces/quickstart/plugins/quickstart/report-alpha.api.md @@ -48,6 +48,7 @@ export const quickstartTranslationRef: TranslationRef< readonly 'steps.findAllLearningPaths.title': string; readonly 'steps.findAllLearningPaths.description': string; readonly 'steps.findAllLearningPaths.ctaTitle': string; + readonly 'snackbar.helpPrompt': string; readonly 'dev.pageTitle': string; readonly 'dev.pageDescription': string; readonly 'dev.drawerControls': string; diff --git a/workspaces/quickstart/plugins/quickstart/report.api.md b/workspaces/quickstart/plugins/quickstart/report.api.md index e6dd663e67..7968243492 100644 --- a/workspaces/quickstart/plugins/quickstart/report.api.md +++ b/workspaces/quickstart/plugins/quickstart/report.api.md @@ -130,6 +130,7 @@ export const quickstartTranslationRef: TranslationRef< readonly 'steps.findAllLearningPaths.title': string; readonly 'steps.findAllLearningPaths.description': string; readonly 'steps.findAllLearningPaths.ctaTitle': string; + readonly 'snackbar.helpPrompt': string; readonly 'dev.pageTitle': string; readonly 'dev.pageDescription': string; readonly 'dev.drawerControls': string; diff --git a/workspaces/quickstart/plugins/quickstart/src/components/QuickstartDrawerProvider.tsx b/workspaces/quickstart/plugins/quickstart/src/components/QuickstartDrawerProvider.tsx index 842f1edb34..5f23ce4549 100644 --- a/workspaces/quickstart/plugins/quickstart/src/components/QuickstartDrawerProvider.tsx +++ b/workspaces/quickstart/plugins/quickstart/src/components/QuickstartDrawerProvider.tsx @@ -27,6 +27,7 @@ import { QuickstartDrawerContext } from './QuickstartDrawerContext'; import { QuickstartItemData } from '../types'; import { filterQuickstartItemsByRole } from '../utils'; import { useQuickstartRole } from '../hooks/useQuickstartRole'; +import { useTranslation } from '../hooks/useTranslation'; /** * Provider component for the Quickstart Drawer functionality @@ -40,6 +41,7 @@ export const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => { const [userKey, setUserKey] = useState('guest'); const identityApi = useApi(identityApiRef); const configApi = useApi(configApiRef); + const { t } = useTranslation(); // Determine role once at provider level to avoid re-fetching on drawer open/close const { isLoading: roleLoading, userRole } = useQuickstartRole(); @@ -187,7 +189,7 @@ export const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => { autoHideDuration={10000} onClose={handleNotificationClose} anchorOrigin={{ vertical: 'top', horizontal: 'right' }} - message="Need help? Visit the Quick Start Guide by clicking on this (?) icon in the header!" + message={t('snackbar.helpPrompt')} action={