From b441258d1f170791208c001f1fd25bbd8f59e0ff Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 21 Jun 2019 09:49:27 +0200 Subject: [PATCH] SONAR-12003 Fix embedded docs page title --- .../src/main/js/apps/documentation/components/App.tsx | 5 ++++- .../components/__tests__/__snapshots__/App-test.tsx.snap | 6 +++--- .../src/main/resources/org/sonar/l10n/core.properties | 3 ++- 3 files changed, 9 insertions(+), 5 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 { : ((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`] = `