Browse Source

SONAR-2589 Modification of all web ruby templates to use bundles

- Add I18n for events in dashboards
- Add I18n for dependencies
tags/2.10
Fabrice Bellingard 13 years ago
parent
commit
d3ae752094

+ 42
- 0
plugins/sonar-i18n-en-plugin/src/main/resources/org/sonar/i18n/core.properties View File

@@ -6,6 +6,7 @@

add_verb=Add
age=Age
all=All
and=And
any=Any
assign=Assign
@@ -16,12 +17,15 @@ blocker=Blocker
bold=Bold
build_date=Build date
cancel=Cancel
category=Category
change_verb=Change
configure=Configure
class=Class
classes=Classes
closed=Closed
code=Code
color=Color
create=Create
created=Created
criteria=Criteria
critical=Critical
@@ -35,6 +39,7 @@ directory=Directory
directories=Directories
display=Display
edit=Edit
events=Events
file=File
files=Files
filter_verb=Filter
@@ -122,6 +127,7 @@ added_since_previous_analysis_detailed=Added since previous analysis ({0})
added_since_version=Added since version {0}
alerts_feed=Alerts feed
all_violations=All violations
are_you_sure=Are you sure?
assigned_to=Assigned to
bulleted_point=Bulleted point
click_to_add_to_favourites=Click to add to favourites
@@ -159,6 +165,7 @@ save_and_preview=Save & Preview
select_a_metric=Select a metric
set_as_default=Set as default
shared_by=Shared by
show_more=Show more
since_x=since {0}
since_previous_analysis=since previous analysis
since_previous_analysis_detailed=since previous analysis ({0})
@@ -182,6 +189,17 @@ project_links.scm_ro=Read-only connection
project_links.scm_dev=Developer connection


#------------------------------------------------------------------------------
#
# EVENT CATEGORIES
#
#------------------------------------------------------------------------------

event.category.Version=Version
event.category.Alert=Alert
event.category.Profile=Profile


#------------------------------------------------------------------------------
#
# LAYOUT
@@ -287,6 +305,20 @@ filters.shared_filters=Shared filters
filters.shared_filters_description=These filters are shared by administrators and can be followed without copying them.


#------------------------------------------------------------------------------
#
# DEPENDENCIES
#
#------------------------------------------------------------------------------

dependencies.search_library=Search library
dependencies.search_help=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
dependencies.select_library=Select library
dependencies.select_version=Select version
dependencies.used_by=Used by
dependencies.not_used=Not used


#------------------------------------------------------------------------------
#
# DASHBOARD / DASHBOARDS
@@ -442,6 +474,16 @@ reviews.why_false_positive=Why is it a false-positive ?
reviews.why_not_false_positive=Why is it not a false-positive anymore ?"


#------------------------------------------------------------------------------
#
# EVENTS
#
#------------------------------------------------------------------------------

events.add_an_event=Add an event
events.name_required=Name (required)


#------------------------------------------------------------------------------
#
# METRIC DOMAINS

+ 7
- 8
sonar-server/src/main/webapp/WEB-INF/app/views/dependencies/index.html.erb View File

@@ -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') -%>">

+ 6
- 6
sonar-server/src/main/webapp/WEB-INF/app/views/events/edit.html.erb View File

@@ -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>

+ 7
- 7
sonar-server/src/main/webapp/WEB-INF/app/views/events/new.html.erb View File

@@ -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>

+ 8
- 8
sonar-server/src/main/webapp/WEB-INF/app/views/project/events.html.erb View File

@@ -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" />

Loading…
Cancel
Save