Skip to content

Commit 14d6bcb

Browse files
fix(quickstart): localize help snackbar (#2701)
Made-with: Cursor
1 parent f391dc4 commit 14d6bcb

File tree

10 files changed

+24
-1
lines changed

10 files changed

+24
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-quickstart': patch
3+
---
4+
5+
Localize the Quickstart help snackbar message.

workspaces/quickstart/plugins/quickstart/report-alpha.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const quickstartTranslationRef: TranslationRef<
4848
readonly 'steps.findAllLearningPaths.title': string;
4949
readonly 'steps.findAllLearningPaths.description': string;
5050
readonly 'steps.findAllLearningPaths.ctaTitle': string;
51+
readonly 'snackbar.helpPrompt': string;
5152
readonly 'dev.pageTitle': string;
5253
readonly 'dev.pageDescription': string;
5354
readonly 'dev.drawerControls': string;

workspaces/quickstart/plugins/quickstart/report.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export const quickstartTranslationRef: TranslationRef<
130130
readonly 'steps.findAllLearningPaths.title': string;
131131
readonly 'steps.findAllLearningPaths.description': string;
132132
readonly 'steps.findAllLearningPaths.ctaTitle': string;
133+
readonly 'snackbar.helpPrompt': string;
133134
readonly 'dev.pageTitle': string;
134135
readonly 'dev.pageDescription': string;
135136
readonly 'dev.drawerControls': string;

workspaces/quickstart/plugins/quickstart/src/components/QuickstartDrawerProvider.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { QuickstartDrawerContext } from './QuickstartDrawerContext';
2727
import { QuickstartItemData } from '../types';
2828
import { filterQuickstartItemsByRole } from '../utils';
2929
import { useQuickstartRole } from '../hooks/useQuickstartRole';
30+
import { useTranslation } from '../hooks/useTranslation';
3031

3132
/**
3233
* Provider component for the Quickstart Drawer functionality
@@ -40,6 +41,7 @@ export const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => {
4041
const [userKey, setUserKey] = useState<string>('guest');
4142
const identityApi = useApi(identityApiRef);
4243
const configApi = useApi(configApiRef);
44+
const { t } = useTranslation();
4345

4446
// Determine role once at provider level to avoid re-fetching on drawer open/close
4547
const { isLoading: roleLoading, userRole } = useQuickstartRole();
@@ -187,7 +189,7 @@ export const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => {
187189
autoHideDuration={10000}
188190
onClose={handleNotificationClose}
189191
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
190-
message="Need help? Visit the Quick Start Guide by clicking on this (?) icon in the header!"
192+
message={t('snackbar.helpPrompt')}
191193
action={
192194
<IconButton
193195
size="small"

workspaces/quickstart/plugins/quickstart/src/translations/de.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const quickstartTranslationDe = createTranslationMessages({
6363
'button.openQuickstartGuide': 'Schnellstartanleitung öffnen',
6464
'button.closeDrawer': 'Drawer schließen',
6565
'button.gotIt': 'Verstanden!',
66+
'snackbar.helpPrompt':
67+
'Brauchen Sie Hilfe? Öffnen Sie die Schnellstartanleitung, indem Sie auf das (?) Symbol in der Kopfzeile klicken!',
6668
'footer.progress': '{{progress}} % Fortschritt',
6769
'footer.notStarted': 'Nicht gestartet',
6870
'footer.hide': 'Ausblenden',

workspaces/quickstart/plugins/quickstart/src/translations/es.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const quickstartTranslationEs = createTranslationMessages({
6363
'button.openQuickstartGuide': 'Abrir la Guía de inicio rápido',
6464
'button.closeDrawer': 'Cerrar panel',
6565
'button.gotIt': '¡Entendido!',
66+
'snackbar.helpPrompt':
67+
'¿Necesita ayuda? Visite la Guía de inicio rápido haciendo clic en el icono (?) del encabezado.',
6668
'footer.progress': 'Progreso del {{progress}} %',
6769
'footer.notStarted': 'No iniciado',
6870
'footer.hide': 'Ocultar',

workspaces/quickstart/plugins/quickstart/src/translations/fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const quickstartTranslationFr = createTranslationMessages({
6363
'button.openQuickstartGuide': 'Ouvrir le guide de démarrage rapide',
6464
'button.closeDrawer': 'Fermer le tiroir',
6565
'button.gotIt': "J'ai compris!",
66+
'snackbar.helpPrompt':
67+
'Besoin d’aide ? Consultez le guide de démarrage rapide en cliquant sur l’icône (?) dans l’en-tête !',
6668
'footer.progress': '{{progress}}% de progrès',
6769
'footer.notStarted': 'Non démarré',
6870
'footer.hide': 'Cacher',

workspaces/quickstart/plugins/quickstart/src/translations/it.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const quickstartTranslationIt = createTranslationMessages({
6565
'button.openQuickstartGuide': "Apri la Guida all'avvio rapido",
6666
'button.closeDrawer': 'Chiudi riquadro',
6767
'button.gotIt': 'Ho capito!',
68+
'snackbar.helpPrompt':
69+
"Hai bisogno di aiuto? Apri la Guida all'avvio rapido facendo clic sull'icona (?) nell'intestazione.",
6870
'footer.progress': '{{progress}}% di avanzamento',
6971
'footer.notStarted': 'Non iniziato',
7072
'footer.hide': 'Nascondi',

workspaces/quickstart/plugins/quickstart/src/translations/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const quickstartTranslationJa = createTranslationMessages({
6363
'button.openQuickstartGuide': 'クイックスタートガイドを開く',
6464
'button.closeDrawer': 'ドロワーを閉じる',
6565
'button.gotIt': '了解しました!',
66+
'snackbar.helpPrompt':
67+
'ヘルプが必要ですか? ヘッダーの (?) アイコンをクリックしてクイックスタートガイドを開いてください。',
6668
'footer.progress': '進捗 {{progress}}%',
6769
'footer.notStarted': '開始されていません',
6870
'footer.hide': '非表示',

workspaces/quickstart/plugins/quickstart/src/translations/ref.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export const quickstartMessages = {
8282
closeDrawer: 'Close Drawer',
8383
gotIt: 'Got it!',
8484
},
85+
snackbar: {
86+
helpPrompt:
87+
'Need help? Visit the Quick Start Guide by clicking on this (?) icon in the header!',
88+
},
8589
footer: {
8690
progress: '{{progress}}% progress',
8791
notStarted: 'Not started',

0 commit comments

Comments
 (0)