From: Tom Hughes Date: Wed, 14 Nov 2018 12:43:35 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/2061' X-Git-Tag: live~3316 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/dd302f4f2c56d1e9f1a2e39a54670f6f5a9bbd34?hp=c89b88c8d0d9c42283cd404228f5079b93ff5a35 Merge remote-tracking branch 'upstream/pull/2061' --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7232d199b..c3c8cc7b4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -141,7 +141,7 @@ Rails/OutputSafety: Exclude: - 'app/controllers/users_controller.rb' - 'app/helpers/application_helper.rb' - - 'app/helpers/changeset_helper.rb' + - 'app/helpers/changesets_helper.rb' - 'app/helpers/geocoder_helper.rb' - 'app/helpers/note_helper.rb' - 'app/helpers/open_graph_helper.rb' diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changesets_controller.rb similarity index 99% rename from app/controllers/changeset_controller.rb rename to app/controllers/changesets_controller.rb index 7c9944f63..e4fd593d7 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changesets_controller.rb @@ -1,6 +1,6 @@ # The ChangesetController is the RESTful interface to Changeset objects -class ChangesetController < ApplicationController +class ChangesetsController < ApplicationController layout "site" require "xml/libxml" diff --git a/app/helpers/changeset_helper.rb b/app/helpers/changesets_helper.rb similarity index 84% rename from app/helpers/changeset_helper.rb rename to app/helpers/changesets_helper.rb index 9bcae4ad4..4a327c16c 100644 --- a/app/helpers/changeset_helper.rb +++ b/app/helpers/changesets_helper.rb @@ -1,4 +1,4 @@ -module ChangesetHelper +module ChangesetsHelper def changeset_user_link(changeset) if changeset.user.status == "deleted" t("users.no_such_user.deleted") @@ -34,13 +34,13 @@ module ChangesetHelper def changeset_index_title(params, user) if params[:friends] && user - t "changeset.index.title_friend" + t "changesets.index.title_friend" elsif params[:nearby] && user - t "changeset.index.title_nearby" + t "changesets.index.title_nearby" elsif params[:display_name] - t "changeset.index.title_user", :user => params[:display_name] + t "changesets.index.title_user", :user => params[:display_name] else - t "changeset.index.title" + t "changesets.index.title" end end end diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 81e930812..c63b0112e 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -127,7 +127,7 @@ <% end %> <%= user = (@prev_by_user || @next_by_user).user.display_name - link_to content_tag(:bdi, user), :controller => "changeset", :action => "index", :display_name => user + link_to content_tag(:bdi, user), :controller => "changesets", :action => "index", :display_name => user %> <% if @next_by_user %> · @@ -137,7 +137,7 @@ <% end %>
- <%= link_to(t('.changesetxml'), :controller => "changeset", :action => "read") %> + <%= link_to(t('.changesetxml'), :controller => "changesets", :action => "read") %> · - <%= link_to(t('.osmchangexml'), :controller => "changeset", :action => "download") %> + <%= link_to(t('.osmchangexml'), :controller => "changesets", :action => "download") %>
diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changesets/_changeset.html.erb similarity index 100% rename from app/views/changeset/_changeset.html.erb rename to app/views/changesets/_changeset.html.erb diff --git a/app/views/changeset/_user.atom.builder b/app/views/changesets/_user.atom.builder similarity index 100% rename from app/views/changeset/_user.atom.builder rename to app/views/changesets/_user.atom.builder diff --git a/app/views/changeset/history.html.erb b/app/views/changesets/history.html.erb similarity index 78% rename from app/views/changeset/history.html.erb rename to app/views/changesets/history.html.erb index ba745cb03..1117f01b3 100644 --- a/app/views/changeset/history.html.erb +++ b/app/views/changesets/history.html.erb @@ -7,7 +7,7 @@ <% set_title(changeset_index_title(params, current_user)) if params[:display_name] - @heading = t('changeset.index.title_user', :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe + @heading = t('changesets.index.title_user', :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe else @heading = @title end diff --git a/app/views/changeset/index.atom.builder b/app/views/changesets/index.atom.builder similarity index 100% rename from app/views/changeset/index.atom.builder rename to app/views/changesets/index.atom.builder diff --git a/app/views/changeset/index.html.erb b/app/views/changesets/index.html.erb similarity index 100% rename from app/views/changeset/index.html.erb rename to app/views/changesets/index.html.erb diff --git a/app/views/changeset/timeout.atom.builder b/app/views/changesets/timeout.atom.builder similarity index 100% rename from app/views/changeset/timeout.atom.builder rename to app/views/changesets/timeout.atom.builder diff --git a/app/views/changeset/timeout.html.erb b/app/views/changesets/timeout.html.erb similarity index 100% rename from app/views/changeset/timeout.html.erb rename to app/views/changesets/timeout.html.erb diff --git a/app/views/notes/_notes_paging_nav.html.erb b/app/views/notes/_notes_paging_nav.html.erb index 862eae17c..694f99602 100644 --- a/app/views/notes/_notes_paging_nav.html.erb +++ b/app/views/notes/_notes_paging_nav.html.erb @@ -1,17 +1,17 @@

<% if @page > 1 %> -<%= link_to t('changeset.changeset_paging_nav.previous'), @params.merge({ :page => @page - 1 }) %> +<%= link_to t('changesets.changeset_paging_nav.previous'), @params.merge({ :page => @page - 1 }) %> <% else %> -<%= t('changeset.changeset_paging_nav.previous') %> +<%= t('changesets.changeset_paging_nav.previous') %> <% end %> -| <%= t('changeset.changeset_paging_nav.showing_page', :page => @page) %> | +| <%= t('changesets.changeset_paging_nav.showing_page', :page => @page) %> | <% if @notes.size < @page_size %> -<%= t('changeset.changeset_paging_nav.next') %> +<%= t('changesets.changeset_paging_nav.next') %> <% else %> -<%= link_to t('changeset.changeset_paging_nav.next'), @params.merge({ :page => @page + 1 }) %> +<%= link_to t('changesets.changeset_paging_nav.next'), @params.merge({ :page => @page + 1 }) %> <% end %>

diff --git a/app/views/users/_contact.html.erb b/app/views/users/_contact.html.erb index ab56ce3e8..5c3afaa89 100644 --- a/app/views/users/_contact.html.erb +++ b/app/views/users/_contact.html.erb @@ -27,10 +27,10 @@ <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('browse.no_comment') %> "<%= link_to(comment, {:controller => 'browse', :action => 'changeset', :id => changeset.id}, - {:title => t('changeset.changeset.view_changeset_details')}) + {:title => t('changesets.changeset.view_changeset_details')}) %>" <% else %> - <%= t'changeset.changeset.no_edits' %> + <%= t'changesets.changeset.no_edits' %> <% end %>

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c7a41b687..f62550928 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -7,7 +7,7 @@