]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10576 Replace wording "Leak" with "New Code"
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Wed, 8 Aug 2018 07:18:10 +0000 (09:18 +0200)
committerSonarTech <sonartech@sonarsource.com>
Thu, 9 Aug 2018 18:20:50 +0000 (20:20 +0200)
24 files changed:
server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js
server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap
server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx
server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx
server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js
server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/ApplicationLeakPeriodLegend-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap
server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx
server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js
server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGateProject-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx
server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/utils.ts
server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index a28540905113f8b81cf034e71f0301c43b30cfeb..203a2855936ef045d888e80bfcb173eafcb00c85 100644 (file)
@@ -28,7 +28,7 @@ export default function AboutLeakPeriod() {
     <div className="boxed-group">
       <h2>{translate('about_page.fix_the_leak')}</h2>
       <div className="boxed-group-inner">
-        <p className="about-page-text">{translate('about_page.fix_the_leak.text')}</p>
+        <p className="about-page-text">{translate('about_page.fix_the_leak_on_new_code.text')}</p>
         <ReadMore link={link} />
       </div>
     </div>
index 263b32f79fcc6f0c4380cb17058d1025ef2fa1db..c2a322741c8a407db313f8ebcae20c89ef4945e3 100644 (file)
@@ -36,12 +36,12 @@ import { translate, translateWithParameters } from '../../../helpers/l10n';
 export default function LeakPeriodLegend({ className, component, period } /*: Props */) {
   const leakClass = classNames('domain-measures-leak-header', className);
   if (component.qualifier === 'APP') {
-    return <div className={leakClass}>{translate('issues.leak_period')}</div>;
+    return <div className={leakClass}>{translate('issues.new_code_period')}</div>;
   }
 
   const label = (
     <div className={leakClass}>
-      {translateWithParameters('overview.leak_period_x', getPeriodLabel(period))}
+      {translateWithParameters('overview.new_code_period_x', getPeriodLabel(period))}
     </div>
   );
 
index d9130616e703b5e0487e6527776143a026737528..f5d95dbffd6664e9f4fd6a9f2a24d255976eccec 100644 (file)
@@ -18,7 +18,7 @@ exports[`should render correctly 1`] = `
   <div
     className="domain-measures-leak-header"
   >
-    overview.leak_period_x.overview.period.previous_version.6,4
+    overview.new_code_period_x.overview.period.previous_version.6,4
   </div>
 </Tooltip>
 `;
@@ -27,7 +27,7 @@ exports[`should render correctly 2`] = `
 <div
   className="domain-measures-leak-header"
 >
-  overview.leak_period_x.overview.period.days.18
+  overview.new_code_period_x.overview.period.days.18
 </div>
 `;
 
@@ -35,6 +35,6 @@ exports[`should render correctly for APP 1`] = `
 <div
   className="domain-measures-leak-header"
 >
-  issues.leak_period
+  issues.new_code_period
 </div>
 `;
index db6e7f6eff1822bfc58d21fccfbcea4f075d5305..5f4c1400b28cbacc8b443d297b9a963433c7c408 100644 (file)
@@ -128,7 +128,7 @@ export default class CreationDateFacet extends React.PureComponent<Props> {
       values.push(translate('issues.facet.createdAt.last_year'));
     }
     if (sinceLeakPeriod) {
-      values.push(translate('issues.leak_period'));
+      values.push(translate('issues.new_code_period'));
     }
     return values;
   }
@@ -235,7 +235,7 @@ export default class CreationDateFacet extends React.PureComponent<Props> {
           <FacetItem
             active={sinceLeakPeriod}
             loading={this.props.loading}
-            name={translate('issues.leak_period')}
+            name={translate('issues.new_code')}
             onClick={this.handleLeakPeriodClick}
             value=""
           />
index 0ac7464bcb38e1a1f9aa90bf1286a35d57ba3117..9fb9e9a51e2d6e330b17c0b08843768258758dd5 100644 (file)
@@ -97,7 +97,7 @@ export default class ApplicationLeakPeriodLegend extends React.Component<Props,
     return (
       <Tooltip overlay={this.renderOverlay()}>
         <div className={classNames('overview-legend', { 'overview-legend-spaced-line': !leak })}>
-          {translate('issues.max_leak_period')}:{' '}
+          {translate('issues.max_new_code_period')}:{' '}
           {leak && (
             <>
               <DateFromNow date={leak.date}>
index ac5c8f5ecf8e16b2bc40e2b6757eeeae76ef1e68..de42924325493d58d1260a70198df75ce7dddf1f 100644 (file)
@@ -77,7 +77,7 @@ export default function LeakPeriodLegend({ period } /*: { period: Period } */) {
   if (period.mode === 'days') {
     return (
       <div className="overview-legend overview-legend-spaced-line">
-        {translateWithParameters('overview.leak_period_x', leakPeriodLabel)}
+        {translateWithParameters('overview.new_code_period_x', leakPeriodLabel)}
       </div>
     );
   }
@@ -100,7 +100,7 @@ export default function LeakPeriodLegend({ period } /*: { period: Period } */) {
   return (
     <Tooltip overlay={tooltip}>
       <div className="overview-legend">
-        {translateWithParameters('overview.leak_period_x', leakPeriodLabel)}
+        {translateWithParameters('overview.new_code_period_x', leakPeriodLabel)}
         <br />
         <DateFromNow date={leakPeriodDate}>
           {fromNow => (
index 6a5804570ebf5db7d80873c3c8005ec7886b5a3f..46fc111b3769509386d8e85b53a4b51b98e38d04 100644 (file)
@@ -11,7 +11,7 @@ exports[`renders 1`] = `
   <div
     className="overview-legend overview-legend-spaced-line"
   >
-    issues.max_leak_period
+    issues.max_new_code_period
     :
      
   </div>
@@ -44,7 +44,7 @@ exports[`renders 2`] = `
   <div
     className="overview-legend"
   >
-    issues.max_leak_period
+    issues.max_new_code_period
     :
      
     <React.Fragment>
index b38a2d79967f87a122d64ae6219ee10e5e1bb716..afbce5c4a8a32318af91dbf470f6afcbf2e55649 100644 (file)
@@ -4,7 +4,7 @@ exports[`check note 10 days 1`] = `
 <div
   className="overview-legend overview-legend-spaced-line"
 >
-  overview.leak_period_x.overview.period.days.10
+  overview.new_code_period_x.overview.period.days.10
 </div>
 `;
 
index 8c7ef64f55318a0bbbeed184a5f7c5896b4ba23e..620a839fed0a62188a474e893c4a3413fa0c1119 100644 (file)
@@ -43,7 +43,7 @@ export default class ApplicationQualityGateProject extends React.PureComponent<P
       <li className={classNames({ 'is-on-leak': isDiff })} key={condition.metric}>
         <span className="text-limited">
           <strong>{formatMeasure(condition.value, metric.type)}</strong> {metricName}
-          {!isDiff && condition.onLeak && ' ' + translate('quality_gates.conditions.leak')}
+          {!isDiff && condition.onLeak && ' ' + translate('quality_gates.conditions.new_code')}
         </span>
         <span
           className={classNames('big-spacer-left', {
index ba6d12fa35d05c796c8ab4b4dbd0f6291f2b61c2..8ff4cb04044c41e1d42e197cbee8909238d17ae3 100644 (file)
@@ -167,7 +167,7 @@ export default class QualityGateCondition extends React.PureComponent {
           {!isDiff &&
             condition.period != null && (
               <div className="overview-quality-gate-condition-period">
-                {translate('quality_gates.conditions.leak')}
+                {translate('quality_gates.conditions.new_code')}
               </div>
             )}
           <div className="overview-quality-gate-threshold">
index 8af25b25049bde58680063f4d4dfa82f31284d52..986d20312b3f8bc054660c18cc9c2fc77e2cbac6 100644 (file)
@@ -78,7 +78,7 @@ exports[`renders 1`] = `
           </strong>
            
           Bugs
-           quality_gates.conditions.leak
+           quality_gates.conditions.new_code
         </span>
         <span
           className="big-spacer-left text-danger"
index d1f6efa3ba1dd8947e74d2b9fa2f3415c00be29b..fbcbb4d17512a9f6776f3754815b9c391de86a64 100644 (file)
@@ -106,7 +106,7 @@ export default class BranchRow extends React.PureComponent<Props, State> {
             <ActionsDropdownItem
               className="js-change-leak-period"
               onClick={this.handleChangeLeakClick}>
-              {translate('branches.set_leak_period')}
+              {translate('branches.set_new_code_period')}
             </ActionsDropdownItem>
           )}
           {isLongLivingBranch(branchLike) && <ActionsDropdownDivider />}
index 3bb22c48aed6a88a1389ca20c33f62fa7b50f655..5812a3d3c608ded56df7c567909c7e411fdb33ee 100644 (file)
@@ -74,7 +74,7 @@ export default class LeakPeriodForm extends React.PureComponent<Props, State> {
 
   render() {
     const { setting } = this.state;
-    const header = translate('branches.set_leak_period');
+    const header = translate('branches.set_new_code_period');
 
     return (
       <Modal contentLabel={header} onRequestClose={this.props.onClose}>
index 7f2a5acc5e8c35d27383104e223c9fe3d4588472..86702c925bd879176744fc0a05bc75605770d728 100644 (file)
@@ -38,3 +38,34 @@ describe('parseSorting', () => {
     expect(utils.parseSorting('-size')).toEqual({ sortDesc: true, sortValue: 'size' });
   });
 });
+
+describe('formatDuration', () => {
+  const ONE_MINUTE = 60000;
+  const ONE_HOUR = 60 * ONE_MINUTE;
+  const ONE_DAY = 24 * ONE_HOUR;
+  const ONE_MONTH = 30 * ONE_DAY;
+  const ONE_YEAR = 12 * ONE_MONTH;
+  it('render years and months only', () => {
+    expect(utils.formatDuration(ONE_YEAR * 4 + ONE_MONTH * 2 + ONE_DAY * 10)).toEqual(
+      'duration.years.4 duration.months.2 '
+    );
+  });
+
+  it('render years only', () => {
+    expect(utils.formatDuration(ONE_YEAR * 4 + ONE_DAY * 10)).toEqual('duration.years.4 ');
+  });
+
+  it('render hours and minutes', () => {
+    expect(utils.formatDuration(ONE_HOUR * 4 + ONE_MINUTE * 10)).toEqual(
+      'duration.hours.4 duration.minutes.10 '
+    );
+  });
+
+  it('render days only', () => {
+    expect(utils.formatDuration(ONE_DAY * 4 + ONE_MINUTE * 10)).toEqual('duration.days.4 ');
+  });
+
+  it('render less than a minute', () => {
+    expect(utils.formatDuration(1000)).toEqual('duration.seconds');
+  });
+});
index 477ad19cc838ef1ea2848afcc6576ee4e5ef671c..57aa0b19360cd3eeb657b075b1849d9002bf7cfb 100644 (file)
@@ -45,8 +45,8 @@ export default class PerspectiveSelect extends React.PureComponent<Props> {
     const options = [
       ...VIEWS.map(opt => ({
         type: 'view',
-        value: opt,
-        label: translate('projects.view', opt)
+        value: opt.value,
+        label: translate('projects.view', opt.label)
       })),
       ...VISUALIZATIONS.map(opt => ({
         type: 'visualization',
index 912bf578736de6fa2eff8f3c66e71966ea668923..dd0670cb55fb60d81141552afeecaa4773701c01 100644 (file)
@@ -23,13 +23,13 @@ import ProjectCardQualityGate from './ProjectCardQualityGate';
 import ProjectCardLeakMeasures from './ProjectCardLeakMeasures';
 import ProjectCardOrganizationContainer from './ProjectCardOrganizationContainer';
 import Favorite from '../../../components/controls/Favorite';
-import DateFromNow from '../../../components/intl/DateFromNow';
 import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
 import TagsList from '../../../components/tags/TagsList';
 import PrivacyBadgeContainer from '../../../components/common/PrivacyBadgeContainer';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { Project } from '../types';
 import { Organization } from '../../../app/types';
+import { formatDuration } from '../utils';
 
 interface Props {
   height: number;
@@ -40,7 +40,9 @@ interface Props {
 export default function ProjectCardLeak({ height, organization, project }: Props) {
   const { measures } = project;
   const hasTags = project.tags.length > 0;
-
+  const period = project.leakPeriodDate
+    ? new Date().getTime() - new Date(project.leakPeriodDate).getTime()
+    : 0;
   return (
     <div className="boxed-group project-card" data-key={project.key} style={{ height }}>
       <div className="boxed-group-header clearfix">
@@ -75,13 +77,9 @@ export default function ProjectCardLeak({ height, organization, project }: Props
         {project.analysisDate &&
           project.leakPeriodDate && (
             <div className="project-card-dates note text-right pull-right">
-              <DateFromNow date={project.leakPeriodDate}>
-                {fromNow => (
-                  <span className="project-card-leak-date pull-right">
-                    {translateWithParameters('projects.leak_period_x', fromNow)}
-                  </span>
-                )}
-              </DateFromNow>
+              <span className="project-card-leak-date pull-right">
+                {translateWithParameters('projects.new_code_period_x', formatDuration(period))}
+              </span>
               <DateTimeFormatter date={project.analysisDate}>
                 {formattedDate => (
                   <span>
@@ -101,7 +99,7 @@ export default function ProjectCardLeak({ height, organization, project }: Props
         <div className="boxed-group-inner">
           <div className="note project-card-not-analyzed">
             {project.analysisDate
-              ? translate('projects.no_leak_period')
+              ? translate('projects.no_new_code_period')
               : translate('projects.not_analyzed')}
           </div>
         </div>
index c2982771b7c42742b987903bb72c40810518648e..5a83961cca1b1a51291f02cb4df4ca387b96a82d 100644 (file)
@@ -43,7 +43,7 @@ const PROJECT = {
 it('should display analysis date and leak start date', () => {
   const card = shallow(<ProjectCardLeak height={100} organization={undefined} project={PROJECT} />);
   expect(card.find('.project-card-dates').exists()).toBeTruthy();
-  expect(card.find('.project-card-dates').find('DateFromNow')).toHaveLength(1);
+  expect(card.find('.project-card-dates').find('.project-card-leak-date')).toHaveLength(1);
   expect(card.find('.project-card-dates').find('DateTimeFormatter')).toHaveLength(1);
 });
 
index 944552d868204ef9926ff6fdc388d69248d5a7b2..807d025e7366aaa3589247cc515d2f47088914ad 100644 (file)
@@ -40,7 +40,7 @@ exports[`should render correctly 1`] = `
           "value": "overall",
         },
         Object {
-          "label": "projects.view.leak",
+          "label": "projects.view.new_code",
           "type": "view",
           "value": "leak",
         },
@@ -101,7 +101,7 @@ exports[`should render with coverage selected 1`] = `
           "value": "overall",
         },
         Object {
-          "label": "projects.view.leak",
+          "label": "projects.view.new_code",
           "type": "view",
           "value": "leak",
         },
index 1c7f833501300a76bcb44a87c587ffee87ba1eb5..bc672cd63b96ab1dde04d7c34e565d916ae59eca 100644 (file)
@@ -69,9 +69,11 @@ exports[`should display the leak measures and quality gate 1`] = `
     <div
       className="project-card-dates note text-right pull-right"
     >
-      <DateFromNow
-        date="2016-12-01"
-      />
+      <span
+        className="project-card-leak-date pull-right"
+      >
+        projects.new_code_period_x.duration.years.1 duration.months.8 
+      </span>
       <DateTimeFormatter
         date="2017-01-01"
       />
index fe010d4231609f004e3ee79fa03787854f6a182e..753e245be49fd1b0e8e9b1ed40d943128aa13c5f 100644 (file)
@@ -20,7 +20,7 @@
 /* eslint-disable camelcase */
 import { uniq } from 'lodash';
 import { Query, convertToFilter } from './query';
-import { translate } from '../../helpers/l10n';
+import { translate, translateWithParameters } from '../../helpers/l10n';
 import { RequestData } from '../../helpers/request';
 import { getOrganizations } from '../../api/organizations';
 import { searchProjects, Facet } from '../../api/components';
@@ -75,7 +75,7 @@ export const SORTING_SWITCH: { [x: string]: string } = {
   new_lines: 'size'
 };
 
-export const VIEWS = ['overall', 'leak'];
+export const VIEWS = [{ value: 'overall', label: 'overall' }, { value: 'leak', label: 'new_code' }];
 
 export const VISUALIZATIONS = [
   'risk',
@@ -336,3 +336,47 @@ function mapMetricToProperty(metricKey: string) {
   };
   return map[metricKey];
 }
+
+const ONE_MINUTE = 60000;
+const ONE_HOUR = 60 * ONE_MINUTE;
+const ONE_DAY = 24 * ONE_HOUR;
+const ONE_MONTH = 30 * ONE_DAY;
+const ONE_YEAR = 12 * ONE_MONTH;
+
+function format(periods: Array<{ value: number; label: string }>) {
+  let result = '';
+  let count = 0;
+  let lastId = -1;
+  for (let i = 0; i < periods.length && count < 2; i++) {
+    if (periods[i].value > 0) {
+      count++;
+      if (lastId < 0 || lastId + 1 === i) {
+        lastId = i;
+        result += translateWithParameters(periods[i].label, periods[i].value) + ' ';
+      }
+    }
+  }
+  return result;
+}
+
+export function formatDuration(value: number) {
+  if(value < ONE_MINUTE) {
+    return translate('duration.seconds');
+  }
+  const years = Math.floor(value / ONE_YEAR);
+  value -= years * ONE_YEAR;
+  const months = Math.floor(value / ONE_MONTH);
+  value -= months * ONE_MONTH;
+  const days = Math.floor(value / ONE_DAY);
+  value -= days * ONE_DAY;
+  const hours = Math.floor(value / ONE_HOUR);
+  value -= hours * ONE_HOUR;
+  const minutes = Math.floor(value / ONE_MINUTE);
+  return format([
+    { value: years, label: 'duration.years' },
+    { value: months, label: 'duration.months' },
+    { value: days, label: 'duration.days' },
+    { value: hours, label: 'duration.hours' },
+    { value: minutes, label: 'duration.minutes' }
+  ]);
+}
index cf70214b2963da59d9b538715ffa05603dc8eda4..1d337c61e2f004123a10fdff3f9bdafa95391898 100644 (file)
@@ -157,7 +157,7 @@ export default class ConditionModal extends React.PureComponent<Props, State> {
         {metric && (
           <>
             <div className="modal-field">
-              <label>{translate('quality_gates.conditions.leak')}</label>
+              <label>{translate('quality_gates.conditions.new_code')}</label>
               <Period
                 canEdit={true}
                 metric={metric}
index 0f1c8cc3a4935e2bdc90eb7099b0e892cb63d5e1..df0daf2024f0e16f71db4e98d240d7a7350928a2 100644 (file)
@@ -132,7 +132,7 @@ export default class Conditions extends React.PureComponent<Props> {
                     />
                   </div>
                 </th>
-                <th className="thin nowrap">{translate('quality_gates.conditions.leak')}</th>
+                <th className="thin nowrap">{translate('quality_gates.conditions.new_code')}</th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.operator')}</th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.warning')}</th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.error')}</th>
index bb991263ae6abdfc2e4a0aaddb5d9d090bb6de3a..baa775d66adcab7bf06025c490433d55cbc19a5c 100644 (file)
@@ -155,7 +155,7 @@ public class CorePropertyDefinitions {
 
       // SCANNER
       PropertyDefinition.builder(LEAK_PERIOD)
-        .name("Leak Period")
+        .name("New Code Period")
         .deprecatedKey("sonar.timemachine.period1")
         .description("Period used to compare measures and track new issues. Values are : " +
           "<ul class='bullet'><li>Number of days before  analysis, for example 5.</li>" +
index 93fa8dbfa37762976d408699522ec46ba14b24a2..881127b4524d1492fbacdee2dbeb8db39d597793 100644 (file)
@@ -655,8 +655,9 @@ issues.to_select_issues=to select issues
 issues.to_navigate=to navigate
 issues.to_navigate_issue_locations=to navigate issue locations
 issues.to_switch_flows=to switch flows
-issues.leak_period=Leak Period
-issues.max_leak_period=Max Leak Period
+issues.new_code=New code
+issues.new_code_period=New Code Period
+issues.max_new_code_period=Max New Code Period
 issues.my_issues=My Issues
 issues.no_my_issues=There are no issues assigned to you.
 issues.no_issues=No Issues. Hooray!
@@ -749,8 +750,8 @@ projects.no_favorite_projects.favorite_projects_from_orgs=Favorite projects from
 projects.no_favorite_projects.favorite_public_projects=Favorite public projects
 projects.explore_projects=Explore Projects
 projects.not_analyzed=Project is not analyzed yet.
-projects.no_leak_period=Project has no leak data yet.
-projects.leak_period_x=Leak Period started: {0}
+projects.no_new_code_period=Project has no new code data yet.
+projects.new_code_period_x=New code: last {0}
 projects.last_analysis_on_x=Last analysis: {0}
 projects.search=Search by project name or key
 projects.perspective=Perspective
@@ -773,7 +774,7 @@ projects.sorting.new_coverage=Coverage
 projects.sorting.new_duplications=Duplications
 projects.sorting.new_lines=New Lines
 projects.view.overall=Overall Status
-projects.view.leak=Leak
+projects.view.new_code=New Code
 projects.worse_of_reliablity_and_security=Worse of Reliability and Security
 projects.visualization.risk=Risk
 projects.visualization.risk.description=Get quick insights into the operational risks in your projects. Any color but green indicates immediate risks: Bugs or Vulnerabilities that should be examined. A position at the top or right of the graph means that the longer-term health of the project may be at risk. Green bubbles at the bottom-left are best.
@@ -846,7 +847,7 @@ settings.reset_confirm.description=Are you sure that you want to reset this sett
 property.category.general=General
 property.category.general.email=Email
 property.category.general.duplications=Duplications
-property.category.general.differentialViews=Leak
+property.category.general.differentialViews=New Code
 property.category.general.localization=Localization
 property.category.general.databaseCleaner=Database Cleaner
 property.category.general.looknfeel=Look & Feel
@@ -855,7 +856,7 @@ property.category.organizations=Organizations
 property.category.security=Security
 property.category.security.encryption=Encryption
 property.category.java=Java
-property.category.differentialViews=Leak
+property.category.differentialViews=New Code
 property.category.codeCoverage=Code Coverage
 property.category.duplications=Duplications
 property.category.localization=Localization
@@ -1223,7 +1224,7 @@ quality_gates.condition.leak.yes=Yes
 quality_gates.condition.leak.no=No
 quality_gates.condition.leak.unconditional=Always
 quality_gates.conditions.metric=Metric
-quality_gates.conditions.leak=Over Leak Period
+quality_gates.conditions.new_code=On New Code
 quality_gates.conditions.operator=Operator
 quality_gates.conditions.warning=Warning
 quality_gates.conditions.error=Error
@@ -2347,9 +2348,9 @@ overview.quality_gate_x=Quality Gate: {0}
 overview.quality_gate_failed_with_x=with {0} errors
 overview.you_should_define_quality_gate=You should define a quality gate on this project.
 overview.quality_gate.ignored_conditions=Some Quality Gate conditions on New Code were ignored because of the small number of New Lines
-overview.quality_gate.ignored_conditions.tooltip=At the start of a leak period, if very few lines have been added or modified, it might be difficult to reach the desired level of code coverage or duplications. To prevent Quality Gate failure when there's little that can be done about it, Quality Gate conditions about duplications in new code and coverage on new code are ignored until the number of new lines is at least 20.
+overview.quality_gate.ignored_conditions.tooltip=At the start of a new code period, if very few lines have been added or modified, it might be difficult to reach the desired level of code coverage or duplications. To prevent Quality Gate failure when there's little that can be done about it, Quality Gate conditions about duplications in new code and coverage on new code are ignored until the number of new lines is at least 20.
 overview.quality_profiles=Quality Profiles
-overview.leak_period_x=Leak Period: {0}
+overview.new_code_period_x=New code: {0}
 overview.started_x=started {0}
 overview.last_analysis_x=last analysis {0}
 overview.started_on_x=Started on {0}
@@ -2546,7 +2547,7 @@ about_page.clean_code=Write Clean Code
 about_page.clean_code.text=By fixing new issues as they appear in code, you create and maintain a clean code base. Even on legacy projects, focusing on keeping new code clean will eventually yield a code base you can be proud of.
 
 about_page.fix_the_leak=Fix The Leak
-about_page.fix_the_leak.text=The water leak paradigm and the default Quality Gate are based on the leak period - the recent period against which you're tracking issues. For some previous_version makes the most sense, for others the last 30 days is a good option.
+about_page.fix_the_leak_on_new_code.text=The water leak paradigm and the default Quality Gate are based on the new code period - the recent period against which you're tracking issues. For some previous_version makes the most sense, for others the last 30 days is a good option.
 
 about_page.quality_gates=Enforce Quality Gate
 about_page.quality_gates.text=Your project's Quality Gate is the set of conditions the project must meet before it can be released into production. The Quality Gate is designed to ensure that the next version's quality will be better than the last.
@@ -2763,7 +2764,7 @@ branches.branch_settings=Branch Settings
 branches.long_living_branches_pattern=Long living branches pattern
 branches.detection_of_long_living_branches=Detection of long living branches
 branches.detection_of_long_living_branches.description=Regular expression used to detect whether a branch is a long living branch (as opposed to short living branch), based on its name. This applies only during first analysis, the type of a branch cannot be changed later.
-branches.set_leak_period=Set Leak Period
+branches.set_new_code_period=Set New Code Period
 branches.last_analysis_date=Last Analysis Date
 branches.search_for_branches=Search for branches...
 branches.pull_requests=Pull Requests