From 44c502dc5057aad8d79c6e85ecd7ecf681d3903d Mon Sep 17 00:00:00 2001 From: Olivier Date: Sun, 17 May 2026 10:40:11 +0200 Subject: [PATCH] feat(i18n): pluralize sidebar network/device counters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show singular form when count is 1 (Network, Device, Réseau, Équip., Red, Equipo) across all three supported languages (fr, en, es). Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.vue | 4 ++-- frontend/src/i18n.js | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c50a804..fedcf4f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -42,11 +42,11 @@
{{ vlans.length }} - {{ t('statsNetworks') }} + {{ vlans.length === 1 ? t('statsNetwork') : t('statsNetworks') }}
{{ devices.length }} - {{ t('statsDevices') }} + {{ devices.length === 1 ? t('statsDevice') : t('statsDevices') }}
diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js index a965c13..cc9bf18 100644 --- a/frontend/src/i18n.js +++ b/frontend/src/i18n.js @@ -14,7 +14,9 @@ const LANGS = { tabNetworks: 'Réseaux', tabDevices: 'Équipements', discovery: '🔍 Découverte auto', + statsNetwork: 'Réseau', statsNetworks: 'Réseaux', + statsDevice: 'Équip.', statsDevices: 'Équip.', exportJson: '⬇ Export JSON', importJson: '⬆ Import JSON', @@ -170,7 +172,9 @@ const LANGS = { tabNetworks: 'Networks', tabDevices: 'Devices', discovery: '🔍 Auto discovery', + statsNetwork: 'Network', statsNetworks: 'Networks', + statsDevice: 'Device', statsDevices: 'Devices', exportJson: '⬇ Export JSON', importJson: '⬆ Import JSON', @@ -320,7 +324,9 @@ const LANGS = { tabNetworks: 'Redes', tabDevices: 'Equipos', discovery: '🔍 Descubrimiento auto', + statsNetwork: 'Red', statsNetworks: 'Redes', + statsDevice: 'Equipo', statsDevices: 'Equipos', exportJson: '⬇ Exportar JSON', importJson: '⬆ Importar JSON',