diff --git a/assets/js/app.js b/assets/js/app.js index 2efab3c..fd2f6e0 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -171,12 +171,24 @@ { var item = document.getElementById("item-" + item_id); if (item) item.parentNode.removeChild(item); - - var $unread_span = document.getElementById("unread-count"); - var unread_count = parseInt($unread_span.innerHTML, 10) - 1; - - $unread_span.innerHTML = unread_count; - document.querySelector("title").innerHTML = "miniflux (" + unread_count + ")"; + + var container = document.getElementById("page-counter"); + + if (container) { + + counter = parseInt(container.textContent.trim(), 10) - 1; + + if (counter == 0) { + + window.location = "?action=feeds¬hing_to_read=1"; + } + else { + + container.textContent = counter + " "; + document.title = "miniflux (" + counter + ")"; + document.getElementById("nav-counter").textContent = "(" + counter + ")"; + } + } } @@ -239,7 +251,7 @@ if (! document.getElementById("current-item")) { document.querySelector("article").id = "current-item"; } - + var item = document.getElementById("current-item"); if (item) switch_status(item.getAttribute("data-item-id")); } diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index 38a6efc..1efcc22 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -36,7 +36,7 @@ return array( 'About' => 'A propos', 'Miniflux version:' => 'Version de Miniflux :', 'Nothing to read' => 'Rien à lire', - '%d unread items' => '%d éléments non lus', + 'unread items' => 'éléments non lus', 'mark all as read' => 'tout marquer comme lu', 'original link' => 'lien original', 'mark as read' => 'marquer comme lu', diff --git a/templates/app_header.php b/templates/app_header.php index f4eef4c..e166193 100644 --- a/templates/app_header.php +++ b/templates/app_header.php @@ -18,11 +18,21 @@ diff --git a/templates/unread_items.php b/templates/unread_items.php index 86e8e81..0d19bbd 100644 --- a/templates/unread_items.php +++ b/templates/unread_items.php @@ -5,7 +5,7 @@