From: Mathieu Suen Date: Fri, 27 Aug 2021 15:36:00 +0000 (+0200) Subject: SONAR-13876 Explicit line of code is for main branch in project info drawer X-Git-Tag: 9.1.0.47736~73 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=422e4a74167fbc468dd8a1270a70fab2d3f17b1d;p=sonarqube.git SONAR-13876 Explicit line of code is for main branch in project info drawer --- diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx index eb48b01b034..ebafe436f72 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx @@ -39,7 +39,10 @@ export default function MetaSize({ component, measures }: MetaSizeProps) { return ( <> -

{localizeMetric(MetricKey.ncloc)}

+
+

{localizeMetric(MetricKey.ncloc)}

+ ({translate('project.info.main_branch')}) +
{ncloc ? ( <> diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap index ecea37594c9..a4394d3d0b3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap @@ -2,9 +2,20 @@ exports[`should render correctly: application 1`] = ` -

- metric.ncloc.name -

+
+

+ metric.ncloc.name +

+ + ( + project.info.main_branch + ) + +
@@ -47,9 +58,20 @@ exports[`should render correctly: application 1`] = ` exports[`should render correctly: project 1`] = ` -

- metric.ncloc.name -

+
+

+ metric.ncloc.name +

+ + ( + project.info.main_branch + ) + +
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 f7b92e4fc46..ac4f56e3c04 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1550,6 +1550,7 @@ project.info.description=Description project.info.quality_gate=Quality Gate used project.info.to_notifications=Set notifications project.info.notifications=Set notifications +project.info.main_branch=Main branch #------------------------------------------------------------------------------ #