From: Andy Allan Date: Wed, 15 Jan 2025 12:49:34 +0000 (+0000) Subject: Merge pull request #5449 from AntonKhorev/edit-preferences X-Git-Tag: live~7 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b8a1a904c6273252c56998178b69f5f65d744d69?hp=-c Merge pull request #5449 from AntonKhorev/edit-preferences Make preferences page editable without clicking 'Edit Preferences' --- b8a1a904c6273252c56998178b69f5f65d744d69 diff --combined config/locales/en.yml index 04b8a9a96,94d095c26..32b0bc6bc --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -20,6 -20,9 +20,6 @@@ en create: Add Comment message: create: Send - client_application: - create: Register - update: Update oauth2_application: create: Register update: Update @@@ -242,6 -245,25 +242,6 @@@ entry: comment: Comment full: Full note - account: - deletions: - show: - title: Delete My Account - warning: Warning! The account deletion process is final, and cannot be reversed. - delete_account: Delete Account - delete_introduction: "You can delete your OpenStreetMap account using the button below. Please note the following details:" - delete_profile: Your profile information, including your avatar, description and home location will be removed. - delete_display_name: Your display name will be removed, and can be reused by other accounts. - retain_caveats: "However, some information about you will be retained on OpenStreetMap, even after your account is deleted:" - retain_edits: Your edits to the map database, if any, will be retained. - retain_traces: Your uploaded traces, if any, will be retained. - retain_diary_entries: Your diary entries and diary comments, if any, will be retained but hidden from view. - retain_notes: Your map notes and note comments, if any, will be retained but hidden from view. - retain_changeset_discussions: Your changeset discussions, if any, will be retained. - retain_email: Your email address will be retained. - recent_editing_html: "As you have edited recently your account cannot currently be deleted. Deletion will be possible in %{time}." - confirm_delete: Are you sure? - cancel: Cancel accounts: edit: title: "Edit account" @@@ -283,53 -305,6 +283,53 @@@ success: "User information updated successfully." destroy: success: "Account Deleted." + deletions: + show: + title: Delete My Account + warning: Warning! The account deletion process is final, and cannot be reversed. + delete_account: Delete Account + delete_introduction: "You can delete your OpenStreetMap account using the button below. Please note the following details:" + delete_profile: Your profile information, including your avatar, description and home location will be removed. + delete_display_name: Your display name will be removed, and can be reused by other accounts. + retain_caveats: "However, some information about you will be retained on OpenStreetMap, even after your account is deleted:" + retain_edits: Your edits to the map database, if any, will be retained. + retain_traces: Your uploaded traces, if any, will be retained. + retain_diary_entries: Your diary entries and diary comments, if any, will be retained but hidden from view. + retain_notes: Your map notes and note comments, if any, will be retained but hidden from view. + retain_changeset_discussions: Your changeset discussions, if any, will be retained. + retain_email: Your email address will be retained. + recent_editing_html: "As you have edited recently your account cannot currently be deleted. Deletion will be possible in %{time}." + confirm_delete: Are you sure? + cancel: Cancel + terms: + show: + title: "Terms" + heading: "Terms" + heading_ct: "Contributor terms" + read and accept with tou: "Please read the contributor agreement and the terms of use, check both checkboxes when done and then press the continue button." + contributor_terms_explain: "This agreement governs the terms for your existing and future contributions." + read_ct: "I have read and agree to the above contributor terms" + tou_explain_html: "These %{tou_link} govern the use of the website and other infrastructure provided by the OSMF. Please click on the link, read and agree to the text." + read_tou: "I have read and agree to the Terms of Use" + consider_pd: "In addition to the above, I consider my contributions to be in the Public Domain" + consider_pd_why: "what's this?" + consider_pd_why_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain + guidance_info_html: "Information to help understand these terms: a %{readable_summary_link} and some %{informal_translations_link}" + readable_summary: human readable summary + informal_translations: informal translations + continue: "Continue" + declined: "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined" + cancel: "Cancel" + you need to accept or decline: "Please read and then either accept or decline the new Contributor Terms to continue." + legale_select: "Country of residence:" + legale_names: + france: "France" + italy: "Italy" + rest_of_world: "Rest of the world" + terms_declined_flash: + terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}. + terms_declined_link: this wiki page + terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined browse: deleted_ago_by_html: "Deleted %{time_ago} by %{user}" edited_ago_by_html: "Edited %{time_ago} by %{user}" @@@ -349,13 -324,17 +349,13 @@@ view_history: "View History" view_unredacted_history: "View Unredacted History" view_details: "View Details" - view_redacted_data: "View Redacted Data" - view_redaction_message: "View Redaction Message" location: "Location:" common_details: coordinates_html: "%{latitude}, %{longitude}" node: title_html: "Node: %{name}" - history_title_html: "Node History: %{name}" way: title_html: "Way: %{name}" - history_title_html: "Way History: %{name}" nodes: "Nodes" nodes_count: one: "%{count} node" @@@ -365,6 -344,7 +365,6 @@@ other: "part of ways %{related_ways}" relation: title_html: "Relation: %{name}" - history_title_html: "Relation History: %{name}" members: "Members" members_count: one: "%{count} member" @@@ -380,6 -360,13 +380,6 @@@ entry_role_html: "%{relation_name} (as %{relation_role})" not_found: title: Not Found - sorry: "Sorry, %{type} #%{id} could not be found." - type: - node: node - way: way - relation: relation - changeset: changeset - note: note timeout: title: Timeout Error sorry: "Sorry, the data for the %{type} with the id %{id} took too long to retrieve." @@@ -416,44 -403,27 +416,44 @@@ introduction: "Click on the map to find nearby features." nearby: "Nearby features" enclosing: "Enclosing features" + old_elements: + index: + node: + title_html: "Node History: %{name}" + way: + title_html: "Way History: %{name}" + relation: + title_html: "Relation History: %{name}" + actions: + view_redacted_data: "View Redacted Data" + view_redaction_message: "View Redaction Message" nodes: + not_found_message: + sorry: "Sorry, node #%{id} could not be found." timeout: sorry: "Sorry, the data for the node with the id %{id} took too long to retrieve." old_nodes: - not_found: + not_found_message: sorry: "Sorry, node #%{id} version %{version} could not be found." timeout: sorry: "Sorry, the history of the node with the id %{id} took too long to retrieve." ways: + not_found_message: + sorry: "Sorry, way #%{id} could not be found." timeout: sorry: "Sorry, the data for the way with the id %{id} took too long to retrieve." old_ways: - not_found: + not_found_message: sorry: "Sorry, way #%{id} version %{version} could not be found." timeout: sorry: "Sorry, the history of the way with the id %{id} took too long to retrieve." relations: + not_found_message: + sorry: "Sorry, relation #%{id} could not be found." timeout: sorry: "Sorry, the data for the relation with the id %{id} took too long to retrieve." old_relations: - not_found: + not_found_message: sorry: "Sorry, relation #%{id} version %{version} could not be found." timeout: sorry: "Sorry, the history of the relation with the id %{id} took too long to retrieve." @@@ -529,8 -499,6 +529,8 @@@ ways_paginated: "Ways (%{x}-%{y} of %{count})" relations: "Relations (%{count})" relations_paginated: "Relations (%{x}-%{y} of %{count})" + not_found_message: + sorry: "Sorry, changeset #%{id} could not be found." timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." dashboards: @@@ -1665,25 -1633,24 +1665,25 @@@ see_their_profile_html: "You can see their profile at %{userurl}." befriend_them: "You can also add them as a friend at %{befriendurl}." befriend_them_html: "You can also add them as a friend at %{befriendurl}." - gpx_description: - description_with_tags: "It looks like your file %{trace_name} with the description %{trace_description} and the following tags: %{tags}" - description_with_tags_html: "It looks like your file %{trace_name} with the description %{trace_description} and the following tags: %{tags}" - description_with_no_tags: "It looks like your file %{trace_name} with the description %{trace_description} and no tags" - description_with_no_tags_html: "It looks like your file %{trace_name} with the description %{trace_description} and no tags" + gpx_details: + details: "Your file details:" + filename: Filename + url: URL + description: Description + tags: Tags + total_points: Total number of points + imported_points: Number of imported points gpx_failure: hi: "Hi %{to_user}," - failed_to_import: "failed to be imported as a GPS trace file. Please verify that your file is a valid GPX file or an archive containing GPX file(s) in the supported format (.tar.gz, .tar.bz2, .tar, .zip, .gpx.gz, .gpx.bz2). Could there be a format or syntax issue with your file? Here is the importing error:" - more_info: "More information about GPX import failures and how to avoid them can be found at %{url}." + failed_to_import: "It looks like your file failed to be imported as a GPS trace." + verify: "Please verify that your file is a valid GPX file or an archive containing GPX file(s) in the supported format (.tar.gz, .tar.bz2, .tar, .zip, .gpx.gz, .gpx.bz2). Could there be a format or syntax issue with your file? Here is the importing error:" + more_info: "More information about GPX import failures and how to avoid them can be found at %{url}" more_info_html: "More information about GPX import failures and how to avoid them can be found at %{url}." import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures" subject: "[OpenStreetMap] GPX Import failure" gpx_success: hi: "Hi %{to_user}," - loaded: - one: "loaded successfully with %{trace_points} out of a possible %{count} point." - other: "loaded successfully with %{trace_points} out of a possible %{count} points." - trace_location: "Your trace is available at %{trace_url}" + imported_successfully: "It looks like your file was imported successfully as a GPS trace." all_your_traces: "All your successfully uploaded GPX traces can be found at %{url}" all_your_traces_html: "All your successfully uploaded GPX traces can be found at %{url}." subject: "[OpenStreetMap] GPX Import success" @@@ -1759,8 -1726,8 +1759,8 @@@ success: "Confirmed your account, thanks for signing up!" already active: "This account has already been confirmed." unknown token: "That confirmation code has expired or does not exist." - resend_html: "If you need us to resend the confirmation email, %{reconfirm_link}." - click_here: click here + if_need_resend: "If you need us to resend the confirmation email, click the button below." + resend_button: Resend the confirmation email confirm_resend: failure: "User %{name} not found." confirm_email: @@@ -1774,6 -1741,28 +1774,6 @@@ confirmation_sent: We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping. whitelist: If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests. messages: - inbox: - title: "Inbox" - messages: "You have %{new_messages} and %{old_messages}" - new_messages: - one: "%{count} new message" - other: "%{count} new messages" - old_messages: - one: "%{count} old message" - other: "%{count} old messages" - no_messages_yet_html: "You have no messages yet. Why not get in touch with some of the %{people_mapping_nearby_link}?" - people_mapping_nearby: "people mapping nearby" - messages_table: - from: "From" - to: "To" - subject: "Subject" - date: "Date" - actions: "Actions" - message_summary: - unread_button: "Mark as unread" - read_button: "Mark as read" - destroy_button: "Delete" - unmute_button: "Move to Inbox" new: title: "Send message" send_message_to_html: "Send a new message to %{name}" @@@ -1785,6 -1774,20 +1785,6 @@@ title: "No such message" heading: "No such message" body: "Sorry there is no message with that id." - outbox: - title: "Outbox" - messages: - one: "You have %{count} sent message" - other: "You have %{count} sent messages" - no_sent_messages_html: "You have no sent messages yet. Why not get in touch with some of the %{people_mapping_nearby_link}?" - people_mapping_nearby: "people mapping nearby" - muted: - title: "Muted Messages" - messages: - one: "%{count} muted message" - other: "You have %{count} muted messages" - reply: - wrong_user: "You are logged in as '%{user}' but the message you have asked to reply to was not sent to that user. Please log in as the correct user in order to reply." show: title: "Read message" reply_button: "Reply" @@@ -1792,6 -1795,12 +1792,6 @@@ destroy_button: "Delete" back: "Back" wrong_user: "You are logged in as '%{user}' but the message you have asked to read was not sent by or to that user. Please log in as the correct user in order to read it." - sent_message_summary: - destroy_button: "Delete" - heading: - my_inbox: "My Inbox" - my_outbox: "My Outbox" - muted_messages: "Muted messages" mark: as_read: "Message marked as read" as_unread: "Message marked as unread" @@@ -1800,53 -1809,6 +1800,53 @@@ error: "The message could not be moved to the Inbox." destroy: destroyed: "Message deleted" + mailboxes: + heading: + my_inbox: "My Inbox" + my_outbox: "My Outbox" + muted_messages: "Muted messages" + messages_table: + from: "From" + to: "To" + subject: "Subject" + date: "Date" + actions: "Actions" + message: + unread_button: "Mark as unread" + read_button: "Mark as read" + destroy_button: "Delete" + unmute_button: "Move to Inbox" + inboxes: + show: + title: "Inbox" + messages: "You have %{new_messages} and %{old_messages}" + new_messages: + one: "%{count} new message" + other: "%{count} new messages" + old_messages: + one: "%{count} old message" + other: "%{count} old messages" + no_messages_yet_html: "You have no messages yet. Why not get in touch with some of the %{people_mapping_nearby_link}?" + people_mapping_nearby: "people mapping nearby" + muted_inboxes: + show: + title: "Muted Messages" + messages: + one: "%{count} muted message" + other: "You have %{count} muted messages" + outboxes: + show: + title: "Outbox" + messages: + one: "You have %{count} sent message" + other: "You have %{count} sent messages" + no_sent_messages_html: "You have no sent messages yet. Why not get in touch with some of the %{people_mapping_nearby_link}?" + people_mapping_nearby: "people mapping nearby" + message: + destroy_button: "Delete" + replies: + new: + wrong_user: "You are logged in as '%{user}' but the message you have asked to reply to was not sent to that user. Please log in as the correct user in order to reply." passwords: new: title: "Lost password" @@@ -1879,11 -1841,7 +1879,7 @@@ auto: Auto light: Light dark: Dark - edit_preferences: Edit Preferences - edit: - title: Edit Preferences save: Update Preferences - cancel: Cancel update: failure: Couldn't update preferences. update_success_flash: @@@ -2789,6 -2747,34 +2785,6 @@@ consider_pd_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain or: "or" use external auth: "or sign up with a third party" - terms: - title: "Terms" - heading: "Terms" - heading_ct: "Contributor terms" - read and accept with tou: "Please read the contributor agreement and the terms of use, check both checkboxes when done and then press the continue button." - contributor_terms_explain: "This agreement governs the terms for your existing and future contributions." - read_ct: "I have read and agree to the above contributor terms" - tou_explain_html: "These %{tou_link} govern the use of the website and other infrastructure provided by the OSMF. Please click on the link, read and agree to the text." - read_tou: "I have read and agree to the Terms of Use" - consider_pd: "In addition to the above, I consider my contributions to be in the Public Domain" - consider_pd_why: "what's this?" - consider_pd_why_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain - guidance_info_html: "Information to help understand these terms: a %{readable_summary_link} and some %{informal_translations_link}" - readable_summary: human readable summary - informal_translations: informal translations - continue: "Continue" - declined: "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined" - cancel: "Cancel" - you need to accept or decline: "Please read and then either accept or decline the new Contributor Terms to continue." - legale_select: "Country of residence:" - legale_names: - france: "France" - italy: "Italy" - rest_of_world: "Rest of the world" - terms_declined_flash: - terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}. - terms_declined_link: this wiki page - terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined no_such_user: title: "No such user" heading: "The user %{user} does not exist" @@@ -2856,27 -2842,6 +2852,27 @@@ report: Report this User go_public: flash success: "All your edits are now public, and you are now allowed to edit." + issued_blocks: + show: + title: "Blocks by %{name}" + heading_html: "List of Blocks by %{name}" + empty: "%{name} has not made any blocks yet." + received_blocks: + show: + title: "Blocks on %{name}" + heading_html: "List of Blocks on %{name}" + empty: "%{name} has not been blocked yet." + edit: + title: "Revoking all blocks on %{block_on}" + heading_html: "Revoking all blocks on %{block_on}" + empty: "%{name} has no active blocks." + confirm: "Are you sure you wish to revoke %{active_blocks}?" + active_blocks: + one: "%{count} active block" + other: "%{count} active blocks" + revoke: "Revoke!" + destroy: + flash: "All active blocks have been revoked." lists: show: title: Users @@@ -2953,6 -2918,16 +2949,6 @@@ title: "User blocks" heading: "List of user blocks" empty: "No blocks have been made yet." - revoke_all: - title: "Revoking all blocks on %{block_on}" - heading_html: "Revoking all blocks on %{block_on}" - empty: "%{name} has no active blocks." - confirm: "Are you sure you wish to revoke %{active_blocks}?" - active_blocks: - one: "%{count} active block" - other: "%{count} active blocks" - revoke: "Revoke!" - flash: "All active blocks have been revoked." helper: time_future_html: "Ends in %{time}." until_login: "Active until the user logs in." @@@ -2978,10 -2953,19 +2974,10 @@@ ended: "ended" revoked_html: "revoked by %{name}" active: "active" - active_unread: "active unread" - expired_unread: "expired unread" + active_until_read: "active until read" read_html: "read at %{time}" time_in_future_title: "%{time_absolute}; in %{time_relative}" time_in_past_title: "%{time_absolute}; %{time_relative}" - blocks_on: - title: "Blocks on %{name}" - heading_html: "List of Blocks on %{name}" - empty: "%{name} has not been blocked yet." - blocks_by: - title: "Blocks by %{name}" - heading_html: "List of Blocks by %{name}" - empty: "%{name} has not made any blocks yet." show: title: "%{block_on} blocked by %{block_by}" heading_html: "%{block_on} blocked by %{block_by}" @@@ -3084,19 -3068,9 +3080,19 @@@ new: title: "New Note" intro: "Spotted a mistake or something missing? Let other mappers know so we can fix it. Move the marker to the correct position and type a note to explain the problem." - anonymous_warning_html: "You are not logged in. Please %{log_in} or %{sign_up} if you want to receive updates for your note." + anonymous_warning_html: "You are not logged in. Please %{log_in} or %{sign_up} to receive updates for your note and help mappers resolve it." anonymous_warning_log_in: "log in" anonymous_warning_sign_up: "sign up" + counter_warning_html: "You have already posted at least %{x_anonymous_notes}, that's great for the community, thank you! Now we encourage you to %{contribute_by_yourself}, it is not that complicated, and %{community_can_help}." + x_anonymous_notes: + one: "%{count} anonymous note" + other: "%{count} anonymous notes" + counter_warning_guide_link: + text: "contribute by yourself" + url: https://wiki.openstreetmap.org/wiki/Beginners%27_guide + counter_warning_forum_link: + text: "the community can help you" + url: https://community.openstreetmap.org/ advice: "Your note is public and may be used to update the map, so don't enter personal information, or information from copyrighted maps or directory listings." add: Add Note new_readonly: @@@ -3106,8 -3080,6 +3102,8 @@@ showing_page: "Page %{page}" next: "Next" previous: "Previous" + not_found_message: + sorry: "Sorry, note #%{id} could not be found." javascripts: close: Close share: diff --combined config/routes.rb index 479d35346,5bda1b37c..d2b2830fd --- a/config/routes.rb +++ b/config/routes.rb @@@ -182,7 -182,11 +182,7 @@@ OpenStreetMap::Application.routes.draw get "/key" => "site#key" get "/id" => "site#id" get "/query" => "browse#query" - get "/user/new" => "users#new" - post "/user/new" => "users#create" - get "/user/terms" => "users#terms" - post "/user/save" => "users#save" - get "/user/:display_name/confirm/resend" => "confirmations#confirm_resend", :as => :user_confirm_resend + post "/user/:display_name/confirm/resend" => "confirmations#confirm_resend", :as => :user_confirm_resend match "/user/:display_name/confirm" => "confirmations#confirm", :via => [:get, :post] match "/user/confirm" => "confirmations#confirm", :via => [:get, :post] match "/user/confirm-email" => "confirmations#confirm_email", :via => [:get, :post] @@@ -265,26 -269,20 +265,27 @@@ post "/diary_comments/:comment/unhide" => "diary_comments#unhide", :comment => /\d+/, :as => :unhide_diary_comment # user pages - resources :users, :path => "user", :param => :display_name, :only => [:show, :destroy] do + get "/user/terms", :to => redirect(:path => "/account/terms") + resources :users, :path => "user", :param => :display_name, :only => [:new, :create, :show, :destroy] do resource :role, :controller => "user_roles", :path => "roles/:role", :only => [:create, :destroy] + scope :module => :users do + resource :issued_blocks, :path => "blocks_by", :only => :show + resource :received_blocks, :path => "blocks", :only => [:show, :edit, :destroy] + end end get "/user/:display_name/account", :to => redirect(:path => "/account/edit") post "/user/:display_name/set_status" => "users#set_status", :as => :set_status_user - resource :account, :only => [:edit, :update, :destroy] - - namespace :account do - resource :deletion, :only => [:show] + resource :account, :only => [:edit, :update, :destroy] do + scope :module => :accounts do + resource :terms, :only => [:show, :update] + resource :deletion, :only => :show + end end + resource :dashboard, :only => [:show] - resource :preferences, :only => [:show, :edit, :update] + resource :preferences, :only => [:show, :update] + get "/preferences/edit", :to => redirect(:path => "/preferences") resource :profile, :only => [:edit, :update] # friendships @@@ -310,22 -308,21 +311,22 @@@ get "/export/embed" => "export#embed" # messages - resources :messages, :only => [:create, :show, :destroy] do + resources :messages, :path_names => { :new => "new/:display_name" }, :id => /\d+/, :only => [:new, :create, :show, :destroy] do post :mark patch :unmute - match :reply, :via => [:get, :post] - collection do - get :inbox - get :muted - get :outbox - end + resource :reply, :module => :messages, :path_names => { :new => "new" }, :only => :new + end + namespace :messages, :path => "/messages" do + resource :inbox, :only => :show + resource :muted_inbox, :path => "muted", :only => :show + resource :outbox, :only => :show end get "/user/:display_name/inbox", :to => redirect(:path => "/messages/inbox") get "/user/:display_name/outbox", :to => redirect(:path => "/messages/outbox") - get "/message/new/:display_name" => "messages#new", :as => "new_message" + get "/message/new/:display_name", :to => redirect(:path => "/messages/new/%{display_name}") get "/message/read/:message_id", :to => redirect(:path => "/messages/%{message_id}") + get "/messages/:message_id/reply", :to => redirect(:path => "/messages/%{message_id}/reply/new") # muting users scope "/user/:display_name" do @@@ -334,7 -331,11 +335,7 @@@ resources :user_mutes, :only => [:index] # banning pages - get "/user/:display_name/blocks" => "user_blocks#blocks_on", :as => "user_blocks_on" - get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by" - get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block" - resources :user_blocks, :except => :new - match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks" + resources :user_blocks, :path_names => { :new => "new/:display_name" } # issues and reports resources :issues do