]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into feature/add-communities-page
authorAdam Hoyle <atomoil@gmail.com>
Mon, 27 Sep 2021 18:30:25 +0000 (19:30 +0100)
committerAdam Hoyle <atomoil@gmail.com>
Mon, 27 Sep 2021 18:30:25 +0000 (19:30 +0100)
1  2 
app/abilities/ability.rb
app/views/layouts/_header.html.erb
config/locales/en.yml
config/routes.rb
yarn.lock

diff --combined app/abilities/ability.rb
index ec32a4607f93dca19bf1d0ddb9efbc99e010a103,769fbca475e401ba9538ae6164cd60f84e6bf6fe..f33ce182dd6a7c7d5f9075c61d85524ee3c9fbdb
@@@ -7,7 -7,7 +7,7 @@@ class Abilit
      can [:relation, :relation_history, :way, :way_history, :node, :node_history,
           :changeset, :note, :new_note, :query], :browse
      can :search, :direction
 -    can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
 +    can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :communities, :preview, :copyright, :key, :id], :site
      can [:finish, :embed], :export
      can [:search, :search_latlon, :search_ca_postcode, :search_osm_nominatim,
           :search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse], :geocoder
@@@ -42,6 -42,7 +42,7 @@@
          can [:index, :new, :create, :show, :edit, :update, :destroy], :oauth2_application
          can [:index, :destroy], :oauth2_authorized_application
          can [:new, :show, :create, :destroy], :oauth2_authorization
+         can [:show], :dashboard
          can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
          can [:make_friend, :remove_friend], Friendship
          can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
index bd1c10c392fc4019a702db0f513d54316d884c11,192b0761431faf62a8f25a002f6e293c8f72a806..e9e88c1e0391a512637f2cd592c5bad4958f5405
@@@ -50,9 -50,6 +50,9 @@@
        <li class="compact-hide nav-item <%= current_page_class(diary_entries_path) %>">
          <%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "nav-link" %>
        </li>
 +      <li class="compact-hide nav-item <%= current_page_class(communities_path) %>">
 +        <%= link_to t("layouts.communities"), communities_path, :class => "nav-link" %>
 +      </li>
        <li class="compact-hide nav-item <%= current_page_class(copyright_path) %>">
          <%= link_to t("layouts.copyright"), copyright_path, :class => "nav-link" %>
        </li>
@@@ -75,7 -72,6 +75,7 @@@
            <% end %>
            <li class="<%= current_page_class(traces_path) %>"><%= link_to t("layouts.gps_traces"), traces_path, :class => "dropdown-item" %></li>
            <li class="<%= current_page_class(diary_entries_path) %>"><%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "dropdown-item" %></li>
 +          <li class="<%= current_page_class(communities_path) %>"><%= link_to t("layouts.communities"), communities_path, :class => "dropdown-item" %></li>
            <li class="<%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
            <li class="<%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
            <li class="<%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
@@@ -94,6 -90,7 +94,7 @@@
            </span>
          </a>
          <div class='dropdown-menu dropdown-menu-right'>
+           <%= link_to t("users.show.my_dashboard"), dashboard_path, :class => "dropdown-item" %>
            <%= link_to inbox_messages_path, :class => "dropdown-item" do %>
              <%= t("users.show.my messages") %>
              <span class='count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
diff --combined config/locales/en.yml
index d361dc852dbccd4c08c7c1d4839a9b4619c692b7,6869e966b821503bafb3b4e568ef033cecb95ca7..b2592c1c252c165d97d02a7df83f82af743a614f
@@@ -416,6 -416,26 +416,26 @@@ en
        title_particular: "OpenStreetMap changeset #%{changeset_id} discussion"
      timeout:
        sorry: "Sorry, the list of changeset comments you requested took too long to retrieve."
+   dashboards:
+     contact:
+       km away: "%{count}km away"
+       m away: "%{count}m away"
+     popup:
+       your location: "Your location"
+       nearby mapper: "Nearby mapper"
+       friend: "Friend"
+     show:
+       title: My Dashboard
+       no_home_location_html: "%{edit_profile_link} and set your home location to see nearby users."
+       edit_your_profile: Edit your profile
+       my friends: My friends
+       no friends: You have not added any friends yet.
+       nearby users: "Other nearby users"
+       no nearby users: "There are no other users who admit to mapping nearby yet."
+       friends_changesets: "friends' changesets"
+       friends_diaries: "friends' diary entries"
+       nearby_changesets: "nearby user changesets"
+       nearby_diaries: "nearby user diary entries"
    diary_entries:
      new:
        title: New Diary Entry
            window_construction: "Window Construction"
            winery: "Winery"
            "yes": "Craft Shop"
+         crossing: "Crossing"
          emergency:
            access_point: "Access Point"
            ambulance_station: "Ambulance Station"
            hill: "Hill"
            hot_spring: "Hot Spring"
            island: "Island"
+           isthmus: "Isthmus"
            land: "Land"
            marsh: "Marsh"
            moor: "Moor"
            sand: "Sand"
            scree: "Scree"
            scrub: "Scrub"
+           shingle: "Shingle"
            spring: "Spring"
            stone: "Stone"
            strait: "Strait"
            tree: "Tree"
+           tree_row: "Tree Row"
+           tundra: "Tundra"
            valley: "Valley"
            volcano: "Volcano"
            water: "Water"
      intro_header: Welcome to OpenStreetMap!
      intro_text: OpenStreetMap is a map of the world, created by people like you and free to use under an open license.
      intro_2_create_account: "Create a user account"
-     hosting_partners_html: "Hosting is supported by %{ucl}, %{bytemark}, and other %{partners}."
+     hosting_partners_html: "Hosting is supported by %{ucl}, %{fastly}, %{bytemark}, and other %{partners}."
      partners_ucl: "UCL"
+     partners_fastly: "Fastly"
      partners_bytemark: "Bytemark Hosting"
      partners_partners: "partners"
      tou: "Terms of Use"
      help: Help
      about: About
      copyright: Copyright
 +    communities: Communities
      community: Community
      community_blogs: "Community Blogs"
      community_blogs_title: "Blogs from members of the OpenStreetMap community"
            <a href="https://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm">Land Vorarlberg</a> and
            Land Tirol (under <a href="https://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT with amendments</a>).
          contributors_au_html: |
-           <strong>Australia</strong>: Contains data sourced from
-           <a href="https://www.psma.com.au/psma-data-copyright-and-disclaimer">PSMA Australia Limited</a>
+           <strong>Australia</strong>: Incorporates or developed using Administrative Boundaries &copy;
+           <a href="https://geoscape.com.au/legal/data-copyright-and-disclaimer/">Geoscape Australia</a>
            licensed by the Commonwealth of Australia under
-           <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
+           <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International licence (CC BY 4.0)</a>.
          contributors_ca_html: |
            <strong>Canada</strong>: Contains data from
            GeoBase&reg;, GeoGratis (&copy; Department of Natural
            Just go to <a href='%{map_url}'>the map</a> and click the note icon:
            <span class='icon note'></span>. This will add a marker to the map, which you can move
            by dragging. Add your message, then click save, and other mappers will investigate.
 +    communities:
 +      title: Communities
 +      lede_text: |
 +        People from all over the world contribute to or use OpenStreetMap.
 +        Whilst some are content to participate as individuals, others have formed communities.
 +        These groups come in a range of sizes and represent geographies from small towns to large multi-country regions.
 +        They can also be formal or informal.
 +      local_chapters:
 +        title: Local Chapters
 +        about_text: |
 +          Local Chapters are country-level or region-level groups that have taken the formal step of
 +          establishing not-for-profit legal entities. They represent the area's map and mappers when
 +          dealing with local government, business, and media. They have also formed an affiliation
 +          with the OpenStreetMap Foundation (OSMF), giving them a link to the legal and copyright
 +          governing body.
 +        list_text: |
 +          So far we have the following formally established foundation Local Chapters:
 +      other_groups:
 +        title: Other Groups
 +        about_html: |
 +          There is no need to formally establish a group to the same extent as the Local Chapters.
 +          Indeed many groups exist very sucessfully as an informal gathering of people or as a
 +          community group. Anyone can set up or join these. Read more on the
 +          <a href="https://wiki.openstreetmap.org/wiki/User_group">Communities wiki page</a>.
    traces:
      visibility:
        private: "Private (only shared as anonymous, unordered points)"
        blocked_zero_hour: "You have an urgent message on the OpenStreetMap web site. You need to read the message before you will be able to save your edits."
        blocked: "Your access to the API has been blocked. Please log-in to the web interface to find out more."
        need_to_see_terms: "Your access to the API is temporarily suspended. Please log-in to the web interface to view the Contributor Terms. You do not need to agree, but you must view them."
+     settings_menu:
+       account_settings: Account Settings
+       oauth1_settings: OAuth 1 settings
+       oauth2_applications: OAuth 2 applications
+       oauth2_authorizations: OAuth 2 authorizations
    oauth:
      authorize:
        title: "Authorize access to your account"
        my settings: My Settings
        my comments: My Comments
        my_preferences: My Preferences
+       my_dashboard: My Dashboard
        blocks on me: Blocks on Me
        blocks by me: Blocks by Me
        edit_profile: Edit Profile
        spam score: "Spam Score:"
        description: Description
        user location: User location
-       no_home_location_html: "%{edit_profile_link} and set your home location to see nearby users."
-       edit_your_profile: Edit your profile
-       my friends: My friends
-       no friends: You have not added any friends yet.
-       km away: "%{count}km away"
-       m away: "%{count}m away"
-       nearby users: "Other nearby users"
-       no nearby users: "There are no other users who admit to mapping nearby yet."
        role:
          administrator: "This user is an administrator"
          moderator: "This user is a moderator"
        unhide_user: "Unhide this User"
        delete_user: "Delete this User"
        confirm: "Confirm"
-       friends_changesets: "friends' changesets"
-       friends_diaries: "friends' diary entries"
-       nearby_changesets: "nearby user changesets"
-       nearby_diaries: "nearby user diary entries"
        report: Report this User
-     popup:
-       your location: "Your location"
-       nearby mapper: "Nearby mapper"
-       friend: "Friend"
      account:
        title: "Edit account"
        my settings: My Settings
          link text: "what is this?"
        save changes button: Save Changes
        make edits public button: Make all my edits public
-       return to profile: Return to profile
-       oauth1 settings: OAuth 1 settings
-       oauth2 applications: OAuth 2 applications
-       oauth2 authorizations: OAuth 2 authorizations
        flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address."
        flash update success: "User information updated successfully."
      set_home:
diff --combined config/routes.rb
index 1295772f1c4c75c48aa99d83921a748ae6302ba8,f4c19f88cb9278ad050e9c972ad0a2939efefc8f..68ab163a933b8e8a1730f6e6df455206fd1fb77e
@@@ -147,8 -147,6 +147,8 @@@ OpenStreetMap::Application.routes.draw 
    get "/help" => "site#help"
    get "/about/:about_locale" => "site#about"
    get "/about" => "site#about"
 +  get "/communities" => "site#communities"
 +  get "/communities/:communities_locale" => "site#communities"
    get "/history" => "changesets#index"
    get "/history/feed" => "changesets#feed", :defaults => { :format => :atom }
    get "/history/comments/feed" => "changeset_comments#index", :as => :changesets_comments_feed, :defaults => { :format => "rss" }
    match "/user/:display_name/account" => "users#account", :via => [:get, :post], :as => "user_account"
    post "/user/:display_name/set_status" => "users#set_status", :as => :set_status_user
  
+   resource :dashboard, :only => [:show]
    resource :preferences, :only => [:show, :edit, :update]
    resource :profile, :only => [:edit, :update]
  
diff --combined yarn.lock
index cd32a2e522937d537f862f02f14d0c0bcf5f7b79,683ca631cd6925498ff2ccd4b95f7d62a638f724..d69e8135697414b738fa276e95556e7bbc3525c3
+++ b/yarn.lock
@@@ -229,11 -229,6 +229,11 @@@ deep-is@^0.1.3
    resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
    integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
  
 +diacritics@^1.3.0:
 +  version "1.3.0"
 +  resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1"
 +  integrity sha1-PvqHMj67hj5mls67AILUj/PW96E=
 +
  doctrine@^3.0.0:
    version "3.0.0"
    resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
@@@ -553,9 -548,9 +553,9 @@@ jquery-simulate@^1.0.2
    integrity sha512-Bq610fSrwTwvH5d06z5oskYaX/79s0BNrKiJZjZOiXRib3iL4ZkSn/wvLwzhf3P9KeXCEpk9wlIaGui/1arOpQ==
  
  js-cookie@^3.0.0:
-   version "3.0.0"
-   resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.0.tgz#db1661d5459920ec95aaf186ccf74ceb4a495164"
-   integrity sha512-oUbbplKuH07/XX2YD2+Q+GMiPpnVXaRz8npE7suhBH9QEkJe2W7mQ6rwuMXHue3fpfcftQwzgyvGzIHyfCSngQ==
+   version "3.0.1"
+   resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.1.tgz#9e39b4c6c2f56563708d7d31f6f5f21873a92414"
+   integrity sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==
  
  js-tokens@^4.0.0:
    version "4.0.0"
@@@ -659,13 -654,6 +659,13 @@@ optionator@^0.9.1
      type-check "^0.4.0"
      word-wrap "^1.2.3"
  
 +osm-community-index@^5.1.3:
 +  version "5.1.3"
 +  resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.1.3.tgz#df2bd0db2b3e43b95fa026138905dc2f3f473062"
 +  integrity sha512-kERHt/O+QFp7DB5jH/Pkh3P1GwT3vH+lYskN7EVEBcnnsW8AIcdGpmQDlLO9IZNCbzmP7YY81wlUv8AuWKUTIg==
 +  dependencies:
 +    diacritics "^1.3.0"
 +
  parent-module@^1.0.0:
    version "1.0.1"
    resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"