From: Tom Hughes Date: Wed, 25 Apr 2018 16:39:27 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/1839' X-Git-Tag: live~3652 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b15a8c73d9c555243952d300e19d6d4127843f19?hp=af4003e2eee24883318212e79f46d2ba4d2b9dbd Merge remote-tracking branch 'upstream/pull/1839' --- diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 84bbcf185..ae6d0983b 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -30,7 +30,7 @@ class OauthController < ApplicationController @token = current_user.oauth_tokens.find_by :token => params[:token] if @token @token.invalidate! - flash[:notice] = t("oauth.revoke.flash", :application => @token.client_application.name) + flash[:notice] = t(".flash", :application => @token.client_application.name) end redirect_to oauth_clients_url(:display_name => @token.user.display_name) end @@ -41,7 +41,7 @@ class OauthController < ApplicationController append_content_security_policy_directives(:form_action => %w[*]) if @token.invalidated? - @message = t "oauth.oauthorize_failure.invalid" + @message = t "oauth.authorize_failure.invalid" render :action => "authorize_failure" elsif request.post? if user_authorizes_token? @@ -69,7 +69,7 @@ class OauthController < ApplicationController end else @token.invalidate! - @message = t("oauth.oauthorize_failure.denied", :app_name => @token.client_application.name) + @message = t("oauth.authorize_failure.denied", :app_name => @token.client_application.name) render :action => "authorize_failure" end end diff --git a/app/controllers/redactions_controller.rb b/app/controllers/redactions_controller.rb index f15060d5b..b8ecce9e2 100644 --- a/app/controllers/redactions_controller.rb +++ b/app/controllers/redactions_controller.rb @@ -25,7 +25,7 @@ class RedactionsController < ApplicationController # note that the description format will default to 'markdown' if @redaction.save - flash[:notice] = t("redaction.create.flash") + flash[:notice] = t(".flash") redirect_to @redaction else render :action => "new" @@ -42,7 +42,7 @@ class RedactionsController < ApplicationController @redaction.description = params[:redaction][:description] if @redaction.save - flash[:notice] = t("redaction.update.flash") + flash[:notice] = t(".flash") redirect_to @redaction else render :action => "edit" @@ -54,14 +54,14 @@ class RedactionsController < ApplicationController @redaction.old_ways.empty? && @redaction.old_relations.empty? if @redaction.destroy - flash[:notice] = t("redaction.destroy.flash") + flash[:notice] = t(".flash") redirect_to :redactions else - flash[:error] = t("redaction.destroy.error") + flash[:error] = t(".error") redirect_to @redaction end else - flash[:error] = t("redaction.destroy.not_empty") + flash[:error] = t(".not_empty") redirect_to @redaction end end diff --git a/app/controllers/user_blocks_controller.rb b/app/controllers/user_blocks_controller.rb index 4a55c9ba2..2b7bf3f58 100644 --- a/app/controllers/user_blocks_controller.rb +++ b/app/controllers/user_blocks_controller.rb @@ -45,7 +45,7 @@ class UserBlocksController < ApplicationController ) if @user_block.save - flash[:notice] = t("user_block.create.flash", :name => @user.display_name) + flash[:notice] = t(".flash", :name => @user.display_name) redirect_to @user_block else render :action => "new" @@ -58,14 +58,14 @@ class UserBlocksController < ApplicationController def update if @valid_params if @user_block.creator != current_user - flash[:error] = t("user_block.update.only_creator_can_edit") + flash[:error] = t(".only_creator_can_edit") redirect_to :action => "edit" elsif @user_block.update( :ends_at => Time.now.getutc + @block_period.hours, :reason => params[:user_block][:reason], :needs_view => params[:user_block][:needs_view] ) - flash[:notice] = t("user_block.update.success") + flash[:notice] = t(".success") redirect_to(@user_block) else render :action => "edit" @@ -80,7 +80,7 @@ class UserBlocksController < ApplicationController def revoke if params[:confirm] if @user_block.revoke! current_user - flash[:notice] = t "user_block.revoke.flash" + flash[:notice] = t ".flash" redirect_to(@user_block) end end @@ -128,10 +128,10 @@ class UserBlocksController < ApplicationController @valid_params = false if !UserBlock::PERIODS.include?(@block_period) - flash[:error] = t("user_block.filter.block_period") + flash[:error] = t("user_blocks.filter.block_period") elsif @user_block && !@user_block.active? - flash[:error] = t("user_block.filter.block_expired") + flash[:error] = t("user_blocks.filter.block_expired") else @valid_params = true diff --git a/app/helpers/user_blocks_helper.rb b/app/helpers/user_blocks_helper.rb index 3c9c0a37e..668eeb0e5 100644 --- a/app/helpers/user_blocks_helper.rb +++ b/app/helpers/user_blocks_helper.rb @@ -7,19 +7,19 @@ module UserBlocksHelper # if the block hasn't expired yet show the date, if the user just needs to login show that if block.needs_view? if block.ends_at > Time.now.getutc - I18n.t("user_block.helper.time_future_and_until_login", :time => friendly_date(block.ends_at)).html_safe + I18n.t("user_blocks.helper.time_future_and_until_login", :time => friendly_date(block.ends_at)).html_safe else - I18n.t("user_block.helper.until_login") + I18n.t("user_blocks.helper.until_login") end else - I18n.t("user_block.helper.time_future", :time => friendly_date(block.ends_at)).html_safe + I18n.t("user_blocks.helper.time_future", :time => friendly_date(block.ends_at)).html_safe end else # the max of the last update time or the ends_at time is when this block finished # either because the user viewed the block (updated_at) or it expired or was # revoked (ends_at) last_time = [block.ends_at, block.updated_at].max - I18n.t("user_block.helper.time_past", :time => friendly_date(last_time)).html_safe + I18n.t("user_blocks.helper.time_past", :time => friendly_date(last_time)).html_safe end end end diff --git a/app/views/notes/_comment.html.erb b/app/views/notes/_comment.html.erb index c0d6e17d3..d9c17848b 100644 --- a/app/views/notes/_comment.html.erb +++ b/app/views/notes/_comment.html.erb @@ -1,8 +1,8 @@
<% if comment.author.nil? -%> -
<%= t "note.description.#{comment.event}_at_html", :when => friendly_date(comment.created_at) %>
+
<%= t ".#{comment.event}_at_html", :when => friendly_date(comment.created_at) %>
<% else -%> -
<%= t "note.description.#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %>
+
<%= t ".#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %>
<% end -%>
<%= comment.body %>
diff --git a/app/views/notes/_entry.html.erb b/app/views/notes/_entry.html.erb index 6f0c8fb71..624ecd15d 100644 --- a/app/views/notes/_entry.html.erb +++ b/app/views/notes/_entry.html.erb @@ -1,4 +1,4 @@ -

<%= t "note.entry.comment" %>

+

<%= t ".comment" %>

<%= render :partial => "comment", :object => entry %> -

<%= t "note.entry.full" %>

+

<%= t ".full" %>

<%= render :partial => "description", :object => entry.note %> diff --git a/app/views/notes/_note.rss.builder b/app/views/notes/_note.rss.builder index 38c42f1ec..9c72b8a5d 100644 --- a/app/views/notes/_note.rss.builder +++ b/app/views/notes/_note.rss.builder @@ -2,11 +2,11 @@ xml.item do location = describe_location(note.lat, note.lon, 14, locale) if note.closed? - xml.title t("note.rss.closed", :place => location) + xml.title t("notes.rss.closed", :place => location) elsif note.comments.length > 1 - xml.title t("note.rss.commented", :place => location) + xml.title t("notes.rss.commented", :place => location) else - xml.title t("note.rss.opened", :place => location) + xml.title t("notes.rss.opened", :place => location) end xml.link browse_note_url(note) diff --git a/app/views/notes/feed.rss.builder b/app/views/notes/feed.rss.builder index 708192e5f..4a4fb3e1a 100644 --- a/app/views/notes/feed.rss.builder +++ b/app/views/notes/feed.rss.builder @@ -5,15 +5,15 @@ xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t("note.rss.title") - xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) + xml.title t("notes.rss.title") + xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.link url_for(:controller => "site", :action => "index", :only_path => false) @comments.each do |comment| location = describe_location(comment.note.lat, comment.note.lon, 14, locale) xml.item do - xml.title t("note.rss.#{comment.event}", :place => location) + xml.title t("notes.rss.#{comment.event}", :place => location) xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false) diff --git a/app/views/notes/index.rss.builder b/app/views/notes/index.rss.builder index e912b9921..d28efa194 100644 --- a/app/views/notes/index.rss.builder +++ b/app/views/notes/index.rss.builder @@ -5,8 +5,8 @@ xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t("note.rss.title") - xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) + xml.title t("notes.rss.title") + xml.description t("notes.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon) xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml << (render(:partial => "note", :collection => @notes) || "") diff --git a/app/views/notes/mine.html.erb b/app/views/notes/mine.html.erb index 666c7dc8f..13824419e 100644 --- a/app/views/notes/mine.html.erb +++ b/app/views/notes/mine.html.erb @@ -8,11 +8,11 @@ - - - - - + + + + + <% @notes.each do |note| -%> class="creator"<% end %>> @@ -25,9 +25,9 @@ - - - + + + <% end -%>
<%= t'note.mine.id' %><%= t'note.mine.creator' %><%= t'note.mine.description' %><%= t'note.mine.created_at' %><%= t'note.mine.last_changed' %><%= t '.id' %><%= t '.creator' %><%= t '.description' %><%= t '.created_at' %><%= t '.last_changed' %>
<%= link_to note.id.to_s, :controller => "browse", :action => "note", :id => note.id %> <%= note_author(note.author) %><%= note.comments.first.body.to_html %><%= t 'note.mine.ago_html', :when => friendly_date(note.created_at) %><%= t 'note.mine.ago_html', :when => friendly_date(note.updated_at) %><%= note.comments.first.body.to_html %><%= t '.ago_html', :when => friendly_date(note.created_at) %><%= t '.ago_html', :when => friendly_date(note.updated_at) %>
diff --git a/app/views/notes/show.rss.builder b/app/views/notes/show.rss.builder index 62ccbe8a9..f40647900 100644 --- a/app/views/notes/show.rss.builder +++ b/app/views/notes/show.rss.builder @@ -4,8 +4,8 @@ xml.rss("version" => "2.0", "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#", "xmlns:georss" => "http://www.georss.org/georss") do xml.channel do - xml.title t("note.rss.title") - xml.description t("note.rss.description_item", :id => @note.id) + xml.title t("notes.rss.title") + xml.description t("notes.rss.description_item", :id => @note.id) xml.link url_for(:controller => "site", :action => "index", :only_path => false) xml << render(:partial => "note", :object => @note) diff --git a/app/views/oauth/authorize.html.erb b/app/views/oauth/authorize.html.erb index 6c8bc3a9e..3108c551a 100644 --- a/app/views/oauth/authorize.html.erb +++ b/app/views/oauth/authorize.html.erb @@ -1,19 +1,19 @@ <% content_for :heading do %> -

<%= t "oauth.oauthorize.title" %>

+

<%= t ".title" %>

<% end %> -

<%= raw t("oauth.oauthorize.request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %>

+

<%= raw t(".request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %>

<%= form_tag authorize_url do %> <%= hidden_field_tag "oauth_token", @token.token %> <%- if params[:oauth_callback] -%> <%= hidden_field_tag "oauth_callback", params[:oauth_callback] %> <%- end -%> -

<%= t 'oauth.oauthorize.allow_to' %>

+

<%= t '.allow_to' %>

-

<%= submit_tag t("oauth.oauthorize.grant_access") %>

+

<%= submit_tag t(".grant_access") %>

<% end %> diff --git a/app/views/oauth/authorize_failure.html.erb b/app/views/oauth/authorize_failure.html.erb index 4afba70e3..7142a71a0 100644 --- a/app/views/oauth/authorize_failure.html.erb +++ b/app/views/oauth/authorize_failure.html.erb @@ -1,5 +1,5 @@ <% content_for :heading do %> -

<%= t "oauth.oauthorize_failure.title" %>

+

<%= t ".title" %>

<% end %>

<%= @message %>

diff --git a/app/views/oauth/authorize_success.html.erb b/app/views/oauth/authorize_success.html.erb index c8f56af33..9c817372f 100644 --- a/app/views/oauth/authorize_success.html.erb +++ b/app/views/oauth/authorize_success.html.erb @@ -1,9 +1,9 @@ <% content_for :heading do %> -

<%= t "oauth.oauthorize_success.title" %>

+

<%= t ".title" %>

<% end %> -

<%= raw t("oauth.oauthorize_success.allowed", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %>

+

<%= raw t(".allowed", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %>

<% if @token.oob? and not @token.oauth10? %> -

<%= t "oauth.oauthorize_success.verification", :code => @token.verifier %>

+

<%= t ".verification", :code => @token.verifier %>

<% end %> diff --git a/app/views/redactions/edit.html.erb b/app/views/redactions/edit.html.erb index 2dd63c9cb..fe85d0756 100644 --- a/app/views/redactions/edit.html.erb +++ b/app/views/redactions/edit.html.erb @@ -1,22 +1,21 @@ -<% @title = t 'redaction.edit.title' %> +<% @title = t '.title' %> <% content_for :heading do %> -

<%= t 'redaction.edit.heading' %>

+

<%= t '.heading' %>

<% end %> <%= form_for(@redaction) do |f| %> <%= f.error_messages %>

- <%= f.label :title, t('redaction.edit.title') %>
+ <%= f.label :title, t('.title') %>
<%= f.text_field :title %>

- <%= f.label :description, t('redaction.edit.description') %>
+ <%= f.label :description, t('.description') %>
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>

- <%= f.submit t('redaction.edit.submit') %> + <%= f.submit t('.submit') %>

<% end %> - diff --git a/app/views/redactions/index.html.erb b/app/views/redactions/index.html.erb index a5a85c38d..b53e9b747 100644 --- a/app/views/redactions/index.html.erb +++ b/app/views/redactions/index.html.erb @@ -1,10 +1,10 @@ -<% @title = t('redaction.index.title') %> +<% @title = t('.title') %> <% content_for :heading do %> -

<%= t('redaction.index.heading') %>

+

<%= t('.heading') %>

<% end %> <% unless @redactions.empty? %> <%= render :partial => 'redactions' %> <% else %> -

<%= t 'redaction.index.empty' %>

+

<%= t '.empty' %>

<% end %> diff --git a/app/views/redactions/new.html.erb b/app/views/redactions/new.html.erb index 5004c0e1e..e6838073d 100644 --- a/app/views/redactions/new.html.erb +++ b/app/views/redactions/new.html.erb @@ -1,22 +1,20 @@ -<% @title = t 'redaction.new.title' %> +<% @title = t '.title' %> <% content_for :heading do %> -

<%= t 'redaction.new.heading' %>

+

<%= t '.heading' %>

<% end %> <%= form_for(@redaction) do |f| %> <%= f.error_messages %>

- <%= f.label :title, t('redaction.new.title') %>
+ <%= f.label :title, t('.title') %>
<%= f.text_field :title %>

- <%= f.label :description, t('redaction.new.description') %>
+ <%= f.label :description, t('.description') %>
<%= richtext_area :redaction, :description, :cols => 80, :rows => 20, :format => @redaction.description_format %>

- <%= f.submit t('redaction.new.submit') %> + <%= f.submit t('.submit') %>

<% end %> - - diff --git a/app/views/redactions/show.html.erb b/app/views/redactions/show.html.erb index 99f7cd1f1..8ec72f3ac 100644 --- a/app/views/redactions/show.html.erb +++ b/app/views/redactions/show.html.erb @@ -1,20 +1,20 @@ -<% @title = t('redaction.show.title') %> +<% @title = t('.title') %> <% content_for :heading do %> -

<%= t('redaction.show.heading', :title => @redaction.title) %>

+

<%= t('.heading', :title => @redaction.title) %>

<% end %>

- <%= t 'redaction.show.user' %> + <%= t '.user' %> <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>

- <%= t 'redaction.show.description' %> + <%= t '.description' %> <%= @redaction.description.to_html %>

<% if current_user and current_user.moderator? %>
- <%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %> - <%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %> + <%= button_to t('.edit'), edit_redaction_path(@redaction), :method => :get %> + <%= button_to t('.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('.confirm') } %>
<% end %> diff --git a/app/views/user/index.html.erb b/app/views/user/index.html.erb deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/user_blocks/blocks_by.html.erb b/app/views/user_blocks/blocks_by.html.erb index 8b7a290fc..69af9374a 100644 --- a/app/views/user_blocks/blocks_by.html.erb +++ b/app/views/user_blocks/blocks_by.html.erb @@ -1,10 +1,10 @@ -<% @title = t('user_block.blocks_by.title', :name => h(@user.display_name)) %> +<% @title = t('.title', :name => h(@user.display_name)) %> <% content_for :heading do %> -

<%= raw(t('user_block.blocks_by.heading', :name => link_to(h(@user.display_name), user_path(@user)))) %>

+

<%= raw(t('.heading', :name => link_to(h(@user.display_name), user_path(@user)))) %>

<% end %> <% unless @user_blocks.empty? %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => false } %> <% else %> -

<%= t "user_block.blocks_by.empty", :name => h(@user.display_name) %>

+

<%= t ".empty", :name => h(@user.display_name) %>

<% end %> diff --git a/app/views/user_blocks/blocks_on.html.erb b/app/views/user_blocks/blocks_on.html.erb index 7abcc8674..6e4fd3ca6 100644 --- a/app/views/user_blocks/blocks_on.html.erb +++ b/app/views/user_blocks/blocks_on.html.erb @@ -1,9 +1,9 @@ -<% @title = t('user_block.blocks_on.title', :name => h(@user.display_name)) %> +<% @title = t('.title', :name => h(@user.display_name)) %> <% content_for :heading do %> -

<%= raw(t('user_block.blocks_on.heading', :name => link_to(h(@user.display_name), user_path(@user)))) %>

+

<%= raw(t('.heading', :name => link_to(h(@user.display_name), user_path(@user)))) %>

<% end %> <% unless @user_blocks.empty? %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => false, :show_creator_name => true } %> <% else %> -

<%= t "user_block.blocks_on.empty", :name => h(@user.display_name) %>

+

<%= t ".empty", :name => h(@user.display_name) %>

<% end %> diff --git a/app/views/user_blocks/edit.html.erb b/app/views/user_blocks/edit.html.erb index 289f7a831..a3bb9c682 100644 --- a/app/views/user_blocks/edit.html.erb +++ b/app/views/user_blocks/edit.html.erb @@ -1,11 +1,11 @@ -<% @title = t 'user_block.edit.title', :name => h(@user_block.user.display_name) %> +<% @title = t '.title', :name => h(@user_block.user.display_name) %> <% content_for :heading do %> -

<%= raw t('user_block.edit.title', +

<%= raw t('.title', :name => link_to(h(@user_block.user.display_name), user_path(@user_block.user))) %>

<% end %> @@ -13,18 +13,18 @@ <%= f.error_messages %>

- <%= f.label :reason, t('user_block.edit.reason', :name => h(@user_block.user.display_name)) %>
+ <%= f.label :reason, t('.reason', :name => h(@user_block.user.display_name)) %>
<%= richtext_area :user_block, :reason, :cols => 80, :rows => 20, :format => @user_block.reason_format %>

- <%= label_tag 'user_block_period', t('user_block.edit.period') %>
- <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_block.period', :count => h), h.to_s] }, params[:user_block_period])) %> + <%= label_tag 'user_block_period', t('.period') %>
+ <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_blocks.period', :count => h), h.to_s] }, params[:user_block_period])) %>

<%= f.check_box :needs_view %> - <%= f.label :needs_view, t('user_block.edit.needs_view') %> + <%= f.label :needs_view, t('.needs_view') %>

- <%= f.submit t('user_block.edit.submit') %> + <%= f.submit t('.submit') %>

<% end %> diff --git a/app/views/user_blocks/index.html.erb b/app/views/user_blocks/index.html.erb index ce7f12b91..adfc0dc28 100644 --- a/app/views/user_blocks/index.html.erb +++ b/app/views/user_blocks/index.html.erb @@ -1,10 +1,10 @@ -<% @title = t('user_block.index.title') %> +<% @title = t('.title') %> <% content_for :heading do %> -

<%= t('user_block.index.heading') %>

+

<%= t('.heading') %>

<% end %> <% unless @user_blocks.empty? %> <%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => true } %> <% else %> -

<%= t "user_block.index.empty" %>

+

<%= t ".empty" %>

<% end %> diff --git a/app/views/user_blocks/new.html.erb b/app/views/user_blocks/new.html.erb index f26a91c5c..bd941babc 100644 --- a/app/views/user_blocks/new.html.erb +++ b/app/views/user_blocks/new.html.erb @@ -1,6 +1,6 @@ -<% @title = t 'user_block.new.title', :name => h(@user.display_name) %> +<% @title = t '.title', :name => h(@user.display_name) %> <% content_for :heading do %> -

<%= raw t('user_block.new.heading', +

<%= raw t('.heading', :name => link_to( h(@user.display_name), user_path(@user))) %>

@@ -9,21 +9,21 @@ <%= f.error_messages %>

- <%= f.label :reason, t('user_block.new.reason', :name => @user.display_name) %>
+ <%= f.label :reason, t('.reason', :name => @user.display_name) %>
<%= richtext_area :user_block, :reason, :cols => 80, :rows => 20 %>

- <%= label_tag 'user_block_period', t('user_block.new.period') %>
- <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_block.period', :count => h), h.to_s] }, params[:user_block_period] )) %> + <%= label_tag 'user_block_period', t('.period') %>
+ <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_blocks.period', :count => h), h.to_s] }, params[:user_block_period] )) %>

<%= f.check_box :needs_view %> - <%= f.label :needs_view, t('user_block.new.needs_view') %> + <%= f.label :needs_view, t('.needs_view') %>

<%= hidden_field_tag 'display_name', @user.display_name %> - <%= f.submit t('user_block.new.submit') %> + <%= f.submit t('.submit') %>

<% end %> -<%= link_to t('user_block.new.back'), user_blocks_path %> +<%= link_to t('.back'), user_blocks_path %> diff --git a/app/views/user_blocks/not_found.html.erb b/app/views/user_blocks/not_found.html.erb index 3b5323d72..6aad7eef3 100644 --- a/app/views/user_blocks/not_found.html.erb +++ b/app/views/user_blocks/not_found.html.erb @@ -1,3 +1,3 @@ -

<%= t'user_block.not_found.sorry', :id => params[:id] %>

+

<%= t'.sorry', :id => params[:id] %>

-<%= link_to t('user_block.not_found.back'), user_blocks_path %> +<%= link_to t('.back'), user_blocks_path %> diff --git a/app/views/user_blocks/revoke.html.erb b/app/views/user_blocks/revoke.html.erb index f812ffff6..c7eee6703 100644 --- a/app/views/user_blocks/revoke.html.erb +++ b/app/views/user_blocks/revoke.html.erb @@ -1,9 +1,9 @@ -<% @title = t('user_block.revoke.title', +<% @title = t('.title', :block_on => h(@user_block.user.display_name), :block_by => h(@user_block.creator.display_name)) %> <% content_for :heading do %> -

<%= raw t('user_block.revoke.heading', +

<%= raw t('.heading', :block_on => link_to( h(@user_block.user.display_name), user_path(@user_block.user)), @@ -14,22 +14,22 @@ <% if @user_block.ends_at > Time.now %>

- <%= t('user_block.revoke.time_future', :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %> + <%= t('.time_future', :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %>

<%= form_for :revoke, :url => { :action => "revoke" } do |f| %> <%= f.error_messages %>

<%= check_box_tag 'confirm', 'yes' %> - <%= label_tag 'confirm', t('user_block.revoke.confirm') %> + <%= label_tag 'confirm', t('.confirm') %>

- <%= submit_tag t('user_block.revoke.revoke') %> + <%= submit_tag t('.revoke') %>

<% end %> <% else %>

- <%= t('user_block.revoke.past', :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %> + <%= t('.past', :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %>

<% end %> diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb index 51fbcaf49..4dc03f4e4 100644 --- a/app/views/user_blocks/show.html.erb +++ b/app/views/user_blocks/show.html.erb @@ -1,9 +1,9 @@ -<% @title = t('user_block.show.title', +<% @title = t('.title', :block_on => @user_block.user.display_name, :block_by => @user_block.creator.display_name) %> <% content_for :heading do %> -

<%= raw t('user_block.show.heading', +

<%= raw t('.heading', :block_on => link_to( h(@user_block.user.display_name), user_path(@user_block.user)), @@ -13,26 +13,26 @@ <% end %> <% if @user_block.revoker %>

- <%= t'user_block.show.revoker' %> + <%= t'.revoker' %> <%= link_to h(@user_block.revoker.display_name), user_path(@user_block.revoker) %>

<% end %> -

<%= t'user_block.show.created' %>: <%= raw t'user_block.show.ago', :time => friendly_date(@user_block.created_at) %>

+

<%= t'.created' %>: <%= raw t'.ago', :time => friendly_date(@user_block.created_at) %>

-

<%= t'user_block.show.status' %>: <%= block_status(@user_block) %>

+

<%= t'.status' %>: <%= block_status(@user_block) %>

-

<%= t'user_block.show.reason' %>

+

<%= t'.reason' %>

<%= @user_block.reason.to_html %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index c273836a6..9e923185d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1689,7 +1689,7 @@ en: blocked: "Your access to the API has been blocked. Please log-in to the web interface to find out more." need_to_see_terms: "Your access to the API is temporarily suspended. Please log-in to the web interface to view the Contributor Terms. You do not need to agree, but you must view them." oauth: - oauthorize: + authorize: title: "Authorize access to your account" request_access: "The application %{app_name} is requesting access to your account, %{user}. Please check whether you would like the application to have the following capabilities. You may choose as many or as few as you like." allow_to: "Allow the client application to:" @@ -1701,11 +1701,11 @@ en: allow_write_gpx: "upload GPS traces." allow_write_notes: "modify notes." grant_access: "Grant Access" - oauthorize_success: + authorize_success: title: "Authorization request allowed" allowed: "You have granted application %{app_name} access to your account." verification: "The verification code is %{code}." - oauthorize_failure: + authorize_failure: title: "Authorization request failed" denied: "You have denied application %{app_name} access to your account." invalid: "The authorization token is not valid." @@ -2107,7 +2107,7 @@ en: are_you_sure: "Are you sure you want to revoke the role `%{role}' from the user `%{name}'?" confirm: "Confirm" fail: "Could not revoke role `%{role}' from user `%{name}'. Please check that the user and role are both valid." - user_block: + user_blocks: model: non_moderator_update: "Must be a moderator to create or update a block." non_moderator_revoke: "Must be a moderator to revoke a block." @@ -2187,7 +2187,6 @@ en: back: "View all blocks" revoker: "Revoker:" needs_view: "The user needs to log in before this block will be cleared." - user_blocks: block: not_revoked: "(not revoked)" show: "Show" @@ -2202,8 +2201,8 @@ en: showing_page: "Page %{page}" next: "Next »" previous: "« Previous" - note: - description: + notes: + comment: opened_at_html: "Created %{when} ago" opened_at_by_html: "Created %{when} ago by %{user}" commented_at_html: "Updated %{when} ago" @@ -2400,7 +2399,7 @@ en: show_address: Show address query_features: Query features centre_map: Centre map here - redaction: + redactions: edit: description: "Description" heading: "Edit redaction"