From: Tom Hughes Date: Wed, 17 Mar 2021 18:17:49 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/3124' X-Git-Tag: live~2228 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/8e5deafd854b05086296513b318df1626dc41967?hp=6f09f5d49ce117c0f34c7c82b80b19fdccb873cf Merge remote-tracking branch 'upstream/pull/3124' --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 219135dff..cac193504 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -52,7 +52,7 @@ Lint/DuplicateBranch: # Offense count: 487 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: - Max: 234 + Max: 235 # Offense count: 62 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. diff --git a/CONFIGURE.md b/CONFIGURE.md index 96aac9f96..c165c6d46 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -28,7 +28,7 @@ If you create a user by signing up to your local website, you need to confirm th ``` $ bundle exec rails console ->> user = User.find_by_display_name("My New User Name") +>> user = User.find_by(:display_name => "My New User Name") => #[ ... ] >> user.status = "active" => "active" @@ -43,7 +43,7 @@ To give administrator or moderator permissions: ``` $ bundle exec rails console ->> user = User.find_by_display_name("My New User Name") +>> user = User.find_by(:display_name => "My New User Name") => #[ ... ] >> user.roles.create(:role => "administrator", :granter_id => user.id) => #[ ... ] diff --git a/Gemfile.lock b/Gemfile.lock index 209ebc544..fb755b709 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,21 +72,21 @@ GEM ast (2.4.2) autoprefixer-rails (10.2.4.0) execjs - aws-eventstream (1.1.0) - aws-partitions (1.430.0) - aws-sdk-core (3.112.0) + aws-eventstream (1.1.1) + aws-partitions (1.433.0) + aws-sdk-core (3.113.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.42.0) + aws-sdk-kms (1.43.0) aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.89.0) + aws-sdk-s3 (1.91.0) aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (1.2.3) aws-eventstream (~> 1, >= 1.0.2) better_errors (2.9.1) coderay (>= 1.0.0) @@ -203,7 +203,7 @@ GEM multipart-post (>= 1.2, < 3) ruby2_keywords faraday-net_http (1.0.1) - ffi (1.14.2) + ffi (1.15.0) ffi-libarchive (1.0.17) ffi (~> 1.0) fspath (3.1.2) @@ -269,8 +269,8 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) - nio4r (2.5.5) - nokogiri (1.11.1) + nio4r (2.5.7) + nokogiri (1.11.2) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.4) @@ -296,11 +296,11 @@ GEM omniauth-github (2.0.0) omniauth (~> 2.0) omniauth-oauth2 (~> 1.7.1) - omniauth-google-oauth2 (0.8.1) + omniauth-google-oauth2 (1.0.0) jwt (>= 2.0) oauth2 (~> 1.1) - omniauth (>= 1.1.1) - omniauth-oauth2 (>= 1.6) + omniauth (~> 2.0) + omniauth-oauth2 (~> 1.7.1) omniauth-mediawiki (0.0.4) jwt (~> 2.0) omniauth-oauth (~> 1.0) @@ -327,7 +327,7 @@ GEM popper_js (1.16.0) progress (3.5.2) public_suffix (4.0.6) - puma (5.2.1) + puma (5.2.2) nio4r (~> 2.0) quad_tile (1.0.1) r2 (0.2.7) @@ -455,7 +455,7 @@ GEM validates_email_format_of (1.6.3) i18n vendorer (0.2.0) - webmock (3.12.0) + webmock (3.12.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 586b18116..d571535d3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -59,7 +59,7 @@ class ApplicationController < ActionController::Base def require_user unless current_user if request.get? - redirect_to :controller => "users", :action => "login", :referer => request.fullpath + redirect_to login_path(:referer => request.fullpath) else head :forbidden end @@ -356,7 +356,7 @@ class ApplicationController < ActionController::Base end elsif request.get? respond_to do |format| - format.html { redirect_to :controller => "users", :action => "login", :referer => request.fullpath } + format.html { redirect_to login_path(:referer => request.fullpath) } format.any { head :forbidden } end else @@ -393,6 +393,8 @@ class ApplicationController < ActionController::Base referer = nil end + referer = nil if referer&.path&.first != "/" + referer.to_s end end diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 2047c4614..dea5c3b07 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -57,7 +57,7 @@ class MessagesController < ApplicationController render :action => "new" else flash[:notice] = t ".wrong_user", :user => current_user.display_name - redirect_to :controller => "users", :action => "login", :referer => request.fullpath + redirect_to login_path(:referer => request.fullpath) end rescue ActiveRecord::RecordNotFound @title = t "messages.no_such_message.title" @@ -74,7 +74,7 @@ class MessagesController < ApplicationController @message.save else flash[:notice] = t ".wrong_user", :user => current_user.display_name - redirect_to :controller => "users", :action => "login", :referer => request.fullpath + redirect_to login_path(:referer => request.fullpath) end rescue ActiveRecord::RecordNotFound @title = t "messages.no_such_message.title" diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 121d050b5..6aa98f7ee 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -164,7 +164,7 @@ class UsersController < ApplicationController token = user.tokens.create UserMailer.lost_password(user, token).deliver_later flash[:notice] = t "users.lost_password.notice email on way" - redirect_to :action => "login" + redirect_to login_path else flash.now[:error] = t "users.lost_password.notice email cannot find" end @@ -271,7 +271,7 @@ class UsersController < ApplicationController def login append_content_security_policy_directives( - :form_action => %w[accounts.google.com *.facebook.com login.live.com github.com meta.wikimedia.org] + :form_action => %w[*] ) session[:referer] = safe_referer(params[:referer]) if params[:referer] @@ -306,7 +306,7 @@ class UsersController < ApplicationController token = UserToken.find_by(:token => params[:confirm_string]) if token&.user&.active? flash[:error] = t("users.confirm.already active") - redirect_to :action => "login" + redirect_to login_path elsif !token || token.expired? flash[:error] = t("users.confirm.unknown token") redirect_to :action => "confirm" @@ -328,7 +328,7 @@ class UsersController < ApplicationController if token.nil? || token.user != user flash[:notice] = t("users.confirm.success") - redirect_to :action => :login, :referer => referer + redirect_to login_path(:referer => referer) else token.destroy @@ -356,7 +356,7 @@ class UsersController < ApplicationController flash[:notice] = t "users.confirm_resend.success_html", :email => user.email, :sender => Settings.support_email end - redirect_to :action => "login" + redirect_to login_path end def confirm_email diff --git a/app/validators/characters_validator.rb b/app/validators/characters_validator.rb index 837e3e6cc..13d08ca55 100644 --- a/app/validators/characters_validator.rb +++ b/app/validators/characters_validator.rb @@ -3,7 +3,7 @@ class CharactersValidator < ActiveModel::EachValidator INVALID_URL_CHARS = "/;.,?%#".freeze def validate_each(record, attribute, value) - record.errors[attribute] << (options[:message] || I18n.t("validations.invalid_characters")) if /[#{INVALID_CHARS}]/o.match?(value) - record.errors[attribute] << (options[:message] || I18n.t("validations.url_characters", :characters => INVALID_URL_CHARS)) if options[:url_safe] && /[#{INVALID_URL_CHARS}]/o.match?(value) + record.errors.add(attribute, options[:message] || I18n.t("validations.invalid_characters")) if /[#{INVALID_CHARS}]/o.match?(value) + record.errors.add(attribute, options[:message] || I18n.t("validations.url_characters", :characters => INVALID_URL_CHARS)) if options[:url_safe] && /[#{INVALID_URL_CHARS}]/o.match?(value) end end diff --git a/app/validators/whitespace_validator.rb b/app/validators/whitespace_validator.rb index 3032c109e..6453742c2 100644 --- a/app/validators/whitespace_validator.rb +++ b/app/validators/whitespace_validator.rb @@ -1,6 +1,6 @@ class WhitespaceValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) - record.errors[attribute] << (options[:message] || I18n.t("validations.leading_whitespace")) if !options.fetch(:leading, true) && /\A\s/.match?(value) - record.errors[attribute] << (options[:message] || I18n.t("validations.trailing_whitespace")) if !options.fetch(:trailing, true) && /\s\z/.match?(value) + record.errors.add(attribute, options[:message] || I18n.t("validations.leading_whitespace")) if !options.fetch(:leading, true) && /\A\s/.match?(value) + record.errors.add(attribute, options[:message] || I18n.t("validations.trailing_whitespace")) if !options.fetch(:trailing, true) && /\s\z/.match?(value) end end diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index d04d5e6bd..079915fcf 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -64,7 +64,7 @@ <% unless current_user %>
- <%= link_to(t(".join_discussion"), :controller => "users", :action => "login", :referer => request.fullpath) %> + <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
<% end %> diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb index 154a7a195..2b7245356 100644 --- a/app/views/diary_entries/show.html.erb +++ b/app/views/diary_entries/show.html.erb @@ -29,7 +29,7 @@ <% end %> <% end %> <% else %> -

<%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), :controller => "users", :action => "login", :referer => request.fullpath)) %>

+

<%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), login_path(:referer => request.fullpath))) %>

<% end %> diff --git a/app/views/messages/inbox.html.erb b/app/views/messages/inbox.html.erb index 0fb5107ce..a27d7f15c 100644 --- a/app/views/messages/inbox.html.erb +++ b/app/views/messages/inbox.html.erb @@ -3,7 +3,14 @@ <% end %> <% content_for :heading do %> -

<%= t ".my_inbox" %>/<%= link_to t(".outbox"), outbox_messages_path %>

+ <% end %>

<%= render :partial => "message_count" %>

diff --git a/app/views/messages/outbox.html.erb b/app/views/messages/outbox.html.erb index 5ae9706b7..562bd9df1 100644 --- a/app/views/messages/outbox.html.erb +++ b/app/views/messages/outbox.html.erb @@ -3,7 +3,14 @@ <% end %> <% content_for :heading do %> -

<%= t(".my_inbox_html", :inbox_link => link_to(t(".inbox"), inbox_messages_path)) %>/<%= t ".outbox" %>

+ <% end %>

<%= t ".messages", :count => current_user.sent_messages.size %>

diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index c2f4183eb..b7325dc54 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -8,28 +8,49 @@ <% end %> <% end %> - <%= link_to trace.name, :controller => "traces", :action => "show", :display_name => trace.user.display_name, :id => trace.id %> - ... - <% if trace.inserted %> - (<%= t ".count_points", :count => trace.size %>) - <% end %> - ... <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %> - <%= link_to_if trace.inserted?, t(".map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" }, { :title => t(".view_map") } %> / - <%= link_to t(".edit"), { :controller => "site", :action => "edit", :gpx => trace.id }, { :title => t(".edit_map") } %> + + + <%= link_to trace.name, :controller => "traces", :action => "show", :display_name => trace.user.display_name, :id => trace.id %> + - <% badge_class = case trace.visibility - when "public", "identifiable" then "success" - else "danger" - end %> - <%= t(".#{trace.visibility}") %> + <% if trace.inserted? %> + + <%= t ".count_points", :count => trace.size %> + + <% end %> + + <% badge_class = case trace.visibility + when "public", "identifiable" then "success" + else "danger" + end %> + <%= t(".#{trace.visibility}") %> -
- <%= trace.description %>
- <%= t ".by" %> <%= link_to trace.user.display_name, user_path(trace.user) %> - <% if !trace.tags.empty? %> - <%= t ".in" %> - <%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %> + + + <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %> + + <%= t ".by" %> <%= link_to trace.user.display_name, user_path(trace.user) %> + <% if !trace.tags.empty? %> + <%= t ".in" %> + <%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %> + <% end %> + +
+

+ <%= trace.description %> +

+ + + <% if trace.inserted? %> + <% end %> diff --git a/app/views/traces/index.html.erb b/app/views/traces/index.html.erb index fa69c48a2..b38436c0a 100644 --- a/app/views/traces/index.html.erb +++ b/app/views/traces/index.html.erb @@ -27,7 +27,7 @@ - <%= render @traces unless @traces.nil? %> + <%= render @traces %>
diff --git a/config/locales/da.yml b/config/locales/da.yml index 10cb86cad..4c382e26b 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -9,6 +9,7 @@ # Author: Fnielsen # Author: Freek # Author: Fugithora +# Author: Funkyboris # Author: Gnonthgol # Author: Gorbi # Author: Hede2000 @@ -151,6 +152,7 @@ da: details: Forklar venligst problemet i flere detaljer (påkrævet). user: email: E-mail + email_confirmation: E-mail-bekræftelse new_email: Ny e-mailadresse active: Aktiv display_name: Vist navn @@ -158,14 +160,23 @@ da: home_lat: Breddegrad home_lon: Længdegrad languages: Foretrukne sprog + preferred_editor: Foretrukken editor pass_crypt: Adgangskode pass_crypt_confirmation: Bekræft adgangskode help: trace: tagstring: kommasepareret user_block: + reason: Årsagen til at brugeren blokeres. Vær venligst så rolig og fornuftig + som muligt. Giv så mange detaljer som kan du om situationen. Husk på, at + meddelelsen bliver synlig offentligt. Husk at ikke alle brugere forstår + fællesskabsjargonen, så prøv at bruge hverdagsudtryk i det omfang det er + muligt. needs_view: Skal brugeren logge på, før denne blokering vil blive fjernet? user: + email_confirmation: Din adresse vises ikke offentligt. Se vores href="https://wiki.osmfoundation.org/wiki/Privacy_Policy" + title="OSMF privacy policy including section on email addresses">privatlivspolitik + for yderligere information. new_email: (vises aldrig offentligt) datetime: distance_in_words_ago: @@ -213,7 +224,7 @@ da: description: iD (redigér i browseren) remote: name: Fjernbetjening - description: Fjernbetjening (JOSM eller Merkaartor) + description: Fjernbetjening (JOSM, Potlatch eller Merkaartor) auth: providers: none: Ingen @@ -331,6 +342,7 @@ da: changeset: ændringssæt note: bemærkning timeout: + title: Timeoutfejl sorry: Beklager, data for %{type} med id %{id} tog for lang tid at hente type: node: punkt @@ -461,6 +473,7 @@ da: stavningen, eller måske er den henvisning du klikkede på forkert. diary_entry: posted_by_html: Skrevet af %{link_user} den %{created} på %{language_link} + updated_at_html: Sidst opdateret den %{updated}. comment_link: Kommentér dette indlæg reply_link: Send en besked til forfatteren comment_count: @@ -1271,12 +1284,15 @@ da: "yes": Vandløb admin_levels: level2: Landegrænse + level3: Regionsgrænse level4: Regionsgrænse level5: Regionsgrænse level6: Kommunegrænse + level7: Kommunegrænse level8: Bygrænse level9: Bydelsgrænse level10: Sognegrænse + level11: Nabolagsgrænse types: cities: Storbyer towns: Byer @@ -1441,12 +1457,21 @@ da: hi: Hej %{to_user}, header: '%{from_user} har kommenteret på OpenStreetMap-blogindlægget med emnet %{subject}:' + header_html: '%{from_user} har kommenteret på OpenStreetMap-blogindlægget med + emnet %{subject}:' footer: Du kan også læse kommentaren på %{readurl}, og du kan kommentere på %{commenturl} eller sende en besked til forfatteren på %{replyurl} + footer_html: Du kan også læse kommentaren på %{readurl}, og du kan kommentere + på %{commenturl} eller sende en besked til forfatteren på %{replyurl} message_notification: + subject: '[OpenStreetMap] %{message_title}' hi: Hej %{to_user}, header: '%{from_user} har sendt dig en besked gennem OpenStreetMap med emnet %{subject}:' + header_html: '%{from_user} har sendt dig en besked gennem OpenStreetMap med + emnet %{subject}:' + footer: Du kan også læse beskeden på %{readurl} og du kan sende en besked til + forfatteren på %{replyurl} footer_html: Du kan også læse beskeden på %{readurl} og du kan sende en besked til forfatteren på %{replyurl} friendship_notification: @@ -1454,11 +1479,17 @@ da: subject: '[OpenStreetMap] %{user} tilføjede dig som ven' had_added_you: '%{user} har tilføjet dig som ven på OpenStreetMap.' see_their_profile: Du kan se deres profil på %{userurl}. + see_their_profile_html: Du kan se deres profil på %{userurl}. befriend_them: Du kan også tilføje dem som ven på %{befriendurl}. + befriend_them_html: Du kan også tilføje dem som ven på %{befriendurl}. gpx_failure: + hi: Hej %{to_user}, failed_to_import: 'kunne ikke importeres. Her er fejlen:' + more_info_html: Yderligere information vedrørende fejl i forbindelse med GPX-import + og hvordan de kan undgås, kan findes på %{url} subject: '[OpenStreetMap] GPX-importering mislykkedes' gpx_success: + hi: Hej %{to_user}, loaded_successfully: one: indlæst med %{trace_points} ud af 1 muligt punkt. other: indlæst med %{trace_points} ud af %{possible_points} mulige punkter. @@ -1495,24 +1526,37 @@ da: du er interesseret i' your_note: '%{commenter} har efterladt en kommentar på en af dine kortbemærkninger nær %{place}.' + your_note_html: '%{commenter} har efterladt en kommentar til en af dine kortbemærkninger + nær %{place}.' commented_note: '%{commenter} har efterladt en kommentar til en kortbemærkning du har kommenteret. Bemærkningen er i nærheden af %{place}.' + commented_note_html: '%{commenter} har efterladt en kommentar til en kortbemærkning + du har kommenteret. Bemærkningen er i nærheden af %{place}.' closed: subject_own: '[OpenStreetMap] %{commenter} har løst en af dine bemærkninger' subject_other: '[OpenStreetMap] %{commenter} har løst en bemærkning, du er interesseret i' your_note: '%{commenter} har løst en af dine kortbemærkninger nær %{place}.' + your_note_html: '%{commenter} har løst en af dine kortbemærkninger i nærheden + af %{place}.' commented_note: '%{commenter} har løst en kortbemærkning du har kommenteret på. Bemærkningen er i nærheden af %{place}.' + commented_note_html: '%{commenter} har løst en kortbemærkning du har kommenteret + på. Bemærkningen er i nærheden af %{place}.' reopened: subject_own: '[OpenStreetMap] %{commenter} har genaktiveret en af dine bemærkninger' subject_other: '[OpenStreetMap] %{commenter} har genaktiveret en bemærkning, du er interesseret i' your_note: '%{commenter} har genaktiveret en af dine kortbemærkninger nær %{place}.' + your_note_html: '%{commenter} har genaktiveret en af dine kortbemærkninger + i nærheden af %{place}.' commented_note: '%{commenter} har genaktiveret en kortbemærkning du har kommenteret. Bemærkningen er i nærheden af %{place}.' + commented_note_html: '%{commenter} har genaktiveret en kortbemærkning du har + kommenteret. Bemærkningen er i nærheden af %{place}.' details: Flere oplysninger om bemærkningen kan findes på %{url}. + details_html: Flere oplysninger om kortbemærkningen kan findes på %{url}. changeset_comment_notification: hi: Hej %{to_user}, greeting: Hej, @@ -1522,13 +1566,21 @@ da: du er interesseret i' your_changeset: '%{commenter} har kommenteret på et af dine ændringssæt, oprettet %{time}' + your_changeset_html: '%{commenter} har kl. %{time} kommenteret på et af dine + ændringssæt' commented_changeset: '%{commenter} har efterladt en kommentar på et ændringssæt som du overvåger, oprettet %{time} af %{changeset_author}' + commented_changeset_html: '%{commenter} har kl. %{time} efterladt en kommentar + på et ændringssæt, oprettet af %{changeset_author}, som du overvåger' partial_changeset_with_comment: med kommentaren '%{changeset_comment}' + partial_changeset_with_comment_html: med kommentaren '%{changeset_comment}' partial_changeset_without_comment: uden kommentar details: Flere oplysninger om ændringssættet kan findes på %{url}. + details_html: Flere oplysninger om ændringssættet kan findes på %{url}. unsubscribe: For at afmelde opdateringer til dette ændringssæt, kan du besøge %{url} og klikke "Afmeld". + unsubscribe_html: For at afmelde opdateringer vedrørende dette ændringssæt, + kan du besøge %{url} og klikke "Afmeld". messages: inbox: title: Indbakke @@ -1606,10 +1658,22 @@ da: destroyed: Besked slettet shared: markdown_help: + title_html: Fortolket med kramdown + headings: Overskrifter + heading: Overskrift + subheading: Underoverskrift + unordered: Usorteret liste + ordered: Sorteret liste + first: Første punkt + second: Andet punkt + link: Link text: Tekst image: Billede + alt: Alt-tekst + url: URL richtext_field: edit: Rediger + preview: Forhåndsvisning site: about: next: Næste @@ -1907,6 +1971,14 @@ da: url: https://wiki.openstreetmap.org/ title: OpenStreetMap Wiki description: Gennemse wikien for dybdegående OSM dokumentation. + potlatch: + removed: Din foretrukne OpenStreetMap-editor er sat til Potlatch. Da Adobe Flash + Player er blevet trukket tilbage, er Potlatch ikke længere tilgængelig i browseren. + desktop_html: Du kan stadig bruge Potlatch ved at hente + applikationen til Mac og Windows. + id_html: Alternativt kan du sætte iD som din foretrukne editor. iD kører i din + browser, ligesom Potlatch gjorde. Du kan ændre din + foretrukne editor her. sidebar: search_results: Søgeresultater close: Luk @@ -2086,6 +2158,7 @@ da: uploaded: 'Overført:' points: 'Punkter:' start_coordinates: 'Startkoordinat:' + coordinates_html: '%{latitude}; %{longitude}' map: kort edit: redigér owner: 'Ejer:' @@ -2709,6 +2782,7 @@ da: custom_dimensions: Angiv brugerdefinerede dimensioner format: 'Format:' scale: 'Skala:' + image_dimensions: Billedet vil vise standardlaget i %{width} x %{height} download: Hent short_url: Kort URL include_marker: Tilføj markør @@ -2736,6 +2810,7 @@ da: other: Du er indenfor %{count} fod fra dette punkt base: standard: Standard + cyclosm: CyclOSM cycle_map: Cykelkort transport_map: Transportkort hot: Humanitær diff --git a/config/locales/en.yml b/config/locales/en.yml index b42390917..ebf14bf3f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1521,7 +1521,7 @@ en: inbox: title: "Inbox" my_inbox: "My Inbox" - outbox: "outbox" + my_outbox: "My Outbox" messages: "You have %{new_messages} and %{old_messages}" new_messages: one: "%{count} new message" @@ -1554,9 +1554,8 @@ en: body: "Sorry there is no message with that id." outbox: title: "Outbox" - my_inbox_html: "My %{inbox_link}" - inbox: "inbox" - outbox: "outbox" + my_inbox: "My Inbox" + my_outbox: "My Outbox" messages: one: "You have %{count} sent message" other: "You have %{count} sent messages" @@ -2112,7 +2111,6 @@ en: more: "more" trace_details: "View Trace Details" view_map: "View Map" - edit: "edit" edit_map: "Edit Map" public: "PUBLIC" identifiable: "IDENTIFIABLE" @@ -2120,7 +2118,6 @@ en: trackable: "TRACKABLE" by: "by" in: "in" - map: "map" index: public_traces: "Public GPS traces" my_traces: "My GPS traces" diff --git a/config/locales/fa.yml b/config/locales/fa.yml index bc6b09485..d212d0ebf 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -407,7 +407,7 @@ fa: title: پرس‌وجوی عارضه‌ها introduction: روی نقشه کلیک کنید تا عارضه‌های نزدیک را بیابید nearby: عارضه‌های نزدیک - enclosing: عارضه‌های دربرگیرنده + enclosing: عارضه‌های دربرگیر changesets: changeset_paging_nav: showing_page: صفحهٔ %{page} @@ -908,7 +908,7 @@ fa: ice_rink: رینک یخ marina: لنگرگاه miniature_golf: گلف کوچک - nature_reserve: طبیعت حفاظت شده + nature_reserve: ذخیره‌گاه طبیعی outdoor_seating: فضای نشستن خارجی park: پارک picnic_table: میز پیکنیک diff --git a/config/locales/fi.yml b/config/locales/fi.yml index e6aaef3cc..b742fcb7a 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -160,6 +160,7 @@ fi: details: Kuvaile ongelmaa (pakollinen) user: email: Sähköpostiosoite + email_confirmation: Sähköpostin varmistus new_email: Uusi sähköpostiosoite active: Aktivoitu display_name: Näyttönimi diff --git a/config/locales/hu.yml b/config/locales/hu.yml index ec8c3a310..414793faa 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1266,6 +1266,8 @@ hu: hi: Szia %{to_user}! header: '%{from_user} küldött neked egy üzenetet az OpenStreetMapon keresztül %{subject} tárggyal:' + header_html: '%{from_user} üzenetet küldött neked az OpenStreetMap-en %{subject} + tárggyal:' footer_html: 'Az üzenet a %{readurl} címen is elolvashatod, vagy válaszolhatsz rá itt: %{replyurl}' friendship_notification: @@ -1354,10 +1356,10 @@ hu: outbox: Elküldött üzenetek messages: '%{new_messages} és %{old_messages} van' new_messages: - one: egy új üzenet - other: '%{count} új üzenet' + one: 1 új üzeneted + other: '%{count} új üzeneted' old_messages: - one: egy régi üzeneted + one: 1 régi üzeneted other: '%{count} régi üzeneted' from: Feladó subject: Tárgy @@ -1422,6 +1424,25 @@ hu: as_unread: Üzenet megjelölve olvasatlanként destroy: destroyed: Üzenet törölve + shared: + markdown_help: + title_html: Kramdownnal + elemezve + headings: Címsorok + heading: Cím + subheading: Alcím + unordered: Rendezetlen lista + ordered: Rendezett lista + first: Első elem + second: Második elem + link: Hivatkozás + text: Szöveg + image: Kép + alt: Alternatív szöveg + url: URL + richtext_field: + edit: Szerkesztés + preview: Előnézet site: about: next: Következő diff --git a/config/locales/id.yml b/config/locales/id.yml index f43a1fd0a..aacc61965 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -22,6 +22,7 @@ # Author: JakArtisan # Author: Kenrick95 # Author: Macofe +# Author: Mnam23 # Author: Pebaryan # Author: RXerself # Author: Rachmat04 @@ -215,7 +216,7 @@ id: description: iD (editor di dalam browser internet) remote: name: Pengendali Jarak Jauh - description: Remote Control (JOSM atau Merkaartor) + description: Remote Control (JOSM, Potlatch, Merkaartor) auth: providers: none: Tidak ada @@ -443,8 +444,8 @@ id: new: title: Entri Baru Catatan Harian form: - location: 'Lokasi:' - use_map_link: gunakan peta + location: Lokasi + use_map_link: Gunakan Peta index: title: Catatan harian pengguna title_friends: Catatan harian teman @@ -2398,13 +2399,13 @@ id: account: title: Edit akun my settings: Pengaturan saya - current email address: 'Alamat Email Saat Ini:' - external auth: 'Autentikasi Eksternal:' + current email address: Alamat surel saat ini + external auth: Autentikasi Eksternal openid: link: https://wiki.openstreetmap.org/wiki/OpenID link text: Apa ini? public editing: - heading: 'Mengedit secara publik:' + heading: Menyunting secara publik enabled: Diaktifkan. Tidak anonim dan dapat mengedit data. enabled link: http://wiki.openstreetmap.org/wiki/Anonymous_edits enabled link text: Apa ini? @@ -2422,7 +2423,7 @@ id: anda menjadi pengguna umum.
  • Tindakan ini tidak dapat dikembalikan dan semua pengguna baru akan diatur sebagai pengguna umum secara standar.
  • contributor terms: - heading: 'Syarat-syarat Kontributor:' + heading: Syarat-syarat Kontributor agreed: Anda telah menyetujui Persyaratan Kontributor yang baru. not yet agreed: Anda belum menyetujui Persyaratan Kontributor yang baru. review link text: Silahkan ikuti link ini untuk kenyamanan Anda untuk meninjau @@ -2431,7 +2432,7 @@ id: Anda berada dalam Domain publik. link: https://www.osmfoundation.org/wiki/License/Contributor_Terms link text: Apa ini? - image: 'Gambar:' + image: Gambar gravatar: gravatar: Gunakan Gravatar link: https://wiki.openstreetmap.org/wiki/Gravatar @@ -2443,7 +2444,7 @@ id: replace image: Ganti gambar saat ini image size hint: (kotak gambar yang dapat bekerja terbaik paling tidak berukuran 100x100) - home location: 'Lokasi Beranda:' + home location: Lokasi Beranda no home location: Anda telah memasukkan lokasi rumah Anda. update home location on click: Memperbarui lokasi rumah ketika saya klik pada peta? diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 1e6f7561f..cfacf3dda 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -115,13 +115,17 @@ ms: body: Isi recipient: Penerima redaction: + title: Tajuk description: Keterangan + report: + category: Pilih sebab untuk laporan anda user: email: E-mel - new_email: 'Alamat E-mel Baru:' + email_confirmation: Pengesahan E-mel + new_email: Alamat E-mel Baru active: Aktif display_name: Nama Paparan - description: Keterangan + description: Keterangan Profil home_lat: 'Garis Lintang:' home_lon: 'Garis Bujur:' languages: Bahasa @@ -467,6 +471,7 @@ ms: bicycle_parking: Letak Basikal bicycle_rental: Sewa Basikal biergarten: Taman Bir + blood_bank: Tabung Darah boat_rental: Bot Sewa brothel: Rumah Pelacuran bureau_de_change: Pengurup Wang @@ -557,12 +562,14 @@ ms: building: apartment: Pangsapuri apartments: Pangsapuri + bungalow: Banglo chapel: Gereja Kecil church: Bangunan Gereja commercial: Bangunan Perdagangan dormitory: Asrama farm: Rumah Ladang garage: Garaj + garages: Garaj hospital: Bangunan Hospital hotel: Bangunan Hotel house: Rumah diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 4702369c3..e43bf3334 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1,6 +1,7 @@ # Messages for Romanian (română) # Exported from translatewiki.net # Export driver: phpyaml +# Author: Andreyyshore # Author: C1pr1an # Author: EddyPetrisor # Author: GabiBil @@ -23,7 +24,7 @@ ro: blog: '%e %B %Y' helpers: file: - prompt: Selectează fişier + prompt: Selectează fișier submit: diary_comment: create: Salvează @@ -628,13 +629,13 @@ ro: monastery: Mănăstire money_transfer: Transfer de bani motorcycle_parking: Parcare pentru motociclete - music_school: Şcoală de muzică + music_school: Școală de muzică nightclub: Club de noapte nursing_home: Azil de bătrâni parking: Parcare parking_entrance: Intrare în parcare parking_space: Spațiu de parcare - payment_terminal: Terminal de plăţi + payment_terminal: Terminal de plăți pharmacy: Farmacie place_of_worship: Lăcaș de cult police: Poliție @@ -681,7 +682,7 @@ ro: national_park: Parc național political: Granița electorală protected_area: Zonă protejată - "yes": GraniÅ£a + "yes": Graniță bridge: aqueduct: Apeduct boardwalk: Promenadă @@ -713,19 +714,19 @@ ro: hospital: Clădire de spital hotel: Clădire de hotel house: Casă - houseboat: Casă ambarcaÅ£iune + houseboat: Casă ambarcațiune hut: Colibă industrial: Clădire industrială kindergarten: Clădirea Grădiniței - manufacture: Clădire de ProducÅ£ie + manufacture: Clădire de Producție office: Clădire de birouri public: Clădire publică residential: Clădire rezidențială retail: Clădire de vânzare cu amănuntul - roof: Acoperiş + roof: Acoperiș ruins: Clădire ruină school: Clădire școlară - semidetached_house: Casă semidetaşată + semidetached_house: Casă semidetașată service: Clădire de servicii shed: Șură stable: Grajd @@ -737,7 +738,7 @@ ro: warehouse: Depozit "yes": Clădire club: - scout: Sediu Grup de Cercetaşi + scout: Sediu Grup de Cercetași sport: Club Sportiv "yes": Club craft: @@ -758,7 +759,7 @@ ro: painter: Pictor photographer: Fotograf plumber: Instalator - roofer: Constructor de acoperişuri + roofer: Constructor de acoperișuri sawmill: Gater shoemaker: Cizmar stonemason: Pietrar @@ -774,10 +775,10 @@ ro: fire_xtinguisher: Extinctor fire_water_pond: Bazinul cu apă pentru foc landing_site: Sit pentru aterizarea de urgență - life_ring: Colac de salvare de urgenţă + life_ring: Colac de salvare de urgență phone: Telefon de urgență - siren: Sirenă de Urgenţă - suction_point: Punct de aspirare de urgenţă + siren: Sirenă de Urgență + suction_point: Punct de aspirare de urgență water_tank: Rezervor de apă de urgență "yes": Urgență highway: @@ -790,7 +791,7 @@ ro: cycleway: Pistă de biciclete elevator: Lift emergency_access_point: Punct de acces de urgență - emergency_bay: Loc oprire de urgenţă + emergency_bay: Loc oprire de urgență footway: Cale pietonală ford: Vad give_way: Semn de cedează trecerea @@ -845,7 +846,7 @@ ro: citywalls: Zidurile orașului fort: Fort heritage: Sit de patrimoniu - hollow_way: Drum tranşeu + hollow_way: Drum tranșeu house: Casă manor: Conac memorial: Memorial @@ -1353,7 +1354,7 @@ ro: reopened: Starea problemei a fost setată la 'Deschis' comments: comment_from_html: Comentariu de la %{user_link} pe %{comment_created_at} - reassign_param: RealocaÅ£i problema? + reassign_param: Realocați problema? reports: reported_by_html: Raportat %{category} de %{user} pe %{updated_at} helper: @@ -1567,7 +1568,7 @@ ro: unread_button: Marchează ca necitit read_button: Marchează ca citit reply_button: Răspunde - destroy_button: Şterge + destroy_button: Șterge new: title: Trimite mesajul send_message_to_html: Trimiteți un mesaj nou către %{name} @@ -1607,14 +1608,14 @@ ro: date: Dată reply_button: Răspunde unread_button: Marchează ca necitit - destroy_button: Ştergeți + destroy_button: Ștergeți back: Înapoi to: Către wrong_user: Sunteți conectat ca `%{user}', dar mesajul pe care ați solicitat să îl citiți nu a fost trimis de către sau către respectivul utilizator. Conectați-vă ca utilizatorul corect pentru a-l citi. sent_message_summary: - destroy_button: Şterge + destroy_button: Șterge mark: as_read: Mesaj marcat ca fiind citit as_unread: Mesaj marcat ca necitit @@ -1946,7 +1947,7 @@ ro: from: De la to: Către where_am_i: Unde mă aflu? - where_am_i_title: Descrie locaÅ£ia curentă folosind motorul de căutare + where_am_i_title: Descrie locația curentă folosind motorul de căutare submit_text: Mergi reverse_directions_text: Inversează direcția key: @@ -2774,7 +2775,7 @@ ro: map: zoom: in: Mărește - out: Micşorează + out: Micșorează locate: title: Arată locația mea metersPopup: @@ -2801,7 +2802,7 @@ ro: title: Straturi copyright: © contribuitori OpenStreetMap donate_link_text: - terms: Website şi API terms + terms: Termeni site și API thunderforest: Plăci amabilitatea Andy Allan hotosm: Stilul plăcilor de Humanitarian diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 30954ea09..13eb8fa7d 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -2,6 +2,7 @@ # Exported from translatewiki.net # Export driver: phpyaml # Author: Chiak +# Author: DuÅ¡an Kreheľ # Author: Helix84 # Author: Jose1711 # Author: KuboF @@ -26,6 +27,8 @@ sk: formats: friendly: '%e. %B %Y o %H:%M' helpers: + file: + prompt: VybraÅ¥ súbor submit: diary_comment: create: UložiÅ¥ @@ -38,7 +41,7 @@ sk: create: OdoslaÅ¥ client_application: create: RegistrovaÅ¥ - update: UpraviÅ¥ + update: AktualizovaÅ¥ redaction: create: VytvoriÅ¥ revíziu update: UložiÅ¥ revíziu @@ -90,6 +93,7 @@ sk: way_tag: Značka cesty attributes: client_application: + name: Meno (povinné) callback_url: URL pre spätné volanie (callback) support_url: URL s podporou diary_comment: @@ -232,6 +236,7 @@ sk: entry_html: Relácia %{relation_name} entry_role_html: Relácia %{relation_name} (ako %{relation_role}) not_found: + title: Nenájdené sorry: 'Ľutujeme, %{type} #%{id} nebolo možné nájsÅ¥.' type: node: bod @@ -240,6 +245,7 @@ sk: changeset: počet zmien note: poznámka timeout: + title: VyprÅ¡al časový limit sorry: Ľutujeme, ale načítanie dát %{type} číslo %{id} trvalo príliÅ¡ dlho type: node: bod diff --git a/config/locales/te.yml b/config/locales/te.yml index 6324943a9..4f18c3f09 100644 --- a/config/locales/te.yml +++ b/config/locales/te.yml @@ -823,6 +823,7 @@ te: status: స్థితి show: చూపించు edit: మార్చు + confirm: నిశ్చయించుకున్నారా? reason: 'నిరోధానికి కారణం:' back: అన్ని నిరోధాలను చూడండి block: diff --git a/config/locales/th.yml b/config/locales/th.yml index 69daffe40..f1c6c7068 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -125,27 +125,38 @@ th: body: เนื้อหา recipient: ผู้รับ redaction: + title: ชื่อเรื่อง description: คำอธิบาย report: category: เลือกเหตุผลของปัญหาที่ท่านแจ้ง details: โปรดให้คำอธิบายเพิ่มเติมเกี่ยวกับปัญหา (จำเป็นต้องใส่) user: + auth_provider: ผู้ให้การยืนยัน + auth_uid: UID การยืนยัน email: อีเมล์ - new_email: 'ที่อยู่อีเมลใหม่:' + email_confirmation: การยืนยันอีเมล + new_email: ที่อยู่อีเมลใหม่ active: เปิดใช้ display_name: ชื่อที่ใช้แสดง - description: คำอธิบาย - home_lat: 'ละติจูด:' - home_lon: 'ลองจิจูด:' - languages: ภาษา + description: คำอธิบายโปรไฟล์ + home_lat: ละติจูด + home_lon: ลองจิจูด + languages: ภาษาที่เลือก + preferred_editor: เครื่องมือแก้ไขที่เลือกใช้ pass_crypt: รหัสผ่าน pass_crypt_confirmation: ยืนยันรหัสผ่าน help: trace: tagstring: คั่นด้วยจุลภาค user_block: + reason: เหตุผลที่ผู้ใช้กำลังถูกระงับ โปรดอย่าเขียนด้วยอารมณ์รุนแรงและระบุรายละเอียดเกี่ยวกับสถานการณ์ที่พบให้ละเอียดชัดเจน + ควรใช้คำอธิบายที่เข้าใจง่ายเป็นหลัก เพราะไม่ใช่ว่าผู้ใช้ทุกคนจะเข้าใจศัพท์เฉพาะ + และต้องอย่าลืมว่าสิ่งที่คุณเขียนนี้จะแสดงต่อสาธารณะด้วย needs_view: ต้องการให้ผู้ใช้คนนี้เข้าระบบก่อนเพิกถอนการระงับหรือไม่? user: + email_confirmation: ที่อยู่อีเมลของคุณจะไม่แสดงเป็นสาธารณะ โปรดดูเพิ่มเติมที่นโยบายความเป็นส่วนตัวสำหรับสารสนเทศเพิ่มเติม new_email: (จะไม่แสดงต่อสาธารณะ) datetime: distance_in_words_ago: @@ -185,7 +196,7 @@ th: description: iD (ตัวแก้ไขในเบราว์เซอร์) remote: name: การควบคุมระยะไกล - description: ตัวควบคุมระยะไกล (JOSM หรือ Merkaartor) + description: การควบคุมทางไกล (JOSM, Potlatch, Merkaator) auth: providers: none: ไม่มี @@ -211,6 +222,7 @@ th: description_area: รายชื่อหมายเหตุที่มีการรายงาน แสดงความคิดเห็น หรือถูกปิดในพื้นที่ของคุณ [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})] description_item: ฟีด rss สำหรับหมายเหตุ %{id} + opened: หมายเหตุใหม่ (พิกัดใกล้กับ %{place}) commented: ความคิดเห็นใหม่ (ใกล้เคียง %{place}) closed: หมายเหตุที่ถูกปิด (ใกล้เคียง %{place}) reopened: หมายเหตุที่ถูกเปิดใช้งานใหม่ (ใกล้เคียง %{place}) @@ -231,6 +243,10 @@ th: anonymous: ไม่ระบุตัวตน no_comment: (ไม่มีความคิดเห็น) part_of: เป็นส่วนหนึ่งของ + part_of_relations: + other: '%{count} ความเกี่ยวข้อง' + part_of_ways: + other: '%{count} ทาง' download_xml: ดาวน์โหลด XML view_history: ดูประวัติ view_details: ดูรายละเอียด diff --git a/config/settings.yml b/config/settings.yml index 049844d3d..3dd732972 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -95,9 +95,6 @@ imagery_blacklist: - "http://xdworld\\.vworld\\.kr:8080/.*" # Blacklist here - ".*\\.here\\.com[/:].*" - # Blacklist Kanton SH and GL - - ".*wms.geo.sh.ch.*Luftbild_201[06].*" - - ".*wms.geo.gl.ch.*ch.gl.imagery.orthofoto201[357].*" # URL of Overpass instance to use for feature queries overpass_url: "https://overpass-api.de/api/interpreter" # Routing endpoints diff --git a/package.json b/package.json index 7e12125bc..79f324107 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "jquery-simulate": "^1.0.2", "jquery.cookie": "^1.4.1", "leaflet": "^1.6.0", - "leaflet.locatecontrol": "^0.72.0", + "leaflet.locatecontrol": "^0.73.0", "ohauth": "^1.0.0", "qs": "^6.9.4" }, diff --git a/test/controllers/changesets_controller_test.rb b/test/controllers/changesets_controller_test.rb index fbbb36f3f..31a1e2d0c 100644 --- a/test/controllers/changesets_controller_test.rb +++ b/test/controllers/changesets_controller_test.rb @@ -164,7 +164,7 @@ class ChangesetsControllerTest < ActionDispatch::IntegrationTest get friend_changesets_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => friend_changesets_path + assert_redirected_to login_path(:referer => friend_changesets_path) session_for(private_user) @@ -190,7 +190,7 @@ class ChangesetsControllerTest < ActionDispatch::IntegrationTest get nearby_changesets_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => nearby_changesets_path + assert_redirected_to login_path(:referer => nearby_changesets_path) session_for(private_user) diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index 868171752..45fe4add1 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -113,7 +113,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest # are not logged in get new_diary_entry_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/diary/new" + assert_redirected_to login_path(:referer => "/diary/new") end def test_new_form @@ -257,7 +257,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest # not logged in, without and with the id of the entry you want to edit get edit_diary_entry_path(:display_name => entry.user.display_name, :id => entry) assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/user/#{ERB::Util.u(entry.user.display_name)}/diary/#{entry.id}/edit" + assert_redirected_to login_path(:referer => "/user/#{ERB::Util.u(entry.user.display_name)}/diary/#{entry.id}/edit") session_for(other_user) @@ -506,7 +506,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest # Try a list of diary entries for your friends when not logged in get friends_diary_entries_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/diary/friends" + assert_redirected_to login_path(:referer => "/diary/friends") # Try a list of diary entries for your friends when logged in session_for(user) @@ -526,7 +526,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest # Try a list of diary entries for nearby users when not logged in get nearby_diary_entries_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/diary/nearby" + assert_redirected_to login_path(:referer => "/diary/nearby") # Try a list of diary entries for nearby users when logged in session_for(nearby_user) diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index 4d08a8d0c..6f6e7dcfa 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -178,7 +178,7 @@ class SiteControllerTest < ActionDispatch::IntegrationTest get edit_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/edit" + assert_redirected_to login_path(:referer => "/edit") end # Test the error when trying to edit without public edits @@ -452,7 +452,7 @@ class SiteControllerTest < ActionDispatch::IntegrationTest def test_welcome get welcome_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => "/welcome" + assert_redirected_to login_path(:referer => "/welcome") session_for(create(:user)) get welcome_path diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 36bee9c95..16a4741a0 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -178,7 +178,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest # First try to get it when not logged in get traces_mine_path - assert_redirected_to :controller => "users", :action => "login", :referer => "/traces/mine" + assert_redirected_to login_path(:referer => "/traces/mine") session_for(user) @@ -541,7 +541,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest # First with no auth get new_trace_path assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => new_trace_path + assert_redirected_to login_path(:referer => new_trace_path) # Now authenticated as a user with gps.trace.visibility set user = create(:user) @@ -627,7 +627,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest # First with no auth get edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file) assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :referer => edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file.id) + assert_redirected_to login_path(:referer => edit_trace_path(:display_name => public_trace_file.user.display_name, :id => public_trace_file.id)) # Now with some other user, which should fail session_for(create(:user)) @@ -768,7 +768,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest assert_select "tr", :count => traces.length do |rows| traces.zip(rows).each do |trace, row| assert_select row, "a", Regexp.new(Regexp.escape(trace.name)) - assert_select row, "span", Regexp.new(Regexp.escape("(#{trace.size} points)")) if trace.inserted? + assert_select row, "span", Regexp.new(Regexp.escape("#{trace.size} points")) if trace.inserted? assert_select row, "td", Regexp.new(Regexp.escape(trace.description)) assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}")) end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 54c737b97..ff87c9466 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -602,7 +602,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest confirm_string = User.find_by(:email => user.email).tokens.create(:referer => new_diary_entry_path).token post user_confirm_path, :params => { :display_name => user.display_name, :confirm_string => confirm_string } - assert_redirected_to :action => "login" + assert_redirected_to login_path assert_match(/already been confirmed/, flash[:error]) end @@ -847,7 +847,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest end end assert_response :redirect - assert_redirected_to :action => :login + assert_redirected_to login_path assert_match(/^Sorry you lost it/, flash[:notice]) email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count @@ -862,7 +862,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest end end assert_response :redirect - assert_redirected_to :action => :login + assert_redirected_to login_path assert_match(/^Sorry you lost it/, flash[:notice]) email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count @@ -889,7 +889,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest end end assert_response :redirect - assert_redirected_to :action => :login + assert_redirected_to login_path assert_match(/^Sorry you lost it/, flash[:notice]) email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count @@ -904,7 +904,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest end end assert_response :redirect - assert_redirected_to :action => :login + assert_redirected_to login_path assert_match(/^Sorry you lost it/, flash[:notice]) email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count @@ -960,7 +960,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # you are not logged in get user_account_path(user) assert_response :redirect - assert_redirected_to :action => "login", :referer => "/user/#{ERB::Util.u(user.display_name)}/account" + assert_redirected_to login_path(:referer => "/user/#{ERB::Util.u(user.display_name)}/account") # Make sure that you are blocked when not logged in as the right user session_for(create(:user)) @@ -1336,7 +1336,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # Shouldn't work when not logged in get users_path assert_response :redirect - assert_redirected_to :action => :login, :referer => users_path + assert_redirected_to login_path(:referer => users_path) session_for(user) diff --git a/test/integration/client_applications_test.rb b/test/integration/client_applications_test.rb index 5a00a5631..f8055ebc7 100644 --- a/test/integration/client_applications_test.rb +++ b/test/integration/client_applications_test.rb @@ -9,7 +9,7 @@ class ClientApplicationsTest < ActionDispatch::IntegrationTest get "/login" assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true" + assert_redirected_to login_path(:cookie_test => "true") follow_redirect! assert_response :success post "/login", :params => { "username" => user.email, "password" => "test", :referer => "/user/#{ERB::Util.u(user.display_name)}" } diff --git a/test/integration/user_login_test.rb b/test/integration/user_login_test.rb index 149875def..509d2525c 100644 --- a/test/integration/user_login_test.rb +++ b/test/integration/user_login_test.rb @@ -355,7 +355,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -376,7 +376,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -401,7 +401,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -425,7 +425,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -448,7 +448,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -468,7 +468,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -492,7 +492,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -518,7 +518,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -541,7 +541,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -566,7 +566,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -586,7 +586,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -610,7 +610,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -634,7 +634,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -655,7 +655,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -675,7 +675,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -699,7 +699,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -723,7 +723,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -744,7 +744,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -764,7 +764,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -788,7 +788,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -812,7 +812,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -833,7 +833,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -853,7 +853,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -877,7 +877,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -901,7 +901,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success assert_template "users/login" @@ -921,7 +921,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest def try_password_login(username, password, remember_me = nil) get "/login" assert_response :redirect - assert_redirected_to :controller => :users, :action => :login, :cookie_test => true + assert_redirected_to login_path(:cookie_test => true) follow_redirect! assert_response :success assert_template "login" diff --git a/yarn.lock b/yarn.lock index 4829895ef..7e7f55779 100644 --- a/yarn.lock +++ b/yarn.lock @@ -247,9 +247,9 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.3.1: - version "7.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" - integrity sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg== + version "7.22.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.22.0.tgz#07ecc61052fec63661a2cab6bd507127c07adc6f" + integrity sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg== dependencies: "@babel/code-frame" "7.12.11" "@eslint/eslintrc" "^0.4.0" @@ -268,7 +268,7 @@ eslint@^7.3.1: file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" - globals "^12.1.0" + globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -276,7 +276,7 @@ eslint@^7.3.1: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.20" + lodash "^4.17.21" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -408,6 +408,13 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +globals@^13.6.0: + version "13.6.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.6.0.tgz#d77138e53738567bb96a3916ff6f6b487af20ef7" + integrity sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ== + dependencies: + type-fest "^0.20.2" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -514,10 +521,10 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -leaflet.locatecontrol@^0.72.0: - version "0.72.2" - resolved "https://registry.yarnpkg.com/leaflet.locatecontrol/-/leaflet.locatecontrol-0.72.2.tgz#513787f983bce029c100a79aedc9eb98383100e0" - integrity sha512-MNi7m+TlQFwiz5jq5W9vcGjwBHsh1PGxjKjONYd0NezuSLdj9dNjRsupLXtF2fNnX+s+tPNzP7V+Nmg6TKvhHA== +leaflet.locatecontrol@^0.73.0: + version "0.73.0" + resolved "https://registry.yarnpkg.com/leaflet.locatecontrol/-/leaflet.locatecontrol-0.73.0.tgz#768d9edb0470f86c913ea6c2a70ec62380fd45c5" + integrity sha512-e6v6SyDU2nzG5AiH80eH7qhXw5J+EfgmEFHkuzTRC9jqCSbfAm/3HlZDuoa9WYsaZbn5ovvqNeaLW/JSMsgg5g== leaflet@^1.6.0: version "1.7.1" @@ -532,10 +539,10 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lodash@^4.17.20: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@^4.17.20, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== minimatch@^3.0.4: version "3.0.4" @@ -723,6 +730,11 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"