feat(i18n): pluralize sidebar network/device counters

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 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 10:40:11 +02:00
parent 89a77e0e9e
commit 44c502dc50
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -42,11 +42,11 @@
<div class="stats">
<div class="stat">
<span class="stat-val">{{ vlans.length }}</span>
<span class="stat-lbl">{{ t('statsNetworks') }}</span>
<span class="stat-lbl">{{ vlans.length === 1 ? t('statsNetwork') : t('statsNetworks') }}</span>
</div>
<div class="stat">
<span class="stat-val">{{ devices.length }}</span>
<span class="stat-lbl">{{ t('statsDevices') }}</span>
<span class="stat-lbl">{{ devices.length === 1 ? t('statsDevice') : t('statsDevices') }}</span>
</div>
</div>
<button class="btn-export" @click="exportJson">{{ t('exportJson') }}</button>
+6
View File
@@ -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',