Pluralize notifier message when other than 1

Correctly pluralize the word point in the notification message based
on the given possible points.
This commit is contained in:
rubynho 2019-11-12 15:03:06 -02:00
parent 816ee8ec92
commit 5542fd2bce
2 changed files with 7 additions and 2 deletions

View file

@ -2,5 +2,8 @@
<p> <p>
<%= render :partial => "gpx_description" %> <%= 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> </p>

View file

@ -1200,7 +1200,9 @@ en:
import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures" import_failures_url: "https://wiki.openstreetmap.org/wiki/GPX_Import_Failures"
success: success:
subject: "[OpenStreetMap] GPX Import 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: signup_confirm:
subject: "[OpenStreetMap] Welcome to OpenStreetMap" subject: "[OpenStreetMap] Welcome to OpenStreetMap"
greeting: "Hi there!" greeting: "Hi there!"