diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-01 17:27:07 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-01 17:27:48 +0200 |
commit | 3e87a7151696d1a4aaa85ce314b74d5cc62f1309 (patch) | |
tree | 6b4cfe07b2d4345386bdedf0740dfa890ea6097f /plugins/sonar-core-gwt | |
parent | c8c4752cf3f27fb4b0acf1234208127934689568 (diff) | |
download | sonarqube-3e87a7151696d1a4aaa85ce314b74d5cc62f1309.tar.gz sonarqube-3e87a7151696d1a4aaa85ce314b74d5cc62f1309.zip |
SONAR-75 Remove unused French GWT properties + add method Metric.Builder#setUserManaged(boolean)
Diffstat (limited to 'plugins/sonar-core-gwt')
4 files changed, 10 insertions, 24 deletions
diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java index 99f50ff1bc2..39e06712348 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java @@ -21,6 +21,7 @@ package org.sonar.plugins.core.testdetailsviewer.client; import com.google.gwt.gen2.table.override.client.FlexTable; import com.google.gwt.gen2.table.override.client.FlexTable.FlexCellFormatter; +import com.google.gwt.i18n.client.Dictionary; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.*; import com.google.gwt.xml.client.Document; @@ -75,12 +76,13 @@ public class TestsPanel extends Composite { Document parsed = XMLParser.parse(testXMLData); NodeList testcasesXML = parsed.getElementsByTagName("testcase"); + Dictionary l10n = Dictionary.getDictionary("l10n"); FlexTable table = new FlexTable(); table.setStylePrimaryName("detailsTable"); table.setText(0, 0, ""); table.setText(0, 1, ""); - table.setText(0, 2, "Duration"); - table.setText(0, 3, "Unit test name"); + table.setText(0, 2, l10n.get("unittest.duration")); + table.setText(0, 3, l10n.get("unittest.name")); table.getCellFormatter().getElement(0, 1).setId("iCol"); table.getCellFormatter().getElement(0, 2).setId("dCol"); setRowStyle(0, table, "header", false); @@ -106,7 +108,6 @@ public class TestsPanel extends Composite { } private void renderTestDetails(int row, int testCounter, String testCaseStatus, Element stackTrace, String name, String timeMS, FlexTable table) { - HTML icon = new HTML(" "); icon.setStyleName(testCaseStatus); table.setWidget(row, 1, icon); diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java index c757be379f6..9b066b0659b 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java @@ -19,6 +19,7 @@ */ package org.sonar.plugins.core.testdetailsviewer.client; +import com.google.gwt.i18n.client.Dictionary; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Widget; @@ -55,6 +56,7 @@ public class TestsViewer extends Page { @Override protected void display(FlowPanel header, Resource resource) { + Dictionary l10n = Dictionary.getDictionary("l10n"); HorizontalPanel panel = new HorizontalPanel(); header.add(panel); @@ -68,18 +70,18 @@ public class TestsViewer extends Page { String skippedHtml = ""; Measure skipped = resource.getMeasure(Metrics.SKIPPED_TESTS); if (skipped != null && skipped.getValue() > 0.0) { - skippedHtml += " (+" + skipped.getFormattedValue() + " skipped)"; + skippedHtml += " (+" + skipped.getFormattedValue() + " " + l10n.get("unittest.skipped") + ")"; } addCell(panel, - "Tests: ", + l10n.get("unittest.tests") + ": ", resource.getMeasureFormattedValue(Metrics.TESTS, "-") + skippedHtml); addCell(panel, - "Failures/Errors: ", + l10n.get("unittest.failures") + ": ", resource.getMeasureFormattedValue(Metrics.TEST_FAILURES, "0") + "/" + resource.getMeasureFormattedValue(Metrics.TEST_ERRORS, "0")); addCell(panel, - "Duration: ", + l10n.get("unittest.duration") + ": ", resource.getMeasureFormattedValue(Metrics.TEST_EXECUTION_TIME, "-")); } } diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspots.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspots.gwt.xml index ad7ecd8c11f..ffb2d169793 100644 --- a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspots.gwt.xml +++ b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspots.gwt.xml @@ -6,5 +6,4 @@ <inherits name="com.google.gwt.i18n.I18N"/> <stylesheet src="hotspots.css"/> <entry-point class="org.sonar.plugins.core.hotspots.client.GwtHotspots"/> - <extend-property name="locale" values="fr"/> </module>
\ No newline at end of file diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/client/I18nConstants_fr.properties b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/client/I18nConstants_fr.properties deleted file mode 100644 index efd8a8c42d6..00000000000 --- a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/client/I18nConstants_fr.properties +++ /dev/null @@ -1,16 +0,0 @@ -# This file must use UTF-8 encoding - -titleMostViolatedRules=Règles les moins respectées -titleMostViolatedResources=Les moins respectueux des règles -titleLongestTests=Les plus long tests -titleMostComplexResources=Les plus complexes -titleMostDuplicatedResources=Les plus dupliqués -titleLessTested=Le plus de lignes non testées -titleMostComplexMethods=Avec les méthodes les plus complexes -titleMostUndocumentedAPI=Les API les moins documentées -noMeasures=Aucune mesure -anyPriority=Toutes les priorités -moreDetails=Détails -lcom4=Manque de cohésion entre méthodes -rfc=Response for class -designTitle=
\ No newline at end of file |