Is your feature request related to a problem? Please describe.
Is your feature request related to a problem? Please describe.
The current translation test suite verifies language-specific translations, but fallback behavior is only tested inside en.test.ts.
The getLabels() function is designed to return English translations when an unsupported language code is provided. Since this behavior is part of the public API contract, a future refactor could accidentally break the fallback mechanism without affecting most existing language tests.
There is currently no dedicated test focused on validating fallback behavior across invalid or unsupported language inputs.
Describe the solution you'd like
Add a dedicated test file (for example, fallback.test.ts) that verifies:
Unsupported language codes return English translations.
Empty language strings return English translations.
Invalid or mixed-case unsupported language codes return English translations.
Supported language codes continue returning their own translation objects.
Example assertions:
expect(getLabels('unknown-language')).toEqual(labels.en);
expect(getLabels('')).toEqual(labels.en);
expect(getLabels('INVALID')).toEqual(labels.en);
expect(getLabels('es')).toEqual(labels.es);
This would provide explicit coverage for fallback behavior and prevent regressions in future internationalization changes.
Describe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
Is your feature request related to a problem? Please describe.
The current translation test suite verifies language-specific translations, but fallback behavior is only tested inside en.test.ts.
The getLabels() function is designed to return English translations when an unsupported language code is provided. Since this behavior is part of the public API contract, a future refactor could accidentally break the fallback mechanism without affecting most existing language tests.
There is currently no dedicated test focused on validating fallback behavior across invalid or unsupported language inputs.
Describe the solution you'd like
Add a dedicated test file (for example, fallback.test.ts) that verifies:
Unsupported language codes return English translations.
Empty language strings return English translations.
Invalid or mixed-case unsupported language codes return English translations.
Supported language codes continue returning their own translation objects.
Example assertions:
expect(getLabels('unknown-language')).toEqual(labels.en);
expect(getLabels('')).toEqual(labels.en);
expect(getLabels('INVALID')).toEqual(labels.en);
expect(getLabels('es')).toEqual(labels.es);
This would provide explicit coverage for fallback behavior and prevent regressions in future internationalization changes.
Describe alternatives you've considered
No response