Extract pagination translations

This commit is contained in:
Claudio Ortolina
2024-10-21 11:35:21 +01:00
parent d78bc1715f
commit 481c9673d0
2 changed files with 16 additions and 4 deletions
@@ -26,14 +26,14 @@ defmodule MusicLibraryWeb.Pagination do
patch={"?" <> encode_query(page: @page_links.prev_page, page_size: @pagination_params.page_size, query: @pagination_params.query)} patch={"?" <> encode_query(page: @page_links.prev_page, page_size: @pagination_params.page_size, query: @pagination_params.query)}
class="relative inline-flex items-center rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50" class="relative inline-flex items-center rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50"
> >
Previous <%= gettext("Previous") %>
</.link> </.link>
<.link <.link
:if={@page_links.next_page} :if={@page_links.next_page}
patch={"?" <> encode_query(page: @page_links.next_page, page_size: @pagination_params.page_size, query: @pagination_params.query)} patch={"?" <> encode_query(page: @page_links.next_page, page_size: @pagination_params.page_size, query: @pagination_params.query)}
class="relative ml-3 inline-flex items-center rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50" class="relative ml-3 inline-flex items-center rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 hover:bg-zinc-50"
> >
Next <%= gettext("Next") %>
</.link> </.link>
</div> </div>
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-items-center sm:justify-center"> <div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-items-center sm:justify-center">
@@ -93,7 +93,7 @@ defmodule MusicLibraryWeb.Pagination do
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-zinc-400 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:z-20 focus:outline-offset-0" class="relative inline-flex items-center rounded-r-md px-2 py-2 text-zinc-400 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:z-20 focus:outline-offset-0"
patch={"?" <> encode_query(page: @page_number, page_size: @page_size, query: @query)} patch={"?" <> encode_query(page: @page_number, page_size: @page_size, query: @query)}
> >
<span class="sr-only">Next</span> <span class="sr-only"><%= gettext("Next") %></span>
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> <svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path <path
fill-rule="evenodd" fill-rule="evenodd"
@@ -115,7 +115,7 @@ defmodule MusicLibraryWeb.Pagination do
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-zinc-400 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:z-20 focus:outline-offset-0" class="relative inline-flex items-center rounded-l-md px-2 py-2 text-zinc-400 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:z-20 focus:outline-offset-0"
patch={"?" <> encode_query(page: @page_number, page_size: @page_size, query: @query)} patch={"?" <> encode_query(page: @page_number, page_size: @page_size, query: @query)}
> >
<span class="sr-only">Previous</span> <span class="sr-only"><%= gettext("Previous") %></span>
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> <svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path <path
fill-rule="evenodd" fill-rule="evenodd"
+12
View File
@@ -91,3 +91,15 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stats" msgid "Stats"
msgstr "" msgstr ""
#: lib/music_library_web/components/pagination.ex:36
#: lib/music_library_web/components/pagination.ex:96
#, elixir-autogen, elixir-format
msgid "Next"
msgstr ""
#: lib/music_library_web/components/pagination.ex:29
#: lib/music_library_web/components/pagination.ex:118
#, elixir-autogen, elixir-format
msgid "Previous"
msgstr ""