我已经将其添加到我的config/locales/en.yml
文件中:
en:
hello: "Hello world"
will_paginate:
page_entries_info:
single_page:
zero: "No %{model} found"
one: "Displayingggg 1 %{model}"
other: "Displayingggggg all %{count} %{model}"
single_page_html:
zero: "No %{model} found"
one: "Displayingggg <b>1</b> %{model}"
other: "Displayingggg <b>all %{count}</b> %{model}"
multi_page: "Displaddying %{model} %{from} - %{to} of %{count} in total"
multi_page_html: "Displayingggggg %{model} <b>%{from} - %{to}</b> of <b>%{count}</b> in totalddd"
我添加了额外的g之类的只是为了测试。它不会产生影响。
我在输出Displaying properties 11 - 20 of 29 in total
的模板中执行<%= page_entries_info(@properties) %>
编辑:这是使用Kaminari。不确定这是否重要
显然,使用Kaminari:时会有所不同
en:
helpers:
page_entries_info:
more_pages:
display_entries: "Showing %{first}-%{last} of %{total} %{entry_name}"
影响