From: Anton Khorev Date: Mon, 3 Jun 2024 11:51:47 +0000 (+0300) Subject: Show changeset element counts using badges X-Git-Tag: live~38^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/31f93077f96c9f5d04f2c9ff17ab4a4a662f2579?hp=-c Show changeset element counts using badges --- 31f93077f96c9f5d04f2c9ff17ab4a4a662f2579 diff --git a/app/views/changesets/_paging_nav.html.erb b/app/views/changesets/_paging_nav.html.erb index 47b0c7590..9fa23f670 100644 --- a/app/views/changesets/_paging_nav.html.erb +++ b/app/views/changesets/_paging_nav.html.erb @@ -1,12 +1,18 @@ <% if pages.page_count == 1 %>

- <%= t ".#{type.pluralize}", :count => pages.item_count %> + <%= t ".#{type.pluralize}_title" %> + + <%= pages.item_count %> +

<% elsif pages.page_count > 1 %>

- <%= t ".#{type.pluralize}_paginated", :x => pages.current_page.first_item, - :y => pages.current_page.last_item, - :count => pages.item_count %> + <%= t ".#{type.pluralize}_title" %> + + <%= t ".range", :x => pages.current_page.first_item, + :y => pages.current_page.last_item, + :count => pages.item_count %> +

<%= sidebar_classic_pagination(pages, "#{type}_page") do |page| diff --git a/config/locales/en.yml b/config/locales/en.yml index 32b0bc6bc..2fffdabdd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -523,12 +523,13 @@ en: changesetxml: "Changeset XML" osmchangexml: "osmChange XML" paging_nav: - nodes: "Nodes (%{count})" + nodes_title: "Nodes" nodes_paginated: "Nodes (%{x}-%{y} of %{count})" - ways: "Ways (%{count})" + ways_title: "Ways" ways_paginated: "Ways (%{x}-%{y} of %{count})" - relations: "Relations (%{count})" + relations_title: "Relations" relations_paginated: "Relations (%{x}-%{y} of %{count})" + range: "%{x}-%{y} of %{count}" not_found_message: sorry: "Sorry, changeset #%{id} could not be found." timeout: