- Add I18n to quality profiles - Add I18n to rules configuration - Add I18n to alertstags/2.10
@@ -4,8 +4,11 @@ | |||
# | |||
#------------------------------------------------------------------------------ | |||
action=Action | |||
active=Active | |||
add_verb=Add | |||
age=Age | |||
alerts=Alerts | |||
all=All | |||
and=And | |||
any=Any | |||
@@ -13,6 +16,8 @@ assign=Assign | |||
assignee=Assignee | |||
author=Author | |||
ascending=Ascending | |||
back=Back | |||
backup_verb=Backup | |||
blocker=Blocker | |||
bold=Bold | |||
build_date=Build date | |||
@@ -20,6 +25,7 @@ cancel=Cancel | |||
category=Category | |||
calendar=Calendar | |||
change_verb=Change | |||
changelog=Changelog | |||
configure=Configure | |||
class=Class | |||
classes=Classes | |||
@@ -27,6 +33,8 @@ clear_verb=Clear | |||
closed=Closed | |||
code=Code | |||
color=Color | |||
compare=Compare | |||
copy=Copy | |||
create=Create | |||
created=Created | |||
criteria=Criteria | |||
@@ -34,12 +42,14 @@ critical=Critical | |||
customize=Customize | |||
date=Date | |||
days=Days | |||
default=Default | |||
delete=Delete | |||
descending=Descending | |||
description=Description | |||
directory=Directory | |||
directories=Directories | |||
display=Display | |||
download_verb=Download | |||
edit=Edit | |||
events=Events | |||
file=File | |||
@@ -49,10 +59,13 @@ follow=Follow | |||
hide=Hide | |||
identifier_abbreviated=Id | |||
info=Info | |||
inactive=Inactive | |||
inheritance=Inheritance | |||
key=Key | |||
language=Language | |||
library=Library | |||
links=Links | |||
load_verb=Load | |||
login=Login | |||
major=Major | |||
max=Max | |||
@@ -66,11 +79,15 @@ on=On | |||
open=Open | |||
open_verb=Open | |||
operations=Operations | |||
optional=Optional | |||
order=Order | |||
package=Package | |||
packages=Packages | |||
parameters=Parameters | |||
password=Password | |||
path=Path | |||
permalinks=Permalinks | |||
plugin=Plugin | |||
project=Project | |||
projects=Projects | |||
raw=Raw | |||
@@ -83,15 +100,19 @@ resolved=Resolved | |||
result=Result | |||
results=Results | |||
rule=Rule | |||
rules=Rules | |||
rename=Rename | |||
review=Review | |||
reviews=Reviews | |||
review_verb=Review | |||
save=Save | |||
search_verb=Search | |||
select_verb=Select | |||
select_all=Select all | |||
severity=Severity | |||
severity_abbreviated=Se. | |||
shared=Shared | |||
show_verb=Show | |||
size=Size | |||
status=Status | |||
status_abbreviated=St. | |||
@@ -100,13 +121,18 @@ sub_projects=Sub-projects | |||
sub_view=Sub-view | |||
sub_views=Sub-views | |||
table=Table | |||
template=Template | |||
title=Titre | |||
to=To | |||
treemap=Treemap | |||
update_verb=Update | |||
updated=Updated | |||
unfollow=Unfollow | |||
unit_test=Unit test | |||
unit_tests=Unit tests | |||
unselect_verb=Unselect | |||
unselect_all=Unselect all | |||
user=User | |||
value=Value | |||
variarion=Variation | |||
view=View | |||
@@ -121,6 +147,7 @@ version=Version | |||
# | |||
#------------------------------------------------------------------------------ | |||
activate_all=Activate all | |||
add_comment=Add comment | |||
add_a_column=Add a column | |||
added_over_x_days=Added over {0} days | |||
@@ -132,10 +159,14 @@ alerts_feed=Alerts feed | |||
all_violations=All violations | |||
are_you_sure=Are you sure? | |||
assigned_to=Assigned to | |||
bulk_change=Bulk Change | |||
bulleted_point=Bulleted point | |||
coding_rules=Coding rules | |||
click_to_add_to_favourites=Click to add to favourites | |||
click_to_remove_from_favourites=Click to remove from favourites | |||
created_by=Created by | |||
deactivate_all=Deactivate all | |||
default_severity=Default severity | |||
default_sort_on=Default sort on | |||
delta_since_previous_analysis=Δ since previous analysis | |||
delta_over_x_days=Δ over {0} days | |||
@@ -311,6 +342,25 @@ filters.shared_filters=Shared filters | |||
filters.shared_filters_description=These filters are shared by administrators and can be followed without copying them. | |||
#------------------------------------------------------------------------------ | |||
# | |||
# REVIEWS | |||
# | |||
#------------------------------------------------------------------------------ | |||
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 ?" | |||
#------------------------------------------------------------------------------ | |||
# | |||
# DEPENDENCIES | |||
@@ -499,21 +549,111 @@ cloud.top_risk=Top risk | |||
#------------------------------------------------------------------------------ | |||
# | |||
# REVIEWS | |||
# QUALITY PROFILES | |||
# | |||
#------------------------------------------------------------------------------ | |||
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 ?" | |||
quality_profiles.quality_profiles=Quality profiles | |||
quality_profiles.new_profile=New profile | |||
quality_profiles.compare_profiles=Compare profiles | |||
quality_profiles.restore_profile=Restore profile | |||
quality_profiles.x_language_profiles= {0} profiles | |||
quality_profiles.optional_configuration_file=Optional configuration file | |||
quality_profiles.create_x_language_profile=Create {0} profile | |||
quality_profiles.are_you_sure_want_x_profile_as_default=Are you sure that you want to set the profile "{0}" as default ? | |||
quality_profiles.profile_x_created=Profile "{0}" created. Set it as default or link it to a project to use it for next measures. | |||
quality_profiles.profile_x_already_exists=This profile already exists: {0}. | |||
quality_profiles.please_type_profile_name=Please type a profile name. | |||
quality_profiles.profile_x_deleted=Profile "{0}" is deleted. | |||
quality_profiles.default_profile_is_x=Default profile is "{0}". | |||
quality_profiles.profile_x_not_activated=Profile "{0}" is created but not activated. | |||
quality_profiles.please_upload_backup_file=Please upload a backup file. | |||
quality_profiles.profile_x_associated_to_x_projects=Profile "{0}" associated to {0} projects. | |||
quality_profiles.profile_name_cant_be_blank=Profile name can not be blank. | |||
quality_profiles.profile_name_already_exists=This profile name already exists. | |||
quality_profiles.new_name=New name | |||
quality_profiles.name_for_new_profile=Name for the new profile | |||
quality_profiles.are_you_sure_want_delete_profile_x=Are you sure that you want to delete the profile "{0}" ? | |||
quality_profiles.editing_profile=Editing profile | |||
quality_profiles.profile_inheritance=Profile inheritance | |||
quality_profiles.available_projects=Available projects | |||
quality_profiles.associated_projects=Associated projects | |||
quality_profiles.no_projects_associated_to_profile_x=No projects are explicitly associated to the profile "{0}". | |||
quality_profiles.no_permalinks=No permalinks | |||
quality_profiles.including_x_overriding.suffix=, incl. {0} overriding | |||
quality_profiles.profile_cant_be_edited=This profile can not be edited. | |||
quality_profiles.set_parent=Set parent | |||
quality_profiles.inherit_rules_from_profile=Inherit rules configuration from the profile | |||
quality_profiles.no_changes_done_on_this_profile=No changes has been done on this quality profile. | |||
quality_profiles.changelog_from=Changelog from | |||
quality_profiles.no_version=no version | |||
quality_profiles.last_version_x_with_date=last version {0} ({1}) | |||
quality_profiles.version_x_with_date=version {0} ({1}) | |||
quality_profiles.profile_version=Profile version | |||
quality_profiles.severity_changed_from_x_to=Severity changed from {0}<b>{1}</b> to | |||
quality_profiles.severity_was_x=Severity was {0}<b>{1}</b> | |||
quality_profiles.severity_set_to_x=Severity set to {0}<b>{1}</b> | |||
quality_profiles.parameter_set_to_x=Parameter <b>{0}</b> set to <b>{1}</b> | |||
quality_profiles.parameter_was_x=Parameter <b>{0}</b> was <b>{1}</b> | |||
quality_profiles.parameter_reset_to_default_value_x=Parameter <b>{0}</b> reset to default value (was <b>{1}</b>) | |||
quality_profiles.parameter_changed_from_x_to_x=Parameter <b>{0}</b> changed from <b>{1}</b> to <b>{2}</b> | |||
quality_profiles.only_in_profile_x=Only in {0} | |||
quality_profiles.with_different_configuration=With different configuration | |||
quality_profiles.with_same_configuration=With same configuration | |||
quality_profiles.x_rules_only_in={0} rules only in | |||
quality_profiles.x_rules_have_different_configuration={0} rules have a different configuration | |||
#------------------------------------------------------------------------------ | |||
# | |||
# RULES CONFIGURATION | |||
# | |||
#------------------------------------------------------------------------------ | |||
rules_configuration.tab.new_rule=New rule | |||
rules_configuration.tab.edit_rule=Edit rule | |||
rules_configuration.profile_cant_be_updated_description=This profile can not be updated but it can be used as a template for your own configuration. Just copy it from the profiles page. | |||
rules_configuration.x_found_in_active_rules={0} found in active rules | |||
rules_configuration.x_found_in_inactive_rules={0} found in inactive rules | |||
rules_configuration.expand_collapse=expand/collapse | |||
rules_configuration.html_allowed=HTML is allowed. | |||
rules_configuration.inherited_from_parent=Inherited from parent | |||
rules_configuration.overrides_parent_definition=Overrides parent definition | |||
rules_configuration.copy_rule=Copy rule | |||
rules_configuration.edit_rule=Edit rule | |||
rules_configuration.revert_to_parent_definition=Revert to parent definition | |||
rules_configuration.not_inherited=Not inherited | |||
rules_configuration.inherited=Inherited | |||
rules_configuration.overrides=Overrides | |||
rules_configuration.rule_not_valid_message_x=Rule is not valid: <br/>{0} | |||
rules_configuration.rule_deleted=Rule deleted | |||
rules_configuration.unknown_rule=Unknown rule | |||
rules_configuration.x_rules_have_been_activated={0} rules have been activated. | |||
rules_configuration.x_rules_have_been_deactivated={0} rules have been deactivated. | |||
#------------------------------------------------------------------------------ | |||
# | |||
# ALERTS | |||
# | |||
#------------------------------------------------------------------------------ | |||
alerts.no_alerts=No alerts. | |||
alerts.notes.description=<p>Only project measures are checked against thresholds. Modules, packages and classes are ignored.</p>Project health icons represent : | |||
alerts.notes.ok=at least one threshold is defined, no threshold is reached. | |||
alerts.notes.warn=at least one warning threshold is reached, no error threshold is reached. | |||
alerts.notes.error=at least one error threshold is reached. | |||
alert.new_alert=New alert | |||
alert.editing_alert=Editing alert | |||
alert.create_alert=Create alert | |||
alert.select_metric=Select a metric | |||
alert.warning_threshold=Warning threshold | |||
alert.warning_tooltip=A warning is triggered when this value is reached. | |||
alert.error_threshold=Error threshold | |||
alert.error_tooltip=An error is triggered when this value is reached. | |||
alert.alert_created=Alert is created. | |||
alert.alert_updated=Alert is updated. | |||
alert.alert_deleted=Alert is deleted. | |||
#------------------------------------------------------------------------------ |
@@ -86,7 +86,7 @@ class AlertsController < ApplicationController | |||
respond_to do |format| | |||
if @alert.save | |||
flash[:notice] = 'Alert is created.' | |||
flash[:notice] = message('alert.alert_created') | |||
format.html { redirect_to :action => 'index', :id=>@profile.id } | |||
format.js { render :update do |page| | |||
page.redirect_to :action => 'index', :id=>@profile.id | |||
@@ -116,7 +116,7 @@ class AlertsController < ApplicationController | |||
respond_to do |format| | |||
if alert.update_attributes(params[:alert]) | |||
flash[:notice] = 'Alert is updated.' | |||
flash[:notice] = message('alert.alert_updated') | |||
format.html { redirect_to :action => 'index', :id=>@profile.id } | |||
format.xml { head :ok } | |||
format.js { render :update do |page| page.redirect_to :action => 'index', :id=>@profile.id end} | |||
@@ -140,7 +140,7 @@ class AlertsController < ApplicationController | |||
@profile = Profile.find(params[:profile_id]) | |||
@alert = @profile.alerts.find(params[:id]) | |||
@alert.destroy | |||
flash[:notice] = 'Alert is deleted.' | |||
flash[:notice] = message('alert.alert_deleted') | |||
respond_to do |format| | |||
format.html { redirect_to(:action => 'index', :id=>@profile.id) } |
@@ -56,11 +56,11 @@ class ProfilesController < ApplicationController | |||
profile_name=params[:name] | |||
language=params[:language] | |||
if profile_name.blank?|| language.blank? | |||
flash[:warning]='Please type a profile name.' | |||
flash[:warning]=message('quality_profiles.please_type_profile_name') | |||
else | |||
profile=Profile.find_by_name_and_language(profile_name, language) | |||
if profile | |||
flash[:error]="This profile already exists: #{profile_name}" | |||
flash[:error]=message('quality_profiles.profile_x_already_exists', :params => profile_name) | |||
else | |||
profile = Profile.create(:name => profile_name, :language => language, :default_profile => false, :enabled => true) | |||
@@ -75,7 +75,7 @@ class ProfilesController < ApplicationController | |||
end | |||
end | |||
if ok | |||
flash[:notice]= "Profile '#{profile.name}' created. Set it as default or link it to a project to use it for next measures." | |||
flash[:notice]=message('quality_profiles.profile_x_created', :params => profile.name) | |||
else | |||
profile.reload | |||
profile.destroy | |||
@@ -95,7 +95,7 @@ class ProfilesController < ApplicationController | |||
@profile = Profile.find(params[:id]) | |||
if @profile && @profile.deletable? | |||
java_facade.deleteProfile(@profile.id) | |||
flash[:notice]="Profile '#{@profile.name}' is deleted." | |||
flash[:notice]=message('quality_profiles.profile_x_deleted', :params => @profile.name) | |||
end | |||
redirect_to(:controller => 'profiles', :action => 'index') | |||
end | |||
@@ -109,7 +109,7 @@ class ProfilesController < ApplicationController | |||
def set_as_default | |||
profile = Profile.find(params[:id]) | |||
profile.set_as_default | |||
flash[:notice]="Default profile is '#{profile.name}'." | |||
flash[:notice]=message('quality_profiles.default_profile_is_x', :params => profile.name) | |||
redirect_to :action => 'index' | |||
end | |||
@@ -127,7 +127,7 @@ class ProfilesController < ApplicationController | |||
validation_errors = profile.validate_copy(name) | |||
if validation_errors.empty? | |||
java_facade.copyProfile(profile.id, name) | |||
flash[:notice]= "Profile '#{name}' is created but not activated." | |||
flash[:notice]= message('quality_profiles.profile_x_not_activated', :params => name) | |||
else | |||
flash[:error] = validation_errors.full_messages.first | |||
end | |||
@@ -158,7 +158,7 @@ class ProfilesController < ApplicationController | |||
# | |||
def restore | |||
if params[:backup].blank? | |||
flash[:warning]='Please upload a backup file.' | |||
flash[:warning]=message('quality_profiles.please_upload_backup_file') | |||
else | |||
messages=java_facade.restoreProfile(read_file_param(params[:backup])) | |||
flash_validation_messages(messages) | |||
@@ -194,7 +194,7 @@ class ProfilesController < ApplicationController | |||
@profile = Profile.find(params[:id]) | |||
profiles=Profile.find(:all, :conditions => ['language=? and id<>? and (parent_name is null or parent_name<>?) and enabled=?', @profile.language, @profile.id, @profile.name, true], :order => 'name') | |||
@select_parent = [['None', nil]] + profiles.collect{ |profile| [profile.name, profile.name] } | |||
@select_parent = [[message('none'), nil]] + profiles.collect{ |profile| [profile.name, profile.name] } | |||
end | |||
# | |||
@@ -225,7 +225,7 @@ class ProfilesController < ApplicationController | |||
end | |||
@changes = ActiveRuleChange.find(:all, :conditions => ['profile_id=? and ?<profile_version and profile_version<=?', @profile.id, @since_version, @to_version], :order => 'id desc') | |||
@select_versions = versions.map {|u| [ (u.profile_version == last_version ? "last " : "" ) + "version " + u.profile_version.to_s + " (" + l(u.change_date) + ")", u.profile_version]} | [["no version", 0]]; | |||
@select_versions = versions.map {|u| [ message(u.profile_version == last_version ? 'quality_profiles.last_version_x_with_date' : 'quality_profiles.version_x_with_date', :params => [u.profile_version.to_s, l(u.change_date)]) ]} | [[message('quality_profiles.no_version'), 0]]; | |||
end | |||
end | |||
@@ -285,7 +285,7 @@ class ProfilesController < ApplicationController | |||
projects=Project.find(params[:projects] || []) | |||
@profile.projects=projects | |||
flash[:notice]="Profile '#{@profile.name}' associated to #{projects.size} projects." | |||
flash[:notice]=message('quality_profiles.profile_x_associated_to_x_projects', :params => [@profile.name, projects.size]) | |||
redirect_to :action => 'projects', :id => @profile.id | |||
end | |||
@@ -301,11 +301,11 @@ class ProfilesController < ApplicationController | |||
name = params['rename_' + profile.id.to_s] | |||
if name.blank? | |||
flash[:warning]='Profile name can not be blank.' | |||
flash[:warning]=message('quality_profiles.profile_name_cant_be_blank') | |||
else | |||
existing=Profile.find(:first, :conditions => {:name => name, :language => profile.language, :enabled => true}) | |||
if existing | |||
flash[:warning]='This profile name already exists.' | |||
flash[:warning]=message('quality_profiles.profile_name_already_exists') | |||
elsif !profile.provided? | |||
java_facade.renameProfile(profile.id, name) | |||
end |
@@ -53,8 +53,8 @@ class RulesConfigurationController < ApplicationController | |||
@select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort | |||
@select_priority = ANY_SELECTION + RULE_PRIORITIES | |||
@select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]] | |||
@select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']] | |||
@select_status = [[message('any'),''], [message('active'), STATUS_ACTIVE], [message('inactive'), STATUS_INACTIVE]] | |||
@select_inheritance = [[message('any'),''], [message('rules_configuration.not_inherited'), 'NOT'], [message('rules_configuration.inherited'), 'INHERITED'], [message('rules_configuration.overrides'), 'OVERRIDES']] | |||
@rules = Rule.search(java_facade, { | |||
:profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance, | |||
@@ -179,7 +179,7 @@ class RulesConfigurationController < ApplicationController | |||
redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name | |||
else | |||
flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" | |||
flash[:error]=message('rules_configuration.rule_not_valid_message_x', :params => rule.errors.full_messages.join('<br/>')) | |||
redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] | |||
end | |||
end | |||
@@ -222,7 +222,7 @@ class RulesConfigurationController < ApplicationController | |||
if rule.save | |||
redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name | |||
else | |||
flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}" | |||
flash[:error]=message('rules_configuration.rule_not_valid_message_x', :params => rule.errors.full_messages.join('<br/>')) | |||
redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id] | |||
end | |||
else | |||
@@ -246,9 +246,9 @@ class RulesConfigurationController < ApplicationController | |||
# it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must | |||
# also be destroyed in cascade. | |||
ActiveRule.destroy_all("rule_id=#{rule.id}") | |||
flash[:notice]='Rule deleted' | |||
flash[:notice]=message('rules_configuration.rule_deleted') | |||
else | |||
flash[:error]='Unknown rule' | |||
flash[:error]=message('rules_configuration.unknown_rule') | |||
end | |||
redirect_to :action => 'index', :id => params[:id] | |||
end | |||
@@ -270,12 +270,12 @@ class RulesConfigurationController < ApplicationController | |||
case params[:bulk_action] | |||
when 'activate' | |||
count=activate_rules(profile, rule_ids) | |||
flash[:notice]="#{count} rules have been activated." | |||
flash[:notice]=message('rules_configuration.x_rules_have_been_activated', :params => count) | |||
status=STATUS_ACTIVE if status==STATUS_INACTIVE | |||
when 'deactivate' | |||
count=deactivate_rules(profile, rule_ids) | |||
flash[:notice]="#{count} rules have been deactivated." | |||
flash[:notice]=message('rules_configuration.x_rules_have_been_deactivated', :params => count) | |||
status=STATUS_INACTIVE if status==STATUS_ACTIVE | |||
end | |||
@@ -23,11 +23,11 @@ module ProfilesHelper | |||
end | |||
def label_for_rules_count(profile) | |||
label="#{profile.count_active_rules} rules" | |||
label="#{profile.count_active_rules} #{message('rules').downcase}" | |||
count_overriding=profile.count_overriding_rules | |||
if count_overriding>0 | |||
label += ", incl. #{count_overriding} overriding" | |||
label += message('quality_profiles.including_x_overriding.suffix', :params => count_overriding) | |||
label += image_tag('overrides.png') | |||
end | |||
label |
@@ -12,16 +12,16 @@ | |||
</select> | |||
</td> | |||
<td width="20%" align="left"> | |||
<%= image_tag 'levels/warn.png', :alt => 'Warning threshold' %> | |||
<%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %> | |||
<%= value_field(alert, alert.value_warning, 'alert[value_warning]') %> <%= alert.metric.suffix if alert.metric %> | |||
</td> | |||
<td width="20%" align="left"> | |||
<%= image_tag 'levels/error.png', :alt => 'Error threshold' %> | |||
<%= image_tag 'levels/error.png', :alt => message('alert.error_tooltip') %> | |||
<%= value_field(alert, alert.value_error, 'alert[value_error]') %> <%= alert.metric.suffix if alert.metric %> | |||
</td> | |||
<td width="120px" nowrap> | |||
<input id="alert_submit" type="submit" value="Update"></input> | |||
<%= link_to 'Delete', {:action => 'delete', :id => alert.id, :profile_id =>@profile.id}, :confirm => 'Are you sure?', :method => :post, :class => 'action', :id => "delete_#{u alert.name}" %> | |||
<input id="alert_submit" type="submit" value="<%= message('update_verb') -%>"></input> | |||
<%= link_to message('delete'), {:action => 'delete', :id => alert.id, :profile_id =>@profile.id}, :confirm => message('are_you_sure'), :method => :post, :class => 'action', :id => "delete_#{u alert.name}" %> | |||
</td> | |||
</tr> | |||
</table> |
@@ -1,4 +1,4 @@ | |||
<h3>Create alert</h3> | |||
<h3><%= message('alert.create_alert') -%></h3> | |||
<%= form_remote_tag :url => {:action => 'create', :profile_id => @profile.id}, :html => {:id => 'new_alert_form'} %> | |||
<table class="spaced"> | |||
<tr> | |||
@@ -12,7 +12,7 @@ | |||
</script> | |||
<select id="alert_metric_id" name="alert[metric_id]" onChange="javascript:selectMetric()"> | |||
<option value="" <%= 'selected' if @alert.metric.nil? %>>Select a metric</option> | |||
<option value="" <%= 'selected' if @alert.metric.nil? %>><%= message('alert.select_metric') -%></option> | |||
<% Metric.domains.each do |domain| %> | |||
<optgroup label="<%= h domain -%>"> | |||
<%# 'new_' metrics excluded due to SONAR-2396 %> | |||
@@ -35,21 +35,21 @@ | |||
</td> | |||
<td width="20%" valign="top"> | |||
<%= image_tag 'levels/warn.png', :alt => 'A warning is triggered when this value is reached.' %> | |||
<%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %> | |||
<%= value_field(@alert, '', 'alert[value_warning]') %> | |||
<%= @alert.metric.suffix if @alert.metric %><br/> | |||
<span class="note">Warning threshold</span> | |||
<span class="note"><%= message('alert.warning_threshold') -%></span> | |||
</td> | |||
<td width="20%" valign="top"> | |||
<%= image_tag 'levels/error.png', :alt => 'An error is triggered when this value is reached.' %> | |||
<%= image_tag 'levels/error.png', :alt => message('alert.error_tooltip') %> | |||
<%= value_field(@alert, '', 'alert[value_error]') %> | |||
<%= @alert.metric.suffix if @alert.metric %><br/> | |||
<span class="note">Error threshold</span> | |||
<span class="note"><%= message('alert.error_threshold') -%></span> | |||
</td> | |||
<td width="120px" nowrap valign="top"> | |||
<input type="submit" value="Create" id="submit_create"></input> | |||
<input type="submit" value="<%= message('create') -%>" id="submit_create"></input> | |||
</td> | |||
</tr> | |||
</table> |
@@ -8,13 +8,13 @@ | |||
</td> | |||
<td width="20%"> | |||
<% if alert.metric && !alert.value_warning.blank? %> | |||
<%= image_tag 'levels/warn.png', :alt => 'Warning threshold' %> | |||
<%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %> | |||
<%= alert.value_warning %> <%= alert.metric.suffix if alert.metric %> | |||
<% end %> | |||
</td> | |||
<td width="20%"> | |||
<% if alert.metric && !alert.value_error.blank? %> | |||
<%= image_tag 'levels/error.png', :alt => 'Error threshold' %> | |||
<%= image_tag 'levels/error.png', :alt => message('alert.error_tooltip') %> | |||
<%= alert.value_error %> <%= alert.metric.suffix %> | |||
<% end %> | |||
</td> |
@@ -1,4 +1,4 @@ | |||
<h1>Editing alert</h1> | |||
<h1><%= message('alert.editing_alert') -%></h1> | |||
<% form_for([@profile, @alert]) do |f| %> | |||
<%= f.error_messages %> | |||
@@ -12,9 +12,9 @@ | |||
<%= f.text_field :name %> | |||
</p> | |||
<p> | |||
<%= f.submit "Update" %> | |||
<%= f.submit message('update_verb') %> | |||
</p> | |||
<% end %> | |||
<%= link_to 'Show', [@profile, @alert] %> | | |||
<%= link_to 'Back', profile_alerts_path(@profile) %> | |||
<%= link_to message('show_verb'), [@profile, @alert] %> | | |||
<%= link_to message('back'), profile_alerts_path(@profile) %> |
@@ -1,11 +1,11 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'Alerts'} %> | |||
<% if is_admin? %> | |||
<% if @profile.provided? %> | |||
<div class="tabs-panel marginbottom10 background-gray"> | |||
<div class="line-info note"> | |||
This profile can not be updated but it can be used as a template for your own configuration. Just copy it from the profiles page. | |||
<%= message('rules_configuration.profile_cant_be_updated_description') -%> | |||
</div> | |||
</div> | |||
<% else %> | |||
@@ -19,7 +19,7 @@ | |||
<% if @alerts.empty? %> | |||
<p id="alerts">No alerts.</p> | |||
<p id="alerts"><%= message('alerts.no_alerts') -%></p> | |||
<% else %> | |||
<table class="data width100 marginbottom10" id="alerts"> | |||
@@ -43,16 +43,15 @@ | |||
<br/> | |||
<div class="help"> | |||
<h3>Notes</h3> | |||
<p>Only project measures are checked against thresholds. Modules, packages and classes are ignored.</p> | |||
Project health icons represent : | |||
<%= message('alerts.notes.description') -%> | |||
<table class="data"> | |||
<thead> | |||
<tr><th colspan="3"></th></tr> | |||
</thead> | |||
<tbody> | |||
<tr class="even"><td><%= image_tag 'levels/ok.png' %></td><td> at least one threshold is defined, no threshold is reached.</td></tr> | |||
<tr class="odd"><td><%= image_tag 'levels/warn.png' %></td><td> at least one warning threshold is reached, no error threshold is reached.</td></tr> | |||
<tr class="even"><td><%= image_tag 'levels/error.png' %></td><td>at least one error threshold is reached.</td></tr> | |||
<tr class="even"><td><%= image_tag 'levels/ok.png' %></td><td> <%= message('alerts.notes.ok') -%></td></tr> | |||
<tr class="odd"><td><%= image_tag 'levels/warn.png' %></td><td> <%= message('alerts.notes.warn') -%></td></tr> | |||
<tr class="even"><td><%= image_tag 'levels/error.png' %></td><td> <%= message('alerts.notes.error') -%></td></tr> | |||
</tbody> | |||
</table> | |||
</div> |
@@ -1,4 +1,4 @@ | |||
<h1>New alert</h1> | |||
<h1><%= message('alert.new_alert') -%></h1> | |||
<% form_for([@profile, @alert]) do |f| %> | |||
<%= f.error_messages %> | |||
@@ -12,8 +12,8 @@ | |||
<%= f.text_field :name %> | |||
</p> | |||
<p> | |||
<%= f.submit "Create" %> | |||
<%= f.submit message('create') %> | |||
</p> | |||
<% end %> | |||
<%= link_to 'Back', profile_alerts_path(@profile) %> | |||
<%= link_to message('back'), profile_alerts_path(@profile) %> |
@@ -1,13 +1,13 @@ | |||
<p> | |||
<b>Profile:</b> | |||
<b><%= message('profile') -%>:</b> | |||
<%=h @alert.profile_id %> | |||
</p> | |||
<p> | |||
<b>Name:</b> | |||
<b><%= message('name') -%>:</b> | |||
<%=h @alert.name %> | |||
</p> | |||
<%= link_to 'Edit', edit_profile_alert_path(@profile, @alert) %> | | |||
<%= link_to 'Back', profile_alerts_path(@profile) %> | |||
<%= link_to message('edit'), edit_profile_alert_path(@profile, @alert) %> | | |||
<%= link_to message('back'), profile_alerts_path(@profile) %> |
@@ -3,7 +3,7 @@ | |||
<table class="spaced"> | |||
<tr> | |||
<td align="left" nowrap="nowrap" width="1%"> | |||
Name | |||
<%= message('name') -%> | |||
</td> | |||
<td align="left"> | |||
<input type="text" name="name"/> | |||
@@ -11,7 +11,7 @@ | |||
</tr> | |||
<tr> | |||
<td align="left" nowrap="nowrap"> | |||
Language | |||
<%= message('language') -%> | |||
</td> | |||
<td align="left"> | |||
<% languages_select=languages.collect do |language| | |||
@@ -29,7 +29,7 @@ | |||
<% @plugins_by_language[language.getKey()].each do |plugin| %> | |||
<tr> | |||
<td align="left" style="vertical-align: top;" nowrap="nowrap" width="1%"> | |||
<%= image_tag'bullet.png' %> <%= plugin.getName() %> XML (optional) | |||
<%= image_tag'bullet.png' %> <%= plugin.getName() %> XML (<%= message('optional').downcase -%>) | |||
</td> | |||
<td align="left"> | |||
<%= file_field_tag plugin.getKey() %> | |||
@@ -43,8 +43,8 @@ | |||
<table class="spaced"> | |||
<tr> | |||
<td colspan="2" align="left"> | |||
<%= submit_tag 'create' %> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'index' -%>" class="action">cancel</a> | |||
<%= submit_tag message('create') %> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'index' -%>" class="action"><%= message('cancel') -%></a> | |||
</td> | |||
</tr> | |||
</table> |
@@ -4,22 +4,22 @@ | |||
%> | |||
<ul class="tabs"> | |||
<li> | |||
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile.id %>" <%= "class='selected'" if selected_tab=='Coding rules' -%>>Coding rules</a> | |||
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile.id %>" <%= "class='selected'" if selected_tab=='Coding rules' -%>><%= message('coding_rules') -%></a> | |||
</li> | |||
<li> | |||
<a href="<%= url_for :controller => 'alerts', :action => 'index', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Alerts' -%>>Alerts</a> | |||
<a href="<%= url_for :controller => 'alerts', :action => 'index', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Alerts' -%>><%= message('alerts') -%></a> | |||
</li> | |||
<li> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'projects', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Projects' -%>>Projects</a> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'projects', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Projects' -%>><%= message('projects') -%></a> | |||
</li> | |||
<li> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'permalinks', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Permalinks' -%>>Permalinks</a> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'permalinks', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='Permalinks' -%>><%= message('permalinks') -%></a> | |||
</li> | |||
<li> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'inheritance', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='inheritance' -%>>Profile inheritance</a> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'inheritance', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='inheritance' -%>><%= message('quality_profiles.profile_inheritance') -%></a> | |||
</li> | |||
<li> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'changelog', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='changelog' -%>>Changelog</a> | |||
<a href="<%= url_for :controller => 'profiles', :action => 'changelog', :id => @profile.id -%>" <%= "class='selected'" if selected_tab=='changelog' -%>><%= message('changelog') -%></a> | |||
</li> | |||
<% if new_tab %> | |||
<li> |
@@ -1,29 +1,29 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'changelog'} %> | |||
<div class="tabs-panel marginbottom10"> | |||
<% if @select_versions.nil? %> | |||
No changes has been done on this quality profile. | |||
<%= message('quality_profiles.no_changes_done_on_this_profile') -%> | |||
<% else %> | |||
<% form_tag({:action => 'changelog'}, {:method => 'post', :class => 'marginbottom10'}) do %> | |||
<%= hidden_field_tag "id", @profile.id %> | |||
Changelog from | |||
<%= message('quality_profiles.changelog_from') -%> | |||
<%= select_tag "since", options_for_select(@select_versions, @since_version) %> | |||
to | |||
<%= message('to').downcase -%> | |||
<%= select_tag "to", options_for_select(@select_versions, @to_version) %> | |||
<%= submit_tag "Load", :id => 'submit'%> | |||
<%= submit_tag message('load_verb'), :id => 'submit'%> | |||
<% end %> | |||
<table class="data width100"> | |||
<thead> | |||
<tr> | |||
<th>Profile version</th> | |||
<th>Date</th> | |||
<th>User</th> | |||
<th>Action</th> | |||
<th>Rule</th> | |||
<th>Parameters</th> | |||
<th><%= message('quality_profiles.profile_version') -%></th> | |||
<th><%= message('date') -%></th> | |||
<th><%= message('user') -%></th> | |||
<th><%= message('action') -%></th> | |||
<th><%= message('rule') -%></th> | |||
<th><%= message('parameters') -%></th> | |||
</tr> | |||
</thead> | |||
<% | |||
@@ -38,33 +38,32 @@ | |||
<td valign="top"> | |||
<% if change.old_severity | |||
if change.new_severity %> | |||
Severity changed from <%= image_tag "priority/#{change.old_severity_text}.png" %><b><%= change.old_severity_text %></b> to | |||
<%= message('quality_profiles.severity_changed_from_x_to', :params => [image_tag("priority/#{change.old_severity_text}.png"), change.old_severity_text]) -%> | |||
<% else %> | |||
Severity was <%= image_tag "priority/#{change.old_severity_text}.png" %><b><%= change.old_severity_text %></b> | |||
<%= message('quality_profiles.severity_was_x', :params => [image_tag("priority/#{change.old_severity_text}.png"), change.old_severity_text]) -%> | |||
<% end | |||
end %> | |||
<% if change.new_severity | |||
if change.old_severity %> | |||
<%= image_tag "priority/#{change.new_severity_text}.png" %><b><%= change.new_severity_text %></b> | |||
<% else %> | |||
Severity set to <%= image_tag "priority/#{change.new_severity_text}.png" %><b><%= change.new_severity_text %></b> | |||
<%= message('quality_profiles.severity_set_to_x', :params => [image_tag("priority/#{change.new_severity_text}.png"), change.new_severity_text]) -%> | |||
<% end | |||
end %> | |||
<% if (change.old_severity or change.new_severity) and change.parameters.size > 0 %> | |||
<br/> | |||
<% end %> | |||
<% change.parameters.each do |param_change| %> | |||
Parameter <b><%=param_change.name %></b> | |||
<% if not param_change.old_value %> | |||
set to <b><%= param_change.new_value %></b> | |||
<%= message('quality_profiles.parameter_set_to_x', :params => [param_change.name, param_change.new_value]) -%> | |||
<% elsif not param_change.new_value | |||
if change.enabled == false %> | |||
was <b><%= param_change.old_value %></b> | |||
<%= message('quality_profiles.parameter_was_x', :params => [param_change.name, param_change.old_value]) -%> | |||
<% else %> | |||
reset to default value (was <b><%= param_change.old_value %></b>) | |||
<%= message('quality_profiles.parameter_reset_to_default_value_x', :params => [param_change.name, param_change.old_value]) -%> | |||
<% end | |||
else %> | |||
changed from <b><%= param_change.old_value %></b> to <b><%= param_change.new_value %></b> | |||
<%= message('quality_profiles.parameter_changed_from_x_to_x', :params => [param_change.name, param_change.old_value, param_change.new_value]) -%> | |||
<% end %> | |||
<%= "<br/>" unless param_change == change.parameters.last %> | |||
<% end%> |
@@ -1,5 +1,5 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / | |||
Compare</h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / | |||
<%= message('compare') -%></h1> | |||
<form method="GET" class="marginbottom10"> | |||
<select name="id1" class="small"> | |||
@@ -11,7 +11,7 @@ | |||
<option value=""></option> | |||
<%= options_for_profiles(@profiles, params[:id2].to_i) %> | |||
</select> | |||
<input type="submit" value="Compare" class="small" id="submit-compare"/> | |||
<input type="submit" value="<%= message('compare') -%>" class="small" id="submit-compare"/> | |||
</form> | |||
<% if @profile1 && @profile2 %> | |||
@@ -19,20 +19,20 @@ | |||
<table class="header1" id="comparison-header"> | |||
<tr> | |||
<td width="25%"> | |||
<p>Only in <%= h(@profile1.name) -%></p> | |||
<span class="big"><a href="#in1" id="in1Value"><%= @in1.size -%></a></span> rules | |||
<p><%= message('quality_profiles.only_in_profile_x', :params => h(@profile1.name)) -%></p> | |||
<span class="big"><a href="#in1" id="in1Value"><%= @in1.size -%></a></span> <%= message('rules').downcase -%> | |||
</td> | |||
<td width="25%"> | |||
<p>Only in <%= h(@profile2.name) -%></p> | |||
<span class="big"><a href="#in2" id="in2Value"><%= @in2.size -%></a></span> rules | |||
<p><%= message('quality_profiles.only_in_profile_x', :params => h(@profile2.name)) -%></p> | |||
<span class="big"><a href="#in2" id="in2Value"><%= @in2.size -%></a></span> <%= message('rules').downcase -%> | |||
</td> | |||
<td width="25%"> | |||
<p>With different configuration</p> | |||
<span class="big"><a href="#modified" id="modifiedValue"><%= @modified.size -%></a></span> rules | |||
<p><%= message('quality_profiles.with_different_configuration') -%></p> | |||
<span class="big"><a href="#modified" id="modifiedValue"><%= @modified.size -%></a></span> <%= message('rules').downcase -%> | |||
</td> | |||
<td width="25%"> | |||
<p>With same configuration</p> | |||
<span class="big" id="sameValue"><%= @sames.size -%></span> rules | |||
<p><%= message('quality_profiles.with_same_configuration') -%></p> | |||
<span class="big" id="sameValue"><%= @sames.size -%></span> <%= message('rules').downcase -%> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -46,7 +46,7 @@ | |||
<table class="data width100 marginbottom10" id="in1-rules"> | |||
<thead> | |||
<tr> | |||
<th><a name="in1"/><%= @in1.size -%> rules only in | |||
<th><a name="in1"/><%= message('quality_profiles.x_rules_only_in', :params => @in1.size) -%> | |||
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a> | |||
</th> | |||
</tr> | |||
@@ -73,7 +73,7 @@ | |||
<table class="data width100 marginbottom10" id="in2-rules"> | |||
<thead> | |||
<tr> | |||
<th><a name="in2"/><%= @in2.size -%> rules only in | |||
<th><a name="in2"/><%= message('quality_profiles.x_rules_only_in', :params => @in2.size) -%> | |||
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile2.id -%>"><%= h @profile2.name %></a> | |||
</th> | |||
</tr> | |||
@@ -97,7 +97,7 @@ | |||
<table class="data width100 marginbottom10" id="modified-rules"> | |||
<thead> | |||
<tr> | |||
<th width="49%"><a name="modified"/><%= @modified.size -%> rules have a different configuration<br/> | |||
<th width="49%"><a name="modified"/><%= message('quality_profiles.x_rules_have_different_configuration', :params =>@modified.size) -%><br/> | |||
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a> | |||
</th> | |||
<th width="2%"></th> |
@@ -1,4 +1,4 @@ | |||
<h1>Editing profile</h1> | |||
<h1>message('quality_profiles.editing_profile')</h1> | |||
<% form_for(@profile) do |f| %> | |||
<%= f.error_messages %> | |||
@@ -12,9 +12,9 @@ | |||
<%= f.check_box :active %> | |||
</p> | |||
<p> | |||
<%= f.submit "Update" %> | |||
<%= f.submit message('update_verb') %> | |||
</p> | |||
<% end %> | |||
<%= link_to 'Show', @profile %> | | |||
<%= link_to 'Back', profiles_path %> | |||
<%= link_to message('show_verb'), @profile %> | | |||
<%= link_to message('back'), profiles_path %> |
@@ -3,25 +3,25 @@ | |||
<ul class="operations"> | |||
<li> | |||
<%= image_tag 'compare.png' -%> | |||
<a href="<%= ApplicationController.root_context-%>/profiles/compare" id="compare-link">Compare profiles</a> | |||
<a href="<%= ApplicationController.root_context-%>/profiles/compare" id="compare-link"><%= message('quality_profiles.compare_profiles') -%></a> | |||
</li> | |||
<li class="last"> | |||
<%= image_tag 'restore.gif' -%> | |||
<a href="#" onclick="$('restore-form').show();return false;" id="restore-link">Restore profile</a> | |||
<a href="#" onclick="$('restore-form').show();return false;" id="restore-link"><%= message('quality_profiles.restore_profile') -%></a> | |||
</li> | |||
</ul> | |||
</div> | |||
<form class="admin marginbottom10" id="restore-form" action="<%= url_for :action => 'restore' -%>" enctype="multipart/form-data" style="display: none" method="post"> | |||
<table class="spaced width100"> | |||
<tr> | |||
<td width="1%" nowrap>Backup: </td> | |||
<td width="1%" nowrap><%= message('backup_verb') -%>: </td> | |||
<td><%= file_field_tag 'backup' %></td> | |||
</tr> | |||
<tr> | |||
<td colspan="2"> | |||
<input type="submit" value="Restore profile"/> | |||
<a href="#" onclick="$('restore-form').reset();$('restore-form').hide();return false;">Cancel</a> | |||
<input type="submit" value="<%= message('quality_profiles.restore_profile') -%>"/> | |||
<a href="#" onclick="$('restore-form').reset();$('restore-form').hide();return false;"><%= message('cancel') -%></a> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -37,11 +37,11 @@ | |||
<% if administrator? %> | |||
<ul style="float: right" class="horizontal"> | |||
<li class="marginleft10 add"> | |||
<a href="#" onClick="$('create-form-<%= language.getKey() -%>').show();$('create-form-<%= language.getKey() -%>-name').focus();return false;" id="create-link-<%= language.getKey() -%>">Create</a> | |||
<a href="#" onClick="$('create-form-<%= language.getKey() -%>').show();$('create-form-<%= language.getKey() -%>-name').focus();return false;" id="create-link-<%= language.getKey() -%>"><%= message('create') -%></a> | |||
</li> | |||
</ul> | |||
<% end %> | |||
<h2><%= language.getName() %> profiles</h2> | |||
<h2><%= message('quality_profiles.x_language_profiles', :params => language.getName()) -%></h2> | |||
</div> | |||
<% if administrator? %> | |||
@@ -49,7 +49,7 @@ | |||
<input type="hidden" name="language" value="<%= language.getKey() -%>"></input> | |||
<table class="spaced width100"> | |||
<tr> | |||
<td width="1%" nowrap>Name: </td> | |||
<td width="1%" nowrap><%= message('name') -%>: </td> | |||
<td><input type="text" name="name" id="create-form-<%= language.getKey()-%>-name"></input></td> | |||
</tr> | |||
<% importers.to_a.sort{|x,y| x.getName() <=> y.getName()}.each do |importer| %> | |||
@@ -57,15 +57,15 @@ | |||
<td width="1%" nowrap><%= importer.getName() -%>: </td> | |||
<td> | |||
<%= file_field_tag "backup[#{importer.getKey()}]" %></input> | |||
<span class="note">Optional configuration file</span> | |||
<span class="note"><%= message('quality_profiles.optional_configuration_file') -%></span> | |||
</td> | |||
</tr> | |||
<% end %> | |||
<tr> | |||
<td colspan="2"> | |||
<input type="submit" value="Create <%= language.getName() %> profile" id="create-submit-<%= language.getKey() -%>"></input> | |||
<a href="#" onclick="$('create-form-<%= language.getKey()-%>').reset();$('create-form-<%= language.getKey()-%>').hide();return false;">Cancel</a> | |||
<input type="submit" value="<%= message('quality_profiles.create_x_language_profile', :params => language.getName()) -%>" id="create-submit-<%= language.getKey() -%>"></input> | |||
<a href="#" onclick="$('create-form-<%= language.getKey()-%>').reset();$('create-form-<%= language.getKey()-%>').hide();return false;"><%= message('cancel') -%></a> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -75,13 +75,13 @@ | |||
<table class="data width100" id="profiles_<%= language.getKey() -%>"> | |||
<thead> | |||
<tr> | |||
<th class="left">Name</th> | |||
<th class="right">Rules</th> | |||
<th class="right">Alerts</th> | |||
<th class="right">Projects</th> | |||
<th class="right">Default</th> | |||
<th class="left"><%= message('name') -%></th> | |||
<th class="right"><%= message('rules') -%></th> | |||
<th class="right"><%= message('alerts') -%></th> | |||
<th class="right"><%= message('projects') -%></th> | |||
<th class="right"><%= message('default') -%></th> | |||
<% if administrator? %> | |||
<th width="1%" class="right" colspan="4">Operations</th> | |||
<th width="1%" class="right" colspan="4"><%= message('operations') -%></th> | |||
<% end %> | |||
</tr> | |||
</thead> | |||
@@ -104,9 +104,9 @@ | |||
<td align="right"> | |||
<% if (!profile.default_profile? && administrator?) %> | |||
<%= button_to 'Set as default', { :action => 'set_as_default', :id => profile.id }, :class => 'action', | |||
<%= button_to message('set_as_default'), { :action => 'set_as_default', :id => profile.id }, :class => 'action', | |||
:id => "activate_#{u profile.key}", | |||
:confirm => "Are you sure that you want to set the profile '#{profile.name}' as default ?", | |||
:confirm => message('quality_profiles.are_you_sure_want_x_profile_as_default', :params => profile.name), | |||
:method => :post %> | |||
<% end %> | |||
<% if profile.default_profile? %> | |||
@@ -120,7 +120,7 @@ | |||
<td align="right"> | |||
<% if !profile.provided? %> | |||
<% form_tag(:action => 'backup', :id => profile.id) do -%> | |||
<input type="submit" name="button_backup" id="backup_<%= u profile.key %>" value="Backup"></input> | |||
<input type="submit" name="button_backup" id="backup_<%= u profile.key %>" value="<%= message('backup_verb') -%>"></input> | |||
<% end | |||
end %> | |||
</td> | |||
@@ -129,7 +129,7 @@ | |||
<% if !(profile.provided?) %> | |||
<% form_tag(:action => 'rename', :id => profile.id) do -%> | |||
<%= hidden_field_tag 'rename_' + profile.id.to_s %> | |||
<input type="button" name="button_rename" id="rename_<%= u profile.key %>" value="Rename" onClick='var name=prompt("New name"); if (name!=null) {$("rename_<%= profile.id %>").value=name; submit();} else {return false;}'> | |||
<input type="button" name="button_rename" id="rename_<%= u profile.key %>" value="<%= message('rename') -%>" onClick='var name=prompt("<%= message('quality_profiles.new_name') -%>"); if (name!=null) {$("rename_<%= profile.id %>").value=name; submit();} else {return false;}'> | |||
<% end | |||
end %> | |||
</td> | |||
@@ -137,15 +137,15 @@ | |||
<td align="right"> | |||
<% form_tag(:action => 'copy', :id => profile.id) do -%> | |||
<%= hidden_field_tag 'copy_' + profile.id.to_s %> | |||
<input type="button" name="button_copy" id="copy_<%= u profile.key %>" value="Copy" onClick='var name=prompt("Name for the new profile"); if (name!=null) {$("copy_<%= profile.id %>").value=name; submit();} else {return false;}'> | |||
<input type="button" name="button_copy" id="copy_<%= u profile.key %>" value="<%= message('copy') -%>" onClick='var name=prompt("<%= message('quality_profiles.name_for_new_profile') -%>"); if (name!=null) {$("copy_<%= profile.id %>").value=name; submit();} else {return false;}'> | |||
<% end %> | |||
</td> | |||
<td> | |||
<% if profile.deletable? %> | |||
<%= button_to "Delete", { :action => 'delete', :id => profile.id }, :class => 'action red-button', | |||
<%= button_to message('delete'), { :action => 'delete', :id => profile.id }, :class => 'action red-button', | |||
:id => "delete_#{u profile.key}", | |||
:confirm => "Are you sure that you want to delete the profile '#{profile.name}' ?", | |||
:confirm => message('quality_profiles.are_you_sure_want_delete_profile_x', :params => profile.name), | |||
:method => :post %> | |||
<% end %> | |||
</td> |
@@ -1,4 +1,4 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'inheritance'} %> | |||
<div class="tabs-panel marginbottom10"> | |||
@@ -31,15 +31,15 @@ | |||
<td valign="top" width="300"> | |||
<div class="admin"> | |||
<% if @profile.provided? %> | |||
<p>This profile can not be edited.</p> | |||
<p><%= message('quality_profiles.profile_cant_be_edited') -%></p> | |||
<% else %> | |||
<h3>Set parent:</h3> | |||
<p>Inherit rules configuration from the profile:</p> | |||
<h3><%= message('quality_profiles.set_parent') -%>:</h3> | |||
<p><%= message('quality_profiles.inherit_rules_from_profile') -%>:</p> | |||
<% form_tag({:action => 'change_parent'}, {:method => 'post'}) do %> | |||
<%= hidden_field_tag "id", @profile.id %> | |||
<%= select_tag "parent_name", options_for_select(@select_parent, @profile.parent_name) %> | |||
<%= submit_tag "Change", :id => 'submit_parent'%> | |||
<%= submit_tag message('change_verb'), :id => 'submit_parent'%> | |||
<% end %> | |||
<% end %> | |||
</div> |
@@ -1,4 +1,4 @@ | |||
<h1>New profile</h1> | |||
<h1><%= message('quality_profiles.new_profile') -%></h1> | |||
<% form_for(@profile) do |f| %> | |||
<%= f.error_messages %> | |||
@@ -12,8 +12,8 @@ | |||
<%= f.check_box :active %> | |||
</p> | |||
<p> | |||
<%= f.submit "Create" %> | |||
<%= f.submit message('create') %> | |||
</p> | |||
<% end %> | |||
<%= link_to 'Back', profiles_path %> | |||
<%= link_to message('back'), profiles_path %> |
@@ -1,10 +1,10 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'Permalinks'} %> | |||
<div class="tabs-panel marginbottom10 "> | |||
<% exporters=controller.java_facade.getProfileExportersForLanguage(@profile.language) %> | |||
<% if exporters.empty? %> | |||
<p>No permalinks</p> | |||
<p><%= message('quality_profiles.no_permalinks') -%></p> | |||
<% else %> | |||
<br/> | |||
<table class="data without-header marginbottom10" id="permalinks-table"> |
@@ -1,4 +1,4 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'Projects'} %> | |||
<div class="tabs-panel"> | |||
@@ -8,7 +8,7 @@ | |||
<table> | |||
<tr> | |||
<td style="padding: 5px 0" valign="top"> | |||
<h3>Available projects</h3> | |||
<h3><%= message('quality_profiles.available_projects') -%></h3> | |||
<select name="from" id="from" size="10" style="max-width:380px;margin-top: 5px" multiple="multiple"> | |||
<% @available_projects.each do |project| %> | |||
<option value="<%= project.id -%>"><%= project.name %><%= " (#{project.profile.name})" if project.profile %></option> | |||
@@ -16,18 +16,18 @@ | |||
</select> | |||
</td> | |||
<td align="center" style="padding: 0 10px;"> | |||
<button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;">select »</button><br/> | |||
<button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;">select all »</button><br/><br/> | |||
<button id="select_left" onclick="SelectBox.move('to', 'from');return false;">« unselect</button><br/> | |||
<button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;">« unselect all</button> | |||
<button id="select_right" onclick="SelectBox.move('from', 'to');SelectBox.sort('to');SelectBox.redisplay('to');return false;"><%= message('select_verb').downcase -%> »</button><br/> | |||
<button id="select_right_all" onclick="SelectBox.move_all('from', 'to');return false;"><%= message('select_all').downcase -%> »</button><br/><br/> | |||
<button id="select_left" onclick="SelectBox.move('to', 'from');return false;">« <%= message('unselect_verb').downcase -%></button><br/> | |||
<button id="select_left_all" onclick="SelectBox.move_all('to', 'from');return false;">« <%= message('unselect_all').downcase -%></button> | |||
</td> | |||
<td class="box" style="padding: 5px 10px;" valign="top"> | |||
<h3>Associated projects</h3> | |||
<h3><%= message('quality_profiles.associated_projects') -%></h3> | |||
<select name="projects[]" id="to" size="10" multiple="multiple" style="min-width: 300px;margin: 5px 0;"> | |||
<%= options_from_collection_for_select(@profile.projects, "id", "name") %> | |||
</select><br/> | |||
<div style="padding:5px 0"> | |||
<input type="submit" id="save" value="Save" onclick="SelectBox.select_all('to');submit();"></input> | |||
<input type="submit" id="save" value="<%= message('save') -%>" onclick="SelectBox.select_all('to');submit();"></input> | |||
</div> | |||
</td> | |||
</tr> | |||
@@ -41,7 +41,7 @@ SelectBox.init('to'); | |||
<% else %> | |||
<% if @profile.projects.empty? %> | |||
<p>No projects are explicitly associated to the profile '<%= @profile.name %>'.</p> | |||
<p><%= message('quality_profiles.no_projects_associated_to_profile_x', :params => @profile.name) -%></p> | |||
<% else %> | |||
<ol> | |||
<% @profile.projects.each do |project| %> |
@@ -1,13 +1,13 @@ | |||
<p> | |||
<b>Name:</b> | |||
<b>message('name'):</b> | |||
<%=h @profile.name %> | |||
</p> | |||
<p> | |||
<b>Active:</b> | |||
<b>message('active'):</b> | |||
<%=h @profile.active %> | |||
</p> | |||
<%= link_to 'Edit', edit_profile_path(@profile) %> | | |||
<%= link_to 'Back', profiles_path %> | |||
<%= link_to message('edit'), edit_profile_path(@profile) %> | | |||
<%= link_to message('back'), profiles_path %> |
@@ -20,9 +20,9 @@ | |||
<% if active_rule %> | |||
<% if active_rule.inherited? %> | |||
<img src="<%= ApplicationController.root_context -%>/images/inherited.png" alt="Inherited from parent" title="Inherited from parent"/> | |||
<img src="<%= ApplicationController.root_context -%>/images/inherited.png" alt="Inherited from parent" title="<%= message('rules_configuration.inherited_from_parent') -%>"/> | |||
<% elsif active_rule.overrides? %> | |||
<img src="<%= ApplicationController.root_context -%>/images/overrides.png" alt="Overrides parent definition" title="Overrides parent definition"/> | |||
<img src="<%= ApplicationController.root_context -%>/images/overrides.png" alt="Overrides parent definition" title="<%= message('rules_configuration.overrides_parent_definition') -%>"/> | |||
<% end %> | |||
<% end %> | |||
</form> | |||
@@ -45,19 +45,19 @@ | |||
</tbody> | |||
<% end %> | |||
<tr> | |||
<td width="10%" nowrap class="left">Key: </td> | |||
<td width="10%" nowrap class="left"><%= message('key') -%>: </td> | |||
<td class="left"><%= rule.plugin_rule_key -%></td> | |||
</tr> | |||
</table> | |||
<% if is_admin %> | |||
<% if rule.template? %> | |||
<%= button_to "Copy rule", {:action => 'new', :id => profile.id, :rule_id => rule.id}, :id => "copy-#{u rule.key}" %> | |||
<%= button_to message('rules_configuration.copy_rule'), {:action => 'new', :id => profile.id, :rule_id => rule.id}, :id => "copy-#{u rule.key}" %> | |||
<% end %> | |||
<% if rule.editable? %> | |||
<%= button_to "Edit rule", :action => 'edit', :id => profile.id, :rule_id => rule.id %> | |||
<%= button_to message('rules_configuration.edit_rule'), :action => 'edit', :id => profile.id, :rule_id => rule.id %> | |||
<% end %> | |||
<% if active_rule && active_rule.overrides? %> | |||
<%= button_to "Revert to parent definition", :overwrite_params => {:action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id} %><br/> | |||
<%= button_to message('rules_configuration.revert_to_parent_definition'), :overwrite_params => {:action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id} %><br/> | |||
<% end %> | |||
<% end %> | |||
</div> |
@@ -26,7 +26,7 @@ | |||
<span id="<%= span_id %>"><%= (param_value.length < 50) ? textfield : textarea %></span> | |||
<% if !read_only %> | |||
<%= submit_tag 'update' %> | |||
<%= submit_tag message('update_verb') %> | |||
<img src="<%= ApplicationController.root_context -%>/images/loading.gif" style="display:none;" id="param_loading_<%= parameter.id -%>"> | |||
<% if active_parameter and active_parameter.errors.size>0 %> | |||
<span class="error"><%= active_parameter.errors.on 'value' %></span> |
@@ -1,4 +1,4 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:new_tab => 'Edit rule'} %> | |||
@@ -21,17 +21,17 @@ | |||
<form method="POST" action="<%= url_for :action => 'update', :id => @profile.id, :rule_id => @rule.id -%>"> | |||
<table width="100%" class="spaced"> | |||
<tr> | |||
<td width="1%" nowrap>Template:</td> | |||
<td width="1%" nowrap><%= message('template') -%>:</td> | |||
<td class="sep"> </td> | |||
<td><%= h @rule.parent.name -%></td> | |||
</tr> | |||
<tr> | |||
<td width="1%" nowrap>Name:</td> | |||
<td width="1%" nowrap><%= message('name') -%>:</td> | |||
<td class="sep"> </td> | |||
<td><input type="text" name="rule[name]" size="80" value="<%= h @rule.name -%>"></input></td> | |||
</tr> | |||
<tr> | |||
<td width="1%" nowrap>Default severity:</td> | |||
<td width="1%" nowrap><%= message('default_severity') -%>:</td> | |||
<td class="sep"> </td> | |||
<td> | |||
<select name="rule[priority]"> | |||
@@ -54,14 +54,14 @@ | |||
<td class="sep"> </td> | |||
<td valign="top"> | |||
<textarea name="rule[description]" cols="80" rows="10" style="vertical-align: baseline"><%= @rule.description -%></textarea> | |||
<span class="small">HTML is allowed.</span> | |||
<span class="small"><%= message('rules_configuration.html_allowed') -%></span> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td colspan="3"> | |||
<input type="submit" value="Update"></input> | |||
<input type="submit" value="Delete" onclick="return deleteRule()" class="red-button"></input> | |||
<a href="<%= url_for :action => 'index', :id => @profile.id -%>">Cancel</a> | |||
<input type="submit" value="<%= message('update_verb') -%>"></input> | |||
<input type="submit" value="<%= message('delete') -%>" onclick="return deleteRule()" class="red-button"></input> | |||
<a href="<%= url_for :action => 'index', :id => @profile.id -%>"><%= message('cancel') -%></a> | |||
</td> | |||
</tr> | |||
</table> |
@@ -26,7 +26,7 @@ | |||
} | |||
</script> | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:selected_tab=>'Coding rules'} %> | |||
@@ -35,7 +35,7 @@ | |||
<% if is_admin? && @profile.provided? %> | |||
<div class="line-info note marginbottom10"> | |||
This profile can not be updated but it can be used as a template for your own configuration. Just copy it from the profiles page. | |||
<%= message('rules_configuration.profile_cant_be_updated_description') -%> | |||
</div> | |||
<% end %> | |||
@@ -44,30 +44,30 @@ | |||
<table class="spaced" id="search_table"> | |||
<tr> | |||
<td class="left" valign="top" width="1%" nowrap> | |||
<span class="note">Name/Key</span><br/> | |||
<span class="note"><%= message('name') -%>/<%= message('key') -%></span><br/> | |||
<%= text_field_tag "searchtext", @searchtext, :id => 'searchtext' %> | |||
</td> | |||
<td class="left" valign="top" width="1%" nowrap> | |||
<span class="note">Plugin</span><br/> | |||
<span class="note"><%= message('plugin') -%></span><br/> | |||
<%= select_tag "plugins", options_for_select(@select_plugins, @plugins), :id => 'search_plugin', :multiple => true, :size => 6 %> | |||
</td> | |||
<td class="left" valign="top" width="1%" nowrap> | |||
<span class="note">Severity</span><br/> | |||
<span class="note"><%= message('severity') -%></span><br/> | |||
<%= select_tag "priorities", options_for_select(@select_priority, @priorities), :id => 'search_priority', :multiple => true, :size => 6 %> | |||
</td> | |||
<td class="left" valign="top" width="1%" nowrap> | |||
<span class="note">Status</span><br/> | |||
<span class="note"><%= message('status') -%></span><br/> | |||
<%= select_tag "rule_status", options_for_select(@select_status, @status), :id => 'search_status', :size => 6 %> | |||
</td> | |||
<% if @profile.inherited? %> | |||
<td class="left" valign="top" width="1%" nowrap> | |||
<span class="note">Inheritance</span><br/> | |||
<span class="note"><%= message('inheritance') -%></span><br/> | |||
<%= select_tag "inheritance", options_for_select(@select_inheritance, @inheritance), :id => 'search_inheritance', :size => 6 %> | |||
</td> | |||
<% end %> | |||
<td class="left" valign="top" > | |||
<br/> | |||
<%= submit_tag "Search", :id => 'submit_search' %> | |||
<%= submit_tag message('search_verb'), :id => 'submit_search' %> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -77,41 +77,41 @@ | |||
<ul style="float: right" class="horizontal"> | |||
<li class="marginleft10"> | |||
<div class="csv"> | |||
<a href="<%= url_for(:controller => 'api/rules', :action => 'index', :language => @profile.language, :profile => @profile.name, :plugins => @plugins.join(','), :status => @status, :inheritance => @inheritance, :searchtext => @searchtext, :priorities => @priorities.join(','), :format => 'csv') -%>" onClick="return downloadCsv()" id="download-link" class="">Download</a> | |||
<a href="<%= url_for(:controller => 'api/rules', :action => 'index', :language => @profile.language, :profile => @profile.name, :plugins => @plugins.join(','), :status => @status, :inheritance => @inheritance, :searchtext => @searchtext, :priorities => @priorities.join(','), :format => 'csv') -%>" onClick="return downloadCsv()" id="download-link" class=""><%= message('download_verb') -%></a> | |||
</div> | |||
</li> | |||
<% if enable_modification %> | |||
<li class="marginleft10"> | |||
<div class="bulk-edit">Bulk Change: | |||
<div class="bulk-edit"><%= message('bulk_change') -%>: | |||
<form action="<%= ApplicationController.root_context -%>/rules_configuration/bulk_edit" method="POST" style="display: inline;vertical-align: middle" id="bulk-form"> | |||
<input type="hidden" name="id" value="<%= @profile.id -%>"/> | |||
<input type="hidden" name="bulk_rule_ids" value="<%= @rules.map{|r| r.id}.join(',') -%>"/> | |||
<select name="bulk_action" onChange="submitBulkForm()" style="height: 16px;margin: 0; padding: 0;vertical-align: top"> | |||
<option value="" selected></option> | |||
<option value="activate">Activate all</option> | |||
<option value="deactivate">Deactivate all</option> | |||
<option value="activate"><%= message('activate_all') -%></option> | |||
<option value="deactivate"><%= message('deactivate_all') -%></option> | |||
</select> | |||
</form> | |||
</div> | |||
</li> | |||
<% end %> | |||
</ul> | |||
<h2><%= @rules.size %> results | |||
<% if @hidden_actives && @hidden_actives>0 %><span class="small">[<a href="<%= url_for params.merge({:rule_status => ''}) -%>" id="active-rules-link">+<%= @hidden_actives -%> found in active rules</a>]</span><% end %> | |||
<% if @hidden_inactives && @hidden_inactives>0 %><span class="small">[<a href="<%= url_for params.merge({:rule_status => ''}) -%>" id="inactive-rules-link">+<%= @hidden_inactives -%> found in inactive rules</a>]</span><% end %> | |||
<h2><%= @rules.size %> <%= message('results').downcase -%> | |||
<% if @hidden_actives && @hidden_actives>0 %><span class="small">[<a href="<%= url_for params.merge({:rule_status => ''}) -%>" id="active-rules-link">+<%= message('rules_configuration.x_found_in_active_rules', :params => @hidden_actives) -%></a>]</span><% end %> | |||
<% if @hidden_inactives && @hidden_inactives>0 %><span class="small">[<a href="<%= url_for params.merge({:rule_status => ''}) -%>" id="inactive-rules-link">+<%= message('rules_configuration.x_found_in_inactive_rules', :params => @hidden_inactives) -%></a>]</span><% end %> | |||
</h2> | |||
</div> | |||
<table class="data width100 marginbottom10" id="result_table"> | |||
<thead> | |||
<tr> | |||
<th class="left" nowrap>Active/Severity</th> | |||
<th class="left">Name <span style="font-weight: normal">[<%= link_to_function("expand/collapse", "toggle_rules()") %>]</span></th> | |||
<th class="right">Plugin</th> | |||
<th class="left" nowrap><%= message('active') -%>/<%= message('severity') -%></th> | |||
<th class="left"><%= message('name') -%> <span style="font-weight: normal">[<%= link_to_function(message('rules_configuration.expand_collapse'), "toggle_rules()") %>]</span></th> | |||
<th class="right"><%= message('plugin') -%></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% if @rules.empty? %> | |||
<tr><td colspan="3" class="even">No results.</td></tr> | |||
<tr><td colspan="3" class="even"><%= message('no_results') -%>.</td></tr> | |||
<% end %> | |||
<% | |||
# avoid executing several times the method is_admin?() |
@@ -1,23 +1,23 @@ | |||
<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<h1 class="marginbottom10"><%= link_to message('quality_profiles.quality_profiles'), :controller => 'profiles', :action => 'index' -%> / <%= h @profile.language -%> / <%= h @profile.name %></h1> | |||
<%= render :partial => 'profiles/tabs', :locals => {:new_tab => 'New rule'} %> | |||
<%= render :partial => 'profiles/tabs', :locals => {:new_tab => message('rules_configuration.tab.new_rule')} %> | |||
<div class="tabs-panel marginbottom10 background-gray"> | |||
<form method="POST" action="<%= url_for :action => 'create', :id => @profile.id, :rule_id => @rule.id -%>"> | |||
<table width="100%" class="spaced"> | |||
<tr> | |||
<td width="1%" nowrap>Template:</td> | |||
<td width="1%" nowrap><%= message('template') -%>:</td> | |||
<td class="sep"> </td> | |||
<td><%= h @rule.name -%></td> | |||
</tr> | |||
<tr> | |||
<td width="1%" nowrap>Name:</td> | |||
<td width="1%" nowrap><%= message('name') -%>:</td> | |||
<td class="sep"> </td> | |||
<td><input type="text" name="rule[name]" size="80"></input></td> | |||
</tr> | |||
<tr> | |||
<td width="1%" nowrap>Default severity:</td> | |||
<td width="1%" nowrap><%= message('default_severity') -%>:</td> | |||
<td class="sep"> </td> | |||
<td> | |||
<select name="rule[priority]"> | |||
@@ -36,16 +36,16 @@ | |||
</tr> | |||
<% end %> | |||
<tr> | |||
<td width="1%" nowrap style="vertical-align: top">Description:</td> | |||
<td width="1%" nowrap style="vertical-align: top"><%= message('description') -%>:</td> | |||
<td class="sep"> </td> | |||
<td valign="top"> | |||
<textarea name="rule[description]" cols="80" rows="10" style="vertical-align: baseline"></textarea> | |||
<span class="small">HTML is allowed.</span> | |||
<span class="small"><%= message('rules_configuration.html_allowed') -%></span> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td colspan="3"> | |||
<input type="submit" value="Create"></input> <a href="<%= url_for :action => 'index', :id => @profile.id -%>">Cancel</a> | |||
<input type="submit" value="<%= message('create') -%>"></input> <a href="<%= url_for :action => 'index', :id => @profile.id -%>"><%= message('cancel') -%></a> | |||
</td> | |||
</tr> | |||
</table> |