diff --git a/frontend/packages/console-app/locales/en/console-app.json b/frontend/packages/console-app/locales/en/console-app.json index fdcf1879ce2..36896127a60 100644 --- a/frontend/packages/console-app/locales/en/console-app.json +++ b/frontend/packages/console-app/locales/en/console-app.json @@ -249,6 +249,9 @@ "Insufficient permissions": "Insufficient permissions", "You do not have sufficient permissions to read any cluster configuration.": "You do not have sufficient permissions to read any cluster configuration.", "{{section}} not found": "{{section}} not found", + "Failed": "Failed", + "Loaded": "Loaded", + "Pending": "Pending", "Disabled": "Disabled", "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "This plugin might have violated the Console Content Security Policy. Refer to the browser's console logs for details.", "Yes": "Yes", @@ -256,6 +259,7 @@ "Name": "Name", "CSP violations": "CSP violations", "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.": "Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.", + "Create {{label}}": "Create {{label}}", "Console plugins": "Console plugins", "Customize": "Customize", "console-extensions.json": "console-extensions.json", @@ -482,7 +486,6 @@ "Create": "Create", "Create by completing the form.": "Create by completing the form.", "Create by manually entering YAML or JSON definitions, or by dragging and dropping a file into the editor.": "Create by manually entering YAML or JSON definitions, or by dragging and dropping a file into the editor.", - "Create {{label}}": "Create {{label}}", "Edit {{label}}": "Edit {{label}}", "{helpText}": "{helpText}", "Availability": "Availability", @@ -495,7 +498,6 @@ "Configure quick starts to help users get started with the cluster.": "Configure quick starts to help users get started with the cluster.", "Ask a cluster administrator to configure quick starts.": "Ask a cluster administrator to configure quick starts.", "Configure quick starts": "Configure quick starts", - "Create {{kind}}": "Create {{kind}}", "Learn more about quick starts": "Learn more about quick starts", "No results found": "No results found", "No results match the filter criteria. Remove filters or clear all filters to show results.": "No results match the filter criteria. Remove filters or clear all filters to show results.", @@ -582,10 +584,11 @@ "Source": "Source", "VolumeSnapshotContent": "VolumeSnapshotContent", "Snapshot content": "Snapshot content", - "Pending": "Pending", "Error": "Error", "Recommended": "Recommended", "Container name": "Container name", "VerticalPodAutoscalers": "VerticalPodAutoscalers", - "No VerticalPodAutoscalers": "No VerticalPodAutoscalers" + "No VerticalPodAutoscalers": "No VerticalPodAutoscalers", + "ConsoleQuickStart": "ConsoleQuickStart", + "ConsoleQuickStarts": "ConsoleQuickStarts" } \ No newline at end of file diff --git a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx index 3d133a772ad..7cfffc3e20f 100644 --- a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx +++ b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx @@ -90,13 +90,31 @@ export const useConsoleOperatorConfigData = () => { export const ConsolePluginStatus: React.FC = ({ status, errorMessage, -}) => ; +}) => { + const { t } = useTranslation('console-app'); + + const pluginStatusTitles = React.useMemo>( + () => ({ + failed: t('Failed'), + loaded: t('Loaded'), + pending: t('Pending'), + }), + [t], + ); + + return ( + + ); +}; export const ConsolePluginEnabledStatus: React.FC = ({ pluginName, enabled, }) => { - const { t } = useTranslation(); + const { t } = useTranslation('console-app'); const { consoleOperatorConfig, @@ -104,7 +122,7 @@ export const ConsolePluginEnabledStatus: React.FC @@ -136,27 +154,27 @@ export const ConsolePluginEnabledStatus: React.FC = ({ hasViolations, }) => { - const { t } = useTranslation(); + const { t } = useTranslation('console-app'); return hasViolations ? ( <> {' '} - {t('console-app~Yes')} + {t('Yes')} ) : ( <> - {t('console-app~No')} + {t('No')} ); }; const ConsolePluginsTable: React.FC = ({ obj, rows }) => { - const { t } = useTranslation(); + const { t } = useTranslation('console-app'); const [sortBy, setSortBy] = React.useState(() => ({ index: 0, @@ -171,30 +189,30 @@ const ConsolePluginsTable: React.FC = ({ obj, rows }) () => [ { id: 'name', - name: t('console-app~Name'), + name: t('Name'), sortable: true, }, { id: 'version', - name: t('console-app~Version'), + name: t('Version'), }, { id: 'description', - name: t('console-app~Description'), + name: t('Description'), }, { id: 'status', - name: t('console-app~Status'), + name: t('Status'), sortable: true, }, { id: 'enabled', - name: t('console-app~Enabled'), + name: t('Enabled'), sortable: true, }, { id: 'csp-violations', - name: t('console-app~CSP violations'), + name: t('CSP violations'), }, ], [t], @@ -227,7 +245,7 @@ const ConsolePluginsTable: React.FC = ({ obj, rows }) variant="info" isInline title={t( - 'console-app~Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.', + 'Console operator spec.managementState is unmanaged. Changes to plugins will have no effect.', )} /> )} @@ -235,7 +253,7 @@ const ConsolePluginsTable: React.FC = ({ obj, rows })
@@ -287,7 +305,7 @@ const ConsolePluginsTable: React.FC = ({ obj, rows }) ) : ( - + )} ); diff --git a/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx b/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx index c1bdcae5a74..d8f684d0c4a 100644 --- a/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx +++ b/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx @@ -58,7 +58,7 @@ export const QuickStartEmptyState = () => { variant="link" component={LinkTo(`/k8s/cluster/${getReferenceForModel(QuickStartModel)}/~new`)} > - {t('Create {{kind}}', { kind: QuickStartModel.kind })} + {t('Create {{label}}', { label: t(QuickStartModel.labelKey) })} = ({ return } />; case 'Pending': + case 'pending': return } />; case 'Planning': @@ -88,6 +89,7 @@ const Status: React.FC = ({ case 'ErrImagePull': case 'Error': case 'Failed': + case 'failed': case 'Failure': case 'ImagePullBackOff': case 'InstallCheckFailed': @@ -107,6 +109,7 @@ const Status: React.FC = ({ case 'Ready': case 'Up to date': case 'Loaded': + case 'loaded': case 'Provisioned as node': case 'Preferred': case 'Connected': diff --git a/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts b/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts index 22f4677488f..01acac06e51 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/demo-dynamic-plugin.cy.ts @@ -54,7 +54,7 @@ const enableDemoPlugin = (enable: boolean) => { }); cy.log(`Running plugin test on ci using PLUGIN_PULL_SPEC: ${PLUGIN_PULL_SPEC}`); cy.byTestID(`${PLUGIN_NAME}-status`) - .should('include.text', enable ? 'loaded' : '-') + .should('include.text', enable ? 'Loaded' : '-') .then(() => { if (!enable) { cy.byLegacyTestID(PLUGIN_NAME).click();