Skip to content

Fix: Transfer and edit-price modals are hardcoded English - #155

Merged
Busiii-adetiba merged 1 commit into
SynapsVault:mainfrom
whiteghost0001:simple/96
Oct 18, 2026
Merged

Busiii-adetiba merged 1 commit into
SynapsVault:mainfrom
whiteghost0001:simple/96

Conversation

@whiteghost0001

Copy link
Copy Markdown
Contributor

Closes #96

Issues

#96 Transfer and edit-price modals are hardcoded English

Severity: Medium · Area: i18n
Where: src/components/TransferOwnershipModal.tsx:11-18, 41-93; src/components/EditPriceModal.tsx:12-19, 39-92
Status labels, titles and button text are hardcoded English.
Suggested fix: Move to i18n.


Found in a code audit of the ui-refinement branch (typecheck, lint and 124 tests passing). Severity: Medium. Area: i18n.

Summary

Follow the existing i18n pattern used by other components (e.g. BuyModal, RegisterModal) for the translation hook. The STATUS_LABELS constant maps should be replaced with a function or inline lookup that calls the translation function so labels re-render on language change. Keep the existing aria-labelledby ids unchanged. Verify that the i18n test setup already wraps components with the provider; if not, add it in the test files.

Changes

  • Add translation keys for all user-facing strings in TransferOwnershipModal and EditPriceModal to the English locale file. Create a new top-level namespace (e.g. "transfer_ownership" and "edit_price") containing: title, label for new owner address, placeholder, invalid address error, confirmation prompt (with {{title}} interpolation), status labels (preparing, signing, submitting, confirmed), network warning prefix, success message (with {{owner}} interpolation), close, cancel, back, working, confirm transfer, review transfer; and for edit price: title, new price label, validation errors (invalid format, must be greater than 0, too large), status labels, success message (with {{price}} interpolation), close, cancel, working, update price. (src/i18n/locales/en.json)
  • Add the same translation keys (matching the English namespace structure) to the Spanish locale file with Spanish translations for every string used by TransferOwnershipModal and EditPriceModal, preserving the {{title}}, {{owner}}, and {{price}} interpolation placeholders. (src/i18n/locales/es.json)
  • Replace all hardcoded English strings in TransferOwnershipModal with calls to the i18n translation hook/function. This includes the title, the new owner address label, the invalid key error message, the confirmation prompt (interpolating resourceTitle), the STATUS_LABELS map (convert to translation keys resolved at render time), the network warning prefix, the success message (interpolating newOwner), and the button labels (Close, Cancel, Back, Working…, Confirm transfer, Review transfer). (src/components/TransferOwnershipModal.tsx)
  • Replace all hardcoded English strings in EditPriceModal with calls to the i18n translation hook/function. This includes the title, the new price label, the validatePrice error messages (invalid format, must be greater than 0, too large), the STATUS_LABELS map (convert to translation keys resolved at render time), the network warning prefix, the success message (interpolating newPrice), and the button labels (Close, Cancel, Working…, Update Price). (src/components/EditPriceModal.tsx)
  • Update the TransferOwnershipModal tests to work with the i18n translation layer instead of asserting on literal English strings. Ensure the test setup provides the i18n provider/context and that assertions use translation keys or the rendered English values from the locale file. (src/components/TransferOwnershipModal.test.tsx)
  • Update the EditPriceModal tests to work with the i18n translation layer instead of asserting on literal English strings. Ensure the test setup provides the i18n provider/context and that assertions use translation keys or the rendered English values from the locale file. (src/components/EditPriceModal.test.tsx)

Co-authored-by: Simple Agent <agent@simple.dev>
@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@whiteghost0001 is attempting to deploy a commit to the work Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@whiteghost0001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Busiii-adetiba
Busiii-adetiba merged commit ee8ab31 into SynapsVault:main Oct 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transfer and edit-price modals are hardcoded English

2 participants