From 8f2ecbafc86e3f561accfceb6d58ba1e0a1c0f61 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Wed, 8 Aug 2018 09:18:10 +0200 Subject: [PATCH] SONAR-10576 Replace wording "Leak" with "New Code" --- .../apps/about/components/AboutLeakPeriod.js | 2 +- .../components/LeakPeriodLegend.js | 4 +- .../LeakPeriodLegend-test.js.snap | 6 +-- .../apps/issues/sidebar/CreationDateFacet.tsx | 4 +- .../ApplicationLeakPeriodLegend.tsx | 2 +- .../overview/components/LeakPeriodLegend.js | 4 +- .../ApplicationLeakPeriodLegend-test.tsx.snap | 4 +- .../LeakPeriodLegend-test.js.snap | 2 +- .../ApplicationQualityGateProject.tsx | 2 +- .../qualityGate/QualityGateCondition.js | 2 +- ...pplicationQualityGateProject-test.tsx.snap | 2 +- .../projectBranches/components/BranchRow.tsx | 2 +- .../components/LeakPeriodForm.tsx | 2 +- .../js/apps/projects/__tests__/utils-test.ts | 31 ++++++++++++ .../projects/components/PerspectiveSelect.tsx | 4 +- .../projects/components/ProjectCardLeak.tsx | 18 ++++--- .../__tests__/ProjectCardLeak-test.tsx | 2 +- .../PerspectiveSelect-test.tsx.snap | 4 +- .../ProjectCardLeak-test.tsx.snap | 8 ++-- .../src/main/js/apps/projects/utils.ts | 48 ++++++++++++++++++- .../components/ConditionModal.tsx | 2 +- .../quality-gates/components/Conditions.tsx | 2 +- .../core/config/CorePropertyDefinitions.java | 2 +- .../resources/org/sonar/l10n/core.properties | 25 +++++----- 24 files changed, 130 insertions(+), 54 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js index a2854090511..203a2855936 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js @@ -28,7 +28,7 @@ export default function AboutLeakPeriod() {

{translate('about_page.fix_the_leak')}

-

{translate('about_page.fix_the_leak.text')}

+

{translate('about_page.fix_the_leak_on_new_code.text')}

diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js index 263b32f79fc..c2a322741c8 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js +++ b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js @@ -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
{translate('issues.leak_period')}
; + return
{translate('issues.new_code_period')}
; } const label = (
- {translateWithParameters('overview.leak_period_x', getPeriodLabel(period))} + {translateWithParameters('overview.new_code_period_x', getPeriodLabel(period))}
); diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap index d9130616e70..f5d95dbffd6 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap @@ -18,7 +18,7 @@ exports[`should render correctly 1`] = `
- overview.leak_period_x.overview.period.previous_version.6,4 + overview.new_code_period_x.overview.period.previous_version.6,4
`; @@ -27,7 +27,7 @@ exports[`should render correctly 2`] = `
- overview.leak_period_x.overview.period.days.18 + overview.new_code_period_x.overview.period.days.18
`; @@ -35,6 +35,6 @@ exports[`should render correctly for APP 1`] = `
- issues.leak_period + issues.new_code_period
`; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx index db6e7f6eff1..5f4c1400b28 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx @@ -128,7 +128,7 @@ export default class CreationDateFacet extends React.PureComponent { 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 { diff --git a/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx index 0ac7464bcb3..9fb9e9a51e2 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/ApplicationLeakPeriodLegend.tsx @@ -97,7 +97,7 @@ export default class ApplicationLeakPeriodLegend extends React.Component
- {translate('issues.max_leak_period')}:{' '} + {translate('issues.max_new_code_period')}:{' '} {leak && ( <> diff --git a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js index ac5c8f5ecf8..de429243254 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js +++ b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js @@ -77,7 +77,7 @@ export default function LeakPeriodLegend({ period } /*: { period: Period } */) { if (period.mode === 'days') { return (
- {translateWithParameters('overview.leak_period_x', leakPeriodLabel)} + {translateWithParameters('overview.new_code_period_x', leakPeriodLabel)}
); } @@ -100,7 +100,7 @@ export default function LeakPeriodLegend({ period } /*: { period: Period } */) { return (
- {translateWithParameters('overview.leak_period_x', leakPeriodLabel)} + {translateWithParameters('overview.new_code_period_x', leakPeriodLabel)}
{fromNow => ( diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/ApplicationLeakPeriodLegend-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/ApplicationLeakPeriodLegend-test.tsx.snap index 6a5804570eb..46fc111b376 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/ApplicationLeakPeriodLegend-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/ApplicationLeakPeriodLegend-test.tsx.snap @@ -11,7 +11,7 @@ exports[`renders 1`] = `
- issues.max_leak_period + issues.max_new_code_period :
@@ -44,7 +44,7 @@ exports[`renders 2`] = `
- issues.max_leak_period + issues.max_new_code_period : diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap b/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap index b38a2d79967..afbce5c4a8a 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/LeakPeriodLegend-test.js.snap @@ -4,7 +4,7 @@ exports[`check note 10 days 1`] = `
- overview.leak_period_x.overview.period.days.10 + overview.new_code_period_x.overview.period.days.10
`; diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx index 8c7ef64f553..620a839fed0 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGateProject.tsx @@ -43,7 +43,7 @@ export default class ApplicationQualityGateProject extends React.PureComponent

{formatMeasure(condition.value, metric.type)} {metricName} - {!isDiff && condition.onLeak && ' ' + translate('quality_gates.conditions.leak')} + {!isDiff && condition.onLeak && ' ' + translate('quality_gates.conditions.new_code')} - {translate('quality_gates.conditions.leak')} + {translate('quality_gates.conditions.new_code')}

)}
diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGateProject-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGateProject-test.tsx.snap index 8af25b25049..986d20312b3 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGateProject-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGateProject-test.tsx.snap @@ -78,7 +78,7 @@ exports[`renders 1`] = ` Bugs - quality_gates.conditions.leak + quality_gates.conditions.new_code { - {translate('branches.set_leak_period')} + {translate('branches.set_new_code_period')} )} {isLongLivingBranch(branchLike) && } diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx index 3bb22c48aed..5812a3d3c60 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LeakPeriodForm.tsx @@ -74,7 +74,7 @@ export default class LeakPeriodForm extends React.PureComponent { render() { const { setting } = this.state; - const header = translate('branches.set_leak_period'); + const header = translate('branches.set_new_code_period'); return ( diff --git a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts index 7f2a5acc5e8..86702c925bd 100644 --- a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts @@ -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'); + }); +}); diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx index 477ad19cc83..57aa0b19360 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx @@ -45,8 +45,8 @@ export default class PerspectiveSelect extends React.PureComponent { 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', diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx index 912bf578736..dd0670cb55f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.tsx @@ -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 (
@@ -75,13 +77,9 @@ export default function ProjectCardLeak({ height, organization, project }: Props {project.analysisDate && project.leakPeriodDate && (
- - {fromNow => ( - - {translateWithParameters('projects.leak_period_x', fromNow)} - - )} - + + {translateWithParameters('projects.new_code_period_x', formatDuration(period))} + {formattedDate => ( @@ -101,7 +99,7 @@ export default function ProjectCardLeak({ height, organization, project }: Props
{project.analysisDate - ? translate('projects.no_leak_period') + ? translate('projects.no_new_code_period') : translate('projects.not_analyzed')}
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx index c2982771b7c..5a83961cca1 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCardLeak-test.tsx @@ -43,7 +43,7 @@ const PROJECT = { it('should display analysis date and leak start date', () => { const card = shallow(); 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); }); diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.tsx.snap index 944552d8682..807d025e736 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PerspectiveSelect-test.tsx.snap @@ -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", }, diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.tsx.snap index 1c7f8335013..bc672cd63b9 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.tsx.snap @@ -69,9 +69,11 @@ exports[`should display the leak measures and quality gate 1`] = `
- + + projects.new_code_period_x.duration.years.1 duration.months.8 + diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts index fe010d42316..753e245be49 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -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' } + ]); +} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx index cf70214b296..1d337c61e2f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx @@ -157,7 +157,7 @@ export default class ConditionModal extends React.PureComponent { {metric && ( <>
- + { />
- {translate('quality_gates.conditions.leak')} + {translate('quality_gates.conditions.new_code')} {translate('quality_gates.conditions.operator')} {translate('quality_gates.conditions.warning')} {translate('quality_gates.conditions.error')} diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index bb991263ae6..baa775d66ad 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -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 : " + "
  • Number of days before analysis, for example 5.
  • " + diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 93fa8dbfa37..881127b4524 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -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 -- 2.39.5