aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-07-20 15:15:00 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-07-20 15:16:48 +0200
commitd3ae752094a1192724e6d9970168b5613683ac16 (patch)
treef1281ddd5751f29dc21906fd43e875e1dccb26ac /sonar-server
parentec184554fcba165e64cfa1ed2b9b20b25938f6d4 (diff)
downloadsonarqube-d3ae752094a1192724e6d9970168b5613683ac16.tar.gz
sonarqube-d3ae752094a1192724e6d9970168b5613683ac16.zip
SONAR-2589 Modification of all web ruby templates to use bundles
- Add I18n for events in dashboards - Add I18n for dependencies
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb15
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb12
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb14
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb16
4 files changed, 28 insertions, 29 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb
index 46531a6be5b..286578434ae 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb
@@ -25,20 +25,19 @@ padding: 5px;
</style>
<form action="<%= ApplicationController.root_context -%>/dependencies/index" id="search_form">
<input type="text" name="search" value="<%= params[:search] -%>" id="search_input"> </input>
- <input type="submit" value="Search library" id="search_submit"></input><br/>
- <p class="small gray">Find out which projects depend on a given library.<br/>
- Search by group, artifact or name. E.g.: org.apache.struts, struts-core or Struts</p>
+ <input type="submit" value="<%= message('dependencies.search_library') -%>" id="search_submit"></input><br/>
+ <p class="small gray"><%= message('dependencies.search_help') -%></p>
</form>
<div id="deps_drilldown">
<% if @resources %>
<div id="artifacts_col" class="drilldown_col">
- <h3>Select library :</h3>
+ <h3><%= message('dependencies.select_library') -%> :</h3>
<div class="col">
<table>
<tbody>
<% if @resources.empty? %>
- <tr class="even"><td>No data</td></tr>
+ <tr class="even"><td><%= message('no_data') -%></td></tr>
<% end %>
<% @resources.each do |resource|%>
<tr class="<%= cycle('even', 'odd', :name => 'lib') -%> <%= 'selected' if resource==@resource -%>">
@@ -53,7 +52,7 @@ padding: 5px;
<% if @versions %>
<div id="versions_col" class="drilldown_col">
- <h3>Select version :</h3>
+ <h3><%= message('dependencies.select_version') -%> :</h3>
<div class="col">
<table>
<tbody>
@@ -75,12 +74,12 @@ padding: 5px;
<% if @project_snapshots %>
<div id="results_col" class="drilldown_col">
- <h3>Used by :</h3>
+ <h3><%= message('dependencies.used_by') -%> :</h3>
<div class="col">
<table>
<tbody>
<% if @project_snapshots.empty? %>
- <tr class="even"><td>Not used</td></tr>
+ <tr class="even"><td><%= message('dependencies.not_used') -%></td></tr>
<% end %>
<% @project_snapshots.each do |project_snapshot|%>
<tr class="<%= cycle('even', 'odd', :name => 'dep') -%>">
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb
index e6459cb8b31..a46f38c21e3 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb
@@ -8,12 +8,12 @@
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" width="1%">
- <span class="comments">Name (required)</span><br>
+ <span class="comments"><%= message('events.name_required') -%></span><br>
<%= f.text_field :name %>
</td>
<td class="left" nowrap="nowrap" valign="top">
- <span class="comments">Category (<%= link_to 'configure', {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)</span><br>
- <%= f.select(:category, @categories.collect {|c| [ c.name, c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %>
+ <span class="comments"><%= message('category') -%> (<%= link_to message('configure').downcase, {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)</span><br>
+ <%= f.select(:category, @categories.collect {|c| [ message('event.category.' + c.name, :default => c.name), c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %>
</td>
</tr>
<tr>
@@ -25,19 +25,19 @@
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <span class="comments">Date</span><br>
+ <span class="comments"><%= message('date') -%></span><br>
<%= f.date_select :event_date %>
</td>
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <span class="comments">Description</span><br>
+ <span class="comments"><%= message('description') -%></span><br>
<%= f.text_area :description, :cols => 50, :rows => 3 %>
</td>
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <%= f.submit "Update" %> <a href="#" onclick="$('event_form').hide()" class="action">cancel</a>
+ <%= f.submit message('update_verb') %> <a href="#" onclick="$('event_form').hide()" class="action"><%= message('cancel') -%></a>
</td>
</tr>
</table>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb
index 002a4b64e95..a04f5dc8be9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb
@@ -8,36 +8,36 @@
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" width="1%">
- <span class="comments">Name (required)</span><br>
+ <span class="comments"><%= message('events.name_required') -%></span><br>
<%= f.text_field :name %>
</td>
<td class="left" nowrap="nowrap" valign="top">
- <span class="comments">Category (<%= link_to 'configure', {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)</span><br>
- <%= f.select(:category, @categories.collect {|c| [ c.name, c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %>
+ <span class="comments"><%= message('category') -%> (<%= link_to message('configure').downcase, {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)</span><br>
+ <%= f.select(:category, @categories.collect {|c| [ message('event.category.' + c.name, :default => c.name), c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %>
</td>
</tr>
<tr>
<td colspan="2" id="event_cat_desc">
<% @categories.each do |categ| %>
- <span id='event_cat_desc_<%= categ.name -%>' style="display:none;" class='comments'><%= categ.description -%></span>
+ <span id='event_cat_desc_<%= categ.name -%>' style='display:none' class='comments'><%= categ.description -%></span>
<% end %>
<td>
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <span class="comments">Date</span><br>
+ <span class="comments"><%= message('date') -%></span><br>
<%= f.date_select :event_date %>
</td>
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <span class="comments">Description</span><br>
+ <span class="comments"><%= message('description') -%></span><br>
<%= f.text_area :description, :cols => 50, :rows => 3 %>
</td>
</tr>
<tr>
<td class="left" nowrap="nowrap" valign="top" colspan="2">
- <%= f.submit "Create" %> <a href="#" onclick="$('event_form').hide()" class="action">cancel</a>
+ <%= f.submit message('create') %> <a href="#" onclick="$('event_form').hide()" class="action"><%= message('cancel') -%></a>
</td>
</tr>
</table>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb
index 7d76f8ede80..0d520b56241 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb
@@ -1,10 +1,10 @@
<% show_admin_actions=is_admin?(@snapshot) %>
-<h3>Events &nbsp;&nbsp;
+<h3><%= message('events') -%> &nbsp;&nbsp;
<select class="small" id="select_category" onchange="<%= remote_function(:update => 'events_portlet', :url => { :controller => :project, :action => :events, :id => @snapshot.id },
:with => "'category=' + $F('select_category')", :method => 'get') -%>">
-<option value="">All</option>
+<option value=""><%= message('all') -%></option>
<% @categories.each do |categ| %>
-<option value="<%= h categ.name -%>" <%= 'selected' if @category==categ.name -%>><%= h categ.name %></option>
+<option value="<%= h categ.name -%>" <%= 'selected' if @category==categ.name -%>><%= h message('event.category.' + categ.name, :default => categ.name) %></option>
<% end %>
</select></h3>
@@ -25,7 +25,7 @@
%>
<tr class="<%= cycle 'even','odd' -%>">
<td x="<%= event.event_date -%>"><%= l(event.event_date.to_date) %></td>
- <td><%= event.category %></td>
+ <td><%= h message('event.category.' + event.category, :default => event.category) %></td>
<td><%= event.name %></td>
<td>
<% unless event.description.blank? %>
@@ -34,8 +34,8 @@
</td>
<td>
<% if show_admin_actions %>
- <%= link_to_remote 'Edit', {:url => edit_event_path(event), :method => :get, :update => "event_form", :complete => "$('event_form').show();"}, :class => 'action', :id => "edit_event_#{h event.name}" %>
- <%= link_to 'Delete', event, :confirm => 'Are you sure ?', :method => :delete, :class => 'action',:id => "delete_event_#{h event.name}" %>
+ <%= link_to_remote message('edit'), {:url => edit_event_path(event), :method => :get, :update => "event_form", :complete => "$('event_form').show();"}, :class => 'action', :id => "edit_event_#{h event.name}" %>
+ <%= link_to message('delete'), event, :confirm => message('are_you_sure'), :method => :delete, :class => 'action',:id => "delete_event_#{h event.name}" %>
<% end %>
</td>
</tr>
@@ -49,12 +49,12 @@
</table>
<% if index>=max_rows %>
- <a href="#" onclick="$('all_events').show();$('show_more_events').hide()" id="show_more_events" class="action">Show more</a>
+ <a href="#" onclick="$('all_events').show();$('show_more_events').hide()" id="show_more_events" class="action"><%= message('show_more') -%></a>
<% end %>
<% if show_admin_actions %>
-<%= link_to_remote "Add an event", {:url => { :controller => 'events', :action => "new", :rid => @snapshot.project_id, :sid => @snapshot.id },
+<%= link_to_remote message('events.add_an_event'), {:url => { :controller => 'events', :action => "new", :rid => @snapshot.project_id, :sid => @snapshot.id },
:update => "event_form", :success => "$('event_form').show();"}, {:class => 'action'} %>
<% end %>
<div id="event_form" />