]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-75 fix some l10n keys
authorsimonbrandhof <simon.brandhof@gmail.com>
Wed, 3 Aug 2011 22:14:28 +0000 (00:14 +0200)
committersimonbrandhof <simon.brandhof@gmail.com>
Wed, 3 Aug 2011 22:14:28 +0000 (00:14 +0200)
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/account/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_edit.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_new.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/alerts/edit.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/alerts/new.html.erb

index f8be8c0c2451e1a24681ee51960cc2ba5498b21e..bd3e5eb18ae3797f02d3cffb16ea97c425bdb143 100644 (file)
@@ -699,6 +699,12 @@ email_configuration.test.send=Send test email
 email_configuration.test.sending=Sending test email
 email_configuration.test.email_was_sent_to_x=Email was sent to {0}
 
+
+#------------------------------------------------------------------------------
+#
+# NOTIFICATIONS
+#
+#------------------------------------------------------------------------------
 notification.channel.EmailNotificationChannel=Email
 notification.dispatcher.ChangesInReviewAssignedToMeOrCreatedByMe=Changes in review assigned to me or created by me
 
@@ -714,21 +720,21 @@ alerts.notes.description=<p>Only project measures are checked against thresholds
 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.
-alert.operator.<=is less than
-alert.operator.>=is greater than
-alert.operator.\==equals
-alert.operator.!\==is not
+alerts.new_alert=New alert
+alerts.editing_alert=Editing alert
+alerts.create_alert=Create alert
+alerts.select_metric=Select a metric
+alerts.warning_threshold=Warning threshold
+alerts.warning_tooltip=A warning is triggered when this value is reached.
+alerts.error_threshold=Error threshold
+alerts.error_tooltip=An error is triggered when this value is reached.
+alerts.alert_created=Alert is created.
+alerts.alert_updated=Alert is updated.
+alerts.alert_deleted=Alert is deleted.
+alerts.operator.<=is less than
+alerts.operator.>=is greater than
+alerts.operator.\==equals
+alerts.operator.!\==is not
 
 #------------------------------------------------------------------------------
 #
@@ -740,6 +746,27 @@ events.add_an_event=Add an event
 events.name_required=Name (required)
 
 
+#------------------------------------------------------------------------------
+#
+# MY PROFILE
+#
+#------------------------------------------------------------------------------
+my_profile.login=Login
+my_profile.name=Name
+my_profile.email=Email
+my_profile.groups=Groups
+my_profile.password.title=Change password
+my_profile.password.old=Old value
+my_profile.password.new=New value
+my_profile.password.confirm=Confirm new value
+my_profile.password.submit=Change password
+my_profile.notifications.title=Notifications
+my_profile.notifications.submit=Save changes
+my_profile.password.changed=Password changed
+my_profile.password.empty=Password can not be empty
+my_profile.password.mismatch=Password mismatch
+my_profile.password.wrong_old=Wrong old password
+
 #------------------------------------------------------------------------------
 #
 # MAINTENANCE
index 807b9bb79d63508ea6a5dd5d76f3b04ef40ccb3e..7d7f13d3185835a7f600c3b76796c20a5c29fb83 100644 (file)
@@ -41,15 +41,15 @@ class AccountController < ApplicationController
         current_user.password_confirmation = params[:password]
         @result = current_user.save
         if @result
-          flash[:notice] = 'Password changed.'
+          flash[:notice] = message('my_profile.password.changed')
         else
-          flash[:error] = 'Password cannot be empty'
+          flash[:error] = message('my_profile.password.empty')
         end
       else
-        flash[:error] = 'Password mismatch'
+        flash[:error] = message('my_profile.password.mismatch')
       end
     else
-      flash[:error] = 'Wrong old password'
+      flash[:error] = message('my_profile.password.wrong_old')
     end
     redirect_to :controller => 'account', :action => 'index'
   end
index 577e19659deda4aa3863b14bfba5637e55d7d2ed..46ad51ffa9e239c518ab44a12565bc0d746d18b9 100644 (file)
@@ -86,7 +86,7 @@ class AlertsController < ApplicationController
     
     respond_to do |format|
       if @alert.save
-        flash[:notice] = message('alert.alert_created')
+        flash[:notice] = message('alerts.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] = message('alert.alert_updated')
+        flash[:notice] = message('alerts.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] = message('alert.alert_deleted')
+    flash[:notice] = message('alerts.alert_deleted')
 
     respond_to do |format|
       format.html { redirect_to(:action => 'index', :id=>@profile.id) }
index 317922eeadc4485f554cadffe13aadc3aa40be3a..175e42c31b3445c93bd98467fd27dce3e44a1b5a 100644 (file)
@@ -1,45 +1,45 @@
-<h1>My profile</h1>
-<div class="admin">
+<h1><%= message('my_profile.page') -%></h1>
+<div class="admin marginbottom10">
 <table class="form">
   <tr>
-    <td><b>Login:</b></td>
+    <td><b><%= message('my_profile.login') -%>:</b></td>
     <td id="login"><%= current_user.login %></td>
   </tr>
   <tr>
-    <td><b>Name:</b></td>
+    <td><b><%= message('my_profile.name') -%>:</b></td>
     <td id="name"><%= current_user.name %></td>
   </tr>
   <tr>
-    <td><b>Email:</b></td>
-    <td id="name"><%= current_user.email %></td>
+    <td><b><%= message('my_profile.email') -%>:</b></td>
+    <td id="email"><%= current_user.email %></td>
   </tr>
   <tr>
-    <td><b>Groups:</b></td>
+    <td><b><%= message('my_profile.groups') -%>:</b></td>
     <td id="groups"><%= current_user.groups.sort.map(&:name).join(', ') %></td>
   </tr>
 </table>
 </div>
 
 <% if User.editable_password? %>
-<h1>Change password</h1>
-<div class="admin">
+<h1><%= message('my_profile.password.title') -%></h1>
+<div class="admin marginbottom10">
   <% form_tag( {:action => 'change_password' }, :id => 'pass_form_tag', :name => 'pass_form_tag') do -%>
   <table class="form">
     <tr>
-      <td class="keyCell"><label for="old_password"><b>Old value:</b></label></td>
+      <td class="keyCell"><label for="old_password"><b><%= message('my_profile.password.old') -%>:</b></label></td>
       <td><%= password_field_tag 'old_password' %></td>
     </tr>
     <tr>
-      <td class="keyCell"><label for="password"><b>New value:</b></label></td>
+      <td class="keyCell"><label for="password"><b><%= message('my_profile.password.new') -%>:</b></label></td>
       <td><%= password_field_tag 'password' %></td>
     </tr>
     <tr>
-      <td class="keyCell"><label for="password_confirmation"><b>Confirm new value:</b></label></td>
+      <td class="keyCell"><label for="password_confirmation"><b><%= message('my_profile.password.confirm') -%>:</b></label></td>
       <td><%= password_field_tag 'password_confirmation' %></td>
     </tr>
     <tr>
       <td></td>
-      <td><%= submit_tag 'Change password' %></td>
+      <td><%= submit_tag message('my_profile.password.submit') %></td>
     </tr>
   </table>
   <% end %>
@@ -52,8 +52,8 @@
 </div>
 <% end -%>
 
-<h1>Notifications</h1>
-<div class="admin">
+<h1><%= message('my_profile.notifications.title') -%></h1>
+<div class="admin marginbottom10">
 <% form_tag({:action => 'update_notifications'}, {:method => 'post'}) do %>
   <table class="form">
     <tr>
@@ -64,7 +64,7 @@
     </tr>
     <% for dispatcher in @dispatchers %>
     <tr>
-      <td><b><%= message('notification.dispatcher.' + dispatcher.getKey()) -%></b></td>
+      <td><%= message('notification.dispatcher.' + dispatcher.getKey()) -%></td>
       <td>
         <%
         for channel in @channels
@@ -79,7 +79,7 @@
     <% end %>
     <tr>
       <td></td>
-      <td><%= submit_tag %></td>
+      <td><%= submit_tag message('my_profile.notifications.submit') %></td>
     </tr>
   </table>
 <% end %>
index 419fbf2b5ce844530ba066360e8c88473a9a0e34..72a26668db336e9741799edd9ec43da2c61285ba 100644 (file)
@@ -7,16 +7,16 @@
   <td width="10%" nowrap>
     <select id="alert_operator" name="alert[operator]">
       <% operators_for_select(alert).each do |key| %>
-        <option value="<%= key -%>" <%= 'selected' if alert.operator==key -%>><%= message("alert.operator.#{key}") -%></option>
+        <option value="<%= key -%>" <%= 'selected' if alert.operator==key -%>><%= message("alerts.operator.#{key}") -%></option>
       <% end %>
     </select>
   </td>
   <td width="20%" align="left">
-    <%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %>
+    <%= image_tag 'levels/warn.png', :alt => message('alerts.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 => message('alert.error_tooltip') %>
+    <%= image_tag 'levels/error.png', :alt => message('alerts.error_tooltip') %>
     <%= value_field(alert, alert.value_error, 'alert[value_error]') %> <%= alert.metric.suffix if alert.metric %>
   </td>
   <td width="120px" nowrap>
index 572127c5ad8b9fd230f2003aeab82aeb174208e2..e877483affe7f29bfbb707e1ff19cfa6d5bbdd5f 100644 (file)
@@ -1,4 +1,4 @@
-<h3><%= message('alert.create_alert') -%></h3>
+<h3><%= message('alerts.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? %>><%= message('alert.select_metric') -%></option>
+    <option value="" <%= 'selected' if @alert.metric.nil? %>><%= message('alerts.select_metric') -%></option>
   <% Metric.domains.each do |domain| %>
   <optgroup label="<%= h domain -%>">
     <%# 'new_' metrics excluded due to SONAR-2396 %>
       <%
         default_op=default_operator(@alert)
         operators_for_select(@alert).each do |key| %>
-        <option value="<%= key -%>" <%= 'selected' if default_op==key -%>><%= message("alert.operator.#{key}") -%></option>
+        <option value="<%= key -%>" <%= 'selected' if default_op==key -%>><%= message("alerts.operator.#{key}") -%></option>
       <% end %>
     </select>
   </td>
 
   <td width="20%" valign="top">
-    <%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %>
+    <%= image_tag 'levels/warn.png', :alt => message('alerts.warning_tooltip') %>
     <%= value_field(@alert, '', 'alert[value_warning]') %>
     <%= @alert.metric.suffix if @alert.metric %><br/>
-    <span class="note"><%= message('alert.warning_threshold') -%></span>
+    <span class="note"><%= message('alerts.warning_threshold') -%></span>
   </td>
 
   <td width="20%" valign="top">
-    <%= image_tag 'levels/error.png', :alt => message('alert.error_tooltip') %>
+    <%= image_tag 'levels/error.png', :alt => message('alerts.error_tooltip') %>
     <%= value_field(@alert, '', 'alert[value_error]') %>
     <%= @alert.metric.suffix if @alert.metric %><br/>
-    <span class="note"><%= message('alert.error_threshold') -%></span>
+    <span class="note"><%= message('alerts.error_threshold') -%></span>
   </td>
 
   <td width="120px" nowrap valign="top">
index f03e9edea33b4c381a0244dabdfc1d99908a7556..ed533127abcacd09e8539ec3418ac4426cd9e5b7 100644 (file)
@@ -4,17 +4,17 @@
     <%= h alert.name %>
   </td>
   <td width="10%">
-    <%= message("alert.operator.#{alert.operator}") -%>
+    <%= message("alerts.operator.#{alert.operator}") -%>
   </td>
   <td width="20%">
     <% if alert.metric && !alert.value_warning.blank? %>
-      <%= image_tag 'levels/warn.png', :alt => message('alert.warning_tooltip') %>
+      <%= image_tag 'levels/warn.png', :alt => message('alerts.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 => message('alert.error_tooltip') %>
+      <%= image_tag 'levels/error.png', :alt => message('alerts.error_tooltip') %>
       <%= alert.value_error %> <%= alert.metric.suffix %>
     <% end %>
   </td>
index 97071fb8ad1c7e52bc7e53c4b003a61ac8486701..1f1cc9ad3a6bb657e60b6e9e9a2354b8a71f325f 100644 (file)
@@ -1,4 +1,4 @@
-<h1><%= message('alert.editing_alert') -%></h1>
+<h1><%= message('alerts.editing_alert') -%></h1>
 
 <% form_for([@profile, @alert]) do |f| %>
   <%= f.error_messages %>
index cbf0989e4974aa55249a685767525115ed2420cb..1858f4de6afd0a91ab86e8781a981800ee625011 100644 (file)
@@ -1,4 +1,4 @@
-<h1><%= message('alert.new_alert') -%></h1>
+<h1><%= message('alerts.new_alert') -%></h1>
 
 <% form_for([@profile, @alert]) do |f| %>
   <%= f.error_messages %>