Merge pull request #30145 from mario-mui/feat/add-some-catalog-import-i18n

Catalog import plugin full support i18n
This commit is contained in:
Fredrik Adelöw
2025-06-04 15:37:05 +02:00
committed by GitHub
5 changed files with 26 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
Catalog import plugin full support i18n
@@ -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';
@@ -92,16 +92,17 @@ export const ImportInfoCard = (props: ImportInfoCardProps) => {
<code>{exampleRepositoryUrl}</code>
</Typography>
<Typography variant="body2" paragraph>
The wizard discovers all <code>{catalogFilename}</code> files in the
repository, previews the entities, and adds them to the {appTitle}{' '}
catalog.
{t('importInfoCard.exampleDescription', {
catalogFilename: <code>{catalogFilename}</code>,
appTitle,
})}
</Typography>
{catalogImportApi.preparePullRequest && (
<Typography variant="body2" paragraph>
If no entities are found, the wizard will prepare a Pull Request
that adds an example <code>{catalogFilename}</code> and prepares
the {appTitle} catalog to load all entities as soon as the Pull
Request is merged.
{t('importInfoCard.preparePullRequestDescription', {
catalogFilename: <code>{catalogFilename}</code>,
appTitle,
})}
</Typography>
)}
</>
@@ -227,9 +227,10 @@ export const StepPrepareCreatePullRequest = (
return (
<>
<Typography>
You entered a link to a {analyzeResult.integrationType} repository but a{' '}
<code>{catalogFilename}</code> could not be found. Use this form to open
a Pull Request that creates one.
{t('stepPrepareCreatePullRequest.description', {
integrationType: analyzeResult.integrationType,
catalogFilename: <code>{catalogFilename}</code>,
})}
</Typography>
{!prDefaultsLoading && (
@@ -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',