aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/documentation
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2019-06-21 09:49:27 +0200
committersonartech <sonartech@sonarsource.com>2019-06-28 08:45:47 +0200
commitb441258d1f170791208c001f1fd25bbd8f59e0ff (patch)
treeaa77bddc114037606926a2ecf3f86ef733dec760 /server/sonar-web/src/main/js/apps/documentation
parent23f172629a20af2d2101db70707061b82167b5c4 (diff)
downloadsonarqube-b441258d1f170791208c001f1fd25bbd8f59e0ff.tar.gz
sonarqube-b441258d1f170791208c001f1fd25bbd8f59e0ff.zip
SONAR-12003 Fix embedded docs page title
Diffstat (limited to 'server/sonar-web/src/main/js/apps/documentation')
-rw-r--r--server/sonar-web/src/main/js/apps/documentation/components/App.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap6
2 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
index 00933eee7e4..ace8f8b66a8 100644
--- a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
@@ -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 (
diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
index 972604838ab..01b9f7beb98 100644
--- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -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"