diff --git a/frontend/packages/integration-tests-cypress/tests/i18n/pseudolocalization.spec.ts b/frontend/packages/integration-tests-cypress/tests/i18n/pseudolocalization.spec.ts index 03cbdb80686..22fc5e67fe1 100644 --- a/frontend/packages/integration-tests-cypress/tests/i18n/pseudolocalization.spec.ts +++ b/frontend/packages/integration-tests-cypress/tests/i18n/pseudolocalization.spec.ts @@ -21,13 +21,9 @@ describe('Localization', () => { cy.visit('/dashboards?pseudolocalization=true&lng=en'); masthead.clickMastheadLink('help-dropdown-toggle'); // wait for both console help menu items and additionalHelpActions items to load - // additionalHelpActions come from ConsoleLinks 'HelpMenu' yaml and are not translated - // only test console help items which are translated - cy.get('.pf-c-app-launcher__group') - .first() - .within(() => { - cy.get('[role="menuitem"]').isPseudoLocalized(); - }); + cy.get('.pf-c-app-launcher__group').should('have.length', 2); + // Test that all links are translated + cy.get('.pf-c-app-launcher__group [role="menuitem"]').isPseudoLocalized(); }); it('pseudolocalizes navigation', () => { diff --git a/frontend/public/components/masthead-toolbar.jsx b/frontend/public/components/masthead-toolbar.jsx index 878a8892bce..2c3f1d45f44 100644 --- a/frontend/public/components/masthead-toolbar.jsx +++ b/frontend/public/components/masthead-toolbar.jsx @@ -40,6 +40,21 @@ import { ConsoleLinkModel } from '../models'; import { languagePreferencesModal } from './modals'; import { withTelemetry, withQuickStartContext } from '@console/shared/src/hoc'; +const defaultHelpLinks = [ + { + // t('public~Learning Portal') + label: 'Learning Portal', + externalLink: true, + href: 'https://learn.openshift.com/?ref=webconsole', + }, + { + // t('public~OpenShift Blog') + label: 'OpenShift Blog', + externalLink: true, + href: 'https://blog.openshift.com', + }, +]; + const SystemStatusButton = ({ statuspageData, className }) => { const { t } = useTranslation(); return !_.isEmpty(_.get(statuspageData, 'incidents')) ? ( @@ -378,6 +393,14 @@ class MastheadToolbarContents_ extends React.Component { ], }); + // Add default help links to start of additional links from operator + additionalHelpActions.actions = defaultHelpLinks + .map((helpLink) => ({ + ...helpLink, + label: t(`public~${helpLink.label}`), + })) + .concat(additionalHelpActions.actions); + if (!_.isEmpty(additionalHelpActions.actions)) { helpActions.push(additionalHelpActions); } diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index d93419e0ae5..5ccd9c8666c 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -658,6 +658,8 @@ "Instance type": "Instance type", "Machine addresses": "Machine addresses", "by machine or node name": "by machine or node name", + "Learning Portal": "Learning Portal", + "OpenShift Blog": "OpenShift Blog", "System status": "System status", "Red Hat applications": "Red Hat applications", "Quick Starts": "Quick Starts",