From: Tom Hughes Date: Thu, 1 Nov 2018 18:01:25 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/2037' X-Git-Tag: live~2777 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/0e7cc08c7b1055341dc01cfdc331fac1a13964c1?hp=801522c5c349cee50c917a933bcd39656c8dc230 Merge remote-tracking branch 'upstream/pull/2037' --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8fc701cb3..26a50cb97 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -19,7 +19,7 @@ Lint/AssignmentInCondition: - 'app/helpers/application_helper.rb' - 'app/helpers/browse_helper.rb' - 'app/models/client_application.rb' - - 'app/models/notifier.rb' + - 'app/mailers/notifier.rb' - 'lib/nominatim.rb' - 'lib/osm.rb' - 'script/deliver-message' diff --git a/Gemfile b/Gemfile index d60f1ba94..9e86b5ec7 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem "json" gem "pg", "~> 0.18" # Use SCSS for stylesheets -gem "sassc-rails" +gem "sassc-rails", "~> 1.3" # Use Uglifier as compressor for JavaScript assets gem "uglifier", ">= 1.3.0" diff --git a/Gemfile.lock b/Gemfile.lock index 9080f009e..08514dcda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -21,7 +21,7 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-page_caching (1.1.0) + actionpack-page_caching (1.1.1) actionpack (>= 4.0.0, < 6) actionview (5.2.0) activesupport (= 5.2.0) @@ -87,7 +87,7 @@ GEM coffee-script-source (1.12.2) composite_primary_keys (11.0.3) activerecord (~> 5.2.0) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.0) coveralls (0.8.22) json (>= 1.8, < 3) simplecov (~> 0.16.1) @@ -97,7 +97,7 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.4) - dalli (2.7.8) + dalli (2.7.9) debug_inspector (0.0.3) delayed_job (4.1.5) activesupport (>= 3.0, < 5.3) @@ -114,7 +114,7 @@ GEM factory_bot_rails (4.11.1) factory_bot (~> 4.11.1) railties (>= 3.0.0) - faraday (0.12.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) ffi (1.9.25) fspath (3.1.0) @@ -129,7 +129,7 @@ GEM concurrent-ruby (~> 1.0) i18n-js (3.0.11) i18n (>= 0.6.6, < 2) - image_optim (0.26.2) + image_optim (0.26.3) exifr (~> 1.2, >= 1.2.2) fspath (~> 3.0) image_size (>= 1.5, < 3) @@ -165,14 +165,14 @@ GEM rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) logstash-event (1.2.02) - logstasher (1.2.2) + logstasher (1.3.0) activesupport (>= 4.0) logstash-event (~> 1.2.0) request_store - loofah (2.2.2) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.0) + mail (2.7.1) mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) @@ -189,19 +189,19 @@ GEM multi_xml (0.6.0) multipart-post (2.0.0) nio4r (2.3.1) - nokogiri (1.8.4) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) - nokogumbo (1.5.0) - nokogiri + nokogumbo (2.0.0) + nokogiri (~> 1.8, >= 1.8.4) oauth (0.4.7) oauth-plugin (0.5.1) multi_json oauth (~> 0.4.4) oauth2 (>= 0.5.0) rack - oauth2 (1.4.0) - faraday (>= 0.8, < 0.13) - jwt (~> 1.0) + oauth2 (1.4.1) + faraday (>= 0.8, < 0.16.0) + jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) @@ -240,7 +240,7 @@ GEM mimemagic (~> 0.3.0) terrapin (~> 0.6.0) parallel (1.12.1) - parser (2.5.1.2) + parser (2.5.3.0) ast (~> 2.4.0) pg (0.21.0) poltergeist (1.18.1) @@ -248,8 +248,8 @@ GEM cliver (~> 0.3.1) websocket-driver (>= 0.2.0) powerpack (0.1.2) - progress (3.4.0) - psych (3.0.2) + progress (3.5.0) + psych (3.0.3) public_suffix (3.0.3) puma (3.12.0) quad_tile (1.0.1) @@ -306,22 +306,22 @@ GEM rack (>= 1.4) rinku (2.0.4) rotp (3.3.1) - rubocop (0.59.1) + rubocop (0.60.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) + unicode-display_width (~> 1.4.0) ruby-openid (2.7.0) ruby-progressbar (1.10.0) ruby_dep (1.5.0) safe_yaml (1.0.4) - sanitize (4.6.6) + sanitize (5.0.0) crass (~> 1.0.2) - nokogiri (>= 1.4.4) - nokogumbo (~> 1.4) + nokogiri (>= 1.8.0) + nokogumbo (~> 2.0) sass (3.6.0) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -360,7 +360,7 @@ GEM thor (0.19.4) thread_safe (0.3.6) tilt (2.0.8) - tins (1.16.3) + tins (1.17.0) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (4.1.19) @@ -368,7 +368,7 @@ GEM unicode-display_width (1.4.0) validates_email_format_of (1.6.3) i18n - vendorer (0.1.16) + vendorer (0.2.0) webmock (3.4.2) addressable (>= 2.3.6) crack (>= 0.3.2) @@ -376,7 +376,7 @@ GEM websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (3.1.0) + xpath (3.2.0) nokogiri (~> 1.8) PLATFORMS @@ -443,7 +443,7 @@ DEPENDENCIES rotp rubocop sanitize - sassc-rails + sassc-rails (~> 1.3) secure_headers uglifier (>= 1.3.0) validates_email_format_of (>= 1.5.1) diff --git a/app/models/notifier.rb b/app/mailers/notifier.rb similarity index 100% rename from app/models/notifier.rb rename to app/mailers/notifier.rb diff --git a/lib/geo_record.rb b/app/models/concerns/geo_record.rb similarity index 89% rename from lib/geo_record.rb rename to app/models/concerns/geo_record.rb index e02734ec9..06049c295 100644 --- a/lib/geo_record.rb +++ b/app/models/concerns/geo_record.rb @@ -1,6 +1,8 @@ require "delegate" module GeoRecord + extend ActiveSupport::Concern + # Ensure that when coordinates are printed that they are always in decimal degrees, # and not e.g. 4.0e-05 # Unfortunately you can't extend Numeric classes directly (e.g. `Coord < Float`). @@ -19,9 +21,9 @@ module GeoRecord # the database. SCALE = 10000000 - def self.included(base) - base.scope :bbox, ->(bbox) { base.where(OSM.sql_for_area(bbox)) } - base.before_save :update_tile + included do + scope :bbox, ->(bbox) { where(OSM.sql_for_area(bbox)) } + before_save :update_tile end # Is this node within -90 >= latitude >= 90 and -180 >= longitude >= 180 diff --git a/lib/not_redactable.rb b/app/models/concerns/not_redactable.rb similarity index 78% rename from lib/not_redactable.rb rename to app/models/concerns/not_redactable.rb index 6a5773296..2d721530f 100644 --- a/lib/not_redactable.rb +++ b/app/models/concerns/not_redactable.rb @@ -1,6 +1,6 @@ -require "osm" - module NotRedactable + extend ActiveSupport::Concern + def redacted? false end diff --git a/lib/object_metadata.rb b/app/models/concerns/object_metadata.rb similarity index 97% rename from lib/object_metadata.rb rename to app/models/concerns/object_metadata.rb index c765df526..dcfde889c 100644 --- a/lib/object_metadata.rb +++ b/app/models/concerns/object_metadata.rb @@ -1,4 +1,6 @@ module ObjectMetadata + extend ActiveSupport::Concern + def add_metadata_to_xml_node(el, osm, changeset_cache, user_display_name_cache) el["changeset"] = osm.changeset_id.to_s el["redacted"] = osm.redaction.id.to_s if osm.redacted? diff --git a/config/locales/da.yml b/config/locales/da.yml index ade8ddcbb..8f662f344 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -963,6 +963,8 @@ da: title: Problemer select_status: Vælg status select_type: Vælg type + select_last_updated_by: Vælg sidst opdateret af + reported_user: Rapporteret bruger not_updated: Ikke opdateret search: Søg user_not_found: Brugeren findes ikke @@ -980,6 +982,7 @@ da: reopen: Genåbn read_reports: Læs rapporter new_reports: Nye rapporter + comments_on_this_issue: Kommentarer på denne sag comments: created_at: Den %{datetime} reports: @@ -1697,8 +1700,10 @@ da: tags_help: kommasepareret visibility: 'Synlighed:' visibility_help: hvad betyder det her? + visibility_help_url: https://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces upload_button: Upload help: Hjælp + help_url: https://wiki.openstreetmap.org/wiki/Upload create: upload_trace: Upload GPS-spor trace_uploaded: Din GPX-fil er uploadet og afventer lagring i databasen. Det @@ -2013,6 +2018,7 @@ da: terms declined: Vi er kede af at du har besluttet at du ikke kan acceptere de nye vilkår for bidragsydere. For yderligere oplysninger, se venligst denne wikiside. + terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined terms: title: Vilkår for bidragsydere heading: Vilkår for bidragsydere diff --git a/config/locales/fa.yml b/config/locales/fa.yml index ce8e8aac1..047d22ef5 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1048,7 +1048,7 @@ fa: befriend_them: همچنین میتوانید در %{befriendurl} او را بعنوان دوست اضافه کنید. gpx_notification: greeting: سلام ، - your_gpx_file: پرونده ی GPX شما اینگونه است + your_gpx_file: فایل GPX شما اینگونه است with_description: با توضیحات and_the_tags: 'و برچسب های زیر:' and_no_tags: و بدون برچسب. @@ -1636,8 +1636,8 @@ fa: identifiable: قابل شناسایی (نمایش در لیست ردها، قابل شناسایی، نقاط مرتب بر اساس زمان) new: - upload_trace: بارگذاری رد GPS - upload_gpx: 'بارگذاری پروندهٔ GPX:' + upload_trace: بارگذاری رد جی‌پی‌اس + upload_gpx: 'بارگذاری فایل GPX:' description: 'توضیحات:' tags: 'برچسب‌ها:' tags_help: جداشده با کاما (,) @@ -1646,10 +1646,10 @@ fa: upload_button: بارگذاری help: کمک create: - upload_trace: بارگذاری رد GPS - trace_uploaded: پروندهٔ GPX شما بارگذاری شده و در انتظار درج در پایگاه‌داده - است. این کار معمولاً کمتر از نیم ساعت طول می‌کشد. هنگامی که انجام شد ایمیلی - برای شما فرستاده می‌شود. + upload_trace: بارگذاری رد جی‌پی‌اس + trace_uploaded: فایل GPX شما بارگذاری شده و در انتظار درج در پایگاه‌داده است. + این کار معمولاً کمتر از نیم ساعت طول می‌کشد. هنگامی که انجام شد ایمیلی برای + شما فرستاده می‌شود. traces_waiting: one: شما %{count} رد منتظر بارگذاری دارید. لطفاً قبل از بارگذاری موارد بیشتر منتظر بمانید تا اینها بارگذاری بشوند که صف برای سایر کاربران بسته نشود. @@ -1658,7 +1658,7 @@ fa: edit: title: ویرایش رد %{name} heading: ویرایش رد %{name} - filename: 'نام پرونده:' + filename: 'نام فایل:' download: دریافت uploaded_at: 'تاریخ بارگذاری:' points: 'نقاط:' @@ -1680,7 +1680,7 @@ fa: title: دیدن رد %{name} heading: دیدن رد %{name} pending: در انتظار - filename: 'نام پرونده:' + filename: 'نام فایل:' download: دریافت uploaded: 'تاریخ بارگذاری:' points: 'نقاط:' @@ -1736,15 +1736,14 @@ fa: message: سامانهٔ بارگذاری جی‌پی‌اکس در حال حاضر در دسترس نیست offline: heading: ذخیره سازی آفلاین GPX - message: ذخیره‌سازی پروندهٔ جی‌پی‌اکس و سامانهٔ بارگذاری در حال حاضر در دسترس - نیست. + message: ذخیره‌گاه فایل جی‌پی‌اکس و سامانهٔ بارگذاری هم‌اکنون در دسترس نیستند. georss: - title: ردهای جی‌پی‌اس OpenStreetMap + title: ‫ردهای جی‌پی‌اس OpenStreetMap‬ description: description_with_count: - one: پرونده GPX با %{count} نقطه از %{user} - other: ' پرونده GPX با %{count} نقطه از %{user}' - description_without_count: پرونده GPX از %{user} + one: ‫فایل GPX با %{count} نقطه از %{user}‬ + other: ' ‫فایل GPX با %{count} نقطه از %{user}‬' + description_without_count: فایل GPX از %{user} application: require_cookies: cookies_needed: بنظر می‌رسد که کوکی‌ها را غیرفعال کرده‌اید - لطفاً قبل از ادامه @@ -1772,7 +1771,7 @@ fa: allow_write_diary: ساخت روزنوشت‌ها، نظردادن و افزودن دوست. allow_write_api: ویرایش نقشه. allow_read_gpx: خواندن ردهای GPS شخصی شما. - allow_write_gpx: بارگذاری ردهای GPS + allow_write_gpx: بارگذاری ردهای GPS. allow_write_notes: اصلاح یادداشت‌ها. grant_access: دسترسی می‌دهم authorize_success: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 62cd2ca70..28b3d7f59 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -10,6 +10,7 @@ # Author: Greencaps # Author: HanV # Author: Hansmuller +# Author: Henke # Author: JaapDeKleine # Author: Jochempluim # Author: Joost schouppe @@ -502,6 +503,7 @@ nl: protected_area: Beschermd gebied bridge: aqueduct: Aquaduct + boardwalk: Plankenweg suspension: Hangbrug swing: Draaibrug viaduct: Viaduct @@ -527,11 +529,11 @@ nl: water_tank: Watertank voor noodgevallen "yes": Noodgeval highway: - abandoned: Verlaten snelweg + abandoned: Verlaten weg bridleway: Ruiterpad bus_guideway: Vrijliggende busbaan bus_stop: Bushalte - construction: Snelweg in aanbouw + construction: Weg in aanbouw corridor: Corridor cycleway: Fietspad elevator: Lift @@ -568,7 +570,7 @@ nl: track: Veld- of bosweg traffic_signals: Verkeerslichten trail: Pad - trunk: Autosnelweg + trunk: Autoweg trunk_link: Autoweg turning_loop: Keerlus unclassified: Ongeclassificeerde weg @@ -784,7 +786,7 @@ nl: square: Plein state: Staat subdivision: Deelgebied - suburb: Buitenwijk + suburb: Stadsdeel town: Stad unincorporated_area: Gemeentevrij gebied village: Dorp @@ -874,9 +876,11 @@ nl: organic: Organische winkel outdoor: Buitensportwinkel paint: Verfwinkel + pawnbroker: Pandmakelaar pet: Dierenwinkel pharmacy: Apotheek photo: Fotowinkel + seafood: Zeevruchten second_hand: Kringloopwinkel shoes: Schoenenzaak sports: Sportwinkel @@ -940,7 +944,7 @@ nl: level6: Countygrens level8: Stadsgrens level9: Dorpsgrens - level10: Wijkgrens + level10: Stadsdeelgrens description: title: osm_nominatim: Locatie van OpenStreetMap @@ -972,9 +976,43 @@ nl: ignored: Genegeerd open: Open resolved: Opgelost + update: + new_report: Uw rapport is succesvol geregistreerd + successful_update: Uw rapport is succesvol bijgewerkt + provide_details: Geef a.u.b. de vereiste gegevens in show: + title: '%{status} Probleem #%{issue_id}' + report_created_at: Voor het eerst vermeld op %{datetime} + last_resolved_at: Laatst opgelost op %{datetime} + last_updated_at: Laatst bijgewerkt op %{datetime} door %{displayname} + resolve: Oplossen ignore: Negeren reopen: Heropenen + reports_of_this_issue: Meldingen van deze kwestie + read_reports: Lees Meldingen + new_reports: Nieuwe Meldingen + other_issues_against_this_user: Andere problemen met deze gebruiker + no_other_issues: Geen andere problemen tegen deze gebruiker. + comments_on_this_issue: Commentaar op deze kwestie + resolve: + resolved: De status van het probleem is ingesteld op 'Opgelost' + ignore: + ignored: De status van het probleem is ingesteld op 'Genegeerd' + reopen: + reopened: De status van het probleem is ingesteld op 'Open' + comments: + created_at: Op %{datetime} + reassign_param: Probleem opnieuw toewijzen? + reports: + updated_at: Op %{datetime} + reported_by_html: Gerapporteerd als %{category} door %{user} + helper: + reportable_title: + diary_comment: '%{entry_title}, commentaar #%{comment_id}' + note: 'Nota #%{note_id}' + issue_comments: + create: + comment_created: Je reactie is succesvol gemaakt reports: new: categories: diff --git a/config/locales/th.yml b/config/locales/th.yml index 2b538b3b9..7f8e7d7cd 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1546,6 +1546,8 @@ th: upload_trace: อัปโหลดรอยทาง GPS trace_uploaded: แฟ้มข้อมูล GPX ของท่านอัปโหลดเข้าระบบแล้ว กำลังรอบรรจุเข้าฐานข้อมูล ซึ่งจะใช้เวลาประมาณครึ่งชั่วโมง เมื่อกระบวนการเรียบร้อยแล้วจะมีอีเมลแจ้งท่านให้ทราบ + traces_waiting: คุณมีรอยทาง %{count} ชุด ที่กำลังรออัพโหลด กรุณารอให้การอัพโหลดเหล่านี้เสร็จสิ้น + ก่อนที่จะเพิ่มรอยทางชุดต่อไป, เพื่อไม่ให้ผู้ใช้คนอื่นๆ จะต้องรอคิวนาน edit: filename: 'ชื่อแฟ้ม:' download: ดาวน์โหลด @@ -1618,6 +1620,8 @@ th: application: require_cookies: cookies_needed: ดูเหมือนว่าคุณปิดใช้งานคุกกี้อยู่, กรุณาเปิดใช้งานคุกกี้ในบราวเซอร์ของคุณก่อนจะดำเนินการต่อ + setup_user_auth: + blocked: คุณถูกระงับการเข้าถึง API, กรุณาเข้าระบบทางหน้าเว็บหลักหากต้องการทราบสาเหตุที่ถูกระงับในครั้งนี้ oauth: authorize: title: อนุญาตการเข้าถึงบัญชีของคุณ @@ -1820,7 +1824,7 @@ th: my settings: การตั้งค่าของฉัน my comments: ความคิดเห็นของฉัน oauth settings: ตั้งค่าการอนุญาต OAuth - blocks on me: ผู้ใช้ที่กีดกันข้าพเจ้า + blocks on me: การถูกระงับของฉัน blocks by me: ผู้ใช้ที่ข้าพเจ้ากีดกัน send message: ส่งข้อความ diary: บันทึก @@ -1853,8 +1857,9 @@ th: role: administrator: คนนี้เป็นผู้ดูแลระบบ moderator: ผู้ใช้นี้เป็นผู้ดูแล + block_history: การถูกระงับใช้งานในปัจจุบัน comments: ความเห็นที่เขียน - create_block: กีดกันผู้ใช้นี้ + create_block: ระงับผู้ใช้นี้ activate_user: เปิดใช้งานผู้ใช้นี้ deactivate_user: ปิดใช้งานผู้ใช้นี้ confirm: ยืนยัน @@ -2002,66 +2007,83 @@ th: fail: ไม่สามารถถอดถอนสถานะ `%{role}' แก่ผู้ใช้ `%{name}' โปรดตรวจสอบว่าทั้งผู้ใช้และสถานะเป็นที่ถูกต้องดีแล้ว user_blocks: model: - non_moderator_update: ต้องเป็นผู้ดูแลระบบจึงจะสามารถสร้างหรือปรับปรุงการกีดกันได้ + non_moderator_update: จะต้องเป็นผู้ดูแลระบบจึงจะสามารถระงับ หรือแก้ไขการระงับผู้ใช้ได้ non_moderator_revoke: ต้องเป็นผู้ดูแลระบบจึงจะสามารถเพิกถอนการกีดกันได้ not_found: - sorry: ขออภัย การกีดกันผู้ใช้รหัส %{id} ไม่พบ + sorry: ขออภัย ไม่พบการระงับผู้ใช้ตามหมายเลขอ้างอิง %{id} ที่ระบุมา back: กลับไปที่ดัชนี new: - title: สร้างการกีดกันบน %{name} + title: ระงับผู้ใช้ %{name} heading: สร้างการกีดกันบน %{name} - reason: เหตุผลที่ผู้ใช้ %{name} ถูกกีดกัน โปรดอย่าใช้อารมณ์รุนแรงในระหว่างระบุ - และขอให้ระบุรายละเอียดเกี่ยวกับสถานการณ์ที่พบให้ละเอียดชัดเจน จำไว้ว่าข้อความที่ท่านพิมพ์จะปรากฏต่อสาธารณะ - ผู้ใช้ทุกท่านไม่จำต้องเข้าใจถึงศัพท์เฉพาะ จึงขอแนะนำให้ใช้ศัพท์อย่างง่าย - period: ต้องการกีดกันผู้ใช้คนนี้จาก API นับแต่บัดนี้ นานเท่าใด + reason: เหตุผลที่ผู้ใช้ %{name} ถูกระงับ, โปรดอย่าเขียนด้วยอารมณ์รุนแรง โดยขอให้ระบุรายละเอียดเกี่ยวกับสถานการณ์ที่พบให้ละเอียดชัดเจน, + ควรใช้คำอธิบายที่เข้าใจง่ายเป็นหลัก เพราะไม่ใช่ว่าผู้ใช้ทุกคนจะเข้าใจศัพท์เฉพาะ, + และต้องอย่าลืม ว่าสิ่งที่คุณเขียนนี้จะแสดงต่อสาธารณะด้วย + period: ระงับผู้ใช้คนนี้จากการเข้าถึง API, นานเท่าใด โดยเริ่มนับจากปัจจุบัน submit: สร้างการกีดกัน tried_contacting: ข้าพเจ้าติดต่อผู้ใช้คนนี้และขอร้องให้เขาหยุดการกระทำ tried_waiting: ข้าพเจ้าได้ให้เวลานานสมควรแก่ผู้ใช้คนนี้ในการตอบคำถามกลับ - needs_view: ผู้ใช้ต้องเข้าระบบก่อนการกีดกันนี้จะถูกเพิกถอน + needs_view: ผู้ใช้ต้องเข้าระบบก่อน การระงับนี้จึงจะถูกเพิกถอน back: แสดงการกีดกันทั้งหมด edit: - title: แก้ไขการกีดกันบน %{name} + title: แก้ไขการระงับผู้ใช้ %{name} heading: แก้ไขการกีดกันบน %{name} - reason: เหตุผลที่ผู้ใช้ %{name} ถูกกีดกัน โปรดอย่าใช้อารมณ์รุนแรงในระหว่างระบุ - และขอให้ระบุรายละเอียดเกี่ยวกับสถานการณ์ที่พบให้ละเอียดชัดเจน จำไว้ว่าข้อความที่ท่านพิมพ์จะปรากฏต่อสาธารณะ - ผู้ใช้ทุกท่านไม่จำต้องเข้าใจถึงศัพท์เฉพาะ จึงขอแนะนำให้ใช้ศัพท์อย่างง่าย - period: ต้องการกีดกันผู้ใช้คนนี้จาก API นับแต่บัดนี้ นานเท่าใด + reason: เหตุผลที่ผู้ใช้ %{name} ถูกระงับ, โปรดอย่าเขียนด้วยอารมณ์รุนแรง โดยขอให้ระบุรายละเอียดเกี่ยวกับสถานการณ์ที่พบให้ละเอียดชัดเจน + และควรใช้คำอธิบายที่เข้าใจง่ายเป็นหลัก เพราะไม่ใช่ว่าผู้ใช้ทุกคนจะเข้าใจศัพท์เฉพาะ + period: ระงับผู้ใช้คนนี้จากการเข้าถึง API, นานเท่าใด โดยเริ่มนับจากปัจจุบัน submit: ปรับปรุงการกีดกัน - show: ดูการกีดกันนี้ + show: ดูรายละเอียดการระงับนี้ back: แสดงการกีดกันทั้งหมด - needs_view: ต้องการให้ผู้ใช้คนนี้เข้าระบบก่อนเพิกถอนการกีดกันหรือไม่? + needs_view: ต้องการให้ผู้ใช้คนนี้เข้าระบบก่อนเพิกถอนการระงับหรือไม่? filter: block_expired: การกีดกันนี้สิ้นผลแล้วแก้ไขไม่ได้ - block_period: ระยะเวลาที่กีดกันต้องเป็นไปตามรายการเลือกในกล่องตัวเลือกเท่านั้น + block_period: ดูระยะเวลาที่ระงับ ให้เป็นหนึ่งในค่าที่เลือกไว้จากรายการนี้ create: - try_contacting: กรุณาติดต่อผู้ใช้ก่อนที่จะกีดกันเขาออกจากระบบ และเผื่อเวลาระยะหนึ่งให้ตอบกลับ + try_contacting: กรุณาติดต่อผู้ใช้คนนั้นก่อนที่จะตัดสินใจสั่งระงับใช้งาน และอย่าลืมเผื่อเวลาระยะหนึ่งให้ตอบกลับ + try_waiting: กรุณาให้เวลากับผู้ใช้ในการตอบคำถาม ก่อนที่ตัดสินเรื่องการสั่งระงับใช้งาน update: + only_creator_can_edit: การระงับนี้สามารถแก้ไขได้ โดยผู้ดูแลที่เป็นผู้สั่งระงับเองเท่านั้น success: ปรับปรุงการกีดกันแล้ว index: - title: การกีดกันผู้ใช้ - heading: รายการการกีดกันผู้ใช้ + title: การระงับผู้ใช้ + heading: รายการการระงับผู้ใช้ empty: ยังไม่มีการกีดกันใด ๆ revoke: - past: การบล็อกนี้ได้สิ้นสุดไปเมื่อ %{time}ก่อนแล้ว การยกเลิกจึงไม่มีผล - flash: ได้ยกเลิกการบล็อกนี้แล้ว + title: ยกเลิกการระงับใช้งานของ %{block_on} + heading: เพิกถอนการระงับผู้ใช้ %{block_on} ซึ่งสั่งโดยผู้ใช้ %{block_by} + past: การระงับนี้ได้สิ้นสุดไปเมื่อ %{time}ก่อนแล้ว การยกเลิกจึงไม่มีผล + confirm: แน่ใจหรือว่าต้องการจะยกเิลิกการระงับนี้? + flash: ได้ยกเลิกการระงับนี้แล้ว helper: time_future: จะสิ้นสุดใน %{time} + until_login: มีผลจนถึงการเริ่มเข้าระบบครั้งถัดไป time_past: สิ้นสุดไปเมื่อ %{time}ก่อน blocks_on: - title: การกีดกันบน %{name} - heading: รายการการกีดกันบน %{name} - empty: '%{name} ยังไม่ได้ถูกกีดกัน' + title: การถูกระงับใช้งานของ %{name} + heading: รายการการถูกระงับของผู้ใช้ %{name} + empty: '%{name} ยังไม่เคยถูกระงับใช้งาน' + blocks_by: + heading: แสดงการสั่งระงับใช้โดย %{name} + empty: '%{name} ไม่เคยได้สั่งระงับผู้ใช้คนใดเลย' show: + heading: '%{block_on} โดนระงับโดย %{block_by}' time_past: สิ้นสุดไปเมื่อ %{time}ก่อน + created: ระงับเมื่อ ago: '%{time}ก่อน' status: สถานะ show: แสดง edit: แก้ไข + reason: 'เหตุผลสำหรับการระงับใช้งาน:' + needs_view: ผู้ใช้ต้องเข้าระบบก่อน การระงับนี้จึงจะถูกเพิกถอน block: + not_revoked: (ไม่ได้มีการยกเลิก) show: แสดง edit: แก้ไข blocks: + display_name: ผู้ใช้ที่ถูกระงับ + creator_name: ผู้สั่งให้ระงับ + reason: เหตุผลที่ต้องระงับใช้งาน status: สถานะ + revoker_name: ยกเลิกโดย showing_page: หน้า %{page} next: ถัดไป » previous: « ก่อนหน้า @@ -2078,6 +2100,7 @@ th: full: เนื้อความเต็มในหมายเหตุ mine: heading: หมายเหตุของ %{user} + creator: ผู้สร้าง ago_html: '%{when}ก่อน' javascripts: close: ปิด diff --git a/lib/classic_pagination/pagination.rb b/lib/classic_pagination/pagination.rb index 811d09239..dbeaf5a40 100644 --- a/lib/classic_pagination/pagination.rb +++ b/lib/classic_pagination/pagination.rb @@ -67,17 +67,17 @@ module ActionController DEFAULT_OPTIONS = { :class_name => nil, :singular_name => nil, - :per_page => 10, + :per_page => 10, :conditions => nil, - :order_by => nil, - :order => nil, - :join => nil, - :joins => nil, - :count => nil, - :include => nil, - :select => nil, - :group => nil, - :parameter => "page" + :order_by => nil, + :order => nil, + :join => nil, + :joins => nil, + :count => nil, + :include => nil, + :select => nil, + :group => nil, + :parameter => "page" }.freeze end diff --git a/lib/diff_reader.rb b/lib/diff_reader.rb index cb553bfbc..e3c533b7a 100644 --- a/lib/diff_reader.rb +++ b/lib/diff_reader.rb @@ -8,8 +8,8 @@ class DiffReader # maps each element type to the model class which handles it MODELS = { - "node" => Node, - "way" => Way, + "node" => Node, + "way" => Way, "relation" => Relation }.freeze diff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake index 53252b769..954acbf22 100644 --- a/lib/tasks/auto_annotate_models.rake +++ b/lib/tasks/auto_annotate_models.rake @@ -6,41 +6,41 @@ if Rails.env.development? # You can override any of these by setting an environment variable of the # same name. Annotate.set_defaults( - "routes" => "false", - "position_in_routes" => "before", - "position_in_class" => "before", - "position_in_test" => "before", - "position_in_fixture" => "before", - "position_in_factory" => "before", - "position_in_serializer" => "before", - "show_foreign_keys" => "true", - "show_indexes" => "true", - "simple_indexes" => "false", - "model_dir" => "app/models", - "root_dir" => "", - "include_version" => "false", - "require" => "", - "exclude_tests" => "true", - "exclude_fixtures" => "true", - "exclude_factories" => "true", - "exclude_serializers" => "true", - "exclude_scaffolds" => "true", - "exclude_controllers" => "true", - "exclude_helpers" => "true", - "ignore_model_sub_dir" => "false", - "ignore_columns" => nil, - "ignore_routes" => nil, - "ignore_unknown_models" => "false", + "routes" => "false", + "position_in_routes" => "before", + "position_in_class" => "before", + "position_in_test" => "before", + "position_in_fixture" => "before", + "position_in_factory" => "before", + "position_in_serializer" => "before", + "show_foreign_keys" => "true", + "show_indexes" => "true", + "simple_indexes" => "false", + "model_dir" => "app/models", + "root_dir" => "", + "include_version" => "false", + "require" => "", + "exclude_tests" => "true", + "exclude_fixtures" => "true", + "exclude_factories" => "true", + "exclude_serializers" => "true", + "exclude_scaffolds" => "true", + "exclude_controllers" => "true", + "exclude_helpers" => "true", + "ignore_model_sub_dir" => "false", + "ignore_columns" => nil, + "ignore_routes" => nil, + "ignore_unknown_models" => "false", "hide_limit_column_types" => "integer,boolean", - "skip_on_db_migrate" => "false", - "format_bare" => "true", - "format_rdoc" => "false", - "format_markdown" => "false", - "sort" => "false", - "force" => "false", - "trace" => "false", - "wrapper_open" => nil, - "wrapper_close" => nil + "skip_on_db_migrate" => "false", + "format_bare" => "true", + "format_rdoc" => "false", + "format_markdown" => "false", + "sort" => "false", + "force" => "false", + "trace" => "false", + "wrapper_open" => nil, + "wrapper_close" => nil ) end diff --git a/test/controllers/amf_controller_test.rb b/test/controllers/amf_controller_test.rb index 0bdd01bd2..650bf1f8e 100644 --- a/test/controllers/amf_controller_test.rb +++ b/test/controllers/amf_controller_test.rb @@ -360,11 +360,11 @@ class AmfControllerTest < ActionController::TestCase # into the method args. def test_getway_old_invalid way_id = create(:way, :with_history, :version => 2).id - { "foo" => "bar", + { "foo" => "bar", way_id => "not a date", way_id => "2009-03-25 00:00:00", # <- wrong format way_id => "0 Jan 2009 00:00:00", # <- invalid date - -1 => "1 Jan 2009 00:00:00" }.each do |id, t| # <- invalid + -1 => "1 Jan 2009 00:00:00" }.each do |id, t| # <- invalid amf_content "getway_old", "/1", [id, t] post :amf_read assert_response :success