From 81516c0b3c97ab54d9d926f059b050259febe997 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Tue, 24 Sep 2019 11:03:48 +0200 Subject: Fixes from review --- .../__tests__/__snapshots__/BranchList-test.tsx.snap | 4 ++-- .../src/main/js/apps/projectBaseline/components/BranchList.tsx | 4 ++-- server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts | 8 ++++---- server/sonar-web/src/main/js/helpers/periods.ts | 2 +- sonar-core/src/main/resources/org/sonar/l10n/core.properties | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap index 8d070004181..12ab71b6a45 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap @@ -11,14 +11,14 @@ exports[`should render correctly 1`] = ` branch_list.branch branch_list.current_setting - branch_list.edit_settings + branch_list.actions diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx index 95ad1db5475..d907968a407 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx @@ -168,10 +168,10 @@ export default class BranchList extends React.PureComponent { {translate('branch_list.branch')} - + {translate('branch_list.current_setting')} - {translate('branch_list.edit_settings')} + {translate('branch_list.actions')} diff --git a/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts index 53689b77ce4..0bebbf61018 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts @@ -85,17 +85,17 @@ describe('getPeriodLabel', () => { it('should handle SPECIFIC_ANALYSIS', () => { expect( - getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS', modeParam: 'A658678DE' }), formatter) - ).toBe('overview.period.specific_analysis.A658678DE'); + getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS', parameter: '7.1' }), formatter) + ).toBe('overview.period.specific_analysis.2019-04-23T02:12:32+0100'); expect(getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS' }), formatter)).toBe( 'overview.period.specific_analysis.2019-04-23T02:12:32+0100' ); - expect(formatter).toBeCalledTimes(1); + expect(formatter).toBeCalledTimes(2); }); it('should handle PREVIOUS_VERSION', () => { expect( - getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION', parameter: 'A658678DE' }), formatter) + getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION', modeParam: 'A658678DE' }), formatter) ).toBe('overview.period.previous_version.A658678DE'); expect(getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION' }), formatter)).toBe( 'overview.period.previous_version.2019-04-23T02:12:32+0100' diff --git a/server/sonar-web/src/main/js/helpers/periods.ts b/server/sonar-web/src/main/js/helpers/periods.ts index b2442175b78..6a9702fec7b 100644 --- a/server/sonar-web/src/main/js/helpers/periods.ts +++ b/server/sonar-web/src/main/js/helpers/periods.ts @@ -43,7 +43,7 @@ export function getPeriodLabel( switch (period.mode) { case 'SPECIFIC_ANALYSIS': - parameter = parameter || dateFormatter(period.date); + parameter = dateFormatter(period.date); break; case 'PREVIOUS_VERSION': parameter = parameter || dateFormatter(period.date); 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 c12ed32138e..707315c440f 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -551,7 +551,7 @@ project_baseline.configure_branches=Set a specific setting for a branch baseline.previous_version=Previous version baseline.previous_version.description=The New Code Period will begin with the analysis following the previous version. baseline.number_days=Number of days -baseline.number_days.description=Specify a number of days to set a floating New Code Period window. +baseline.number_days.description=A floating New Code Period window set to a specific number of days. baseline.specific_date=Specific date baseline.specific_date.description=Set a specific date as the start of the New Code Period. (First analysis on this date will be used) baseline.specific_analysis=Specific analysis @@ -562,9 +562,9 @@ baseline.last_analysis_before=Last analysis before baseline.next_analysis_notice=Changes will take effect after the next analysis branch_list.branch=Branch -branch_list.current_setting=Current setting +branch_list.current_setting=Setting branch_list.current_baseline=Current Baseline -branch_list.edit_settings=Edit settings +branch_list.actions=Actions branch_list.default_setting=Project setting baseline.new_code_period_for_branch_x=New Code Period for {0} @@ -2565,7 +2565,7 @@ overview.period.manual_baseline=since {0} # New periods (MMF-1579) overview.period.number_of_days=from last {0} days -overview.period.specific_analysis=since analysis on {0} +overview.period.specific_analysis=since {0} overview.gate.ERROR=Failed overview.gate.WARN=Warning -- cgit v1.2.3