Phase 4: Translate Shared Components - common, navigation, status labels

- Translate LoadingState and EmptyState components (common namespace)
- Translate Header navigation labels (navigation namespace)
- Translate StatusBadge trade status labels (exchange namespace)
- Create navigation.json translation files for es, en, ca
- Create exchange.json translation files for status/direction/transfer labels
- Update IntlProvider to load navigation and exchange namespaces
- Update frontend tests to expect Spanish translations (default language)
- Configure Playwright to use English language for e2e tests via storageState
- Fix test expectations to match translated strings

All frontend and e2e tests passing.
This commit is contained in:
counterweight 2025-12-25 22:06:39 +01:00
parent f86ec8b62d
commit a5a1a2c1ad
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
14 changed files with 173 additions and 27 deletions

View file

@ -1,4 +1,7 @@
"use client";
import { utilityStyles } from "../styles/shared";
import { useTranslation } from "../hooks/useTranslation";
interface EmptyStateProps {
/** Message to display when empty */
@ -18,8 +21,10 @@ interface EmptyStateProps {
* Displays a message when there's no data, or a loading state.
*/
export function EmptyState({ message, hint, isLoading, action, style }: EmptyStateProps) {
const t = useTranslation("common");
if (isLoading) {
return <div style={{ ...utilityStyles.emptyState, ...style }}>Loading...</div>;
return <div style={{ ...utilityStyles.emptyState, ...style }}>{t("loading")}</div>;
}
return (