whisper-money/resources/js/components/transactions
Víctor Falcón 79075dbcdf
fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331)
## Summary

Fixes untranslated strings surfaced in the Spanish UI (e.g. `Unknown
Income`, `Unknown Expense` on the cashflow breakdown).

## Root cause

`CashflowAnalyticsController` pushed literal English names into the API
response for uncategorized totals, bypassing `__()`. Additional `__()`
calls across the sync flow and validation had no matching keys in
`lang/es.json`. Several frontend toasts/errors were also hardcoded.

## Changes

**Controller (P0)**
- `app/Http/Controllers/Api/CashflowAnalyticsController.php` — wrap
`Unknown Income`/`Unknown Expense` with `__()` (lines 250, 323).

**Translations (P0 + P1 + P2)**
- `lang/es.json` — added 23 keys (1730 → 1753):
  - `Unknown Income`, `Unknown Expense`, `Unknown Bank`, `Unknown error`
- Sync/banking messages: `Invalid credentials…`, `Rate limit exceeded…`,
`Failed to sync with the provider…`, `The provider is experiencing
issues…`, `An unexpected error occurred during sync…`, `Credentials
updated. Sync started.`, `Action required: :provider connection needs
attention`, `:count new transactions synced on Whisper Money`
- Validation: `The selected property cannot be linked.`, `The selected
property is already linked to a loan.`, `The verification link is
invalid.`, `This field is required.`
- Misc: `Confirm your waitlist spot - Whisper Money`, `Log in to your
bank`
- Frontend toasts: `Failed to re-evaluate rules. Please try again.`,
`Failed to load import data`, `All transactions failed to import`,
`Failed to update transactions`, `Failed to update transactions with
labels`

**Frontend hardcoded strings wrapped in `__()` (P2)**
- `resources/js/components/transactions/import-transactions-drawer.tsx`
- `resources/js/components/accounts/import-balances-drawer.tsx`
- `resources/js/lib/sync-manager.ts` (added `@/utils/i18n` import)
- `resources/js/components/transactions/transaction-list.tsx`
- `resources/js/components/transactions/import-transactions-button.tsx`
- `resources/js/pages/transactions/index.tsx`

## Verification

- `vendor/bin/pint --dirty` → pass
- `php artisan test --filter=CashflowAnalytics` → 24 passed
- `php artisan test --filter=Sync` → 166 passed
- `npm run build` → OK
- Post-fix audit: 0 real missing `__()` keys remaining
2026-04-24 17:58:26 +01:00
..
bulk-actions-bar.tsx fix: prevent account label combobox crash (#230) 2026-03-16 13:03:11 +01:00
bulk-category-select.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
bulk-label-select.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
categorizer-card.tsx feat: (Onboarding) add categorization intro screen with benefit cards (#201) 2026-03-05 11:47:12 +01:00
categorizer-command.tsx feat: (Onboarding) add categorization intro screen with benefit cards (#201) 2026-03-05 11:47:12 +01:00
category-cell.tsx feat(accounts): add real estate asset tracking (#241) 2026-03-24 10:21:32 +00:00
category-select.tsx feat(shared): Add CategoryCombobox component 2025-11-14 16:05:53 +01:00
edit-transaction-dialog.tsx feat(i18n): localize Spanish translations and currency formatting (#160) 2026-02-28 18:46:18 +00:00
encrypted-transaction-description.tsx feat: Plaintext transactions behind feature flag (#105) 2026-02-10 14:31:24 +01:00
import-step-account.tsx feat(accounts): add real estate asset tracking (#241) 2026-03-24 10:21:32 +00:00
import-step-mapping.tsx feat(i18n): localize Spanish translations and currency formatting (#160) 2026-02-28 18:46:18 +00:00
import-step-preview.tsx feat(landing): open-banking feature section with conditional grid layout (#209) 2026-03-07 13:41:25 +00:00
import-step-upload.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
import-transactions-button.tsx fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331) 2026-04-24 17:58:26 +01:00
import-transactions-drawer.tsx fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331) 2026-04-24 17:58:26 +01:00
transaction-actions-menu.tsx fix(banking): correct backfill-ibans endpoint, handle expired sessions, and update labels (#223) 2026-03-12 12:23:32 +00:00
transaction-columns.tsx fix(transactions): cap description column width to prevent horizontal overflow (#216) 2026-03-09 15:14:55 +00:00
transaction-filters.tsx fix(transactions): move clear button inline with filters row on all screen sizes (#192) 2026-03-03 14:06:51 +00:00
transaction-list.tsx fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331) 2026-04-24 17:58:26 +01:00