diff options
author | Jeremy Davis <jeremy.davis@sonarsource.com> | 2024-11-05 18:07:01 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-13 20:05:48 +0000 |
commit | 29168ab9565bcc29a752a58efb3c09848f7b2b03 (patch) | |
tree | 9c1435e35e724a829fb5a5856ba4049d5e3d1887 /server/sonar-web/src/main/js/apps/quality-profiles/components | |
parent | b2a3c8a65a92fdac25042a05cd37c43fa18c67c3 (diff) | |
download | sonarqube-29168ab9565bcc29a752a58efb3c09848f7b2b03.tar.gz sonarqube-29168ab9565bcc29a752a58efb3c09848f7b2b03.zip |
SONAR-23596 New branding
SONAR-23597 SONAR-23598 SONAR-23595
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/components')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx index f8c72d29f8d..a47c1873b6c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx @@ -20,9 +20,10 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { useIntl } from 'react-intl'; import { Outlet, useSearchParams } from 'react-router-dom'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; -import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import ProfileHeader from '../details/ProfileHeader'; import { useQualityProfilesContext } from '../qualityProfilesContext'; import ProfileNotFound from './ProfileNotFound'; @@ -36,6 +37,8 @@ export default function ProfileContainer() { const context = useQualityProfilesContext(); const { profiles } = context; + const intl = useIntl(); + // try to find a quality profile with the given key // if managed to find one, redirect to a new version // otherwise show not found page @@ -63,9 +66,9 @@ export default function ProfileContainer() { <Helmet defer={false} title={profile.name} - titleTemplate={translateWithParameters( - 'page_title.template.with_category', - translate('quality_profiles.page'), + titleTemplate={intl.formatMessage( + { id: 'page_title.template.with_category' }, + { page: translate('quality_profiles.page') }, )} /> <ProfileHeader |