]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18768 align the format of all page titles
authorstanislavh <stanislav.honcharov@sonarsource.com>
Thu, 23 Mar 2023 10:36:04 +0000 (11:36 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 23 Mar 2023 20:02:57 +0000 (20:02 +0000)
25 files changed:
server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
server/sonar-web/src/main/js/app/components/FormattingHelp.tsx
server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx
server/sonar-web/src/main/js/app/components/ResetPassword.tsx
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/FormattingHelp-test.tsx.snap
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/PluginRiskConsent-test.tsx.snap
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/ResetPassword-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/Header.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/Header-test.tsx.snap
server/sonar-web/src/main/js/apps/account/Account.tsx
server/sonar-web/src/main/js/apps/account/profile/Profile.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap
server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx
server/sonar-web/src/main/js/apps/overview/components/App.tsx
server/sonar-web/src/main/js/apps/projectBaseline/components/ProjectBaselineApp.tsx
server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/ProjectBaselineApp-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBranches/components/ProjectBranchesApp.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/ProjectBranchesApp-test.tsx.snap
server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx
server/sonar-web/src/main/js/apps/projectDump/__tests__/__snapshots__/ProjectDumpApp-test.tsx.snap
server/sonar-web/src/main/js/apps/sessions/components/Login.tsx
server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx
server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index acaab01d1d5dc6e2f622c444167958a08d655d2b..bddd03d7ae909c8b7541bc36171064bd5745572c 100644 (file)
@@ -19,6 +19,7 @@
  */
 import { differenceBy } from 'lodash';
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { Outlet } from 'react-router-dom';
 import { getProjectAlmBinding, validateProjectAlmBinding } from '../../api/alm-settings';
 import { getBranches, getPullRequests } from '../../api/branches';
@@ -32,6 +33,7 @@ import {
   isMainBranch,
   isPullRequest,
 } from '../../helpers/branch-like';
+import { translateWithParameters } from '../../helpers/l10n';
 import { HttpStatus } from '../../helpers/request';
 import { getPortfolioUrl } from '../../helpers/urls';
 import {
@@ -435,6 +437,13 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
 
     return (
       <div>
+        <Helmet
+          defer={false}
+          titleTemplate={translateWithParameters(
+            'page_title.template.with_instance',
+            component?.name ?? ''
+          )}
+        />
         {component &&
           !([ComponentQualifier.File, ComponentQualifier.TestFile] as string[]).includes(
             component.qualifier
index a9fce3615a66f22b1e86b9c3a51bf5891365d5fa..c0b76ebc373c35296ecb0eb1dcaf77fe33338d9e 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
+import { translate } from '../../helpers/l10n';
 
 export default function FormattingHelp() {
   return (
     <div className="page page-limited">
+      <Helmet defer={false} title={translate('formatting.page')} />
       <h2 className="spacer-bottom">Formatting Syntax</h2>
       <table className="width-100 data zebra">
         <thead>
index 8a3f34b42f659f196d72daee1f5f8078f079452e..3b6bb89fc8e77d37f0f046c9a4dd2611a413b054 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { setSimpleSettingValue } from '../../api/settings';
 import { Button } from '../../components/controls/buttons';
 import { whenLoggedIn } from '../../components/hoc/whenLoggedIn';
@@ -67,6 +68,7 @@ export function PluginRiskConsent(props: PluginRiskConsentProps) {
 
   return (
     <div className="plugin-risk-consent-page">
+      <Helmet defer={false} title={translate('plugin_risk_consent.page')} />
       <div className="plugin-risk-consent-content boxed-group">
         <div className="boxed-group-inner text-center">
           <h1 className="big-spacer-bottom">{translate('plugin_risk_consent.title')}</h1>
index 0544ca4b44384bc0a08b4cd47a78452b8915165c..675763704b28dc808dfb3d1ecf6e1a94515ff6f7 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import ResetPasswordForm from '../../components/common/ResetPasswordForm';
 import { whenLoggedIn } from '../../components/hoc/whenLoggedIn';
 import { translate } from '../../helpers/l10n';
@@ -31,6 +32,7 @@ export interface ResetPasswordProps {
 export function ResetPassword({ currentUser }: ResetPasswordProps) {
   return (
     <div className="page-wrapper-simple">
+      <Helmet defer={false} title={translate('my_account.reset_password.page')} />
       <div className="page-simple">
         <h1 className="text-center huge">{translate('my_account.reset_password')}</h1>
         <p className="text-center huge-spacer-top huge-spacer-bottom">
index 031748e845ef4f68863deb63920cf3475af8d75d..723d6dc652c7b726a8dcfbe01f5ccc43ab93b166 100644 (file)
@@ -4,6 +4,12 @@ exports[`should render correctly 1`] = `
 <div
   className="page page-limited"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="formatting.page"
+  />
   <h2
     className="spacer-bottom"
   >
index ec59ee3ae601f55d72a1a975bd937a47d62683e7..ca59e6da2434307c81080b52dbcfc7192f366efe 100644 (file)
@@ -4,6 +4,12 @@ exports[`should render correctly: default 1`] = `
 <div
   className="plugin-risk-consent-page"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="plugin_risk_consent.page"
+  />
   <div
     className="plugin-risk-consent-content boxed-group"
   >
index 8a9ce7d4f1b593c11c04ecb24ffbe32982cca094..6c22619eecc7fd3d4621eaeed4d750b1d57c4a8d 100644 (file)
@@ -4,6 +4,12 @@ exports[`should render correctly 1`] = `
 <div
   className="page-wrapper-simple"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="my_account.reset_password.page"
+  />
   <div
     className="page-simple"
   >
index 0e2a745da37ef415f3f9caf05a3408f5dc203b2e..145ae9377dd07940a67e49b46d128d78ecfc3f97 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Helmet } from 'react-helmet-async';
 import Favorite from '../../../../components/controls/Favorite';
 import { ProjectAlmBindingResponse } from '../../../../types/alm-settings';
 import { BranchLike } from '../../../../types/branch-like';
@@ -41,31 +40,28 @@ export function Header(props: HeaderProps) {
   const { branchLikes, component, currentBranchLike, currentUser, projectBinding } = props;
 
   return (
-    <>
-      <Helmet title={component.name} />
-      <div className="display-flex-center flex-shrink">
-        <Breadcrumb component={component} currentBranchLike={currentBranchLike} />
-        {isLoggedIn(currentUser) && (
-          <Favorite
-            className="spacer-left"
-            component={component.key}
-            favorite={Boolean(component.isFavorite)}
-            qualifier={component.qualifier}
+    <div className="display-flex-center flex-shrink">
+      <Breadcrumb component={component} currentBranchLike={currentBranchLike} />
+      {isLoggedIn(currentUser) && (
+        <Favorite
+          className="spacer-left"
+          component={component.key}
+          favorite={Boolean(component.isFavorite)}
+          qualifier={component.qualifier}
+        />
+      )}
+      {currentBranchLike && (
+        <>
+          <BranchLikeNavigation
+            branchLikes={branchLikes}
+            component={component}
+            currentBranchLike={currentBranchLike}
+            projectBinding={projectBinding}
           />
-        )}
-        {currentBranchLike && (
-          <>
-            <BranchLikeNavigation
-              branchLikes={branchLikes}
-              component={component}
-              currentBranchLike={currentBranchLike}
-              projectBinding={projectBinding}
-            />
-            <CurrentBranchLikeMergeInformation currentBranchLike={currentBranchLike} />
-          </>
-        )}
-      </div>
-    </>
+          <CurrentBranchLikeMergeInformation currentBranchLike={currentBranchLike} />
+        </>
+      )}
+    </div>
   );
 }
 
index 635a9b815ff6e099b2e7cfcf4d56a51c4045f20e..bac9e18453ca5908932790106ae1989512a23019 100644 (file)
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<Fragment>
-  <Helmet
-    defer={true}
-    encodeSpecialCharacters={true}
-    prioritizeSeoTags={false}
-    title="MyProject"
-  />
-  <div
-    className="display-flex-center flex-shrink"
-  >
-    <Breadcrumb
-      component={
-        {
-          "breadcrumbs": [],
-          "key": "my-project",
-          "name": "MyProject",
-          "qualifier": "TRK",
-          "qualityGate": {
-            "isDefault": true,
-            "key": "30",
+<div
+  className="display-flex-center flex-shrink"
+>
+  <Breadcrumb
+    component={
+      {
+        "breadcrumbs": [],
+        "key": "my-project",
+        "name": "MyProject",
+        "qualifier": "TRK",
+        "qualityGate": {
+          "isDefault": true,
+          "key": "30",
+          "name": "Sonar way",
+        },
+        "qualityProfiles": [
+          {
+            "deleted": false,
+            "key": "my-qp",
+            "language": "ts",
             "name": "Sonar way",
           },
-          "qualityProfiles": [
-            {
-              "deleted": false,
-              "key": "my-qp",
-              "language": "ts",
-              "name": "Sonar way",
-            },
-          ],
-          "tags": [],
-        }
+        ],
+        "tags": [],
+      }
+    }
+    currentBranchLike={
+      {
+        "analysisDate": "2018-01-01",
+        "excludedFromPurge": true,
+        "isMain": false,
+        "name": "branch-11",
       }
-      currentBranchLike={
+    }
+  />
+  <Favorite
+    className="spacer-left"
+    component="my-project"
+    favorite={false}
+    qualifier="TRK"
+  />
+  <withAvailableFeaturesContext(Component)
+    branchLikes={
+      [
         {
           "analysisDate": "2018-01-01",
           "excludedFromPurge": true,
           "isMain": false,
           "name": "branch-11",
-        }
-      }
-    />
-    <Favorite
-      className="spacer-left"
-      component="my-project"
-      favorite={false}
-      qualifier="TRK"
-    />
-    <withAvailableFeaturesContext(Component)
-      branchLikes={
-        [
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": false,
-            "name": "branch-11",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": false,
-            "name": "branch-1",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": true,
-            "name": "master",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "base": "master",
-            "branch": "feature/foo/bar",
-            "key": "1",
-            "target": "master",
-            "title": "PR-1",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": false,
-            "name": "branch-12",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "base": "master",
-            "branch": "feature/foo/bar",
-            "key": "2",
-            "target": "master",
-            "title": "PR-2",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": false,
-            "name": "branch-3",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "excludedFromPurge": true,
-            "isMain": false,
-            "name": "branch-2",
-          },
-          {
-            "analysisDate": "2018-01-01",
-            "base": "master",
-            "branch": "feature/foo/bar",
-            "isOrphan": true,
-            "key": "2",
-            "target": "llb-100",
-            "title": "PR-2",
-          },
-        ]
-      }
-      component={
+        },
         {
-          "breadcrumbs": [],
-          "key": "my-project",
-          "name": "MyProject",
-          "qualifier": "TRK",
-          "qualityGate": {
-            "isDefault": true,
-            "key": "30",
-            "name": "Sonar way",
-          },
-          "qualityProfiles": [
-            {
-              "deleted": false,
-              "key": "my-qp",
-              "language": "ts",
-              "name": "Sonar way",
-            },
-          ],
-          "tags": [],
-        }
-      }
-      currentBranchLike={
+          "analysisDate": "2018-01-01",
+          "excludedFromPurge": true,
+          "isMain": false,
+          "name": "branch-1",
+        },
+        {
+          "analysisDate": "2018-01-01",
+          "excludedFromPurge": true,
+          "isMain": true,
+          "name": "master",
+        },
+        {
+          "analysisDate": "2018-01-01",
+          "base": "master",
+          "branch": "feature/foo/bar",
+          "key": "1",
+          "target": "master",
+          "title": "PR-1",
+        },
         {
           "analysisDate": "2018-01-01",
           "excludedFromPurge": true,
           "isMain": false,
-          "name": "branch-11",
-        }
-      }
-    />
-    <Memo(CurrentBranchLikeMergeInformation)
-      currentBranchLike={
+          "name": "branch-12",
+        },
+        {
+          "analysisDate": "2018-01-01",
+          "base": "master",
+          "branch": "feature/foo/bar",
+          "key": "2",
+          "target": "master",
+          "title": "PR-2",
+        },
         {
           "analysisDate": "2018-01-01",
           "excludedFromPurge": true,
           "isMain": false,
-          "name": "branch-11",
-        }
+          "name": "branch-3",
+        },
+        {
+          "analysisDate": "2018-01-01",
+          "excludedFromPurge": true,
+          "isMain": false,
+          "name": "branch-2",
+        },
+        {
+          "analysisDate": "2018-01-01",
+          "base": "master",
+          "branch": "feature/foo/bar",
+          "isOrphan": true,
+          "key": "2",
+          "target": "llb-100",
+          "title": "PR-2",
+        },
+      ]
+    }
+    component={
+      {
+        "breadcrumbs": [],
+        "key": "my-project",
+        "name": "MyProject",
+        "qualifier": "TRK",
+        "qualityGate": {
+          "isDefault": true,
+          "key": "30",
+          "name": "Sonar way",
+        },
+        "qualityProfiles": [
+          {
+            "deleted": false,
+            "key": "my-qp",
+            "language": "ts",
+            "name": "Sonar way",
+          },
+        ],
+        "tags": [],
+      }
+    }
+    currentBranchLike={
+      {
+        "analysisDate": "2018-01-01",
+        "excludedFromPurge": true,
+        "isMain": false,
+        "name": "branch-11",
       }
-    />
-  </div>
-</Fragment>
+    }
+  />
+  <Memo(CurrentBranchLikeMergeInformation)
+    currentBranchLike={
+      {
+        "analysisDate": "2018-01-01",
+        "excludedFromPurge": true,
+        "isMain": false,
+        "name": "branch-11",
+      }
+    }
+  />
+</div>
 `;
index 89c44b98f9ad5a2dc63b98aa121d37155db0c827..279a5b6035b620c3dbc70960eafd8f8956867993 100644 (file)
@@ -24,7 +24,7 @@ import withCurrentUserContext from '../../app/components/current-user/withCurren
 import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
 import Suggestions from '../../components/embed-docs-modal/Suggestions';
 import handleRequiredAuthentication from '../../helpers/handleRequiredAuthentication';
-import { translate } from '../../helpers/l10n';
+import { translate, translateWithParameters } from '../../helpers/l10n';
 import { CurrentUser, LoggedInUser } from '../../types/users';
 import './account.css';
 import Nav from './components/Nav';
@@ -52,7 +52,14 @@ export class Account extends React.PureComponent<Props> {
     return (
       <div id="account-page">
         <Suggestions suggestions="account" />
-        <Helmet defaultTitle={title} defer={false} titleTemplate={`%s - ${title}`} />
+        <Helmet
+          defaultTitle={title}
+          defer={false}
+          titleTemplate={translateWithParameters(
+            'page_title.template.with_category',
+            translate('my_account.page')
+          )}
+        />
         <A11ySkipTarget anchor="account_main" />
         <header className="account-header">
           <div className="account-container clearfix">
index 7f5484d0307b051872c6c83ac01d5e4a226f5c71..81ee0edee8be0ec9910d0c89b11217dea1e10ac0 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn';
 import { translate } from '../../../helpers/l10n';
@@ -34,6 +35,7 @@ export function Profile({ currentUser }: ProfileProps) {
 
   return (
     <div className="account-body account-container account-profile">
+      <Helmet defer={false} title={translate('my_account.profile')} />
       <div className="boxed-group">
         {renderLogin()}
         {renderEmail()}
index 430a327776f0b2798ee84573a40d96b9e6a797af..0b37e713584a620796469194bca182e5d94804ac 100644 (file)
@@ -216,6 +216,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
     if (!types) {
       return (
         <div className="page page-limited">
+          <Helmet defer={false} title={translate('background_tasks.page')} />
           <i className="spinner" />
         </div>
       );
index d6a88662327faebdba22524ac084f971b3a800b2..f3363add97f38e49d8b2dfdecf716dce2995d214 100644 (file)
@@ -4,6 +4,12 @@ exports[`should render correctly: initial 1`] = `
 <div
   className="page page-limited"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="background_tasks.page"
+  />
   <i
     className="spinner"
   />
index 42f0341936f1463e4bd66cdb945c2ca2b9c66e45..530ea4ed8ae0373a42c447d69f4e822fcf020b3d 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { SubmitButton } from '../../components/controls/buttons';
 import { Location } from '../../components/hoc/withRouter';
 import { Alert } from '../../components/ui/Alert';
@@ -58,6 +59,7 @@ export default function ChangeAdminPasswordAppRenderer(props: ChangeAdminPasswor
 
   return (
     <div className="page-wrapper-simple">
+      <Helmet defer={false} title={translate('users.change_admin_password.page')} />
       <div className="page-simple">
         {success ? (
           <Alert variant="success">
index ad04df2512f69120bc306f5890fb41ee5d7ca745..73be0c7cc867855814b381e1486c9eb9f32a3a65 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import withAvailableFeatures, {
   WithAvailableFeaturesProps,
 } from '../../../app/components/available-features/withAvailableFeatures';
 import withComponentContext from '../../../app/components/componentContext/withComponentContext';
 import Suggestions from '../../../components/embed-docs-modal/Suggestions';
 import { isPullRequest } from '../../../helpers/branch-like';
+import { translate } from '../../../helpers/l10n';
 import { ProjectAlmBindingResponse } from '../../../types/alm-settings';
 import { BranchLike } from '../../../types/branch-like';
 import { isPortfolioLike } from '../../../types/component';
@@ -50,34 +52,39 @@ export function App(props: AppProps) {
     return null;
   }
 
-  return isPullRequest(branchLike) ? (
-    <main>
-      <Suggestions suggestions="pull_requests" />
-      <PullRequestOverview branchLike={branchLike} component={component} />
-    </main>
-  ) : (
-    <main>
-      <Suggestions suggestions="overview" />
+  return (
+    <>
+      <Helmet defer={false} title={translate('overview.page')} />
+      {isPullRequest(branchLike) ? (
+        <main>
+          <Suggestions suggestions="pull_requests" />
+          <PullRequestOverview branchLike={branchLike} component={component} />
+        </main>
+      ) : (
+        <main>
+          <Suggestions suggestions="overview" />
 
-      {!component.analysisDate && (
-        <EmptyOverview
-          branchLike={branchLike}
-          branchLikes={branchLikes}
-          component={component}
-          hasAnalyses={isPending || isInProgress}
-          projectBinding={projectBinding}
-        />
-      )}
+          {!component.analysisDate && (
+            <EmptyOverview
+              branchLike={branchLike}
+              branchLikes={branchLikes}
+              component={component}
+              hasAnalyses={isPending || isInProgress}
+              projectBinding={projectBinding}
+            />
+          )}
 
-      {component.analysisDate && (
-        <BranchOverview
-          branch={branchLike}
-          branchesEnabled={branchSupportEnabled}
-          component={component}
-          projectBinding={projectBinding}
-        />
+          {component.analysisDate && (
+            <BranchOverview
+              branch={branchLike}
+              branchesEnabled={branchSupportEnabled}
+              component={component}
+              projectBinding={projectBinding}
+            />
+          )}
+        </main>
       )}
-    </main>
+    </>
   );
 }
 
index 025cc21974ef1933547679b9eb5ab2359c2e103f..fa88657aa0e222a56c63be2252cd2b8339fabeb3 100644 (file)
@@ -20,6 +20,7 @@
 import classNames from 'classnames';
 import { debounce } from 'lodash';
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { getNewCodePeriod, resetNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod';
 import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
 import withAvailableFeatures, {
@@ -265,6 +266,7 @@ export class ProjectBaselineApp extends React.PureComponent<Props, State> {
     return (
       <>
         <Suggestions suggestions="project_baseline" />
+        <Helmet defer={false} title={translate('project_baseline.page')} />
         <div className="page page-limited">
           <AppHeader canAdmin={!!appState.canAdmin} />
           {loading ? (
index 847b62f98de68496e5f909f1ceb27dfd5f83cb66..0bdcbfd57a6b3469a1dd977e4041a21367050da2 100644 (file)
@@ -5,6 +5,12 @@ exports[`should render correctly 1`] = `
   <Suggestions
     suggestions="project_baseline"
   />
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="project_baseline.page"
+  />
   <div
     className="page page-limited"
   >
@@ -128,6 +134,12 @@ exports[`should render correctly: without branch support 1`] = `
   <Suggestions
     suggestions="project_baseline"
   />
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="project_baseline.page"
+  />
   <div
     className="page page-limited"
   >
index 28b4fa07404790838c5b1187367bd24beda6b6f7..5af1f9e3ad35a19945b53046bf97b7d2b6e24c93 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import withComponentContext from '../../../app/components/componentContext/withComponentContext';
 import { translate } from '../../../helpers/l10n';
 import { BranchLike } from '../../../types/branch-like';
@@ -37,6 +38,7 @@ export function ProjectBranchesApp(props: ProjectBranchesAppProps) {
   return (
     <div className="page page-limited" id="project-branch-like">
       <header className="page-header">
+        <Helmet defer={false} title={translate('project_branch_pull_request.page')} />
         <h1>{translate('project_branch_pull_request.page')}</h1>
         <LifetimeInformation />
       </header>
index 979a1948c74c4e25c63c67279c194f93d3c1deb2..3d61a39aba61b46686713c78f8b8451aed776e2d 100644 (file)
@@ -8,6 +8,12 @@ exports[`should render correctly 1`] = `
   <header
     className="page-header"
   >
+    <Helmet
+      defer={false}
+      encodeSpecialCharacters={true}
+      prioritizeSeoTags={false}
+      title="project_branch_pull_request.page"
+    />
     <h1>
       project_branch_pull_request.page
     </h1>
index c168c6944ac86eee34d155b2000f6cc4d91f56d4..9e67eeeca00bf9e64f7a4507c75ff091a4f1bbd8 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { getActivity } from '../../api/ce';
 import { getStatus } from '../../api/project-dump';
 import withAvailableFeatures, {
@@ -158,6 +159,7 @@ export class ProjectDumpApp extends React.Component<Props, State> {
 
     return (
       <div className="page page-limited" id="project-dump">
+        <Helmet defer={false} title={translate('project_dump.page')} />
         <header className="page-header">
           <h1 className="page-title">{translate('project_dump.page')}</h1>
           <div className="page-description">
index e176282cfa9415620c661b32d95aed7bf728ce7f..caba04a83e997328ec28fce203145da5376842b1 100644 (file)
@@ -5,6 +5,12 @@ exports[`should render correctly: loaded 1`] = `
   className="page page-limited"
   id="project-dump"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="project_dump.page"
+  />
   <header
     className="page-header"
   >
@@ -74,6 +80,12 @@ exports[`should render correctly: loaded without import 1`] = `
   className="page page-limited"
   id="project-dump"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="project_dump.page"
+  />
   <header
     className="page-header"
   >
@@ -119,6 +131,12 @@ exports[`should render correctly: loading 1`] = `
   className="page page-limited"
   id="project-dump"
 >
+  <Helmet
+    defer={false}
+    encodeSpecialCharacters={true}
+    prioritizeSeoTags={false}
+    title="project_dump.page"
+  />
   <header
     className="page-header"
   >
index 9cdcc6b19aeaf30ac7606d064b3d98924ccc4d1a..abc039a55859effa43c7e816c400052435c02fd8 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import { Location } from '../../../components/hoc/withRouter';
 import { Alert } from '../../../components/ui/Alert';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
@@ -47,7 +48,7 @@ export default function Login(props: LoginProps) {
       <h1 className="login-title text-center big-spacer-bottom">
         {translate('login.login_to_sonarqube')}
       </h1>
-
+      <Helmet defer={false} title={translate('login.page')} />
       {loading ? (
         <DeferredSpinner loading={loading} timeout={0} />
       ) : (
index d45e308b7feb1959c0a03b8f887dadcacc8f48c9..add0793a7233f403400cf461b2bbd1809394ef42 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { Helmet } from 'react-helmet-async';
 import Link from '../../../components/common/Link';
 import { getCookie } from '../../../helpers/cookies';
 import { translate } from '../../../helpers/l10n';
@@ -26,6 +27,7 @@ export default function Unauthorized() {
   const message = decodeURIComponent(getCookie('AUTHENTICATION-ERROR') || '');
   return (
     <div className="page-wrapper-simple" id="bd">
+      <Helmet defer={false} title={translate('unauthorized.page')} />
       <div className="page-simple" id="nonav">
         <div className="text-center">
           <p id="unauthorized">{translate('unauthorized.message')}</p>
index 1e132aaf84088e5702a26296ff8773a060bf7806..1f4fc07da7022a2556ef319ac4c664fef38d2914 100644 (file)
@@ -94,11 +94,13 @@ export function renderComponent(component: React.ReactElement, pathname = '/') {
   function Wrapper({ children }: { children: React.ReactElement }) {
     return (
       <IntlProvider defaultLocale="en" locale="en">
-        <MemoryRouter initialEntries={[pathname]}>
-          <Routes>
-            <Route path="*" element={children} />
-          </Routes>
-        </MemoryRouter>
+        <HelmetProvider>
+          <MemoryRouter initialEntries={[pathname]}>
+            <Routes>
+              <Route path="*" element={children} />
+            </Routes>
+          </MemoryRouter>
+        </HelmetProvider>
       </IntlProvider>
     );
   }
index a72eb17133db200d3803b049f78f3b44c42a1f9b..4ae548850845d8c571cd49507b91e7fb729fa783 100644 (file)
@@ -681,6 +681,7 @@ regulatory_page.select_branch=Select Branch
 
 page_title.template.default=%s - SonarQube
 page_title.template.with_category=%s - {0} - SonarQube
+page_title.template.with_instance={0} - %s - SonarQube
 overview.page=Overview
 code.page=Code
 permissions.page=Permissions
@@ -1690,8 +1691,8 @@ project.info.see_more_info_on_x_locs=See more information on your {0} lines of c
 #
 #------------------------------------------------------------------------------
 
-quality_profiles.page_title_changelog_x={0} - Quality profile changelog
-quality_profiles.page_title_compare_x={0} - Quality profile comparison
+quality_profiles.page_title_changelog_x={0} Changelog
+quality_profiles.page_title_compare_x={0} Comparison
 quality_profiles.new_profile=New Quality Profile
 quality_profiles.compare_with=Compare with
 quality_profiles.filter_by=Filter profiles by
@@ -2160,6 +2161,7 @@ user.new_password_same_as_old=New password must be different from old password
 user.login_or_email_used_as_scm_account=Login and email are automatically considered as SCM accounts
 user.x_deleted={0} (deleted)
 
+login.page=Log in
 login.login_to_sonarqube=Log in to SonarQube
 login.login_with_x=Log in with {0}
 login.more_options=More options
@@ -2168,6 +2170,7 @@ login.with_x=With {0}
 login.authentication_failed=Authentication failed
 login.logout_failed=Logout failed
 
+unauthorized.page=Unauthorized
 unauthorized.message=You're not authorized to access this page. Please contact the administrator.
 unauthorized.reason=Reason:
 
@@ -2220,6 +2223,7 @@ my_account.add_project.bitbucket=Bitbucket Server
 my_account.add_project.bitbucketcloud=Bitbucket Cloud
 my_account.add_project.github=GitHub
 my_account.add_project.gitlab=GitLab
+my_account.reset_password.page=Update password
 my_account.reset_password=Update your password
 my_account.reset_password.explain=This account should not use the default password.
 
@@ -2911,6 +2915,7 @@ sonarlint-connection.unspecified-ide=an unspecified IDE
 # HELP
 #
 #------------------------------------------------------------------------------
+formatting.page=Formatting
 formatting.helplink=Formatting Help
 formatting.example.link=For a hyperlink, write: [link label](https://www.domain.com)
 
@@ -3115,6 +3120,7 @@ marketplace.risk_consent.description=Plugins are not provided by SonarSource and
 marketplace.risk_consent.installation=You can install plugins directly from the list below after you acknowledge the risk.
 marketplace.risk_consent.action=I understand the risk
 
+plugin_risk_consent.page=Plugin risk consent
 plugin_risk_consent.title=Installation of plugins
 plugin_risk_consent.description=A plugin has been detected.
 plugin_risk_consent.description2=Plugins are not provided by SonarSource and are therefore installed at your own risk. SonarSource disclaims all liability for installing and using such plugins.
@@ -4390,6 +4396,7 @@ users.tokens.expiration.0=No expiration
 users.tokens.new_token_created=New token "{0}" has been created. Make sure you copy it now, you won't be able to see it again!
 users.generate_new_token=Generate New Token
 users.new_token=New token value
+users.change_admin_password.page=Change password
 users.change_admin_password.instance_is_at_risk=Secure your SonarQube instance
 users.change_admin_password.header=Default Administrator credentials are still used
 users.change_admin_password.description=Your SonarQube instance is still using default administrator credentials. You must change the password for the 'admin' account to secure your SonarQube instance.