]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12003 Fix embedded docs page title
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 21 Jun 2019 07:49:27 +0000 (09:49 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:47 +0000 (08:45 +0200)
server/sonar-web/src/main/js/apps/documentation/components/App.tsx
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 00933eee7e4ff503752009e9a1ee76a989703d15..ace8f8b66a8879c061dfdb2dab3985c662ee5185 100644 (file)
@@ -56,7 +56,10 @@ export default class App extends React.PureComponent<Props> {
       : ((navigationTreeSonarQube as any).default as DocNavigationItem[]);
     const { splat = '' } = this.props.params;
     const page = this.pages.find(p => p.url === '/' + splat);
-    const mainTitle = translate('documentation.page_title');
+    const mainTitle = translate(
+      'documentation.page_title',
+      isSonarCloud() ? 'sonarcloud' : 'sonarqube'
+    );
 
     if (!page) {
       return (
index 972604838ab6b3b2b6bd02b228d4ca47db511e46..01b9f7beb9881cb2d8c01ab0cd67eebb8d1722bf 100644 (file)
@@ -7,7 +7,7 @@ exports[`should render correctly for SonarCloud 1`] = `
   <HelmetWrapper
     defer={true}
     encodeSpecialCharacters={true}
-    title="Lorem | documentation.page_title"
+    title="Lorem | documentation.page_title.sonarcloud"
   />
   <ScreenPositionHelper
     className="layout-page-side-outer"
@@ -45,7 +45,7 @@ exports[`should render correctly for SonarQube 1`] = `
   <HelmetWrapper
     defer={true}
     encodeSpecialCharacters={true}
-    title="Lorem | documentation.page_title"
+    title="Lorem | documentation.page_title.sonarqube"
   >
     <meta
       content="noindex nofollow"
@@ -139,7 +139,7 @@ exports[`should show a 404 if the page doesn't exist 1`] = `
   <HelmetWrapper
     defer={true}
     encodeSpecialCharacters={true}
-    title="documentation.page_title"
+    title="documentation.page_title.sonarcloud"
   >
     <meta
       content="noindex nofollow"
index cbc7f60daee5b28747c976e1d66ae7edc6f60030..52c75eda3319414c1e899a23cad37ab4b26ceedb 100644 (file)
@@ -2578,7 +2578,8 @@ api_documentation.search=Search by name...
 #
 #------------------------------------------------------------------------------
 documentation.page=Documentation
-documentation.page_title=SonarCloud Docs
+documentation.page_title.sonarcloud=SonarCloud Docs
+documentation.page_title.sonarqube=SonarQube Docs
 documentation.on_this_page=On this page
 documentation.skip_to_nav=Skip to documentation navigation