From a9b2318ce220e5abf97ade9123233fbf1e59e900 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 4 Aug 2011 00:14:28 +0200 Subject: [PATCH] SONAR-75 fix some l10n keys --- .../resources/org/sonar/l10n/core.properties | 57 ++++++++++++++----- .../app/controllers/account_controller.rb | 8 +-- .../app/controllers/alerts_controller.rb | 6 +- .../WEB-INF/app/views/account/index.html.erb | 34 +++++------ .../WEB-INF/app/views/alerts/_edit.html.erb | 6 +- .../WEB-INF/app/views/alerts/_new.html.erb | 14 ++--- .../WEB-INF/app/views/alerts/_show.html.erb | 6 +- .../WEB-INF/app/views/alerts/edit.html.erb | 2 +- .../WEB-INF/app/views/alerts/new.html.erb | 2 +- 9 files changed, 81 insertions(+), 54 deletions(-) diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties index f8be8c0c245..bd3e5eb18ae 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -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=

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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb index 807b9bb79d6..7d7f13d3185 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb index 577e19659de..46ad51ffa9e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb @@ -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) } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/account/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/account/index.html.erb index 317922eeadc..175e42c31b3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/account/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/account/index.html.erb @@ -1,45 +1,45 @@ -

My profile

-
+

<%= message('my_profile.page') -%>

+
- + - + - - + + - +
Login:<%= message('my_profile.login') -%>: <%= current_user.login %>
Name:<%= message('my_profile.name') -%>: <%= current_user.name %>
Email:<%= current_user.email %><%= message('my_profile.email') -%>:<%= current_user.email %>
Groups:<%= message('my_profile.groups') -%>: <%= current_user.groups.sort.map(&:name).join(', ') %>
<% if User.editable_password? %> -

Change password

-
+

<%= message('my_profile.password.title') -%>

+
<% form_tag( {:action => 'change_password' }, :id => 'pass_form_tag', :name => 'pass_form_tag') do -%> - + - + - + - +
<%= password_field_tag 'old_password' %>
<%= password_field_tag 'password' %>
<%= password_field_tag 'password_confirmation' %>
<%= submit_tag 'Change password' %><%= submit_tag message('my_profile.password.submit') %>
<% end %> @@ -52,8 +52,8 @@
<% end -%> -

Notifications

-
+

<%= message('my_profile.notifications.title') -%>

+
<% form_tag({:action => 'update_notifications'}, {:method => 'post'}) do %> @@ -64,7 +64,7 @@ <% for dispatcher in @dispatchers %> - + - +
<%= message('notification.dispatcher.' + dispatcher.getKey()) -%><%= message('notification.dispatcher.' + dispatcher.getKey()) -%> <% for channel in @channels @@ -79,7 +79,7 @@ <% end %>
<%= submit_tag %><%= submit_tag message('my_profile.notifications.submit') %>
<% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_edit.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_edit.html.erb index 419fbf2b5ce..72a26668db3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_edit.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_edit.html.erb @@ -7,16 +7,16 @@ - <%= 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 %> - <%= 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 %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_new.html.erb index 572127c5ad8..e877483affe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_new.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_new.html.erb @@ -1,4 +1,4 @@ -

<%= message('alert.create_alert') -%>

+

<%= message('alerts.create_alert') -%>

<%= form_remote_tag :url => {:action => 'create', :profile_id => @profile.id}, :html => {:id => 'new_alert_form'} %> @@ -12,7 +12,7 @@ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/edit.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/edit.html.erb index 97071fb8ad1..1f1cc9ad3a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/edit.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/edit.html.erb @@ -1,4 +1,4 @@ -

<%= message('alert.editing_alert') -%>

+

<%= message('alerts.editing_alert') -%>

<% form_for([@profile, @alert]) do |f| %> <%= f.error_messages %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/new.html.erb index cbf0989e497..1858f4de6af 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/new.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/new.html.erb @@ -1,4 +1,4 @@ -

<%= message('alert.new_alert') -%>

+

<%= message('alerts.new_alert') -%>

<% form_for([@profile, @alert]) do |f| %> <%= f.error_messages %> -- 2.39.5
- <%= 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 %>
- <%= message('alert.warning_threshold') -%> + <%= message('alerts.warning_threshold') -%>
- <%= 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 %>
- <%= message('alert.error_threshold') -%> + <%= message('alerts.error_threshold') -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb index f03e9edea33..ed533127abc 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb @@ -4,17 +4,17 @@ <%= h alert.name %> - <%= message("alert.operator.#{alert.operator}") -%> + <%= message("alerts.operator.#{alert.operator}") -%> <% 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 %> <% 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 %>