From: Tom Hughes Date: Thu, 22 Dec 2022 16:43:41 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/3848' X-Git-Tag: live~1360 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/3ff8ef52b71d544e6660ea7823a43397165cd180?hp=1e332721531b9b3baa1a8795a718cdeffdb2bd40 Merge remote-tracking branch 'upstream/pull/3848' --- diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5f0f0f078..acc19b8c0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -28,6 +28,7 @@ jobs: run: | docker-compose run --rm web bundle exec rails db:migrate docker-compose run --rm web bundle exec rails i18n:js:export + docker-compose run --rm web bundle exec rails assets:precompile docker-compose run --rm web osmosis --rx docker/null-island.osm.xml --wd host=db database=openstreetmap user=openstreetmap password=openstreetmap validateSchemaVersion=no - name: Test Basic Website run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 11a4c322f..94eb05df9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -54,11 +54,11 @@ jobs: restore-keys: | yarn-${{ env.os }}- - name: Install node modules - run: bundle exec rake yarn:install + run: bundle exec rails yarn:install - name: Create dummy database configuration run: cp config/example.database.yml config/database.yml - name: Run eslint - run: bundle exec rake eslint + run: bundle exec rails eslint brakeman: name: Brakeman runs-on: ubuntu-20.04 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2ee32c449..73ce90b92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,13 +48,15 @@ jobs: - name: Populate database run: | sed -f script/normalise-structure db/structure.sql > db/structure.expected - bundle exec rake db:migrate + bundle exec rails db:migrate sed -f script/normalise-structure db/structure.sql > db/structure.actual diff -uw db/structure.expected db/structure.actual - name: Export javascript strings - run: bundle exec rake i18n:js:export + run: bundle exec rails i18n:js:export - name: Install node modules - run: bundle exec rake yarn:install + run: bundle exec rails yarn:install + - name: Compile assets + run: bundle exec rails assets:precompile - name: Run tests run: bundle exec rails test:all - name: Report completion to Coveralls diff --git a/CONFIGURE.md b/CONFIGURE.md index af93dcaef..3bf0724fc 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -127,7 +127,7 @@ If your installation stops working for some reason: * The OSM database schema is changed periodically and you need to keep up with these improvements. Go to your `openstreetmap-website` directory and run: ``` -bundle exec rake db:migrate +bundle exec rails db:migrate ``` ## Testing on the osm dev server @@ -145,5 +145,5 @@ If you want to deploy `openstreetmap-website` for production use, you'll need to * It's not recommended to use `rails server` in production. Our recommended approach is to use [Phusion Passenger](https://www.phusionpassenger.com/). Instructions are available for [setting it up with most web servers](https://www.phusionpassenger.com/documentation_and_support#documentation). * Passenger will, by design, use the Production environment and therefore the production database - make sure it contains the appropriate data and user accounts. * The included version of the map call is quite slow and eats a lot of memory. You should consider using [CGIMap](https://github.com/zerebubuth/openstreetmap-cgimap) instead. -* Make sure you generate the i18n files and precompile the production assets: `RAILS_ENV=production rake i18n:js:export assets:precompile` +* Make sure you generate the i18n files and precompile the production assets: `RAILS_ENV=production rails i18n:js:export assets:precompile` * Make sure the web server user as well as the rails user can read, write and create directories in `tmp/`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e878a30c..99286692e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ development to check that your code matches our guidelines: ``` bundle exec rubocop -bundle exec rake eslint +bundle exec rails eslint bundle exec erblint . ``` diff --git a/DOCKER.md b/DOCKER.md index d0b16db07..2df50bea9 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -54,7 +54,7 @@ This will launch one Docker container for each 'service' specified in `docker-co Run the Rails database migrations: - docker-compose run --rm web bundle exec rake db:migrate + docker-compose run --rm web bundle exec rails db:migrate ### Tests diff --git a/Dockerfile b/Dockerfile index aae65c2bb..7d5d4982c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,6 @@ RUN gem install bundler \ && bundle install # Install NodeJS packages using yarnpkg -# `bundle exec rake yarn:install` will not work +# `bundle exec rails yarn:install` will not work ADD package.json yarn.lock /app/ RUN yarnpkg --ignore-engines install diff --git a/Gemfile.lock b/Gemfile.lock index c63ef0081..ba539393a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,7 +86,7 @@ GEM autoprefixer-rails (10.4.7.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.675.0) + aws-partitions (1.680.0) aws-sdk-core (3.168.4) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -153,7 +153,7 @@ GEM rexml crass (1.0.6) dalli (3.2.3) - date (3.3.1) + date (3.3.3) debug_inspector (1.1.0) deep_merge (1.2.2) delayed_job (4.1.11) @@ -164,7 +164,7 @@ GEM docile (1.4.0) doorkeeper (5.6.2) railties (>= 5) - doorkeeper-i18n (5.2.5) + doorkeeper-i18n (5.2.6) doorkeeper (>= 5.2) dry-configurable (1.0.1) dry-core (~> 1.0, < 2) @@ -213,7 +213,7 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (2.7.1) + faraday (2.7.2) faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) @@ -366,7 +366,7 @@ GEM rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-protection (3.0.4) + rack-protection (3.0.5) rack rack-test (2.0.2) rack (>= 1.3) @@ -414,8 +414,8 @@ GEM rack (>= 1.4) rexml (3.2.5) rinku (2.0.6) - rotp (6.2.1) - rubocop (1.40.0) + rotp (6.2.2) + rubocop (1.41.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.1.2.1) @@ -471,9 +471,9 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - sprockets (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-exporters_pack (0.1.2) brotli (>= 0.2.0) sprockets (>= 4.0.0.beta3) diff --git a/INSTALL.md b/INSTALL.md index 6815bab1f..b19ce4ffc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -137,7 +137,7 @@ bundle install We use [Yarn](https://yarnpkg.com/) to manage the Node.js modules required for the project. ``` -bundle exec rake yarn:install +bundle exec rails yarn:install ``` ## Prepare local settings file @@ -185,7 +185,7 @@ exit To create the three databases - for development, testing and production - run: ``` -bundle exec rake db:create +bundle exec rails db:create ``` ### Database structure @@ -193,7 +193,7 @@ bundle exec rake db:create To create all the tables, indexes and constraints, run: ``` -bundle exec rake db:migrate +bundle exec rails db:migrate ``` ## Running the tests diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 594038939..10a6dc09b 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -12,8 +12,8 @@ class IssuesController < ApplicationController @title = t ".title" @issue_types = [] - @issue_types.concat %w[Note] if current_user.moderator? - @issue_types.concat %w[DiaryEntry DiaryComment User] if current_user.administrator? + @issue_types.push("Note") if current_user.moderator? + @issue_types.push("DiaryEntry", "DiaryComment", "User") if current_user.administrator? @users = User.joins(:roles).where(:user_roles => { :role => current_user.roles.map(&:role) }).distinct @issues = Issue.visible_to(current_user) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6d98c17f6..abd998030 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -151,7 +151,7 @@ class UsersController < ApplicationController redirect_to referer || edit_account_path elsif params[:decline] - redirect_to t("users.terms.declined") + redirect_to t("users.terms.declined"), :allow_other_host => true else redirect_to :action => :terms end diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index e4f640e35..a66715a75 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,7 +18,7 @@ :class => "btn btn-outline-primary geolink editlink", :id => "editanchor", :data => { :editor => preferred_editor } %> - + - credit_3_1_html: |- - Za obvestilo o avtorskih pravicah imamo različne zahteve, kako naj bo prikazano, odvisno od tega, - kako uporabljate naÅ¡e podatke. Veljajo na primer različna pravila o tem, kako prikazati obvestilo - o avtorskih pravicah glede na to, ali ste - ustvarili zemljevid za brskanje, natisnjeni zemljevid ali statično sliko. Vse podrobnosti o - zahtevah najdete v - Smernicah o priznanju avtorstva. + credit_3_1_html: Za obvestilo o avtorskih pravicah imamo različne zahteve, + kako naj bo prikazano, odvisno od tega, kako uporabljate naÅ¡e podatke. Veljajo + na primer različna pravila o tem, kako prikazati obvestilo o avtorskih pravicah + glede na to, ali ste ustvarili zemljevid za brskanje, natisnjeni zemljevid + ali statično sliko. Vse podrobnosti o zahtevah najdete v Smernicah + o pripisu avtorstva. credit_4_html: "Za pojasnitev, da so podatki na voljo pod licenco Open Database, se lahko povežete na\nto avtorskopravno stran.\nDruga možnost in zahteva, če OSM distribuirate @@ -1843,7 +2090,8 @@ sl: (morda z razÅ¡iritvijo\n»OpenStreetMap« na ta polni naslov) in na opendatacommons.org. \nV tem primeru je pripis zaslug naveden v kotu zemljevida." attribution_example: - alt: Zgled navedbe OpenStreetMap na spletnem mestu + alt: Zgled pripisa avtorstva OpenStreetMap na spletni strani + title: Zgled pripisa more_title_html: Več o tem more_1_html: "Preberite več o uporabi naÅ¡ih podatkov in o tem, kako nam pripisati zasluge, na \nstrani licence @@ -1855,10 +2103,9 @@ sl: Pravilnik o uporabi ploščic in Pravilnik o uporabi Nominatim. contributors_title_html: NaÅ¡i sodelavci - contributors_intro_html: |- - NaÅ¡ih sodelavcev je na tisoče. Vključujemo tudi - podatke pod odprto licenco nacionalnih kartografskih agencij - in drugih virov, med njimi: + contributors_intro_html: "NaÅ¡ih sodelavcev je na tisoče. Vključujemo tudi + odprtolicenčne \npodatke nacionalnih kartografskih agencij\nin drugih virov, + med njimi:" contributors_at_html: "Avstrija: Vsebuje podatke \nStadt Wien (pod licenco\nCC BY),\nLand @@ -1868,6 +2115,12 @@ sl: z uporabo upravnih meja ©\nGeoscape Australia, \nz dovoljenjem Commonwealtha Avstralije pod\nMednarodno licenco Creative Commons Attribution 4.0 (CC BY 4.0)." + contributors_ca_html: |- + Kanada: Vsebuje podatke iz + GeoBase®, GeoGratis (© Department of Natural + Resources Canada), CanVec (© Department of Natural + Resources Canada) in StatCan (Geography Division, + Statistics Canada). contributors_fi_html: |- Finska: Vsebuje podatke National Land Survey Finske Topografske podatkovne zbirke @@ -1938,6 +2191,7 @@ sl: not_public_description_html: Urejanje zemljevida ni mogoče dokler vaÅ¡i prispevki niso javni. Označite jih lahko kot javne na %{user_page}. user_page_link: strani vaÅ¡ega uporabniÅ¡kega računa + anon_edits_html: (%{link}) anon_edits_link_text: Pojasnilo zakaj je temu tako. id_not_configured: iD Å¡e ni konfiguriran no_iframe_support: VaÅ¡ brskalnik ne podpira HTML iframes, kar je potrebno za @@ -1983,7 +2237,7 @@ sl: add_marker: Dodaj zaznamek na zemljevid latitude: 'Å ir:' longitude: 'Dol:' - output: Rezultat + output: Izhod paste_html: Uporabite ta HTML za vključitev zemljevida na spletno stran export_button: Izvozi fixthemap: @@ -2020,6 +2274,7 @@ sl: title: Vodnik za začetnike description: Vodnik za začetnike, ki ga vzdržuje skupnost. help: + url: https://help.openstreetmap.org/ title: Forum za pomoč description: Postavite vpraÅ¡anje ali poiščite odgovore v zbirki vpraÅ¡anj in odgovorov OpenStreetMap. @@ -2031,6 +2286,10 @@ sl: title: Forumi (arhiv) description: VpraÅ¡anja in razprave za tiste, ki jim bolj ustreza forumski vmesnik. + community: + url: https://community.openstreetmap.org/ + title: Forum skupnosti + description: Skupno mesto za pogovore o OpenStreetMap. irc: title: IRC description: Interaktivni klepet v Å¡tevilnih različnih jezikih in o Å¡tevilnih @@ -2045,11 +2304,14 @@ sl: description: Ste iz organizacije z načrti za OpenStreetMap? Kar morati vedeti, lahko najdete v Paketu dobrodoÅ¡lice. wiki: + url: https://wiki.openstreetmap.org/ title: Viki OpenStreetMap description: Prebrskajte viki za poglobljeno dokumentacijo OpenStreetMap. potlatch: removed: VaÅ¡ privzeti urejevalnik OpenStreetMap je Potlatch. Ker Adobe Flash Player ni več na voljo, Potlatch ni več na voljo za uporabo v spletnem brskalniku. + desktop_html: Potlatch lahko Å¡e vedno uporabljate tako, da si prenesete + namizno aplikacijo za Mac in Windows. id_html: Lahko pa privzeti urejevalnik nastavite na iD, ki se izvaja v vaÅ¡em spletnem brskalniku, tako kot se je Potlatch. Svoje preference spremenite tukaj. @@ -2105,6 +2367,7 @@ sl: common: - Travniki - travnik + - vrt retail: Trgovsko območje industrial: Industrijsko območje commercial: Poslovno območje @@ -2165,10 +2428,16 @@ sl: restavracije ali omejitev cestne hitrosti. rules: title: Pravila! + paragraph_1_html: "OpenStreetMap ima nekaj formalnih pravil, vendar pričakujemo, + da vsi udeleženci sodelujejo\ns skupnostjo in komunicirajo z njo. Če razmiÅ¡ljate + o kateri koli dejavnosti razen ročnega urejanja, preberite in sledite smernicam + \nUvoz + in \nSamodejna + urejanja." questions: title: Imate kakÅ¡no vpraÅ¡anje? paragraph_1_html: |- - OpenStreetMap ima več virov za učenje o projektu, postavljanje vpraÅ¡anj in odgovarjanje nanja, sodelovalno razpravljanje in dokumentiranje tem o kartiranju. + OpenStreetMap ima več virov za učenje o projektu, postavljanje vpraÅ¡anj in odgovarjanje nanja, sodelovalno razpravljanje in dokumentiranje kartografskih tem. Poiščite pomoč tukaj. Ste iz organizacije, ki ima načrte za OpenStreetMap? Preverite Paket dobrodoÅ¡lice. start_mapping: Začnite kartirati add_a_note: @@ -2209,7 +2478,9 @@ sl: new: upload_trace: Naloži sled GPS visibility_help: kaj to pomeni? + visibility_help_url: https://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces help: Pomoč + help_url: https://wiki.openstreetmap.org/wiki/Upload create: upload_trace: Naloži sled GPS trace_uploaded: VaÅ¡a datoteka s sledjo GPS v datoteki GPX je bila poslana na @@ -2229,6 +2500,9 @@ sl: title: Urejanje sledi %{name} heading: Urejanje sledi %{name} visibility_help: kaj to pomeni? + visibility_help_url: https://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces + update: + updated: Sled posodobljena trace_optionals: tags: Oznake show: @@ -2240,6 +2514,7 @@ sl: uploaded: 'Poslano:' points: 'Točk:' start_coordinates: 'Začetna koordinata:' + coordinates_html: '%{latitude}; %{longitude}' map: zemljevid edit: uredi owner: 'Lastnik:' @@ -2274,6 +2549,7 @@ sl: in: v index: public_traces: Javne sledi GPS + my_gps_traces: Moje GPS-sledi public_traces_from: Javne sledi GPS uporabnika %{user} description: Brskajte po nedavnih prenosih sledi GPS tagged_with: z oznako %{tags} @@ -2283,6 +2559,8 @@ sl: upload_trace: Naloži sled GPS all_traces: Vse sledi my_traces: Moje sledi + traces_from: Javne sledi uporabnika %{user} + remove_tag_filter: Odstrani filter oznak destroy: scheduled_for_deletion: Sled bo izbrisana make_public: @@ -2344,16 +2622,21 @@ sl: authorize_failure: title: Zahteva za overovitev ni uspela denied: Aplikaciji %{app_name} ste zavrnili zahtevek za dostop do vaÅ¡ega računa. + invalid: Avtorizacijski žeton ni veljaven. revoke: flash: Preklicali ste žeton za %{application} + permissions: + missing: Aplikaciji niste dovolili dostopa do te funkcije scopes: read_prefs: Branje uporabniÅ¡kih preferenc write_prefs: Spreminjanje uporabniÅ¡kih nastavitev + write_diary: Ustvarjajte dnevniÅ¡ke zapise, komentarje in sklepajte prijateljstva write_api: Spreminjanje zemljevida read_gpx: Branje zasebnih sledi GPS write_gpx: Nalaganje sledi GPS write_notes: Spreminjanje opomb read_email: Branje uporabnikovega e-poÅ¡tnega naslova + skip_authorization: Samodejna odobritev aplikacije oauth_clients: new: title: Registriraj novo aplikacijo @@ -2401,31 +2684,49 @@ sl: no_applications_html: Imate aplikacijo, ki jo želite registrirati za uporabo z nami po standardu %{oauth2}? Da bo lahko za to storitev izvajala zahtevke OAuth, jo morate najprej registrirati. + oauth_2: OAuth 2 + new: Registriraj novo aplikacijo name: Ime permissions: Dovoljenja application: edit: Uredi delete: IzbriÅ¡i + confirm_delete: Želite izbrisati to aplikacijo? new: title: Registriraj novo aplikacijo + edit: + title: Uredi svojo aplikacijo show: edit: Uredi delete: IzbriÅ¡i + confirm_delete: Želite izbrisati to aplikacijo? + client_id: ID odjemalca + client_secret: Skrivnost odjemalca + client_secret_warning: Ne pozabite shraniti te skrivnosti – ne bo več dostopna permissions: Dovoljenja + redirect_uris: Preusmeritveni URI-ji not_found: sorry: Te aplikacije ni bilo mogoče najti. oauth2_authorizations: new: + title: Potrebna je avtorizacija + introduction: Želite avtorizirati %{application} za dostop do vaÅ¡ega računa + z naslednjimi dovoljenji? + authorize: Avtoriziraj deny: Zavrni error: title: PriÅ¡lo je do napake + show: + title: Avtorizacijska koda oauth2_authorized_applications: index: title: Moje pooblaščene aplikacije + application: Aplikacija permissions: Dovoljenja no_applications_html: Pooblastili Å¡e niste nobene aplikacije %{oauth2}. application: revoke: Prekliči dostop + confirm_revoke: Želite za to aplikacijo preklicati dostop? users: new: title: Registracija @@ -2465,6 +2766,7 @@ sl: read_tou: Prebral sem pogoje uporabe in soglaÅ¡am z njimi consider_pd: Poleg zgoraj navedenega menim, da so moji prispevki v javni domeni consider_pd_why: kaj je to? + consider_pd_why_url: https://wiki.osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain guidance_html: 'Informacije, ki pomagajo razumeti te pogoje: berljivi povzetek in nekaj neuradnih prevodov' continue: Nadaljuj @@ -2480,6 +2782,7 @@ sl: terms_declined_flash: terms_declined_html: Žal nam je, da ste se odločili, da ne sprejmete novih pogojev za sodelavce. Za več informacij glejte %{terms_declined_link}. + terms_declined_link: ta vikistran terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined no_such_user: title: Ni tega uporabnika @@ -2536,6 +2839,8 @@ sl: activate_user: Aktiviraj uporabnika deactivate_user: Dezaktiviraj uporabnika confirm_user: Potrdi uporabnika + unconfirm_user: Prekliči potrditev tega uporabnika + unsuspend_user: Prekliči suspendiranje tega uporabnika hide_user: Skrij uporabnika unhide_user: Prikaži uporabnika delete_user: IzbriÅ¡i uporabnika @@ -2570,6 +2875,7 @@ sl: no_authorization_code: Ni pooblastitvene kode unknown_signature_algorithm: Neznan algoritem podpisa invalid_scope: Neveljaven obseg + unknown_error: Avtentikacija ni uspela auth_association: heading: VaÅ¡ ID Å¡e ni povezan z računom OpenStreetMap. option_1: Če ste novi v OpenStreetMapu, prosimo, ustvarite nov račun z uporabo @@ -2732,6 +3038,7 @@ sl: custom_dimensions: Nastavitev velikosti po meri format: 'Format:' scale: 'Merilo:' + image_dimensions: Slika bo prikazala standardni sloj velikosti %{width} x %{height} download: Prenesi short_url: Kratek URL include_marker: Vključi oznako @@ -2780,6 +3087,9 @@ sl: terms: Pogoji za spletno mesto in API cyclosm: 'Slog ploščic: CyclOSM; gosti OpenStreetMap France' + thunderforest: Ploščice z dovoljenjem Andyja + Allana + opnvkarte: Ploščite z dovoljenjem MeMoMaps hotosm: 'Slog ploščic: Humanitarian OpenStreetMap Team; gosti OpenStreetMap France' @@ -2919,7 +3229,7 @@ sl: query: node: Vozlišče way: Pot - relation: Zveza + relation: Relacija nothing_found: Značilnosti ni bilo mogoče najti error: 'Napaka pri povezovanju s strežnikom %{server}: %{error}' timeout: Časovna omejitev povezovanja s strežnikom %{server} @@ -2959,5 +3269,8 @@ sl: flash: Redakcija uničena. error: Ob uničevanju te redakcije je priÅ¡lo do napake. validations: + leading_whitespace: ima začetne presledke + trailing_whitespace: ima končne presledke invalid_characters: vsebuje neveljavne znake + url_characters: vsebuje posebne znake URL (%{characters}) ... diff --git a/config/locales/sr.yml b/config/locales/sr.yml index b5041cad8..da022f570 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -44,7 +44,7 @@ sr: client_application: create: Отвори налог update: Ажурирај - doorkeeper_application: + oauth2_application: create: Регистрација update: Ажурирај redaction: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 09f843af6..93ba1ea93 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -71,7 +71,7 @@ sv: client_application: create: Registrera update: Uppdatera - doorkeeper_application: + oauth2_application: create: Registrera update: Uppdatera redaction: diff --git a/config/locales/ta.yml b/config/locales/ta.yml index 33b342259..713c98345 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -34,7 +34,7 @@ ta: client_application: create: பதிவுசெய் update: புதுப்பி - doorkeeper_application: + oauth2_application: create: பதிவுசெய் update: புதுப்பி redaction: diff --git a/config/locales/te.yml b/config/locales/te.yml index c7131eda2..60750cb62 100644 --- a/config/locales/te.yml +++ b/config/locales/te.yml @@ -31,7 +31,7 @@ te: client_application: create: నమోదవ్వండి update: తాజాకరించు - doorkeeper_application: + oauth2_application: create: నమోదవ్వండి update: తాజాకరించు redaction: diff --git a/config/locales/tl.yml b/config/locales/tl.yml index 6de9cbff5..95ca5951e 100644 --- a/config/locales/tl.yml +++ b/config/locales/tl.yml @@ -35,7 +35,7 @@ tl: client_application: create: Magpatala update: Isapanahon - doorkeeper_application: + oauth2_application: create: Magpatala update: Isapanahon redaction: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index ea994afc9..4ebf5cf11 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -72,7 +72,7 @@ tr: client_application: create: Kaydol update: Güncelle - doorkeeper_application: + oauth2_application: create: Kaydol update: Güncelle redaction: diff --git a/config/locales/tt.yml b/config/locales/tt.yml index 62d496251..6ec076c3e 100644 --- a/config/locales/tt.yml +++ b/config/locales/tt.yml @@ -25,7 +25,7 @@ tt: client_application: create: Теркәлү update: Яңарту - doorkeeper_application: + oauth2_application: create: Теркәлү update: Яңарту trace: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index bd0a09783..6d3a06f64 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -68,7 +68,7 @@ uk: client_application: create: Зареєструвати update: Оновити - doorkeeper_application: + oauth2_application: create: Реєстрація update: Оновити redaction: diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 7772c0326..15b9fae16 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -13,6 +13,7 @@ # Author: Minh Nguyen # Author: Nemo bis # Author: Nghiemtrongdai VN +# Author: Nguyenphutrong2 # Author: Nguyễn Mạnh An # Author: Ninomax # Author: Phjtieudoc @@ -43,7 +44,7 @@ vi: client_application: create: Đăng ký update: Cập nhật - doorkeeper_application: + oauth2_application: create: Đăng ký update: Cập nhật redaction: @@ -2555,6 +2556,9 @@ vi: title: Mở tài khoản no_auto_account_create: Rất tiếc, chúng ta hiện không có khả năng tạo ra tài khoản tá»± động cho bạn. + please_contact_support_html: Vui lòng liên hệ với %{support_link} để sắp xếp + tạo tài khoản - chúng tôi sẽ cố gắng và giải quyết yêu cầu nhanh nhất có thể. + support: hỗ trợ about: header: Tá»± do sá»­ dụng và sá»­a đổi html: |- @@ -2688,6 +2692,10 @@ vi: title: Tài khoản bị Cấm heading: Tài khoản bị Cấm support: hỗ trợ + automatically_suspended: Xin lỗi, tài khoản của bạn đã tá»± động bị treo do hoạt + động đáng ngờ. + contact_support_html: Quyết định này sẽ sớm được quản trị viên xem xét hoặc + bạn có thể liên hệ với %{support_link} nếu bạn muốn thảo luận về vấn đề này. auth_failure: connection_failed: Kết nối đến dịch vụ xác minh bị thất bại invalid_credentials: Chứng nhận xác minh không hợp lệ diff --git a/config/locales/xmf.yml b/config/locales/xmf.yml index 80b598602..9b2d51900 100644 --- a/config/locales/xmf.yml +++ b/config/locales/xmf.yml @@ -24,7 +24,7 @@ xmf: client_application: create: რეგისტრაცია update: გოახალაფა - doorkeeper_application: + oauth2_application: create: რეგისტრაცია update: გოახალაფა redaction: diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 9747f9a98..34f5c0204 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -99,7 +99,7 @@ zh-CN: client_application: create: 注册 update: 更新 - doorkeeper_application: + oauth2_application: create: 注册 update: 更新 redaction: diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 46233c41b..1723607fe 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -28,7 +28,7 @@ zh-HK: client_application: create: 註冊 update: 更新 - doorkeeper_application: + oauth2_application: create: 註冊 update: 更新 redaction: diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 19c683742..ac28222a5 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -67,7 +67,7 @@ zh-TW: client_application: create: 註冊 update: 更新 - doorkeeper_application: + oauth2_application: create: 註冊 update: 更新 redaction: diff --git a/docker-compose.yml b/docker-compose.yml index 8f67212eb..ad55e660e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,10 +8,10 @@ services: - .:/app # Prevent these directories from mounting so they're not shared between host OS and Docker - /app/node_modules/ - - /app/tmp/ - # Mount these upload directories so they persist between runs - - web-traces:/home/osm/traces - - web-images:/home/osm/images + # Mount a tmp directory that will persist between runs + - web-tmp:/app/tmp + # Mount a storage directory that will persist between runs + - web-storage:/app/storage ports: - "3000:3000" command: bundle exec rails s -p 3000 -b '0.0.0.0' @@ -32,6 +32,6 @@ services: - db-data:/var/lib/postgresql/data volumes: - web-traces: - web-images: + web-tmp: + web-storage: db-data: diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb index 9470ec0bb..979b5d8af 100644 --- a/test/controllers/api/changesets_controller_test.rb +++ b/test/controllers/api/changesets_controller_test.rb @@ -1768,7 +1768,7 @@ module Api get changeset_download_path(changeset) assert_response :success - # print @response.body + # FIXME: needs more assert_select tests assert_select "osmChange[version='#{Settings.api_version}'][generator='#{Settings.generator}']" do assert_select "create", :count => 5 diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index b1e9b72f2..2003f9a08 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -325,7 +325,6 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest assert_select "p", :text => /#{new_body}/, :count => 1 assert_select "abbr[class='geo'][title='#{number_with_precision(new_latitude, :precision => 4)}; #{number_with_precision(new_longitude, :precision => 4)}']", :count => 1 # As we're not logged in, check that you cannot edit - # print @response.body assert_select "a[href='/user/#{ERB::Util.u(entry.user.display_name)}/diary/#{entry.id}/edit']", :text => "Edit this entry", :count => 1 end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 634b279a5..9358a5948 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -529,7 +529,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest get user_path(seen_user) assert_response :success - # put @response.body assert_select "div.content-heading" do assert_select "dt", :count => 1, :text => /Contributor terms/ assert_select "dd", /Declined/ diff --git a/test/integration/user_diaries_test.rb b/test/integration/user_diaries_test.rb index 0b3ee930d..57a98823b 100644 --- a/test/integration/user_diaries_test.rb +++ b/test/integration/user_diaries_test.rb @@ -15,7 +15,7 @@ class UserDiariesTest < ActionDispatch::IntegrationTest # We can now login post "/login", :params => { "username" => user.email, "password" => "test", :referer => "/diary/new" } assert_response :redirect - # print @response.body + # Check that there is some payload alerting the user to the redirect # and allowing them to get to the page they are being directed to assert_select "html:root" do @@ -30,8 +30,6 @@ class UserDiariesTest < ActionDispatch::IntegrationTest assert_response :success assert_template "diary_entries/new" - # print @response.body - # print @html_document.to_yaml # We will make sure that the form exists here, full # assert testing of the full form should be done in the diff --git a/test/models/way_test.rb b/test/models/way_test.rb index 420eb42a8..8674b3790 100644 --- a/test/models/way_test.rb +++ b/test/models/way_test.rb @@ -34,7 +34,6 @@ class WayTest < ActiveSupport::TestCase way.add_nd_num(node_b.id) end way.save - # print way.nds.size assert_predicate way, :valid? way.add_nd_num(node_c.id) assert_predicate way, :valid? diff --git a/test/system/site_test.rb b/test/system/site_test.rb index 0fa524675..d7b9f279e 100644 --- a/test/system/site_test.rb +++ b/test/system/site_test.rb @@ -71,9 +71,10 @@ class SiteTest < ApplicationSystemTestCase find("h1").hover # un-hover original element visit "#map=10/0/0" + find("#{selector}.disabled") # Ensure that capybara has waited for JS to finish processing + assert_no_selector ".tooltip" find(selector).hover - sleep(0.5) assert_selector ".tooltip", :text => "Zoom in" end end diff --git a/test/system/user_signup_test.rb b/test/system/user_signup_test.rb index 7e2c6ba54..5bd88f5a4 100644 --- a/test/system/user_signup_test.rb +++ b/test/system/user_signup_test.rb @@ -8,4 +8,22 @@ class UserSignupTest < ApplicationSystemTestCase assert_content "Confirm Password" end + + test "externally redirect when contributor terms declined" do + user = build(:user) + + visit root_path + click_on "Sign Up" + fill_in "Email", :with => user.email + fill_in "Email Confirmation", :with => user.email + fill_in "Display Name", :with => user.display_name + fill_in "Password", :with => "testtest" + fill_in "Confirm Password", :with => "testtest" + click_button "Sign Up" + + assert_content "Contributor terms" + click_on "Cancel" + + assert_current_path "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined" + end end diff --git a/yarn.lock b/yarn.lock index 013e82b5d..ba4c35621 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,25 +2,25 @@ # yarn lockfile v1 -"@eslint/eslintrc@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" - integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== +"@eslint/eslintrc@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.0.tgz#8ec64e0df3e7a1971ee1ff5158da87389f167a63" + integrity sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.4.0" - globals "^13.15.0" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.6": - version "0.11.7" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" - integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -214,12 +214,12 @@ eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8.0.0: - version "8.29.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.29.0.tgz#d74a88a20fb44d59c51851625bc4ee8d0ec43f87" - integrity sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg== + version "8.30.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.30.0.tgz#83a506125d089eef7c5b5910eeea824273a33f50" + integrity sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ== dependencies: - "@eslint/eslintrc" "^1.3.3" - "@humanwhocodes/config-array" "^0.11.6" + "@eslint/eslintrc" "^1.4.0" + "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" @@ -238,7 +238,7 @@ eslint@^8.0.0: file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.15.0" + globals "^13.19.0" grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" @@ -379,10 +379,10 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.15.0: - version "13.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.18.0.tgz#fb224daeeb2bb7d254cd2c640f003528b8d0c1dc" - integrity sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A== +globals@^13.19.0: + version "13.19.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" + integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== dependencies: type-fest "^0.20.2"