From 7e78ec95931abdf1a7a25fcddb1dfd446b9e8e0b Mon Sep 17 00:00:00 2001 From: joshuaboud Date: Mon, 19 Jul 2021 13:50:05 -0300 Subject: [PATCH] fix pluralization in dir and file count --- navigator/components/NavWindow.js | 4 ++-- navigator/navigator.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/navigator/components/NavWindow.js b/navigator/components/NavWindow.js index c97afdb..5967f54 100644 --- a/navigator/components/NavWindow.js +++ b/navigator/components/NavWindow.js @@ -131,8 +131,8 @@ export class NavWindow { document.getElementById("pwd").value = this.pwd().path_str(); this.set_selected(this.pwd(), false, false); this.show_selected_properties(); - document.getElementById("nav-num-dirs").innerText = num_dirs.toString(); - document.getElementById("nav-num-files").innerText = num_files.toString(); + document.getElementById("nav-num-dirs").innerText = `${num_dirs} Director${(num_dirs === 1)? "y" : "ies"}`; + document.getElementById("nav-num-files").innerText = `${num_files} File${(num_files === 1)? "" : "s"}`; document.getElementById("nav-num-bytes").innerText = format_bytes(bytes_sum); this.stop_load(); this.set_nav_button_state(); diff --git a/navigator/navigator.html b/navigator/navigator.html index 9010aad..72df661 100644 --- a/navigator/navigator.html +++ b/navigator/navigator.html @@ -162,7 +162,7 @@