aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-27 13:41:11 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-27 13:41:11 +0200
commitbf3e16cf8d55aaa76b68516280050eefca2ea0da (patch)
tree9a4140b725ad4cd26f4f8b9c1b0043a13dda85f2
parente6543b4d816657feb45a1684506180d789378f85 (diff)
downloadsonarqube-bf3e16cf8d55aaa76b68516280050eefca2ea0da.tar.gz
sonarqube-bf3e16cf8d55aaa76b68516280050eefca2ea0da.zip
SONAR-2547 support i18n
-rw-r--r--plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties25
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb22
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb18
3 files changed, 44 insertions, 21 deletions
diff --git a/plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties b/plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties
index 9eb6a1ab6b1..a266ae44fdb 100644
--- a/plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties
+++ b/plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties
@@ -443,7 +443,7 @@ widget.complexity.per_file.suffix=\ /file
widget.complexity.total=Total
widget.custom_measures.title=Custom Measures
-widget.custom_measures.description=Select the measures to display
+widget.custom_measures.description=Display a list of selected measures.
widget.description.title=Description
widget.description.description=Displays general project information
@@ -527,6 +527,29 @@ violations_drilldown.any_severity=Any severity
violations_drilldown.any_rule=Any rule
violations_drilldown.no_violations=No violations
+
+#------------------------------------------------------------------------------
+#
+# MANUAL MEASURES
+#
+#------------------------------------------------------------------------------
+
+manual_measures.add_measure_link=Add measure
+manual_measures.manage_metrics_link=Manage metrics
+manual_measures.col.domain=Domain
+manual_measures.col.metric=Metric
+manual_measures.col.value=Value
+manual_measures.col.description=Description
+manual_measures.col.author=Author
+manual_measures.col.date=Date
+manual_measures.col.operations=Operations
+manual_measures.col.last_change=Last change
+manual_measures.col.last_change_label=By {0} at {1}
+manual_measures.add_measure_title=Add manual measure
+manual_measures.save_button=Save
+manual_measures.save_and_add_button=Save & Add new again
+
+
#------------------------------------------------------------------------------
#
# TIME MACHINE
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
index 69375a40a26..634dc528901 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
@@ -15,10 +15,10 @@
<ul class="operations">
<li class="last">
<%= image_tag 'add.png' -%>
- <a href="<%= ApplicationController.root_context -%>/manual_measures/new/<%= @resource.id -%>" id="addMeasureLink">Add measure</a>
+ <a href="<%= ApplicationController.root_context -%>/manual_measures/new/<%= @resource.id -%>" id="addMeasureLink"><%= message('manual_measures.add_measure_link') -%></a>
</li>
</ul>
- <h1>Manual measures</h1>
+ <h1><%= message('manual_measures.page') -%></h1>
</div>
@@ -26,13 +26,13 @@
<thead>
<tr>
<th style="padding: 0; margin: 0" class="nosort"></th>
- <th class="thin nowrap sortfirstasc">Domain</th>
- <th class="thin nowrap">Metric</th>
- <th class="thin nowrap" style="text-align: right">Value</th>
- <th>Description</th>
- <th style="text-align: right">Author</th>
- <th style="text-align: right">Date</th>
- <th class="thin nowrap nosort">Operations</th>
+ <th class="thin nowrap sortfirstasc"><%= message('manual_measures.col.domain') -%></th>
+ <th class="thin nowrap"><%= message('manual_measures.col.metric') -%></th>
+ <th class="thin nowrap" style="text-align: right"><%= message('manual_measures.col.value') -%></th>
+ <th><%= message('manual_measures.col.description') -%></th>
+ <th style="text-align: right"><%= message('manual_measures.col.author') -%></th>
+ <th style="text-align: right"><%= message('manual_measures.col.date') -%></th>
+ <th class="thin nowrap nosort"><%= message('manual_measures.col.operations') -%></th>
</tr>
</thead>
<tbody>
@@ -59,8 +59,8 @@
<%= l(measure.updated_at) -%>
</td>
<td class="thin nowrap">
- <a href="<%= url_for :controller => 'manual_measures', :action => 'new', :metric => measure.metric.key, :id => @resource.id -%>">Edit</a>
- <%= link_to 'Delete', {:action => 'delete', :metric => measure.metric.key, :id => @resource.id}, {:method => 'POST', :confirm => "This measure will be deleted during next project analysis", :class => 'action'} -%>
+ <a href="<%= url_for :controller => 'manual_measures', :action => 'new', :metric => measure.metric.key, :id => @resource.id -%>"><%= message('edit') -%></a>
+ <%= link_to message('delete'), {:action => 'delete', :metric => measure.metric.key, :id => @resource.id}, {:method => 'POST', :confirm => "This measure will be deleted during next project analysis", :class => 'action'} -%>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb
index e3974c5f06e..6ba201f4bfe 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/new.html.erb
@@ -8,7 +8,7 @@
return true;
}
</script>
-<h1 class="marginbottom10">Add manual measure</h1>
+<h1 class="marginbottom10"><%= message('manual_measures.add_measure_title') -%></h1>
<form action="<%= url_for :action => (@measure ? 'save' : 'new') -%>" method="POST" id="createForm">
<input type="hidden" name="id" value="<%= @resource.id -%>"/>
<table class="width100 form">
@@ -21,7 +21,7 @@
<select name="metric" onchange="changeMetric();" id="metricSelect">
<%= options_grouped_by_domain(Metric.all.select { |m| m.user_managed? }, (@metric ? @metric.key : nil), :include_empty => true) -%>
</select>
- <%= link_to 'Manage metrics', :controller => 'metrics', :action => 'index' if has_role?(:admin)-%>
+ <%= link_to message('manual_measures.manage_metrics_link'), :controller => 'metrics', :action => 'index' if has_role?(:admin)-%>
<% if @metric && @metric.description %>
<br/>
@@ -32,7 +32,7 @@
<% if @measure %>
<tr>
<td class="keyCell">
- Value:
+ <%= message('manual_measures.col.value') -%>:
</td>
<td>
<input type="text" name="val" id="valueText" value="<%= @measure.value -%>"/>
@@ -40,7 +40,7 @@
</tr>
<tr>
<td class="keyCell">
- Description:
+ <%= message('manual_measures.col.description') -%>:
</td>
<td>
<textarea rows="5" cols="80" name="desc" class="width100"><%= @measure.description -%></textarea>
@@ -49,10 +49,10 @@
<% unless @measure.new_record?() %>
<tr>
<td class="keyCell">
- Last change:
+ <%= message('manual_measures.col.last_change') -%>:
</td>
<td>
- By <%= @measure.username -%> on <%= l(@measure.updated_at) -%>
+ <%= message('manual_measures.col.last_change_label', :params => [@measure.username, l(@measure.updated_at)]) -%>
</td>
</tr>
<% end %>
@@ -63,10 +63,10 @@
<td>
<% if @measure %>
<input type="hidden" name="redirect_to_new" value="false" id="redirect_to_new"/>
- <input type="submit" value="Save"/>
- <input type="submit" value="Save & Add new" onclick="saveAndAddNew()"/>
+ <input type="submit" value="<%= message('manual_measures.save_button') -%>"/>
+ <input type="submit" value="<%= message('manual_measures.save_and_add_button') -%>" onclick="saveAndAddNew()"/>
<% end %>
- <%= link_to 'Cancel', :action => 'index', :id => @resource.id -%>
+ <%= link_to message('cancel'), :action => 'index', :id => @resource.id -%>
</td>
</tr>
</tbody>