]> git.openstreetmap.org Git - rails.git/commitdiff
Pluralize notifier message when other than 1
authorrubynho <brunorafael6656@gmail.com>
Tue, 12 Nov 2019 17:03:06 +0000 (15:03 -0200)
committerrubynho <brunorafael6656@gmail.com>
Sun, 17 Nov 2019 16:55:20 +0000 (14:55 -0200)
Correctly pluralize the word point in the notification message based
on the given possible points.

app/views/notifier/gpx_success.html.erb
config/locales/en.yml

index 7601a621dc752c8d427628ce601e9b873721955f..d9d184a6d88a56b90ba3a11ef162c8752ce108be 100644 (file)
@@ -2,5 +2,8 @@
 
 <p>
   <%= render :partial => "gpx_description" %>
-  <%= t "notifier.gpx_notification.success.loaded_successfully", :trace_points => @trace_points, :possible_points => @possible_points %>
+  <%= t("notifier.gpx_notification.success.loaded_successfully",
+        :trace_points => @trace_points,
+        :possible_points => @possible_points,
+        :count => @possible_points) %>
 </p>
index 917c06a954de363ac0252424575fc8208b6fa87d..92197f614b13e74bb1672024a63de0ef3902c00a 100644 (file)
@@ -1200,7 +1200,9 @@ en:
         import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures"
       success:
         subject: "[OpenStreetMap] GPX Import success"
-        loaded_successfully: loaded successfully with %{trace_points} out of a possible %{possible_points} points.
+        loaded_successfully:
+          one: loaded successfully with %{trace_points} out of a possible 1 point.
+          other: loaded successfully with %{trace_points} out of a possible %{possible_points} points.
     signup_confirm:
       subject: "[OpenStreetMap] Welcome to OpenStreetMap"
       greeting: "Hi there!"