Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): translate the local storage badge on Infrastructure

Yudhi Armyndharisd0f641f184bc
diff --git a/dashboard/src/pages/Infrastructure.test.ts b/dashboard/src/pages/Infrastructure.test.ts
index 2fb59fa11..5b7e18f60 100644
--- a/dashboard/src/pages/Infrastructure.test.ts
+++ b/dashboard/src/pages/Infrastructure.test.ts
@@ -289,6 +289,15 @@ test('a failed /config read offers no Save, so defaults cannot overwrite the sto
assert.ok(!screen.queryByRole('button', { name: 'Save Configuration' }), 'Save offered without the saved config');
});
+test('the storage badge names local storage in the active language', async () => {
+ const { screen } = rtl;
+ resetFetchCalls();
+ renderInfrastructure();
+
+ const card = (await screen.findByText('Storage Configuration')).closest('.infra-card') as HTMLElement;
+ assert.equal(card.querySelector('.card-header .status-indicator')?.textContent, '● Local Filesystem');
+});
+
/**
* Every toggle is a bare checkbox inside a `<label class="toggle-switch">` whose only other child is
* the decorative slider span, so the wrapping label contributes no text: a screen reader announced
diff --git a/dashboard/src/pages/Infrastructure.tsx b/dashboard/src/pages/Infrastructure.tsx
index ac4b59425..b860aabce 100644
--- a/dashboard/src/pages/Infrastructure.tsx
+++ b/dashboard/src/pages/Infrastructure.tsx
@@ -658,7 +658,7 @@ export function Infrastructure() {
? s3Unreachable
? t('infrastructure.storage.s3Unreachable')
: 'S3'
- : 'Local'}
+ : t('infrastructure.storage.local')}
</span>
);
})()}