diff --git a/.changeset/slimy-cups-shake.md b/.changeset/slimy-cups-shake.md new file mode 100644 index 0000000000..164b741499 --- /dev/null +++ b/.changeset/slimy-cups-shake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-import': patch +--- + +Catalog import plugin full support i18n diff --git a/plugins/catalog-import/report-alpha.api.md b/plugins/catalog-import/report-alpha.api.md index d4dab4549a..229c2ff10c 100644 --- a/plugins/catalog-import/report-alpha.api.md +++ b/plugins/catalog-import/report-alpha.api.md @@ -26,6 +26,8 @@ export const catalogImportTranslationRef: TranslationRef< readonly 'importInfoCard.fileLinkTitle': 'Link to an existing entity file'; readonly 'importInfoCard.examplePrefix': 'Example: '; readonly 'importInfoCard.fileLinkDescription': 'The wizard analyzes the file, previews the entities, and adds them to the {{appTitle}} catalog.'; + readonly 'importInfoCard.exampleDescription': 'The wizard discovers all {{catalogFilename}} files in the repository, previews the entities, and adds them to the {{appTitle}} catalog.'; + readonly 'importInfoCard.preparePullRequestDescription': 'If no entities are found, the wizard will prepare a Pull Request that adds an example {{catalogFilename}} and prepares the {{appTitle}} catalog to load all entities as soon as the Pull Request is merged.'; readonly 'importInfoCard.githubIntegration.label': 'GitHub only'; readonly 'importInfoCard.githubIntegration.title': 'Link to a repository'; readonly 'importStepper.finish.title': 'Finish'; @@ -65,6 +67,7 @@ export const catalogImportTranslationRef: TranslationRef< readonly 'stepInitAnalyzeUrl.error.locations': 'There are no entities at this location'; readonly 'stepInitAnalyzeUrl.urlHelperText': 'Enter the full path to your entity file to start tracking your component'; readonly 'stepInitAnalyzeUrl.nextButtonText': 'Analyze'; + readonly 'stepPrepareCreatePullRequest.description': 'You entered a link to a {{integrationType}} repository but a {{catalogFilename}} could not be found. Use this form to open a Pull Request that creates one.'; readonly 'stepPrepareCreatePullRequest.nextButtonText': 'Create PR'; readonly 'stepPrepareCreatePullRequest.previewPr.title': 'Preview Pull Request'; readonly 'stepPrepareCreatePullRequest.previewPr.subheader': 'Create a new Pull Request'; diff --git a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx index 1777c0786b..f9103a00cf 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx +++ b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx @@ -92,16 +92,17 @@ export const ImportInfoCard = (props: ImportInfoCardProps) => { {exampleRepositoryUrl} - The wizard discovers all {catalogFilename} files in the - repository, previews the entities, and adds them to the {appTitle}{' '} - catalog. + {t('importInfoCard.exampleDescription', { + catalogFilename: {catalogFilename}, + appTitle, + })} {catalogImportApi.preparePullRequest && ( - If no entities are found, the wizard will prepare a Pull Request - that adds an example {catalogFilename} and prepares - the {appTitle} catalog to load all entities as soon as the Pull - Request is merged. + {t('importInfoCard.preparePullRequestDescription', { + catalogFilename: {catalogFilename}, + appTitle, + })} )} diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx index a40f4868e9..e42de5257e 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx @@ -227,9 +227,10 @@ export const StepPrepareCreatePullRequest = ( return ( <> - You entered a link to a {analyzeResult.integrationType} repository but a{' '} - {catalogFilename} could not be found. Use this form to open - a Pull Request that creates one. + {t('stepPrepareCreatePullRequest.description', { + integrationType: analyzeResult.integrationType, + catalogFilename: {catalogFilename}, + })} {!prDefaultsLoading && ( diff --git a/plugins/catalog-import/src/translation.ts b/plugins/catalog-import/src/translation.ts index 857b551d9c..6fcb33f11c 100644 --- a/plugins/catalog-import/src/translation.ts +++ b/plugins/catalog-import/src/translation.ts @@ -42,6 +42,10 @@ export const catalogImportTranslationRef = createTranslationRef({ title: 'Link to a repository', label: 'GitHub only', }, + exampleDescription: + 'The wizard discovers all {{catalogFilename}} files in the repository, previews the entities, and adds them to the {{appTitle}} catalog.', + preparePullRequestDescription: + 'If no entities are found, the wizard will prepare a Pull Request that adds an example {{catalogFilename}} and prepares the {{appTitle}} catalog to load all entities as soon as the Pull Request is merged.', }, importStepper: { singleLocation: { @@ -114,6 +118,8 @@ export const catalogImportTranslationRef = createTranslationRef({ nextButtonText: 'Analyze', }, stepPrepareCreatePullRequest: { + description: + 'You entered a link to a {{integrationType}} repository but a {{catalogFilename}} could not be found. Use this form to open a Pull Request that creates one.', previewPr: { title: 'Preview Pull Request', subheader: 'Create a new Pull Request',