From: simonbrandhof Date: Thu, 23 Dec 2010 00:15:40 +0000 (+0000) Subject: update labels of variation select boxes X-Git-Tag: 2.6~236 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e7dacd3a82d2de6a1cf25694d13ff3b9a86c506;p=sonarqube.git update labels of variation select boxes --- diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java index 5a1767f0eb0..4d2fa97d408 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java @@ -31,6 +31,9 @@ public interface I18nConstants extends com.google.gwt.i18n.client.Constants { @DefaultStringValue("No filters") String noFilters(); + @DefaultStringValue("Added...") + String addedPeriod(); + @DefaultStringValue("Expand:") String expand(); diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java index 804b143edb8..99de6907d55 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java @@ -127,7 +127,7 @@ public class ViolationsViewer extends Page { private void initPeriodBox() { periodBox = new ListBox(); periodBox.setStyleName("small"); - periodBox.addItem(I18nConstants.INSTANCE.noFilters()); + periodBox.addItem(I18nConstants.INSTANCE.addedPeriod()); initPeriod(1); initPeriod(2); @@ -141,7 +141,7 @@ public class ViolationsViewer extends Page { if (period != null) { Date date = JsonUtils.parseDateTime(Configuration.getParameter("period" + periodIndex + "_date")); if (date != null) { - periodBox.addItem(period); + periodBox.addItem("Added " + period); dateFilters.add(date); } } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index 184f74aa749..a62478a85fc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -83,13 +83,13 @@ module ApplicationHelper label=nil if mode if mode=='days' - label = "%s days ago" % mode_param + label = "over %s days" % mode_param elsif mode=='version' - label = "Version %s" % mode_param + label = "since version %s" % mode_param elsif mode=='previous_analysis' - label = "Previous analysis (%s)" % localize(Date.parse(mode_param)) + label = "since previous analysis (%s)" % localize(Date.parse(mode_param)) elsif mode=='date' - label = "Date: #{localize(Date.parse(mode_param))}" + label = "since #{localize(Date.parse(mode_param))}" end end label diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb index b6473f95dee..90b920a0174 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb @@ -32,7 +32,7 @@ module DashboardHelper label=period_label(snapshot, index) if label selected=(params[:period]==index.to_s ? 'selected' : '') - "" + "" else nil end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb index 0016d5e7919..8cdfaf522e2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb @@ -26,13 +26,13 @@ module DrilldownHelper if mode if mode=='days' - label = "New violations from %s previous days" % mode_param + label = "Added over %s previous days" % mode_param elsif mode=='version' - label = "New violations since version %s" % mode_param + label = "Added since version %s" % mode_param elsif mode=='previous_analysis' - label = "New violations since previous analysis (%s)" % localize(Date.parse(mode_param)) + label = "Added since previous analysis (%s)" % localize(Date.parse(mode_param)) elsif mode=='date' - label = "New violations since #{localize(Date.parse(mode_param))}" + label = "Added since #{localize(Date.parse(mode_param))}" end if label selected=(params[:period]==index.to_s ? 'selected' : '') diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb index 9ba8ca4c1bf..27f66bda913 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb @@ -171,14 +171,14 @@ module FiltersHelper def period_name(property) if property=='previous_analysis' - "Compare to previous analysis" + "Δ since previous analysis" elsif property =~ /^[\d]+(\.[\d]+){0,1}$/ # is integer - "Compare to #{property} days ago" + "Δ over #{property} days" elsif property =~ /\d{4}-\d{2}-\d{2}/ - "Compare to #{property}" + "Δ since #{property}" elsif !property.blank? - "Compare to version #{property}" + "Δ since version #{property}" else nil end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb index dad5d8ed91a..ce47937e37c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb @@ -21,7 +21,7 @@ -
- + <% period_names.each_with_index do |name, index| %>