فهرست منبع

fix(devices): translate the unit column header (#2098)

The column showing which unit a client hangs off was hardcoded 'Router'
in three places (sort header, column picker, sort selector), so it read
ROUTER in every language and did not match the Unit wording used
elsewhere. Route it through devices.colRouter (en Unit, es Unidad),
consistent with the existing dot11r.colRouter label.
Bann-DEV 2 هفته پیش
والد
کامیت
53196cc7b9
3فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 1 0
      app/public/locales/en/translation.json
  2. 1 0
      app/public/locales/es/translation.json
  3. 3 3
      app/src/pages/Devices.tsx

+ 1 - 0
app/public/locales/en/translation.json

@@ -469,6 +469,7 @@
     "listView": "List view",
     "nameUpdated": "Name updated",
     "colLease": "Lease time",
+    "colRouter": "Unit",
     "leaseDaysHours": "{{days}}d {{hours}}h",
     "leaseHoursMinutes": "{{hours}}h {{minutes}}min",
     "leaseMinutes": "{{minutes}}min",

+ 1 - 0
app/public/locales/es/translation.json

@@ -469,6 +469,7 @@
     "listView": "Vista de lista",
     "nameUpdated": "Nombre actualizado",
     "colLease": "Tiempo restante",
+    "colRouter": "Unidad",
     "leaseDaysHours": "{{days}}d {{hours}}h",
     "leaseHoursMinutes": "{{hours}}h {{minutes}}min",
     "leaseMinutes": "{{minutes}}min",

+ 3 - 3
app/src/pages/Devices.tsx

@@ -194,7 +194,7 @@ function ColumnPicker({ hidden, onToggle }: { hidden: DeviceColumn[]; onToggle:
     type: t('devices.colType'),
     ip: 'IP / MAC',
     lease: t('devices.colLease'),
-    router: 'Router',
+    router: t('devices.colRouter'),
     band: t('devices.colBand'),
     signal: t('devices.colSignal'),
     traffic: t('devices.colTraffic'),
@@ -771,7 +771,7 @@ function FilterBar(p: FilterBarProps) {
               <SelectItem value="name">{t('devices.colDevice')}</SelectItem>
               <SelectItem value="traffic">{t('devices.colTraffic')}</SelectItem>
               <SelectItem value="ip">IP / MAC</SelectItem>
-              <SelectItem value="router">Router</SelectItem>
+              <SelectItem value="router">{t('devices.colRouter')}</SelectItem>
               <SelectItem value="band">{t('devices.colBand')}</SelectItem>
               <SelectItem value="signal">{t('devices.colSignal')}</SelectItem>
               <SelectItem value="lease">{t('devices.colLease')}</SelectItem>
@@ -2154,7 +2154,7 @@ export default function Devices() {
                 <SortHeader label={t('devices.colLease')} k="lease" sort={sort} onSort={toggleSort} />
               </span>
             )}
-            {visibleColumns.has('router') && <SortHeader label="Router" k="router" sort={sort} onSort={toggleSort} />}
+            {visibleColumns.has('router') && <SortHeader label={t('devices.colRouter')} k="router" sort={sort} onSort={toggleSort} />}
             {visibleColumns.has('band') && <SortHeader label={t('devices.colBand')} k="band" sort={sort} onSort={toggleSort} />}
             {visibleColumns.has('signal') && <SortHeader label={t('devices.colSignal')} k="signal" sort={sort} onSort={toggleSort} />}
             {visibleColumns.has('traffic') && <SortHeader label={t('devices.colTraffic')} k="traffic" sort={sort} onSort={toggleSort} />}