diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-07-18 15:32:16 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-07-18 15:33:06 +0200 |
commit | 1f853451f7754607a2534578e4ac8c403cb0fe37 (patch) | |
tree | 55f01d8d3546c1a851f06c151bd0ab45ce712dae | |
parent | 042d19c020d8ebd296ef7ea43e98f86d5adb80a5 (diff) | |
download | sonarqube-1f853451f7754607a2534578e4ac8c403cb0fe37.tar.gz sonarqube-1f853451f7754607a2534578e4ac8c403cb0fe37.zip |
SONAR-2589 Modification of all web ruby templates to use bundles
- Add I18n for reviews
- Add I18n for markdown
- Add I18n for user auto-suggest field
12 files changed, 117 insertions, 87 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 ecfe127b689..11617756374 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 @@ -24,17 +24,24 @@ view.size.paragraphs_suffix=\ paragraphs #------------------------------------------------------------------------------ add_verb=Add +age=Age and=And +any=Any assign=Assign +assignee=Assignee author=Author ascending=Ascending blocker=Blocker +bold=Bold build_date=Build date cancel=Cancel change_verb=Change class=Class classes=Classes +closed=Closed +code=Code color=Color +created=Created criteria=Criteria critical=Critical date=Date @@ -47,6 +54,7 @@ display=Display edit=Edit file=File files=Files +identifier_abbreviated=Id info=Info key=Key language=Language @@ -55,10 +63,13 @@ links=Links login=Login major=Major max=Max +me=Me min=Min minor=Minor name=Name none=None +open=Open +open_verb=Open operations=Operations order=Order package=Package @@ -67,33 +78,42 @@ password=Password path=Path project=Project projects=Projects -reset_verb=Reset -search_verb=Search -shared=Shared -view=View -views=Views raw=Raw reassign=Reassign reopen=Reopen reopened=Reopened +reset_verb=Reset resolve=Resolve +resolved=Resolved result=Result +results=Results rule=Rule +review=Review +reviews=Reviews review_verb=Review +search_verb=Search select_verb=Select severity=Severity +severity_abbreviated=Se. +shared=Shared size=Size +status=Status +status_abbreviated=St. sub_project=Sub-project sub_projects=Sub-projects sub_view=Sub-view sub_views=Sub-views table=Table +title=Titre treemap=Treemap +updated=Updated unfollow=Unfollow unit_test=Unit test unit_tests=Unit tests value=Value variarion=Variation +view=View +views=Views violations=Violations version=Version @@ -113,6 +133,8 @@ added_since_version=Added since version {0} alerts_feed=Alerts feed all_violations=All violations assigned_to=Assigned to +bulleted_point=Bulleted point +created_by=Created by delta_since_previous_analysis=Δ since previous analysis delta_over_x_days=Δ over {0} days delta_since=Δ since {0} @@ -123,6 +145,7 @@ false_positives_only=False-Positives only full_source=Full source greater_or_equals=Greater or equals greater_than=Greater than +help_tips=Help tips less_or_equals=Less or equals less_than=Less than move_left=Move left @@ -137,6 +160,7 @@ save_and_close=Save & Close save_and_preview=Save & Preview select_a_metric=Select a metric time_changes=Time changes +update_comment=Update comment #------------------------------------------------------------------------------ @@ -249,11 +273,17 @@ filters.shared_filters_description=These filters are shared by administrators an # #------------------------------------------------------------------------------ +reviews.review_number=Review #{0} reviews.do_you_want_to_reopen=Do you want to reopen this review? reviews.do_you_want_to_resolve=Do you want to resolve this review? reviews.flag_as_false_positive=Flag as false-positive reviews.unflag_as_false_positive=Unflag as false-positive reviews.do_you_want_to_delete_comment=Do you want to delete this comment? +reviews.only_false_positives=Only false positives +reviews.without_false_positives=Without false positives +reviews.showing_false_positives_only=Showing false positives only +reviews.why_false_positive=Why is it a false-positive ? +reviews.why_not_false_positive=Why is it not a false-positive anymore ?" #------------------------------------------------------------------------------ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb index 695f922dbd2..f5c2843f204 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb @@ -131,7 +131,7 @@ module UsersHelper unless param_id_value.blank? user = User.find(:all, :conditions => [ "login = ?", param_id_value ]).first param_displayed_value = user.name if user - param_displayed_value += " (me)" if user && current_user && current_user.login == param_id_value + param_displayed_value += " (#{message('me').downcase})" if user && current_user && current_user.login == param_id_value end server_url = url_for :controller => 'users', :action => 'autocomplete' diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb index d116702f885..c15a405b420 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb @@ -1,16 +1,16 @@ -<h3>Help Tips</h3> +<h3><%= message('help_tips') -%></h3> <table> <tr> - <td>*bold*</td> + <td>*<%= message('bold') -%>*</td> <td class="sep"></td> - <td><b>bold</b></td> + <td><b><%= message('bold') -%></b></td> </tr> <tr> - <td>``code``</td> + <td>``<%= message('code') -%>``</td> <td class="sep"></td> - <td><code>code</code></td> + <td><code><%= message('code') -%></code></td> </tr> <tr> - <td colspan="3">* Bulleted point</td> + <td colspan="3">* <%= message('bulleted_point') -%></td> </tr> </table>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_assign_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_assign_form.html.erb index 2ec5fe829e0..df4a07ab164 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_assign_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_assign_form.html.erb @@ -3,11 +3,11 @@ <%= hidden_field_tag :id, params[:review_id] -%> <%= user_autocomplete_field "assignee_login", "" -%> - <%= submit_to_remote "submit_btn", "Assign", + <%= submit_to_remote "submit_btn", message('assign'), :url => { :action => 'assign' }, :update => "review" -%> - <%= link_to_remote 'Cancel', + <%= link_to_remote message('cancel'), :url => { :action => 'show', :id => params[:review_id] }, :update => "review" %> <script> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb index 2a7723c8324..92067818d04 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb @@ -1,5 +1,5 @@ <% - button=(@comment ? 'Update comment' : 'Add comment') + button=(@comment ? message('update_comment') : message('add_comment')) %> <form method="POST" action="save_comment"> <input type="hidden" name="id" value="<%= params[:id] -%>"/> @@ -14,7 +14,7 @@ <br/> <%= submit_to_remote "submit_btn", button, :url => { :action => 'save_comment'}, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'review' -%> - <%= link_to_remote 'Cancel', :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%> + <%= link_to_remote message('cancel'), :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%> </td> <td class="sep"></td> <td style="vertical-align:top;width: 90px"> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb index b4a0be8ac11..3a2befa2df4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_false_positive_form.html.erb @@ -1,10 +1,10 @@ <% if params[:false_positive]=='true' - title = "Why is it a false-positive ?" - button = "Flag as false-positive" + title = message('reviews.why_false_positive') + button = message('reviews.flag_as_false_positive') else - title = "Why is it not a false-positive anymore ?" - button = "Unflag as false-positive" + title = message('reviews.why_not_false_positive') + button = message('reviews.unflag_as_false_positive') end %> <form method="POST" action="violation_flag_as_false_positive"> @@ -16,5 +16,5 @@ <textarea id="commentText" rows="8" name="comment" style="width: 100%" onkeyup="if (this.value=='') $('submit_btn').disabled='true'; else $('submit_btn').disabled='';"></textarea> <%= submit_to_remote "submit_btn", button, :url => { :action => 'flag_as_false_positive' }, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'review' -%> - <%= link_to_remote 'Cancel', :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%> + <%= link_to_remote message('cancel'), :url => {:action => 'show', :id => params[:id]}, :update => 'review' -%> </form> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb index 542a584c296..55ff8a79433 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb @@ -1,10 +1,10 @@ <div id="rev_<%= review.id -%>"> <div class="reportTitle"> - <h2>Review #<%= h(review.id.to_s) -%> - <%= h(review.title) -%></h2> + <h2><%= message('reviews.review_number', :params => h(review.id.to_s)) -%> - <%= h(review.title) -%></h2> <% if review.false_positive %> <%= image_tag("sep12.png") -%> - <span class="falsePositive">False-Positive</span> + <span class="falsePositive"><%= message('false_positive') -%></span> <% end %> <% @@ -18,13 +18,13 @@ <% if !violation_switched_off %> - <%= link_to_remote (review.isResolved? ? "Reopen" : "Resolve"), + <%= link_to_remote (review.isResolved? ? message('reopen') : message('resolve')), :url => { :controller => "reviews", :action => "change_status", :id => review.id}, :update => "review", - :confirm => review.isResolved? ? "Do you want to reopen this review?" : "Do you want to resolve this review?" -%> + :confirm => review.isResolved? ? message('reviews.do_you_want_to_reopen') : message('reviews.do_you_want_to_resolve') -%> <% unless review.isResolved? %> - <%= link_to_remote (review.assignee_id ? "Reassign" : "Assign"), + <%= link_to_remote (review.assignee_id ? message('reassign') : message('assign')), :url => { :controller => "reviews", :action => "assign_form", :review_id => review.id}, :update => "assignForm", :complete => "$('rActions').hide(); $('editActions').hide(); $('assignee_login').focus();" -%> @@ -33,7 +33,7 @@ <% end %> <% end %> <% if review.can_change_false_positive_flag? %> - <%= link_to_remote (violation_switched_off ? "Unflag as false-positive" : "Flag as false-positive"), + <%= link_to_remote (violation_switched_off ? message('reviews.unflag_as_false_positive') : message('reviews.flag_as_false_positive')), :url => { :controller => "reviews", :action => "false_positive_form", :id => review.id, :false_positive => !violation_switched_off }, :update => "reviewForm", :complete => "$('reviewForm').show(); $('rActions').hide(); $('editActions').hide(); $('commentText').focus();" -%> @@ -46,21 +46,21 @@ <table class="reportDetails"> <tr> <td class="key"> - Status: + <%= message('status') -%>: </td> <td class="val"> - <%= image_tag "status/#{review.status}.png" -%> <%= review.status.capitalize -%> + <%= image_tag "status/#{review.status}.png" -%> <%= message(review.status.downcase).capitalize -%> </td> <td class="key"> - Severity: + <%= message('severity') -%>: </td> <td class="val"> - <%= image_tag "priority/#{review.severity}.png" -%> <%= review.severity.capitalize -%> + <%= image_tag "priority/#{review.severity}.png" -%> <%= message(review.severity.downcase).capitalize -%> </td> </tr> <tr> <td class="key"> - Assignee: + <%= message('assignee') -%>: </td> <td class="val"> <span id="assignForm"> @@ -68,7 +68,7 @@ </span> </td> <td class="key"> - Author: + <%= message('author') -%>: </td> <td class="val"> <%= h(review.user.name) -%> @@ -76,13 +76,13 @@ </tr> <tr> <td class="key"> - Created: + <%= message('created') -%>: </td> <td class="val"> <%= l(review.created_at, :format => "%m/%b/%y %H:%M") -%> </td> <td class="key"> - Updated: + <%= message('updated') -%>: </td> <td class="val"> <%= l(review.updated_at, :format => "%m/%b/%y %H:%M") -%> @@ -91,7 +91,7 @@ <% if review.rule %> <tr> <td class="key"> - Rule: + <%= message('rule') -%>: </td> <td class="val" colspan="3"> <a onclick="window.open(this.href,'rule','height=800,width=900,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => review.rule.key, :layout => 'false' -%>"><%= h(review.rule.name) -%></a> @@ -100,7 +100,7 @@ <% end %> <tr> <td class="key"> - File: + <%= message('file') -%>: </td> <td class="val" colspan="3"> <%= qualifier_icon(@review.resource) -%> @@ -134,7 +134,7 @@ <%= image_tag("sep12.png") -%> - <%= link_to_remote "Add comment", + <%= link_to_remote message('add_comment'), :url => { :controller => "reviews", :action => "comment_form", :id => review.id }, :update => "reviewForm", :complete => "$('rActions').hide();$('editActions').hide();$('reviewForm').show();$('commentText').focus();" -%> @@ -142,16 +142,16 @@ if current_user.id == comment.user_id %> - <%= link_to_remote "Edit", + <%= link_to_remote message('edit'), :url => { :controller => "reviews", :action => "comment_form", :comment_id => comment.id, :id => review.id }, :update => "lastComment", :complete => "$('rActions').hide();$('editActions').hide();$('commentText').focus();" -%> <% unless comment_index == 0 %> - <%= link_to_remote "Delete", + <%= link_to_remote message('delete'), :url => { :controller => "reviews", :action => "delete_comment", :comment_id => comment.id, :id => review.id }, :update => "review", - :confirm => "Do you want to delete this comment?" -%> + :confirm => message('reviews.do_you_want_to_delete_comment') -%> <% end %> <% end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_assign_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_assign_form.html.erb index f29909b57dc..5977b875884 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_assign_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_assign_form.html.erb @@ -5,11 +5,11 @@ <%= hidden_field_tag :id, params[:violation_id] -%> <%= user_autocomplete_field "assignee_login", "" -%> - <%= submit_to_remote "submit_btn", "Assign", + <%= submit_to_remote "submit_btn", message('assign'), :url => { :action => 'violation_assign' }, :update => "vId" + params[:violation_id] -%> - <%= link_to_remote 'Cancel', + <%= link_to_remote message('cancel'), :url => { :action => 'display_violation', :id => params[:violation_id] }, :update => "vId" + params[:violation_id] %> <script> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb index b5324ab753b..20752d630fe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb @@ -1,5 +1,5 @@ <% - button=(@comment ? 'Update comment' : 'Add comment') + button=(@comment ? message('update_comment') : message('add_comment')) %> <form method="POST" onsubmit="new Ajax.Updater('vId<%= params[:id] -%>', '<%= url_for :action => 'violation_save_comment' -%>', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)});return false;"> @@ -18,11 +18,11 @@ :html => { :id => "submit_btn"+params[:id], :disabled => "true" }, :update => 'vId'+params[:id] -%> - <%= link_to_remote 'Cancel', :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> + <%= link_to_remote message('cancel'), :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> <% if @violation.review.nil? || @violation.review.comments.size==0 %> - <span>Assignee:</span> + <span><%= message('assignee') -%>:</span> <%= user_autocomplete_field "assignee_login", current_user.login -%> <% end %> </td> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb index 3c4e89354a1..4d7fbe789e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb @@ -1,10 +1,10 @@ <% if params[:false_positive]=='true' - title = "Why is it a false-positive ?" - button = "Flag as false-positive" + title = message('reviews.why_false_positive') + button = message('reviews.flag_as_false_positive') else - title = "Why is it not a false-positive anymore ?" - button = "Unflag as false-positive" + title = message('reviews.why_not_false_positive') + button = message('reviews.unflag_as_false_positive') end %> <form method="POST" action="violation_flag_as_false_positive"> @@ -16,5 +16,5 @@ <textarea id="commentText<%= params[:id] -%>" rows="8" name="comment" style="width: 100%" onkeyup="if (this.value=='') $('submit_btn<%= params[:id] -%>').disabled='true'; else $('submit_btn<%= params[:id] -%>').disabled='';"></textarea> <%= submit_to_remote "submit_btn"+params[:id], button, :url => { :action => 'violation_flag_as_false_positive' }, :html => { :id => "submit_btn"+params[:id], :disabled => "true" }, :update => 'vId'+params[:id] -%> - <%= link_to_remote 'Cancel', :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> + <%= link_to_remote message('cancel'), :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> </form> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb index 74eca028c2b..d1ac7bc7891 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb @@ -22,7 +22,7 @@ function launchSearch(columnName, link) { } </script> <div id="reviews-search"> - <h1>Reviews</h1> + <h1><%= message('reviews') -%></h1> <% form_tag({:action => 'index'}, {:method => 'get'}) do %> <table id="reviews-form" class="header1"> <thead> @@ -33,30 +33,30 @@ function launchSearch(columnName, link) { <tbody> <tr> <td width="1%" nowrap> - <span class="note">Status</span><br/> + <span class="note"><%= message('status') -%></span><br/> <select size="6" name="statuses[]" multiple="multiple" id="statuses" class="withIcons"> - <option <%= 'selected' if @statuses.include?('') -%> value="">Any</option> - <option value="<%= Review::STATUS_OPEN -%>" class="status_open" <%= 'selected' if @statuses.include?(Review::STATUS_OPEN) -%>>Open</option> - <option value="<%= Review::STATUS_REOPENED -%>" class="status_reopened" <%= 'selected' if @statuses.include?(Review::STATUS_REOPENED) -%>>Reopened</option> - <option value="<%= Review::STATUS_RESOLVED -%>" class="status_resolved" <%= 'selected' if @statuses.include?(Review::STATUS_RESOLVED) -%>>Resolved</option> - <option value="<%= Review::STATUS_CLOSED -%>" class="status_closed" <%= 'selected' if @statuses.include?(Review::STATUS_CLOSED) -%>>Closed</option> + <option <%= 'selected' if @statuses.include?('') -%> value=""><%= message('any') -%></option> + <option value="<%= Review::STATUS_OPEN -%>" class="status_open" <%= 'selected' if @statuses.include?(Review::STATUS_OPEN) -%>><%= message('open') -%></option> + <option value="<%= Review::STATUS_REOPENED -%>" class="status_reopened" <%= 'selected' if @statuses.include?(Review::STATUS_REOPENED) -%>><%= message('reopened') -%></option> + <option value="<%= Review::STATUS_RESOLVED -%>" class="status_resolved" <%= 'selected' if @statuses.include?(Review::STATUS_RESOLVED) -%>><%= message('resolved') -%></option> + <option value="<%= Review::STATUS_CLOSED -%>" class="status_closed" <%= 'selected' if @statuses.include?(Review::STATUS_CLOSED) -%>><%= message('closed') -%></option> </select> </td> <td width="1%" nowrap> - <span class="note">Severity</span><br/> + <span class="note"><%= message('severity') -%></span><br/> <select size="6" name="severities[]" multiple="multiple" id="severities" class="withIcons"> - <option <%= 'selected' if @severities.include?('') -%> value="">Any</option> - <option value="<%= Severity::BLOCKER -%>" class="sev_BLOCKER" <%= 'selected' if @severities.include?(Severity::BLOCKER) -%>>Blocker</option> - <option value="<%= Severity::CRITICAL -%>" class="sev_CRITICAL" <%= 'selected' if @severities.include?(Severity::CRITICAL) -%>>Critical</option> - <option value="<%= Severity::MAJOR -%>" class="sev_MAJOR" <%= 'selected' if @severities.include?(Severity::MAJOR) -%>>Major</option> - <option value="<%= Severity::MINOR -%>" class="sev_MINOR" <%= 'selected' if @severities.include?(Severity::MINOR) -%>>Minor</option> - <option value="<%= Severity::INFO -%>" class="sev_INFO" <%= 'selected' if @severities.include?(Severity::INFO) -%>>Info</option> + <option <%= 'selected' if @severities.include?('') -%> value=""><%= message('any') -%></option> + <option value="<%= Severity::BLOCKER -%>" class="sev_BLOCKER" <%= 'selected' if @severities.include?(Severity::BLOCKER) -%>><%= message('blocker') -%></option> + <option value="<%= Severity::CRITICAL -%>" class="sev_CRITICAL" <%= 'selected' if @severities.include?(Severity::CRITICAL) -%>><%= message('critical') -%></option> + <option value="<%= Severity::MAJOR -%>" class="sev_MAJOR" <%= 'selected' if @severities.include?(Severity::MAJOR) -%>><%= message('major') -%></option> + <option value="<%= Severity::MINOR -%>" class="sev_MINOR" <%= 'selected' if @severities.include?(Severity::MINOR) -%>><%= message('minor') -%></option> + <option value="<%= Severity::INFO -%>" class="sev_INFO" <%= 'selected' if @severities.include?(Severity::INFO) -%>><%= message('info') -%></option> </select> </td> <td width="1%" nowrap> - <span class="note">Project</span><br/> + <span class="note"><%= message('project') -%></span><br/> <select size="6" name="projects[]" multiple="multiple" id="projects"> - <option <%= 'selected' if @projects.include?('') -%> value="">Any</option> + <option <%= 'selected' if @projects.include?('') -%> value=""><%= message('any') -%></option> <% projects_for_select.each do |project| name=project.name(true) %> @@ -65,20 +65,20 @@ function launchSearch(columnName, link) { </select> </td> <td width="1%" nowrap> - <span class="note">Created by</span><br/> + <span class="note"><%= message('created_by') -%></span><br/> <%= user_autocomplete_field "author_login", @author_login, { :class => "max-width" } -%> <br/> - <span class="note">Assigned to</span><br/> + <span class="note"><%= message('assigned_to') -%></span><br/> <%= user_autocomplete_field "assignee_login", @assignee_login, { :class => "max-width" } -%> <br/> <br/> <select name="false_positives" id="false_positives" onchange="if(this.value=='only' || this.value=='with') {$('assignee_login').value = ''; $('autocompleteText-assignee_login').value = ''; $('statuses').value = '';};"> - <option <%= 'selected' if @false_positives=='without' -%> value="without">Without false positives</option> - <option <%= 'selected' if @false_positives=='only' -%> value="only">Only false positives</option> + <option <%= 'selected' if @false_positives=='without' -%> value="without"><%= message('reviews.without_false_positives') -%></option> + <option <%= 'selected' if @false_positives=='only' -%> value="only"><%= message('reviews.only_false_positives') -%></option> </select> </td> <td width="1%" style="padding-left: 20px" nowrap> - <span class="note">Id</span><br/> + <span class="note"><%= message('identifier_abbreviated') -%></span><br/> <%= text_field_tag "review_id", @id, :size => 10, :onkeyup => "reviewIdFieldModified(this)" -%> <br/> <br/> @@ -87,7 +87,7 @@ function launchSearch(columnName, link) { <div style="width:100%; text-align: right"> <input type="hidden" name="sort" id="sort" value="<%= @sort -%>"/> <input type="hidden" name="asc" id="asc" value="<%= @asc -%>"/> - <%= submit_tag "Search", :id => 'submit_search' %> + <%= submit_tag message('search_verb'), :id => 'submit_search' %> </div> </td> <td> @@ -102,38 +102,38 @@ function launchSearch(columnName, link) { if @reviews && !@reviews.empty? %> <% if @false_positives=='only' %> - <div style="color:#777777; font-size:93%; padding: 4px 0px 4px 10px;">Showing <span class="falsePositive">false positives</span> only</div> + <div style="color:#777777; font-size:93%; padding: 4px 0px 4px 10px;"><span class="falsePositive"><%= message('reviews.showing_false_positives_only') -%></span></div> <% end %> <table id="reviews-list" class="data width100"> <thead> <tr> <th width="1%" nowrap> - <a href="#" onClick="launchSearch('status', this)">St.</a> + <a href="#" onClick="launchSearch('status', this)"><%= message('status_abbreviated') -%></a> <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'status' -%> </th> <th width="1%" nowrap> - <a href="#" onClick="launchSearch('id', this)">Id</a> + <a href="#" onClick="launchSearch('id', this)"><%= message('identifier_abbreviated') -%></a> <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'id' -%> </th> <th width="1%" nowrap> - <a href="#" onClick="launchSearch('severity', this)">Se.</a> + <a href="#" onClick="launchSearch('severity', this)"><%= message('severity_abbreviated') -%></a> <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'severity' -%> </th> <th> - <a href="#" onClick="launchSearch('title', this)">Title</a> + <a href="#" onClick="launchSearch('title', this)"><%= message('title') -%></a> <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'title' -%> </th> - <th width="1%">Project</th> - <th>Assignee</th> + <th width="1%"><%= message('project') -%></th> + <th><%= message('assignee') -%></th> <th> - <a href="#" onClick="launchSearch('updated_at', this)">Age</a> + <a href="#" onClick="launchSearch('updated_at', this)"><%= message('age') -%></a> <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'updated_at' -%> </th> </tr> </thead> <tfoot> <tr> - <td colspan="6"><%= @reviews.size -%> results + <td colspan="6"><%= @reviews.size -%> <%= message('results') -%> </tr> </tfoot> <tbody> @@ -142,11 +142,11 @@ function launchSearch(columnName, link) { comment = review.comments.last %> <tr class="<%= cycle('even', 'odd') -%>"> - <td><img src="<%= ApplicationController.root_context -%>/images/status/<%= review.status -%>.png" title="<%= review.status.capitalize -%>"/></td> + <td><img src="<%= ApplicationController.root_context -%>/images/status/<%= review.status -%>.png" title="<%= message(review.status.downcase).capitalize -%>"/></td> <td> <%= link_to h(review.id), :controller => "reviews", :action => "view", :id => review.id -%> </td> - <td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= review.severity -%>.png" title="<%= review.severity.capitalize -%>"/></td> + <td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= review.severity -%>.png" title="<%= message(review.severity.downcase).capitalize -%>"/></td> <td> <%= link_to h(review.title), :controller => "reviews", :action => "view", :id => review.id -%> <div class="comment-excerpt"> @@ -168,14 +168,14 @@ function launchSearch(columnName, link) { <% elsif @reviews %> - <p>No results</p> + <p><%= message('no_results') -%></p> <% end %> <% if @security_exclusions %> <br/> - <p class="notes">Due to security settings, some results are not being displayed.</p> + <p class="notes"><%= message('results_not_display_due_to_security') -%></p> <% end %> </div> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/users/_autocomplete.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/users/_autocomplete.html.erb index 3f43d346192..182a0994d7f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/users/_autocomplete.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/users/_autocomplete.html.erb @@ -4,6 +4,6 @@ @users.each do |user| user_name = user.name %> - <li id="<%= h(user.login) -%>"><strong><%= h(user_name)[0..@char_count-1] -%></strong><%= h(user_name)[@char_count..user_name.size-1] -%> <i><%= "(me)" if current_user_login == user.login -%></i></li> + <li id="<%= h(user.login) -%>"><strong><%= h(user_name)[0..@char_count-1] -%></strong><%= h(user_name)[@char_count..user_name.size-1] -%> <i><%= "(#{message('me').downcase})" if current_user_login == user.login -%></i></li> <% end %> </ul> |