From a46e7025366a604c74d316b502abb54bb3ef60bc Mon Sep 17 00:00:00 2001 From: Wojtek Date: Sat, 29 Jun 2024 05:19:38 +0200 Subject: [PATCH] Add navigation to last/first page --- internal/locale/translations/de_DE.json | 2 + internal/locale/translations/el_EL.json | 2 + internal/locale/translations/en_US.json | 2 + internal/locale/translations/es_ES.json | 2 + internal/locale/translations/fi_FI.json | 2 + internal/locale/translations/fr_FR.json | 2 + internal/locale/translations/hi_IN.json | 2 + internal/locale/translations/id_ID.json | 2 + internal/locale/translations/it_IT.json | 2 + internal/locale/translations/ja_JP.json | 2 + internal/locale/translations/nl_NL.json | 2 + internal/locale/translations/pl_PL.json | 2 + internal/locale/translations/pt_BR.json | 2 + internal/locale/translations/ru_RU.json | 2 + internal/locale/translations/tr_TR.json | 2 + internal/locale/translations/uk_UA.json | 2 + internal/locale/translations/zh_CN.json | 2 + internal/locale/translations/zh_TW.json | 2 + .../template/templates/common/pagination.html | 44 ++++++++++++++----- internal/ui/pagination.go | 17 +++++++ internal/ui/static/css/common.css | 28 ++++++++++-- 21 files changed, 109 insertions(+), 16 deletions(-) diff --git a/internal/locale/translations/de_DE.json b/internal/locale/translations/de_DE.json index fa3d3a68..ff297ba6 100644 --- a/internal/locale/translations/de_DE.json +++ b/internal/locale/translations/de_DE.json @@ -55,7 +55,9 @@ "search.label": "Suche", "search.placeholder": "Suche...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Nächste", + "pagination.first": "First", "pagination.previous": "Vorherige", "entry.status.unread": "Ungelesen", "entry.status.read": "Gelesen", diff --git a/internal/locale/translations/el_EL.json b/internal/locale/translations/el_EL.json index 28169261..932c7c47 100644 --- a/internal/locale/translations/el_EL.json +++ b/internal/locale/translations/el_EL.json @@ -55,7 +55,9 @@ "search.label": "Αναζήτηση", "search.placeholder": "Αναζήτηση...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Επόμενη", + "pagination.first": "First", "pagination.previous": "Προηγούμενη", "entry.status.unread": "Μη αναγνωσμένο", "entry.status.read": "Αναγνωσμένο", diff --git a/internal/locale/translations/en_US.json b/internal/locale/translations/en_US.json index 71867ffe..872f63f5 100644 --- a/internal/locale/translations/en_US.json +++ b/internal/locale/translations/en_US.json @@ -55,7 +55,9 @@ "search.label": "Search", "search.placeholder": "Search…", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Next", + "pagination.first": "First", "pagination.previous": "Previous", "entry.status.unread": "Unread", "entry.status.read": "Read", diff --git a/internal/locale/translations/es_ES.json b/internal/locale/translations/es_ES.json index 0c7766e8..b52d47d1 100644 --- a/internal/locale/translations/es_ES.json +++ b/internal/locale/translations/es_ES.json @@ -55,7 +55,9 @@ "search.label": "Buscar", "search.placeholder": "Búsqueda...", "search.submit": "Search", + "pagination.last": "Ultimo", "pagination.next": "Siguiente", + "pagination.first": "Primero", "pagination.previous": "Anterior", "entry.status.unread": "No leído", "entry.status.read": "Leído", diff --git a/internal/locale/translations/fi_FI.json b/internal/locale/translations/fi_FI.json index 7b6565fc..00e4c8f4 100644 --- a/internal/locale/translations/fi_FI.json +++ b/internal/locale/translations/fi_FI.json @@ -55,7 +55,9 @@ "search.label": "Haku", "search.placeholder": "Hae...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Seuraava", + "pagination.first": "First", "pagination.previous": "Edellinen", "entry.status.unread": "Lukematon", "entry.status.read": "Luettu", diff --git a/internal/locale/translations/fr_FR.json b/internal/locale/translations/fr_FR.json index b25033b4..63d7d790 100644 --- a/internal/locale/translations/fr_FR.json +++ b/internal/locale/translations/fr_FR.json @@ -55,7 +55,9 @@ "search.label": "Recherche", "search.placeholder": "Recherche...", "search.submit": "Rechercher", + "pagination.last": "Last", "pagination.next": "Suivant", + "pagination.first": "First", "pagination.previous": "Précédent", "entry.status.unread": "Non lu", "entry.status.read": "Lu", diff --git a/internal/locale/translations/hi_IN.json b/internal/locale/translations/hi_IN.json index 2ebe379a..6d956521 100644 --- a/internal/locale/translations/hi_IN.json +++ b/internal/locale/translations/hi_IN.json @@ -55,7 +55,9 @@ "search.label": "खोजे", "search.placeholder": "खोजे...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "अगला", + "pagination.first": "First", "pagination.previous": "पिछला", "entry.status.unread": "अपठित", "entry.status.read": "पढ़े", diff --git a/internal/locale/translations/id_ID.json b/internal/locale/translations/id_ID.json index 06ecd7db..001687b3 100644 --- a/internal/locale/translations/id_ID.json +++ b/internal/locale/translations/id_ID.json @@ -56,6 +56,8 @@ "search.placeholder": "Cari...", "search.submit": "Search", "pagination.next": "Berikutnya", + "pagination.last": "Last", + "pagination.first": "First", "pagination.previous": "Sebelumnya", "entry.status.unread": "Belum dibaca", "entry.status.read": "Telah dibaca", diff --git a/internal/locale/translations/it_IT.json b/internal/locale/translations/it_IT.json index fcb5daae..f62526f0 100644 --- a/internal/locale/translations/it_IT.json +++ b/internal/locale/translations/it_IT.json @@ -56,6 +56,8 @@ "search.placeholder": "Cerca...", "search.submit": "Search", "pagination.next": "Successivo", + "pagination.last": "Last", + "pagination.first": "First", "pagination.previous": "Precedente", "entry.status.unread": "Da leggere", "entry.status.read": "Letto", diff --git a/internal/locale/translations/ja_JP.json b/internal/locale/translations/ja_JP.json index f6f3d72c..c0c68923 100644 --- a/internal/locale/translations/ja_JP.json +++ b/internal/locale/translations/ja_JP.json @@ -55,7 +55,9 @@ "search.label": "検索", "search.placeholder": "…を検索", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "次", + "pagination.first": "First", "pagination.previous": "前", "entry.status.unread": "未読にする", "entry.status.read": "既読にする", diff --git a/internal/locale/translations/nl_NL.json b/internal/locale/translations/nl_NL.json index 6b73abbc..134ddcb9 100644 --- a/internal/locale/translations/nl_NL.json +++ b/internal/locale/translations/nl_NL.json @@ -55,7 +55,9 @@ "search.label": "Zoeken", "search.placeholder": "Zoeken...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Volgende", + "pagination.first": "First", "pagination.previous": "Vorige", "entry.status.unread": "Ongelezen", "entry.status.read": "Gelezen", diff --git a/internal/locale/translations/pl_PL.json b/internal/locale/translations/pl_PL.json index 0044d021..b8bf855d 100644 --- a/internal/locale/translations/pl_PL.json +++ b/internal/locale/translations/pl_PL.json @@ -55,7 +55,9 @@ "search.label": "Szukaj", "search.placeholder": "Szukaj...", "search.submit": "Search", + "pagination.last": "Ostatni", "pagination.next": "Następny", + "pagination.first": "Pierwszy", "pagination.previous": "Poprzedni", "entry.status.unread": "Nieprzeczytane", "entry.status.read": "Przeczytane", diff --git a/internal/locale/translations/pt_BR.json b/internal/locale/translations/pt_BR.json index 1dd3f195..d014c603 100644 --- a/internal/locale/translations/pt_BR.json +++ b/internal/locale/translations/pt_BR.json @@ -55,7 +55,9 @@ "search.label": "Buscar", "search.placeholder": "Buscar por...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Próximo", + "pagination.first": "First", "pagination.previous": "Anterior", "entry.status.unread": "Não lido", "entry.status.read": "Lido", diff --git a/internal/locale/translations/ru_RU.json b/internal/locale/translations/ru_RU.json index d759621b..47df1f61 100644 --- a/internal/locale/translations/ru_RU.json +++ b/internal/locale/translations/ru_RU.json @@ -55,7 +55,9 @@ "search.label": "Поиск", "search.placeholder": "Поиск…", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Следующая", + "pagination.first": "First", "pagination.previous": "Предыдущая", "entry.status.unread": "Не прочитано", "entry.status.read": "Прочитано", diff --git a/internal/locale/translations/tr_TR.json b/internal/locale/translations/tr_TR.json index fbaa3efb..965f68de 100644 --- a/internal/locale/translations/tr_TR.json +++ b/internal/locale/translations/tr_TR.json @@ -485,7 +485,9 @@ "page.users.title": "Kullanıcılar", "page.users.username": "Kullanıcı adı", "page.webauthn_rename.title": "Passkey'i Yeniden Adlandır", + "pagination.last": "Last", "pagination.next": "Sonraki", + "pagination.first": "First", "pagination.previous": "Önceki", "search.label": "Ara", "search.placeholder": "Ara...", diff --git a/internal/locale/translations/uk_UA.json b/internal/locale/translations/uk_UA.json index 84ed3278..f8496ad6 100644 --- a/internal/locale/translations/uk_UA.json +++ b/internal/locale/translations/uk_UA.json @@ -55,7 +55,9 @@ "search.label": "Пошук", "search.placeholder": "Шукати...", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "Вперед", + "pagination.first": "First", "pagination.previous": "Назад", "entry.status.unread": "Непрочитане", "entry.status.read": "Прочитане", diff --git a/internal/locale/translations/zh_CN.json b/internal/locale/translations/zh_CN.json index 7ab55344..5b9387fa 100644 --- a/internal/locale/translations/zh_CN.json +++ b/internal/locale/translations/zh_CN.json @@ -55,7 +55,9 @@ "search.label": "搜索", "search.placeholder": "搜索…", "search.submit": "Search", + "pagination.last": "Last", "pagination.next": "下一页", + "pagination.first": "First", "pagination.previous": "上一页", "entry.status.unread": "标为未读", "entry.status.read": "标为已读", diff --git a/internal/locale/translations/zh_TW.json b/internal/locale/translations/zh_TW.json index 12ea4c7a..79020d9f 100644 --- a/internal/locale/translations/zh_TW.json +++ b/internal/locale/translations/zh_TW.json @@ -55,7 +55,9 @@ "search.label": "搜尋", "search.placeholder": "搜尋…", "search.submit": "送出", + "pagination.last": "Last", "pagination.next": "下一頁", + "pagination.first": "First", "pagination.previous": "上一頁", "entry.status.unread": "標為未讀", "entry.status.read": "標為已讀", diff --git a/internal/template/templates/common/pagination.html b/internal/template/templates/common/pagination.html index 964a7a0f..7bcf870e 100644 --- a/internal/template/templates/common/pagination.html +++ b/internal/template/templates/common/pagination.html @@ -1,19 +1,39 @@ {{ define "pagination" }}