Browse Source

SONAR-12003 Fix embedded docs page title

tags/8.0
Wouter Admiraal 4 years ago
parent
commit
b441258d1f

+ 4
- 1
server/sonar-web/src/main/js/apps/documentation/components/App.tsx View 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 (

+ 3
- 3
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap View 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"

+ 2
- 1
sonar-core/src/main/resources/org/sonar/l10n/core.properties View 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


Loading…
Cancel
Save