]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4439'
authorTom Hughes <tom@compton.nu>
Thu, 28 Dec 2023 18:39:22 +0000 (18:39 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Dec 2023 18:39:22 +0000 (18:39 +0000)
61 files changed:
.rubocop.yml
Gemfile.lock
app/assets/images/key/cyclemap/cycleway.png [deleted file]
app/assets/images/key/cyclemap/footway.svg [deleted file]
app/assets/images/key/cyclemap/motorway12.png [deleted file]
app/assets/images/key/cyclemap/pedestrian.svg [deleted file]
app/assets/images/key/cyclemap/primary12.png [deleted file]
app/assets/images/key/cyclemap/rail.png [deleted file]
app/assets/images/key/cyclemap/rail14.png [deleted file]
app/assets/images/key/cyclemap/secondary12.png [deleted file]
app/assets/images/key/cyclemap/track.png [deleted file]
app/assets/images/key/cyclemap/trunk12.png [deleted file]
app/assets/images/key/mapnik/bridge.svg [deleted file]
app/assets/images/key/mapnik/bridleway.png [deleted file]
app/assets/images/key/mapnik/building15.svg [deleted file]
app/assets/images/key/mapnik/building16.svg [deleted file]
app/assets/images/key/mapnik/cycleway.png [deleted file]
app/assets/images/key/mapnik/footway.png [deleted file]
app/assets/images/key/mapnik/glacier10.svg [deleted file]
app/assets/images/key/mapnik/glacier5.svg [deleted file]
app/assets/images/key/mapnik/motorway.png [deleted file]
app/assets/images/key/mapnik/rail12.svg [deleted file]
app/assets/images/key/mapnik/rail18.svg [deleted file]
app/assets/images/key/mapnik/track.png [deleted file]
app/assets/images/key/mapnik/tram15.svg [deleted file]
app/assets/images/key/mapnik/tunnel.svg [deleted file]
app/assets/images/key/mapnik/unclassified.png [deleted file]
app/assets/images/key/mapnik/unclassified13.png [deleted file]
app/assets/images/key/opnvkarte/main_road11.svg [deleted file]
app/assets/images/key/opnvkarte/main_road13.svg [deleted file]
app/assets/images/key/opnvkarte/main_road15.svg [deleted file]
app/assets/images/key/opnvkarte/main_road17.svg [deleted file]
app/assets/images/key/opnvkarte/motorway13.svg [deleted file]
app/assets/images/key/opnvkarte/motorway15.svg [deleted file]
app/assets/images/key/opnvkarte/motorway17.svg [deleted file]
app/assets/images/key/opnvkarte/motorway8.svg [deleted file]
app/assets/images/key/opnvkarte/rail11.svg [deleted file]
app/assets/images/key/opnvkarte/rail15.svg [deleted file]
app/assets/javascripts/messages.js
app/helpers/svg_helper.rb
app/views/layouts/map.html.erb
app/views/messages/_inbox_count.html.erb [moved from app/views/messages/_message_count.html.erb with 91% similarity]
app/views/messages/_muted_count.html.erb [new file with mode: 0644]
app/views/messages/_outbox_count.html.erb [new file with mode: 0644]
app/views/messages/destroy.json.jbuilder
app/views/messages/inbox.html.erb
app/views/messages/mark.json.jbuilder
app/views/messages/muted.html.erb
app/views/messages/outbox.html.erb
app/views/site/key.html.erb
config/key.yml
config/locales/en.yml
config/locales/fa.yml
config/locales/fr.yml
config/locales/ia.yml
config/locales/skr-arab.yml
config/locales/ta.yml
test/helpers/svg_helper_test.rb [new file with mode: 0644]
test/system/messages_test.rb [new file with mode: 0644]
test/system/oauth2_test.rb [new file with mode: 0644]
yarn.lock

index 97bb72e0ac03fee0bc94c89280bdb14d400f4ee1..1e18afd83581ba0fc47d728032b3ade65f091b1a 100644 (file)
@@ -37,9 +37,6 @@ Metrics/ClassLength:
 Metrics/ModuleLength:
   Max: 150
 
-Minitest/MultipleAssertions:
-  Enabled: false
-
 Naming/FileName:
   Exclude:
     - 'script/deliver-message'
index 29ad5ed310d2e53f25672c4c7709e9dfdd9413e2..96ece492d3854035f35f8bb3982a577bb2666bc6 100644 (file)
@@ -95,8 +95,8 @@ GEM
     autoprefixer-rails (10.4.16.0)
       execjs (~> 2)
     aws-eventstream (1.3.0)
-    aws-partitions (1.869.0)
-    aws-sdk-core (3.190.0)
+    aws-partitions (1.875.0)
+    aws-sdk-core (3.190.1)
       aws-eventstream (~> 1, >= 1.3.0)
       aws-partitions (~> 1, >= 1.651.0)
       aws-sigv4 (~> 1.8)
@@ -104,7 +104,7 @@ GEM
     aws-sdk-kms (1.75.0)
       aws-sdk-core (~> 3, >= 3.188.0)
       aws-sigv4 (~> 1.1)
-    aws-sdk-s3 (1.141.0)
+    aws-sdk-s3 (1.142.0)
       aws-sdk-core (~> 3, >= 3.189.0)
       aws-sdk-kms (~> 1)
       aws-sigv4 (~> 1.8)
@@ -133,7 +133,8 @@ GEM
     bootstrap_form (5.4.0)
       actionpack (>= 6.1)
       activemodel (>= 6.1)
-    brakeman (6.1.0)
+    brakeman (6.1.1)
+      racc
     brotli (0.4.0)
     browser (5.3.1)
     builder (3.2.4)
@@ -228,12 +229,12 @@ GEM
     erubi (1.12.0)
     execjs (2.9.1)
     exifr (1.4.0)
-    factory_bot (6.4.2)
+    factory_bot (6.4.4)
       activesupport (>= 5.0.0)
     factory_bot_rails (6.4.2)
       factory_bot (~> 6.4)
       railties (>= 5.0.0)
-    faraday (2.7.12)
+    faraday (2.8.1)
       base64
       faraday-net_http (>= 2.0, < 3.1)
       ruby2_keywords (>= 0.0.4)
@@ -289,7 +290,7 @@ GEM
     image_size (3.3.0)
     in_threads (1.6.0)
     io-console (0.7.1)
-    irb (1.10.1)
+    irb (1.11.0)
       rdoc
       reline (>= 0.3.8)
     jbuilder (2.11.5)
@@ -335,7 +336,7 @@ GEM
     multi_json (1.15.0)
     multi_xml (0.6.0)
     mutex_m (0.2.0)
-    net-imap (0.4.8)
+    net-imap (0.4.9)
       date
       net-protocol
     net-pop (0.1.2)
@@ -345,7 +346,7 @@ GEM
     net-smtp (0.4.0)
       net-protocol
     nio4r (2.7.0)
-    nokogiri (1.15.5)
+    nokogiri (1.16.0)
       mini_portile2 (~> 2.8.2)
       racc (~> 1.4)
     oauth (0.4.7)
@@ -495,13 +496,13 @@ GEM
       rubocop (~> 1.41)
     rubocop-factory_bot (2.24.0)
       rubocop (~> 1.33)
-    rubocop-minitest (0.34.1)
+    rubocop-minitest (0.34.2)
       rubocop (>= 1.39, < 2.0)
       rubocop-ast (>= 1.30.0, < 2.0)
-    rubocop-performance (1.20.0)
+    rubocop-performance (1.20.1)
       rubocop (>= 1.48.1, < 2.0)
       rubocop-ast (>= 1.30.0, < 2.0)
-    rubocop-rails (2.23.0)
+    rubocop-rails (2.23.1)
       activesupport (>= 4.2.0)
       rack (>= 1.1)
       rubocop (>= 1.33.0, < 2.0)
diff --git a/app/assets/images/key/cyclemap/cycleway.png b/app/assets/images/key/cyclemap/cycleway.png
deleted file mode 100644 (file)
index 13bed4a..0000000
Binary files a/app/assets/images/key/cyclemap/cycleway.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/footway.svg b/app/assets/images/key/cyclemap/footway.svg
deleted file mode 100644 (file)
index ecad174..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='50' height='3'>
-<line x1='-2' x2='52' y1='1.5' y2='1.5' stroke='#bd6d6e' stroke-width='1.5' stroke-dasharray='6 2' />
-</svg>
diff --git a/app/assets/images/key/cyclemap/motorway12.png b/app/assets/images/key/cyclemap/motorway12.png
deleted file mode 100644 (file)
index 749493a..0000000
Binary files a/app/assets/images/key/cyclemap/motorway12.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/pedestrian.svg b/app/assets/images/key/cyclemap/pedestrian.svg
deleted file mode 100644 (file)
index af8fce1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='50' height='4'>
-<rect x='-.5' y='.5' width='51' height='3' fill='#e2e3e2' stroke='#9a9a9a' />
-</svg>
diff --git a/app/assets/images/key/cyclemap/primary12.png b/app/assets/images/key/cyclemap/primary12.png
deleted file mode 100644 (file)
index fed37d0..0000000
Binary files a/app/assets/images/key/cyclemap/primary12.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/rail.png b/app/assets/images/key/cyclemap/rail.png
deleted file mode 100644 (file)
index 0abf0c1..0000000
Binary files a/app/assets/images/key/cyclemap/rail.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/rail14.png b/app/assets/images/key/cyclemap/rail14.png
deleted file mode 100644 (file)
index 957f17c..0000000
Binary files a/app/assets/images/key/cyclemap/rail14.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/secondary12.png b/app/assets/images/key/cyclemap/secondary12.png
deleted file mode 100644 (file)
index cde0085..0000000
Binary files a/app/assets/images/key/cyclemap/secondary12.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/track.png b/app/assets/images/key/cyclemap/track.png
deleted file mode 100644 (file)
index f294edc..0000000
Binary files a/app/assets/images/key/cyclemap/track.png and /dev/null differ
diff --git a/app/assets/images/key/cyclemap/trunk12.png b/app/assets/images/key/cyclemap/trunk12.png
deleted file mode 100644 (file)
index 51230a0..0000000
Binary files a/app/assets/images/key/cyclemap/trunk12.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/bridge.svg b/app/assets/images/key/mapnik/bridge.svg
deleted file mode 100644 (file)
index 4096e81..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='30' height='5' stroke='black'>
-<line y1='0.5' y2='0.5' x2='30' />
-<line y1='4.5' y2='4.5' x2='30' />
-</svg>
diff --git a/app/assets/images/key/mapnik/bridleway.png b/app/assets/images/key/mapnik/bridleway.png
deleted file mode 100644 (file)
index 9aec1ad..0000000
Binary files a/app/assets/images/key/mapnik/bridleway.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/building15.svg b/app/assets/images/key/mapnik/building15.svg
deleted file mode 100644 (file)
index cc05073..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>
-<rect x='.5' y='.5' width='9' height='9' fill='#b9a99c' stroke='#a99a8d' />
-</svg>
diff --git a/app/assets/images/key/mapnik/building16.svg b/app/assets/images/key/mapnik/building16.svg
deleted file mode 100644 (file)
index 6ff2210..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>
-<rect x='.5' y='.5' width='9' height='9' fill='#c4b6ab' stroke='#a99a8d' />
-</svg>
diff --git a/app/assets/images/key/mapnik/cycleway.png b/app/assets/images/key/mapnik/cycleway.png
deleted file mode 100644 (file)
index a1a16f1..0000000
Binary files a/app/assets/images/key/mapnik/cycleway.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/footway.png b/app/assets/images/key/mapnik/footway.png
deleted file mode 100644 (file)
index 4486119..0000000
Binary files a/app/assets/images/key/mapnik/footway.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/glacier10.svg b/app/assets/images/key/mapnik/glacier10.svg
deleted file mode 100644 (file)
index be79f23..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='26' height='10'>
-<rect x='.5' y='.5' width='25' height='9' fill='#ddecec' stroke='#9cf' stroke-dasharray='4 2' />
-</svg>
diff --git a/app/assets/images/key/mapnik/glacier5.svg b/app/assets/images/key/mapnik/glacier5.svg
deleted file mode 100644 (file)
index 8e6d368..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='26' height='10'>
-<rect x='.5' y='.5' width='25' height='9' fill='#ddecec' stroke='#9cf' />
-</svg>
diff --git a/app/assets/images/key/mapnik/motorway.png b/app/assets/images/key/mapnik/motorway.png
deleted file mode 100644 (file)
index 484fc9d..0000000
Binary files a/app/assets/images/key/mapnik/motorway.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/rail12.svg b/app/assets/images/key/mapnik/rail12.svg
deleted file mode 100644 (file)
index 45c76a4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='3'>
-<rect width='100%' height='100%' fill='#707070' />
-<line x2='100%' y1='50%' y2='50%' stroke='white' stroke-dasharray='8' stroke-dashoffset='2' />
-</svg>
diff --git a/app/assets/images/key/mapnik/rail18.svg b/app/assets/images/key/mapnik/rail18.svg
deleted file mode 100644 (file)
index 5094baf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='4'>
-<rect width='100%' height='100%' fill='#707070' />
-<line x2='100%' y1='50%' y2='50%' stroke='white' stroke-dasharray='8' stroke-dashoffset='2' stroke-width='2' />
-</svg>
diff --git a/app/assets/images/key/mapnik/track.png b/app/assets/images/key/mapnik/track.png
deleted file mode 100644 (file)
index f294edc..0000000
Binary files a/app/assets/images/key/mapnik/track.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/tram15.svg b/app/assets/images/key/mapnik/tram15.svg
deleted file mode 100644 (file)
index 8f873f7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='3'>
-<line x2='100%' y1='50%' y2='50%' stroke='#6e6e6e' stroke-width='1.5' />
-</svg>
diff --git a/app/assets/images/key/mapnik/tunnel.svg b/app/assets/images/key/mapnik/tunnel.svg
deleted file mode 100644 (file)
index 05cd7e7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='30' height='5' stroke='grey' stroke-dasharray='4 2' stroke-dashoffset='-1'>
-<line y1='0.5' y2='0.5' x2='30' />
-<line y1='4.5' y2='4.5' x2='30' />
-</svg>
diff --git a/app/assets/images/key/mapnik/unclassified.png b/app/assets/images/key/mapnik/unclassified.png
deleted file mode 100644 (file)
index 3cdfb2d..0000000
Binary files a/app/assets/images/key/mapnik/unclassified.png and /dev/null differ
diff --git a/app/assets/images/key/mapnik/unclassified13.png b/app/assets/images/key/mapnik/unclassified13.png
deleted file mode 100644 (file)
index 1a87924..0000000
Binary files a/app/assets/images/key/mapnik/unclassified13.png and /dev/null differ
diff --git a/app/assets/images/key/opnvkarte/main_road11.svg b/app/assets/images/key/opnvkarte/main_road11.svg
deleted file mode 100644 (file)
index b03c744..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='4'>
-<rect x='-.5' y='.5' width='53' height='3' fill='#dddddd' stroke='#a1968b' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/main_road13.svg b/app/assets/images/key/opnvkarte/main_road13.svg
deleted file mode 100644 (file)
index 2d59022..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='8'>
-<rect x='-.5' y='.5' width='53' height='7' fill='#dddddd' stroke='#a1968b' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/main_road15.svg b/app/assets/images/key/opnvkarte/main_road15.svg
deleted file mode 100644 (file)
index cb53916..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='13'>
-<rect x='-.5' y='.5' width='53' height='12' fill='#dddddd' stroke='#a1968b' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/main_road17.svg b/app/assets/images/key/opnvkarte/main_road17.svg
deleted file mode 100644 (file)
index de7db0f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='17'>
-<rect x='-.5' y='.5' width='53' height='16' fill='#dddddd' stroke='#a1968b' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/motorway13.svg b/app/assets/images/key/opnvkarte/motorway13.svg
deleted file mode 100644 (file)
index c44e777..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='8'>
-<rect x='-.5' y='.5' width='53' height='7' fill='#dddddd' stroke='#6d6d6d' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/motorway15.svg b/app/assets/images/key/opnvkarte/motorway15.svg
deleted file mode 100644 (file)
index c217bb2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='13'>
-<rect x='-.5' y='.5' width='53' height='12' fill='#dddddd' stroke='#6d6d6d' />
-<line x1='-4' x2='60' y1='6.5' y2='6.5' stroke='#ffffff' stroke-dasharray='12' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/motorway17.svg b/app/assets/images/key/opnvkarte/motorway17.svg
deleted file mode 100644 (file)
index 36b37db..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='17'>
-<rect x='-1' y='1' width='54' height='15' fill='#dddddd' stroke='#6d6d6d' stroke-width='2' />
-<line x1='-4' x2='60' y1='8.5' y2='8.5' stroke='#ffffff' stroke-dasharray='12' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/motorway8.svg b/app/assets/images/key/opnvkarte/motorway8.svg
deleted file mode 100644 (file)
index 21f006c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='4'>
-<rect x='-.5' y='.5' width='53' height='3' fill='#dddddd' stroke='#6d6d6d' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/rail11.svg b/app/assets/images/key/opnvkarte/rail11.svg
deleted file mode 100644 (file)
index 849f5cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='3'>
-<rect width='100%' height='100%' fill='#868686' />
-<line x2='100%' y1='50%' y2='50%' stroke='#eeeeee' stroke-dasharray='10 10' stroke-dashoffset='9' />
-</svg>
diff --git a/app/assets/images/key/opnvkarte/rail15.svg b/app/assets/images/key/opnvkarte/rail15.svg
deleted file mode 100644 (file)
index efe7792..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg xmlns='http://www.w3.org/2000/svg' width='52' height='4'>
-<rect width='100%' height='100%' fill='#868686' />
-<line x2='100%' y1='50%' y2='50%' stroke='#eeeeee' stroke-dasharray='10 10' stroke-dashoffset='9' stroke-width='2' />
-</svg>
index 5accc1a6036fb94ec958eaf8f5c803832ecf3c09..cc86da05ea38365abaaa39a75f7dd25f94007dc6 100644 (file)
@@ -22,6 +22,8 @@ $(document).ready(function () {
     $(".user-button").before(data.inboxanchor);
 
     $("#inbox-count").replaceWith(data.inbox_count);
+    $("#outbox-count").replaceWith(data.outbox_count);
+    $("#muted-count").replaceWith(data.muted_count);
   }
 
   function updateReadState(target, isRead) {
index abb512f0d3c60cba5eae288cf03d1b4a77fce1bc..a40fa7086fdf0d1db0a752b99896f8e71f63e7b4 100644 (file)
@@ -1,7 +1,37 @@
 module SvgHelper
-  def solid_svg_tag(width, height, fill, **options)
-    tag.svg :width => width, :height => height, **options do
-      tag.rect :width => "100%", :height => "100%", :fill => fill
+  def key_svg_tag(**options)
+    border_width = options["border"] ? (options["border-width"] || 1) : 0
+    rect_attrs = {
+      :width => "100%",
+      :height => "100%",
+      :fill => options["fill"] || "none"
+    }
+    if border_width.positive?
+      rect_attrs[:x] = rect_attrs[:y] = format("%g", 0.5 * border_width)
+      rect_attrs[:width] = options["width"] - border_width
+      rect_attrs[:height] = options["height"] - border_width
     end
+    svg_attrs = options.slice("width", "height", "opacity", :class)
+
+    tag.svg(**svg_attrs) do
+      horizontal = "H#{options['width']}"
+      concat tag.rect(**rect_attrs, **stroke_attrs(options, "border")) if options["fill"] || options["border"]
+      if options["line"]
+        y_middle = format("%g", 0.5 * options["height"])
+        concat tag.path(:d => "M0,#{y_middle} #{horizontal}", **stroke_attrs(options, "line"))
+      end
+      if options["casing"]
+        casing_width = options["casing-width"] || 1
+        y_top = format("%g", 0.5 * casing_width)
+        y_bottom = format("%g", options["height"] - (0.5 * casing_width))
+        concat tag.path(:d => "M0,#{y_top} #{horizontal} M0,#{y_bottom} #{horizontal}", **stroke_attrs(options, "casing"))
+      end
+    end
+  end
+
+  private
+
+  def stroke_attrs(attrs, prefix)
+    attrs.select { |key| key.start_with?(prefix) }.transform_keys { |key| key.delete_prefix(prefix).prepend("stroke") }
   end
 end
index 55066f25f227e1bee738d23f7763c0895d1d298e..f6a7473a4f6f777d3977a4c4026a19de0efbb12d 100644 (file)
                                        :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
                                        :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
         </p>
-        <div class="d-flex mx-n1">
-          <div class="w-50 px-1">
-            <a class="btn btn-primary w-100" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
-          </div>
-          <div class="w-50 px-1">
-            <a class="btn btn-primary w-100" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
-          </div>
+        <div class="d-flex gap-2">
+          <a class="btn btn-primary w-100 d-flex align-items-center justify-content-center" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
+          <a class="btn btn-primary w-100 d-flex align-items-center justify-content-center" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
         </div>
       </div>
     <% end %>
similarity index 91%
rename from app/views/messages/_message_count.html.erb
rename to app/views/messages/_inbox_count.html.erb
index 33a3b52f3917c400cb1bedbe16e44de4692e66ba..86bb2c474d8bf005e290ce7a5e80a47d3d31ad3d 100644 (file)
@@ -1,7 +1,7 @@
-<p id="inbox-count">
+<h4 id="inbox-count">
 <%= t "messages.inbox.messages",
       :new_messages => t("messages.inbox.new_messages",
                          :count => current_user.new_messages.size),
       :old_messages => t("messages.inbox.old_messages",
                          :count => current_user.messages.size - current_user.new_messages.size) %>
-</p>
+</h4>
diff --git a/app/views/messages/_muted_count.html.erb b/app/views/messages/_muted_count.html.erb
new file mode 100644 (file)
index 0000000..207973d
--- /dev/null
@@ -0,0 +1,3 @@
+<h4 id="muted-count">
+<%= t "messages.muted.messages", :count => current_user.muted_messages.size %>
+</h4>
diff --git a/app/views/messages/_outbox_count.html.erb b/app/views/messages/_outbox_count.html.erb
new file mode 100644 (file)
index 0000000..5b27f1d
--- /dev/null
@@ -0,0 +1,3 @@
+<h4 id="outbox-count">
+<%= t "messages.outbox.messages", :count => current_user.sent_messages.size %>
+</h4>
index 3403ac888e27210467629afc2dba0532c98e4c64..65bfd6a6b70a97d9c5e06107d0ee076ea4e86931 100644 (file)
@@ -1,2 +1,4 @@
 json.inboxanchor render(:partial => "layouts/inbox")
-json.inbox_count render(:partial => "message_count")
+json.inbox_count render(:partial => "inbox_count")
+json.outbox_count render(:partial => "outbox_count")
+json.muted_count render(:partial => "muted_count")
index db807d2dfc732fd744335abf2234eb29ccd13dff..4d6be787b93fa5866404c8fc5721afe505382a12 100644 (file)
@@ -4,7 +4,7 @@
 
 <%= render :partial => "heading", :locals => { :active_link_path => inbox_messages_path } %>
 
-<h4><%= render :partial => "message_count" %></h4>
+<%= render :partial => "inbox_count" %>
 
 <% if current_user.messages.size > 0 %>
   <%= render :partial => "messages_table", :locals => { :columns => %w[from subject date], :messages => current_user.messages, :inner_partial => "message_summary" } %>
index 3403ac888e27210467629afc2dba0532c98e4c64..65bfd6a6b70a97d9c5e06107d0ee076ea4e86931 100644 (file)
@@ -1,2 +1,4 @@
 json.inboxanchor render(:partial => "layouts/inbox")
-json.inbox_count render(:partial => "message_count")
+json.inbox_count render(:partial => "inbox_count")
+json.outbox_count render(:partial => "outbox_count")
+json.muted_count render(:partial => "muted_count")
index 40c74e915762cb918a76233ff6faec6943528cdd..8e97abc7f2ff701d4cd9f67d266856cf7d36bc49 100644 (file)
@@ -4,6 +4,6 @@
 
 <%= render :partial => "heading", :locals => { :active_link_path => muted_messages_path } %>
 
-<h4><%= t ".messages", :count => current_user.muted_messages.size %></h4>
+<%= render :partial => "muted_count" %>
 
 <%= render :partial => "messages_table", :locals => { :columns => %w[from subject date], :messages => current_user.muted_messages, :inner_partial => "message_summary" } %>
index ae8a899c484850b7ab6ec52cc3425dc57a38be9e..65fbaf3261c818aa79613e6b6a3c6b546b69a9b3 100644 (file)
@@ -4,7 +4,7 @@
 
 <%= render :partial => "heading", :locals => { :active_link_path => outbox_messages_path } %>
 
-<h4><%= t ".messages", :count => current_user.sent_messages.size %></h4>
+<%= render :partial => "outbox_count" %>
 
 <% if current_user.sent_messages.size > 0 %>
   <%= render :partial => "messages_table", :locals => { :columns => %w[to subject date], :messages => current_user.sent_messages, :inner_partial => "sent_message_summary" } %>
index 28e364685db67ea15928c1331d6ed1ce10eb8040..82105097e7b409eaffc16f7e1a9bb8f5e25f2784 100644 (file)
@@ -4,10 +4,10 @@
       <% layer_data.each do |entry| %>
         <%= tag.tr :class => "mapkey-table-entry", :data => { :layer => layer_name, :zoom_min => entry["min_zoom"], :zoom_max => entry["max_zoom"] } do %>
           <td>
-            <% if entry["width"] && entry["height"] && entry["fill"] %>
-              <%= solid_svg_tag entry["width"], entry["height"], entry["fill"], :class => "d-block mx-auto" %>
-            <% else %>
+            <% if entry["image"] %>
               <%= image_tag "key/#{layer_name}/#{entry['image']}", :class => "d-block mx-auto" %>
+            <% else %>
+              <%= key_svg_tag :class => "d-block mx-auto", **entry %>
             <% end %>
           </td>
           <td>
index d7d4017b12936bb4d85ab498867c349c5fdad6eb..5341245e5b1128078b7e761dff04a14b36ea244f 100644 (file)
@@ -1,24 +1,24 @@
 mapnik:
   # transportation: roads.mss
-  - { min_zoom:  6, name: motorway, image: motorway.png }
+  - { min_zoom:  6, name: motorway, width: 52, height: 5, fill: "#e892a2", casing: "#dc2a67" }
   - { min_zoom:  6, name: main_road, image: mainroad.png }
   - { min_zoom:  8, name: main_road, image: mainroad8.png }
   - { min_zoom: 12, name: main_road, image: mainroad12.png }
-  - { min_zoom: 13, name: track, image: track.png }
-  - { min_zoom: 13, name: bridleway, image: bridleway.png }
-  - { min_zoom: 13, name: cycleway, image: cycleway.png }
-  - { min_zoom: 13, name: footway, image: footway.png }
+  - { min_zoom: 13, name: track, width: 52, height: 3, opacity: .8, line: "#996600", line-width: 1.5, line-dasharray: "6 5" }
+  - { min_zoom: 13, name: bridleway, width: 52, height: 3, line: green, line-width: 1.25, line-dasharray: "4 2" }
+  - { min_zoom: 13, name: cycleway, width: 52, height: 1, line: blue, line-dasharray: "3 3.5" }
+  - { min_zoom: 13, name: footway, width: 52, height: 3, line: salmon, line-width: 1.3, line-dasharray: "3 3.5" }
   - { min_zoom:  8, name: rail, width: 52, height: 1, fill: "#787878" }
-  - { min_zoom: 12, name: rail, image: rail12.svg }
-  - { min_zoom: 18, name: rail, image: rail18.svg }
+  - { min_zoom: 12, name: rail, width: 52, height: 3, fill: "#707070", line: white, line-dasharray: 8, line-dashoffset: 2 }
+  - { min_zoom: 18, name: rail, width: 52, height: 4, fill: "#707070", line: white, line-dasharray: 8, line-dashoffset: 2, line-width: 2 }
   - { min_zoom: 12, name: subway, width: 52, height: 2, fill: "#999" }
   - { min_zoom:  8, name: light_rail, width: 52, height: 1, fill: "#ccc" }
   - { min_zoom: 10, name: light_rail, width: 52, height: 1, fill: "#aaa" }
   - { min_zoom: 13, name: light_rail, width: 52, height: 2, fill: "#666" }
-  - { min_zoom: 12, name: tram_only, width: 52, height: 1, fill: "#6e6e6eaa" }
-  - { min_zoom: 14, name: tram_only, width: 52, height: 1, fill: "#6e6e6e" }
-  - { min_zoom: 15, name: tram_only, image: tram15.svg }
-  - { min_zoom: 17, name: tram_only, width: 52, height: 2, fill: "#6e6e6e" }
+  - { min_zoom: 12, name: tram_only, width: 52, height: 1, line: "#6e6e6e", line-width: 0.75 }
+  - { min_zoom: 14, name: tram_only, width: 52, height: 3, line: "#6e6e6e", line-width: 1 }
+  - { min_zoom: 15, name: tram_only, width: 52, height: 3, line: "#6e6e6e", line-width: 1.5 }
+  - { min_zoom: 17, name: tram_only, width: 52, height: 2, line: "#6e6e6e", line-width: 2 }
   - { min_zoom: 12, name: [cable_car, chair_lift], image: cable.png }
   - { min_zoom: 11, name: [runway_only, taxiway], image: runway11.svg }
   - { min_zoom: 12, name: [runway_only, taxiway], image: runway12.svg }
@@ -30,8 +30,8 @@ mapnik:
   # landcover z5: landcover.mss, water.mss
   - { name: [lake_only, reservoir], width: 26, height: 10, fill: "#aad3df" }
   - { name: intermittent_water, image: intermittent_water.svg }
-  - { min_zoom:  5, name: glacier, image: glacier5.svg }
-  - { min_zoom: 10, name: glacier, image: glacier10.svg }
+  - { min_zoom:  5, name: glacier, width: 26, height: 10, fill: "#ddecec", border: "#9cf" }
+  - { min_zoom: 10, name: glacier, width: 26, height: 10, fill: "#ddecec", border: "#9cf", border-dasharray: "4 2" }
   - { min_zoom: 10, name: reef, image: reef.png }
   - { min_zoom: 10, name: wetland, image: wetland.png }
   - { min_zoom:  5, name: [forest_only, wood], width: 26, height: 10, fill: "#bddab1" }
@@ -74,40 +74,42 @@ mapnik:
   - { min_zoom: 13, name: [school_only, university, hospital], image: school.svg }
   # buildings: buildings.mss
   - { min_zoom: 14, name: building, width: 10, height: 10, fill: "#ab9793" }
-  - { min_zoom: 15, name: building, image: building15.svg }
-  - { min_zoom: 16, name: building, image: building16.svg }
+  - { min_zoom: 15, name: building, width: 10, height: 10, fill: "#b9a99c", border: "#a99a8d" }
+  - { min_zoom: 16, name: building, width: 10, height: 10, fill: "#c4b6ab", border: "#a99a8d" }
   # stations: stations.mss
   - { min_zoom: 12, name: station, width: 4, height: 4, fill: "#7981b0" }
   - { min_zoom: 13, name: station, width: 6, height: 6, fill: "#7981b0" }
   - { min_zoom: 15, name: station, width: 9, height: 9, fill: "#7981b0" }
   # other
   - { min_zoom: 11, name: [summit_only, peak], image: summit.svg } # amenity-points.mss
-  - { min_zoom: 13, name: tunnel, image: tunnel.svg } # roads.mss
-  - { min_zoom: 13, name: bridge, image: bridge.svg } # roads.mss
+  - { min_zoom: 13, name: tunnel, width: 50, height: 5, casing: grey, casing-dasharray: "4 2", casing-dashoffset: 1 } # roads.mss
+  - { min_zoom: 13, name: bridge, width: 50, height: 5, casing: black } # roads.mss
   - { min_zoom: 15, name: private, image: private.png }
   - { min_zoom: 15, name: destination, image: destination.png }
   - { min_zoom: 12, name: construction, image: construction.png }
 cyclemap:
   - { min_zoom:  5, name: motorway, width: 50, height: 3, fill: "#9a9ab1" }
-  - { min_zoom: 12, name: motorway, image: motorway12.png }
+  - { min_zoom: 12, name: motorway, width: 50, height: 5, fill: "#bdbece", casing: "#8d95a7" }
   - { min_zoom:  6, name: trunk, width: 50, height: 2, fill: "#c8d8c8" }
-  - { min_zoom: 12, name: trunk, image: trunk12.png }
+  - { min_zoom: 12, name: trunk, width: 50, height: 5, fill: "#c8d8c8", casing: "#abb5a4" }
   - { min_zoom:  8, name: primary, width: 50, height: 2, fill: "#d8c8c8" }
-  - { min_zoom: 12, name: primary, image: primary12.png }
+  - { min_zoom: 12, name: primary, width: 50, height: 4, fill: "#f0e3e3", casing: "#d4b6b7" }
   - { min_zoom: 10, name: secondary, width: 50, height: 1, fill: "#dadacc" }
-  - { min_zoom: 12, name: secondary, image: secondary12.png }
-  - { min_zoom: 15, name: pedestrian, image: pedestrian.svg }
-  - { min_zoom: 13, name: track, image: track.png }
-  - { min_zoom:  8, name: cycleway, image: cycleway.png }
+  - { min_zoom: 12, name: secondary, width: 50, height: 4, fill: "#ededc8", casing: "#c8b48a" }
+  - { min_zoom: 15, name: pedestrian, width: 50, height: 4, fill: "#e2e3e2", casing: "#9a9a9a" }
+  - { min_zoom: 13, name: track, width: 50, height: 3, fill: white, casing: "#999", casing-dasharray: "5 3", casing-dashoffset: 1 }
+  - { min_zoom: 15, name: track, width: 50, height: 4, fill: white, casing: "#999", casing-dasharray: "5 3", casing-dashoffset: 1 }
+  - { min_zoom: 17, name: track, width: 50, height: 5, fill: white, casing: "#999", casing-dasharray: "5 3", casing-dashoffset: 1 }
+  - { min_zoom:  8, name: cycleway, width: 50, height: 3, line: "#0100fe", line-width: 1.5, line-dasharray: "6 2" }
   - { min_zoom:  5, name: cycleway_national, width: 50, height: 2, fill: "#fe0000" }
   - { min_zoom: 13, name: cycleway_national, width: 50, height: 4, fill: "#ffb3b3" }
   - { min_zoom:  7, name: cycleway_regional, width: 50, height: 2, fill: "#b638fb" }
   - { min_zoom: 13, name: cycleway_regional, width: 50, height: 4, fill: "#ddb5d9" }
   - { min_zoom:  8, name: cycleway_local, width: 50, height: 2, fill: "#0100fe" }
   - { min_zoom: 13, name: cycleway_local, width: 50, height: 4, fill: "#b2b2ff" }
-  - { min_zoom: 13, name: footway, image: footway.svg }
-  - { min_zoom:  7, name: rail, image: rail.png }
-  - { min_zoom: 14, name: rail, image: rail14.png }
+  - { min_zoom: 13, name: footway, width: 50, height: 3, line: "#bd6d6e", line-width: 1.5, line-dasharray: "6 2" }
+  - { min_zoom:  7, name: rail, width: 50, height: 3, line: "#999999", line-width: 1.5 }
+  - { min_zoom: 14, name: rail, width: 50, height: 4, fill: "#999999", line: white, line-dasharray: 4, line-width: 2 }
   - { min_zoom:  1, name: [lake_only, reservoir], width: 26, height: 10, fill: "#addeff" }
   - { min_zoom:  9, name: [forest_only, wood], width: 26, height: 10, fill: "#b3d6a4" }
   - { min_zoom: 10, name: meadow, width: 26, height: 10, fill: "#c0de9c" }
@@ -119,8 +121,8 @@ cyclemap:
 opnvkarte:
   - { min_zoom:  6, name: rail, width: 52, height: 1, fill: "#868686" }
   - { min_zoom:  8, name: rail, width: 52, height: 2, fill: "#868686" }
-  - { min_zoom: 11, name: rail, image: rail11.svg }
-  - { min_zoom: 15, name: rail, image: rail15.svg }
+  - { min_zoom: 11, name: rail, width: 52, height: 3, fill: "#868686", line: "#eeeeee", line-dasharray: 10, line-dashoffset: 9 }
+  - { min_zoom: 15, name: rail, width: 52, height: 4, fill: "#868686", line: "#eeeeee", line-dasharray: 10, line-dashoffset: 9, line-width: 2 }
   - { min_zoom: 17, name: rail, image: rail17.svg }
   - { min_zoom:  6, name: train, width: 52, height:  2, fill: "#ffc366" }
   - { min_zoom: 10, name: train, width: 52, height:  3, fill: "#ffc366" }
@@ -154,15 +156,15 @@ opnvkarte:
   - { min_zoom: 15, name: bus_stop, image: bus_stop15.svg }
   - { min_zoom: 13, name: stop, image: stop13.svg }
   - { min_zoom: 15, name: stop, image: stop15.svg }
-  - { min_zoom:  8, name: motorway, image: motorway8.svg }
-  - { min_zoom: 13, name: motorway, image: motorway13.svg }
-  - { min_zoom: 15, name: motorway, image: motorway15.svg }
-  - { min_zoom: 17, name: motorway, image: motorway17.svg }
-  - { min_zoom:  8, name: main_road, width: 52, height: 1, fill: "#5c6d6d88" }
-  - { min_zoom: 11, name: main_road, image: main_road11.svg }
-  - { min_zoom: 13, name: main_road, image: main_road13.svg }
-  - { min_zoom: 15, name: main_road, image: main_road15.svg }
-  - { min_zoom: 17, name: main_road, image: main_road17.svg }
+  - { min_zoom:  8, name: motorway, width: 52, height:  4, fill: "#dddddd", casing: "#6d6d6d" }
+  - { min_zoom: 13, name: motorway, width: 52, height:  8, fill: "#dddddd", casing: "#6d6d6d" }
+  - { min_zoom: 15, name: motorway, width: 52, height: 13, fill: "#dddddd", casing: "#6d6d6d", line: "#ffffff", line-dasharray: 12, line-dashoffset: 4 }
+  - { min_zoom: 17, name: motorway, width: 52, height: 17, fill: "#dddddd", casing: "#6d6d6d", line: "#ffffff", line-dasharray: 12, line-dashoffset: 4, casing-width: 2 }
+  - { min_zoom:  8, name: main_road, width: 52, height:  1, fill: "#5c6d6d88" }
+  - { min_zoom: 11, name: main_road, width: 52, height:  4, fill: "#dddddd", casing: "#a1968b" }
+  - { min_zoom: 13, name: main_road, width: 52, height:  8, fill: "#dddddd", casing: "#a1968b" }
+  - { min_zoom: 15, name: main_road, width: 52, height: 13, fill: "#dddddd", casing: "#a1968b" }
+  - { min_zoom: 17, name: main_road, width: 52, height: 17, fill: "#dddddd", casing: "#a1968b" }
   # landcover
   - { min_zoom:  0, name: [lake_only, reservoir], width: 26, height: 10, fill: "#a1cbea" }
   - { min_zoom:  8, name: [lake_only, reservoir], width: 26, height: 10, fill: "#bfd3ef" }
index fa10f018f8de2283a1e212cc09123a936eda738b..14e9b5c442373e6e0f39b0999011c259ffa6b3cc 100644 (file)
@@ -2683,6 +2683,7 @@ en:
       application: "Application"
       permissions: "Permissions"
       no_applications_html: "You have not yet authorized any %{oauth2} applications."
+      oauth_2: "OAuth 2"
     application:
       revoke: "Revoke Access"
       confirm_revoke: "Revoke access for this application?"
index 1caa4e7dec09b01c3a0ab42e8ed6b0d3129780f6..0db0ee2ce85142ade2685466c521b669a587a69c 100644 (file)
@@ -1812,6 +1812,7 @@ fa:
       no home location: شما محل خانهٔ خودتان را وارد نکرده‌اید.
       update home location on click: وقتی روی نقشه کلیک می‌کنم موقعیت خانه روزآمد
         شود.
+      delete: حذف
     update:
       success: نمایه ذخیره شد.
       failure: ذخیره‌سازی نمایه انجام نشد.
index 9db11fabb752e6be061971f532d1127f138c8155..56a0ce9fca77998aa63071dc01c03dfd4bde9e5a 100644 (file)
@@ -2,6 +2,7 @@
 # Exported from translatewiki.net
 # Export driver: phpyaml
 # Author: 0x010C
+# Author: 2NumForIce
 # Author: Adriendelucca
 # Author: Ajeje Brazorf
 # Author: Alno
@@ -137,6 +138,11 @@ fr:
       messages:
         invalid_email_address: ne semble pas être une adresse de courriel valide
         email_address_not_routable: n’est pas routable
+      models:
+        user_mute:
+          attributes:
+            subject:
+              format: '%{message}'
     models:
       acl: Liste de contrôle d’accès
       changeset: Groupe de modifications
@@ -2526,7 +2532,7 @@ fr:
           military: Zone militaire
           school_only: École
           university: université
-          hospital: hôpital
+          hospital: Hôpital
           building: Bâtiment important
           station: Gare ferroviaire
           summit_only: Sommet
@@ -2537,7 +2543,7 @@ fr:
           destination: Accès réservé aux riverains
           construction: Routes en construction
           bus_stop: Arrêt de bus
-          stop: Arrêt
+          stop: Arrêter
           bicycle_shop: Magasin de vélos
           bicycle_parking: Parking à vélos
           toilets: Toilettes
index 5a5bb722a37dca3edd7c636db54d3828e0f3ea24..ac7a08dbca5edd1545a859203b6e2d9ff9ad4817 100644 (file)
@@ -2341,16 +2341,16 @@ ia:
           cable_car: Telepherico
           chair_lift: Telesedia
           runway_only: Pista de aeroporto
-          taxiway: via de circulation pro aviones
+          taxiway: Via de circulation pro aviones
           apron_only: Platteforma pro aviones
           admin: Limite administrative
           orchard_only: Verdiero
-          vineyard: vinia
+          vineyard: Vinia
           forest_only: Foreste
-          wood: bosco
+          wood: Bosco
           farmland: Terra agricole
           grass_only: Herba
-          meadow: prato
+          meadow: Prato
           bare_rock: Rocca nude
           sand: Sablo
           golf: Percurso de golf
@@ -2364,7 +2364,7 @@ ia:
           heathland: Landa
           scrubland: Terreno de brossas
           lake_only: Laco
-          reservoir: bassino
+          reservoir: Reservoir
           intermittent_water: Massa de aqua intermittente
           glacier: Glaciero
           reef: Scolio
@@ -2378,12 +2378,12 @@ ia:
           reserve: Reserva natural
           military: Area militar
           school_only: Schola
-          university: universitate
-          hospital: hospital
+          university: Universitate
+          hospital: Hospital
           building: Edificio significante
           station: Station ferroviari
           summit_only: Summitate
-          peak: picco
+          peak: Picco
           tunnel: Bordo a lineettas = tunnel
           bridge: Bordo nigre = ponte
           private: Accesso private
index 4bd17ca3c032273e787a6c4b3a51012d7285e520..b27491ed16e8eced1e97ff6cc8c0af6b674561b4 100644 (file)
@@ -1054,6 +1054,7 @@ skr-arab:
       back_to_inbox: انباکس تے واپس
     outbox:
       title: آؤٹ باکس
+      actions: عمل
     show:
       title: سنیہا پڑھو
       reply_button: جواب
@@ -1219,6 +1220,7 @@ skr-arab:
           bus: بس
           cable_car: کیبل کار
           chair_lift: چیئر لفٹ
+          taxiway: ٹیکسی دا راہ
           orchard_only: بغیچا
           forest_only: جنگل
           wood: لکڑ
@@ -1238,6 +1240,7 @@ skr-arab:
           university: یونی ورسٹی
           hospital: ہسپتال
           station: ریلوے ٹیشݨ
+          peak: چوٹی
           bus_stop: بساں دا اݙا
           stop: اݙہ
     welcome:
index 85e7d5faf78b6b1859e01c227b3f87fe4cc1070c..680773e892e91f7b20d3253d42f0e584b4852e69 100644 (file)
@@ -53,6 +53,12 @@ ta:
       messages:
         invalid_email_address: செல்லுபடியாகும் மின்னஞ்சல் முகவரியாகத் தெரியவில்லை
         email_address_not_routable: திசைதிருப்பக்கூடியது அல்ல
+      models:
+        user_mute:
+          attributes:
+            subject:
+              format: '%{message}'
+          is_already_muted: ஏற்கனவே மௌனிக்கப்பட்டுள்ளார்
     models:
       acl: அனுமதிக் கட்டுப்பாட்டுப் பட்டியல்
       changeset: மாற்றங்கள்
@@ -597,14 +603,16 @@ ta:
       from: 'அனுப்புநர்:'
       subject: பொருள்
       date: நாள்
+      actions: செயல்கள்
     message_summary:
       unread_button: வாசிக்கப்படாததாக என குறியிடு
       read_button: வாசித்ததாக குறியிடு
       reply_button: பதிலளி
       destroy_button: நீக்கு
+      unmute_button: வருமஞ்சலுக்கு நகர்த்து
     new:
-      title: à®¤à®\95வலà¯\8d à®\85னà¯\81பà¯\8dபà¯\81
-      send_message_to_html: '%{name} à®\95à¯\8dà®\95à¯\81 à®ªà¯\81திய à®¤à®\95வலà¯\8d அனுப்பு'
+      title: தகவலனுப்பு
+      send_message_to_html: '%{name} à®\8eனà¯\8dபவரà¯\81à®\95à¯\8dà®\95à¯\81 à®\92à®°à¯\81 à®ªà¯\81திய à®¤à®\95வலà¯\88 அனுப்பு'
       back_to_inbox: உள்பெட்டிக்கு திரும்பவும்
     create:
       message_sent: செய்தி அனுப்பப்பட்டுவிட்டது
@@ -613,6 +621,12 @@ ta:
       heading: அப்படியொரு தகவல் இல்லை
     outbox:
       title: அனுப்பியவை
+      actions: செயல்கள்
+    muted:
+      title: மௌனித்த தகவல்கள்
+      messages:
+        one: '%{count} மௌனித்த தகவல்'
+        other: உமக்கு %{count} மௌனித்த தகவல்கள் உள்ளன
     show:
       title: தகவலை வாசிக்கவும்
       reply_button: பதிலளி
@@ -620,6 +634,10 @@ ta:
       destroy_button: நீக்கு
     sent_message_summary:
       destroy_button: நீக்கு
+    heading:
+      muted_messages: மௌனித்த தகவல்கள்
+    unmute:
+      notice: தகவல் வருமஞ்சலுக்கு நகர்த்தப்பட்டுள்ளது
     destroy:
       destroyed: தகவல் நீக்கப்பட்டது
   passwords:
@@ -692,23 +710,33 @@ ta:
           secondary: இரண்டாம் நிலை சாலை
           unclassified: வகைப்படுத்தாத சாலை
           rail: இரயில்வே
+          vineyard: திராட்சைத் தோட்டம்
           forest_only: காடு
           wood: விறகு
+          farmland: பண்ணை நிலம்
+          meadow: புல்வெளி
+          bare_rock: வெற்றுப் பாறை
+          sand: மணல்
           park: பூங்கா
           common_only: பொதுவான
+          built_up: கட்டடப் பகுதி
           industrial: தொழிற்சாலை பகுதி
           commercial: வணிக பகுதி
+          scrubland: புதர் நிலம்
           lake_only: ஏரி
-          reservoir: நீர்த்தேக்கம்
+          reservoir: நீர்நிலை
+          glacier: பனிப்பாறை
+          wetland: ஈரநிலம்
           farm: பண்ணை
           centre: விளையாட்டு மையம்
           military: ராணுவ பகுதி
           school_only: பள்ளி
           university: பல்கலைக்கழகம்
+          hospital: மருத்துவமனை
           building: குறிப்பிடத்தக்க கட்டிடம்
           station: தொடர்வண்டி நிலையம்
           summit_only: உச்சி மாநாடு
-          peak: à®\89யரமான à®\87à®\9fà®®à¯\8d
+          peak: à®\89à®\9aà¯\8dà®\9aி
           private: தனியார் அனுமதி
           construction: சாலைகளில்  கட்டுமானப் பணிகள் நடந்து வருகின்றன.
           toilets: கழிவறைகள்
@@ -750,6 +778,9 @@ ta:
       in: உள்
     index:
       upload_trace: சுவடை பதிவேற்றவும்
+  application:
+    settings_menu:
+      muted_users: மௌனித்த பயனர்கள்
   oauth_clients:
     show:
       edit: தொகுப்பு விவரங்கள்
@@ -772,6 +803,8 @@ ta:
       my diary: எனது நாட்குறிப்பேடு
       my edits: என் திருத்தங்கள்
       my settings: என் அமைப்புகள்
+      create_mute: இப்பயனரை மௌனி
+      destroy_mute: இப்பயனரை ஓசையாக்கு
       diary: நாட்குறிப்பேடு
       edits: தொகுப்புகள்
       add as friend: நண்பராக சேர்
@@ -824,6 +857,25 @@ ta:
       display_name: தடைசெய்யப்பட்ட பயனர்
       creator_name: உருவாக்கியவர்
       status: நிலை
+  user_mutes:
+    index:
+      title: மௌனித்த பயனர்கள்
+      my_muted_users: எனது மௌனிக்கப்பட்ட பயனர்கள்
+      you_have_muted_n_users:
+        one: நீர் %{count} பயனரை மௌனித்துள்ளீர்
+        other: நீர் %{count} பயனர்களை மௌனித்துள்ளீர்
+      table:
+        thead:
+          muted_user: மௌனித்த பயனர்
+          actions: செயல்கள்
+        tbody:
+          unmute: ஓசையாக்கு
+          send_message: தகவலனுப்பு
+    create:
+      notice: நீர் %{name} என்பவரை மௌனித்தீர்.
+      error: '%{name} என்பவரை மௌனிக்க முடியவில்லை. %{full_message}.'
+    destroy:
+      notice: நீர் %{name} என்பவரை ஓசையாக்கினீர்.
   notes:
     show:
       description: விளக்கம்
diff --git a/test/helpers/svg_helper_test.rb b/test/helpers/svg_helper_test.rb
new file mode 100644 (file)
index 0000000..25a9e45
--- /dev/null
@@ -0,0 +1,113 @@
+require "test_helper"
+
+class SvgHelperTest < ActionView::TestCase
+  def test_key_fill
+    svg = key_svg_tag("width" => 60, "height" => 40, "fill" => "green")
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="60" height="40">
+        <rect width="100%" height="100%" fill="green" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_border
+    svg = key_svg_tag("width" => 60, "height" => 40, "border" => "red")
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="60" height="40">
+        <rect x="0.5" y="0.5" width="59" height="39" fill="none" stroke="red" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_border_width
+    svg = key_svg_tag("width" => 60, "height" => 40, "border" => "red", "border-width" => 3)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="60" height="40">
+        <rect x="1.5" y="1.5" width="57" height="37" fill="none" stroke="red" stroke-width="3" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_border_with_integer_coords
+    svg = key_svg_tag("width" => 60, "height" => 40, "border" => "red", "border-width" => 2)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="60" height="40">
+        <rect x="1" y="1" width="58" height="38" fill="none" stroke="red" stroke-width="2" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_border_fractional_width
+    svg = key_svg_tag("width" => 60, "height" => 40, "border" => "red", "border-width" => 1.5)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="60" height="40">
+        <rect x="0.75" y="0.75" width="58.5" height="38.5" fill="none" stroke="red" stroke-width="1.5" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_line
+    svg = key_svg_tag("width" => 80, "height" => 15, "line" => "blue")
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="15">
+        <path d="M0,7.5 H80" stroke="blue" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_line_width
+    svg = key_svg_tag("width" => 80, "height" => 15, "line" => "blue", "line-width" => 3)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="15">
+        <path d="M0,7.5 H80" stroke="blue" stroke-width="3" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_line_with_integer_coords
+    svg = key_svg_tag("width" => 80, "height" => 20, "line" => "blue")
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="20">
+        <path d="M0,10 H80" stroke="blue" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_casing
+    svg = key_svg_tag("width" => 80, "height" => 20, "casing" => "yellow")
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="20">
+        <path d="M0,0.5 H80 M0,19.5 H80" stroke="yellow" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_casing_width
+    svg = key_svg_tag("width" => 80, "height" => 20, "casing" => "yellow", "casing-width" => 5)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="20">
+        <path d="M0,2.5 H80 M0,17.5 H80" stroke="yellow" stroke-width="5" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+
+  def test_key_casing_with_integer_coords
+    svg = key_svg_tag("width" => 80, "height" => 20, "casing" => "yellow", "casing-width" => 2)
+    expected = <<~HTML.gsub(/\n\s*/, "")
+      <svg width="80" height="20">
+        <path d="M0,1 H80 M0,19 H80" stroke="yellow" stroke-width="2" />
+      </svg>
+    HTML
+    assert_dom_equal expected, svg
+  end
+end
diff --git a/test/system/messages_test.rb b/test/system/messages_test.rb
new file mode 100644 (file)
index 0000000..87021dd
--- /dev/null
@@ -0,0 +1,41 @@
+require "application_system_test_case"
+
+class NoteCommentsTest < ApplicationSystemTestCase
+  def test_delete_received_message
+    user = create(:user)
+    create(:message, :recipient => user)
+    sign_in_as(user)
+
+    visit inbox_messages_path
+    assert_text "You have 1 new message and 0 old messages"
+
+    click_button "Delete"
+    assert_text "You have 0 new messages and 0 old messages"
+  end
+
+  def test_delete_sent_message
+    user = create(:user)
+    create(:message, :sender => user)
+    sign_in_as(user)
+
+    visit outbox_messages_path
+    assert_text "You have 1 sent message"
+
+    click_button "Delete"
+    assert_text "You have 0 sent messages"
+  end
+
+  def test_delete_muted_message
+    user = create(:user)
+    muted_user = create(:user)
+    create(:user_mute, :owner => user, :subject => muted_user)
+    create(:message, :sender => muted_user, :recipient => user)
+    sign_in_as(user)
+
+    visit muted_messages_path
+    assert_text "1 muted message"
+
+    click_button "Delete"
+    assert_text "0 muted messages"
+  end
+end
diff --git a/test/system/oauth2_test.rb b/test/system/oauth2_test.rb
new file mode 100644 (file)
index 0000000..ab49640
--- /dev/null
@@ -0,0 +1,10 @@
+require "application_system_test_case"
+
+class Oauth2Test < ApplicationSystemTestCase
+  def test_authorized_applications
+    sign_in_as(create(:user))
+    visit oauth_authorized_applications_path
+
+    assert_text "You have not yet authorized any OAuth 2 applications."
+  end
+end
index f722b6a1b6e208295dcca7a2932559e90911aa90..f113d57529fe54db00c55d3a0e356bb5a2e26094 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -574,9 +574,9 @@ optionator@^0.9.3:
     type-check "^0.4.0"
 
 osm-community-index@^5.2.0:
-  version "5.6.0"
-  resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.6.0.tgz#b2361fce7ded723844b0ed68d47bddfc4a8cb240"
-  integrity sha512-C5AqEWidBIgKeaJKQwuPWvDqSzm9CpZgDbHDi+k4+ZCHBazRQjnl7TpWVv2/fQWMqsJL3I5qzh19rXBTWMWL1A==
+  version "5.6.1"
+  resolved "https://registry.yarnpkg.com/osm-community-index/-/osm-community-index-5.6.1.tgz#5be72c700145e94c57f2006e6f767a0e49d93870"
+  integrity sha512-eMi5mDwwLkt3tbZtD60+aMj4kIa3smlQanxb3OcvJa2pv6w5uVCLbyCem0j8cTqAO3A+C7HD4T7dFUyt2WCYaQ==
   dependencies:
     diacritics "^1.3.0"