From: rubynho Date: Tue, 12 Nov 2019 17:03:06 +0000 (-0200) Subject: Pluralize notifier message when other than 1 X-Git-Tag: live~2768^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5542fd2bce182e2ac42782d88d0c99fb15a31e3f Pluralize notifier message when other than 1 Correctly pluralize the word point in the notification message based on the given possible points. --- diff --git a/app/views/notifier/gpx_success.html.erb b/app/views/notifier/gpx_success.html.erb index 7601a621d..d9d184a6d 100644 --- a/app/views/notifier/gpx_success.html.erb +++ b/app/views/notifier/gpx_success.html.erb @@ -2,5 +2,8 @@

<%= 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) %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 917c06a95..92197f614 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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!"