]> source.dussan.org Git - sonarqube.git/commitdiff
Apply review comments
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 10 May 2017 08:32:33 +0000 (10:32 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 10 May 2017 09:56:20 +0000 (11:56 +0200)
server/sonar-web/src/main/js/app/components/extensions/Extension.js
server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.js
server/sonar-web/src/main/js/apps/code/components/App.js
server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesAppContainer.js
server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js
server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js
server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap
server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.js.snap

index 7d05ab8840bffe6e3a40c79576d152aea3c6dea6..93dac302b0e41921d0b904bcff213b38e3097d5b 100644 (file)
@@ -19,6 +19,7 @@
  */
 // @flow
 import React from 'react';
+import Helmet from 'react-helmet';
 import { connect } from 'react-redux';
 import { withRouter } from 'react-router';
 import { addGlobalErrorMessage } from '../../../store/globalMessages/duck';
@@ -31,7 +32,7 @@ type Props = {
   currentUser: Object,
   extension: {
     key: string,
-    title: string
+    name: string
   },
   location: { hash: string },
   onFail: string => void,
@@ -94,6 +95,7 @@ class Extension extends React.PureComponent {
   render() {
     return (
       <div>
+        <Helmet title={this.props.extension.name} />
         <div ref={container => (this.container = container)} />
       </div>
     );
index 4e6da93deeab4a871c63e5afb063b5f3cb858481..a7f96db6cf64c7c92267325e994894d7a07a36ab 100644 (file)
  */
 // @flow
 import React from 'react';
-import Helmet from 'react-helmet';
 import GlobalPageExtension from './GlobalPageExtension';
-import { translate } from '../../../helpers/l10n';
 
 export default function PortfoliosPage(props: Object) {
   return (
     <div>
-      <Helmet title={translate('portfolios.page')} />
       <GlobalPageExtension
         location={props.location}
         params={{ pluginKey: 'governance', extensionKey: 'portfolios' }}
index 1918cac2abf94643bc301e372f653c75ea48fa88..a85387a0e5ebf01e317560fe8f3d4b3601d409d2 100644 (file)
@@ -181,7 +181,7 @@ class App extends React.PureComponent {
 
     return (
       <div className="page page-limited">
-        <Helmet title={translate('code')} />
+        <Helmet title={translate('code.page')} />
 
         {error &&
           <div className="alert alert-danger">
index 52b1b29d6a1ea2b4bdbe56058b09253c02824d2d..020977d998a1d36fe86e1ac1c2a3e3aa2eb35311 100644 (file)
@@ -72,7 +72,7 @@ class CodingRulesAppContainer extends React.PureComponent {
     // but react wants it to be there to unmount it
     return (
       <div>
-        <Helmet title={translate('rules')} />
+        <Helmet title={translate('coding_rules.page')} />
         <div ref="container" />
       </div>
     );
index 1cd73c0be0fcd29fa0d7011e102a1de79937fab5..dbfce33a3fddbf9e56135d86fc8149ccc4b24b3a 100644 (file)
@@ -95,12 +95,13 @@ class OrganizationDelete extends React.PureComponent {
   }
 
   render() {
+    const title = translate('organization.delete');
     return (
       <div className="page page-limited">
-        <Helmet title={translate('delete')} />
+        <Helmet title={title} />
 
         <header className="page-header">
-          <h1 className="page-title">{translate('organization.delete')}</h1>
+          <h1 className="page-title">{title}</h1>
           <div className="page-description">{translate('organization.delete.description')}</div>
         </header>
 
index e108da282a5a6f76cdf149a78ce4a62975a1715f..a75fd2d94448886f8c85a3dbd775da63a561d1d6 100644 (file)
@@ -95,12 +95,13 @@ class OrganizationEdit extends React.PureComponent {
   };
 
   render() {
+    const title = translate('organization.edit');
     return (
       <div className="page page-limited">
-        <Helmet title={translate('edit')} />
+        <Helmet title={title} />
 
         <header className="page-header">
-          <h1 className="page-title">{translate('organization.edit')}</h1>
+          <h1 className="page-title">{title}</h1>
         </header>
 
         <form onSubmit={this.handleSubmit}>
index fa13f06a074b1cacf5d19c15e0b938c6b87c465b..4762fa4e4d949c0a6344f125caa5cbcf225260a5 100644 (file)
@@ -5,7 +5,7 @@ exports[`smoke test 1`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="delete"
+    title="organization.delete"
   />
   <header
     className="page-header"
@@ -38,7 +38,7 @@ exports[`smoke test 2`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="delete"
+    title="organization.delete"
   />
   <header
     className="page-header"
@@ -119,7 +119,7 @@ exports[`smoke test 3`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="delete"
+    title="organization.delete"
   />
   <header
     className="page-header"
index 9fe30235a6233528d3a758cbc1486e60c8d404b1..86dcb2b5556ff0a6a91cc00ce21e849424659b05 100644 (file)
@@ -5,7 +5,7 @@ exports[`smoke test 1`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="edit"
+    title="organization.edit"
   />
   <header
     className="page-header"
@@ -136,7 +136,7 @@ exports[`smoke test 2`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="edit"
+    title="organization.edit"
   />
   <header
     className="page-header"
@@ -282,7 +282,7 @@ exports[`smoke test 3`] = `
   className="page page-limited"
 >
   <HelmetWrapper
-    title="edit"
+    title="organization.edit"
   />
   <header
     className="page-header"