]> git.openstreetmap.org Git - rails.git/commitdiff
Use i18n at_least_pattern in issues count helper
authorAnton Khorev <tony29@yandex.ru>
Fri, 1 Sep 2023 05:19:22 +0000 (08:19 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 1 Sep 2023 05:19:22 +0000 (08:19 +0300)
app/helpers/issues_helper.rb
config/locales/en.yml

index 4538863348c471b66caa19cdeba03d35d0a963d1..55bd0952f7ef27047117953f1010a833a161bfba 100644 (file)
@@ -28,7 +28,7 @@ module IssuesHelper
   def open_issues_count
     count = Issue.visible_to(current_user).open.limit(Settings.max_issues_count).size
     if count >= Settings.max_issues_count
-      tag.span("#{Settings.max_issues_count}+", :class => "badge count-number")
+      tag.span(I18n.t("count.at_least_pattern", :count => Settings.max_issues_count), :class => "badge count-number")
     elsif count.positive?
       tag.span(count, :class => "badge count-number")
     end
index 7b415f6b794b917231796ea916b20b58a1cd0284..98ecbe8a7adc3f4ba8cba9ae994d3e1eba2a78bf 100644 (file)
@@ -5,6 +5,8 @@ en:
     formats:
       friendly: "%e %B %Y at %H:%M"
       blog: "%e %B %Y"
+  count:
+    at_least_pattern: "%{count}+"
   helpers:
     file:
       prompt: Choose file