From d3ae752094a1192724e6d9970168b5613683ac16 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 20 Jul 2011 15:15:00 +0200 Subject: SONAR-2589 Modification of all web ruby templates to use bundles - Add I18n for events in dashboards - Add I18n for dependencies --- .../webapp/WEB-INF/app/views/dependencies/index.html.erb | 15 +++++++-------- .../main/webapp/WEB-INF/app/views/events/edit.html.erb | 12 ++++++------ .../main/webapp/WEB-INF/app/views/events/new.html.erb | 14 +++++++------- .../webapp/WEB-INF/app/views/project/events.html.erb | 16 ++++++++-------- 4 files changed, 28 insertions(+), 29 deletions(-) (limited to 'sonar-server') 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;
-
-

Find out which projects depend on a given library.
- Search by group, artifact or name. E.g.: org.apache.struts, struts-core or Struts

+
+

<%= message('dependencies.search_help') -%>

<% if @resources %>
-

Select library :

+

<%= message('dependencies.select_library') -%> :

<% if @resources.empty? %> - + <% end %> <% @resources.each do |resource|%> @@ -53,7 +52,7 @@ padding: 5px; <% if @versions %>
-

Select version :

+

<%= message('dependencies.select_version') -%> :

No data
<%= message('no_data') -%>
@@ -75,12 +74,12 @@ padding: 5px; <% if @project_snapshots %>
-

Used by :

+

<%= message('dependencies.used_by') -%> :

<% if @project_snapshots.empty? %> - + <% end %> <% @project_snapshots.each do |project_snapshot|%> 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 @@ @@ -25,19 +25,19 @@
Not used
<%= message('dependencies.not_used') -%>
- Name (required)
+ <%= message('events.name_required') -%>
<%= f.text_field :name %>
- Category (<%= link_to 'configure', {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)
- <%= f.select(:category, @categories.collect {|c| [ c.name, c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %> + <%= message('category') -%> (<%= link_to message('configure').downcase, {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)
+ <%= f.select(:category, @categories.collect {|c| [ message('event.category.' + c.name, :default => c.name), c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %>
- Date
+ <%= message('date') -%>
<%= f.date_select :event_date %>
- Description
+ <%= message('description') -%>
<%= f.text_area :description, :cols => 50, :rows => 3 %>
- <%= f.submit "Update" %> cancel + <%= f.submit message('update_verb') %> <%= message('cancel') -%>
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 @@ - Name (required)
+ <%= message('events.name_required') -%>
<%= f.text_field :name %> - Category (<%= link_to 'configure', {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)
- <%= f.select(:category, @categories.collect {|c| [ c.name, c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %> + <%= message('category') -%> (<%= link_to message('configure').downcase, {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)
+ <%= f.select(:category, @categories.collect {|c| [ message('event.category.' + c.name, :default => c.name), c.name ] }, {:include_blank => true}, {:onChange => "selectEventCateg()"}) %> <% @categories.each do |categ| %> - + <% end %> - Date
+ <%= message('date') -%>
<%= f.date_select :event_date %> - Description
+ <%= message('description') -%>
<%= f.text_area :description, :cols => 50, :rows => 3 %> - <%= f.submit "Create" %> cancel + <%= f.submit message('create') %> <%= message('cancel') -%> 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) %> -

Events    +

<%= message('events') -%>   

@@ -25,7 +25,7 @@ %> <%= l(event.event_date.to_date) %> - <%= event.category %> + <%= h message('event.category.' + event.category, :default => event.category) %> <%= event.name %> <% unless event.description.blank? %> @@ -34,8 +34,8 @@ <% 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 %> @@ -49,12 +49,12 @@ <% if index>=max_rows %> - Show more + <%= message('show_more') -%> <% 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 %>
-- cgit v1.2.3