Skip to content

feat(i18n): translate email card warnings in ScanResults - #523

Merged
NovaCode37 merged 2 commits into
NovaCode37:mainfrom
RinZ27:fix/email-translations
Oct 10, 2026
Merged

NovaCode37 merged 2 commits into
NovaCode37:mainfrom
RinZ27:fix/email-translations

Conversation

@RinZ27

@RinZ27 RinZ27 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moved the hardcoded status lines from the Email/SMTP/Breaches cards into the locale system to partially resolve #519.

Changes

  • Replaced literal english strings in frontend/src/components/views/ScanResults.tsx with {i18n('results.email.<key>')}.
  • Added translation keys to all 10 language files in frontend/src/messages/*.json.
  • Maintained the warning symbols (⚠, ✓) outside the translated text.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed

Screenshots

N/A

@RinZ27
RinZ27 requested a review from NovaCode37 as a code owner October 8, 2026 12:15
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. pytest tests/ -q passing is the main thing I look at.

@github-actions github-actions Bot added the javascript Pull requests that update javascript code label Oct 8, 2026

@NovaCode37 NovaCode37 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up. Two things, and the second one is on me for not spotting it when I wrote #519:

1. All ten locale files were re-serialized. The diff is 2358 added lines for what should be about ten, because every one-line object was expanded onto several lines. #519 asks for the JSON to be edited by hand for exactly this reason: it makes the real change impossible to review and conflicts with every other open translation PR. Please reset the locale files to main and add only what is needed.

2. Most of these strings are already translated. The keys exist in all ten locales and simply were never wired up:

Literal Existing key
Disposable email detected results.emailrep.disposableWarn
Domain is spoofable (missing SPF/DMARC) results.emailrep.spoofableWarn
Free email provider results.emailrep.freeProvider
Catch-all server (accepts any address) results.smtp.catchAllWarn

So those four lines should use i18n('results.emailrep.disposableWarn') and so on, with no new keys. The existing values already include the ⚠, so drop the symbol from the JSX for those three. Right now the new results.email.* keys hold English text in every locale, so the Russian interface would still show English.

Only "No breaches found" needs a new key. results.breaches.none fits next to the others; please give it real translations, at least for the languages you can check, and the English text for the rest.

@RinZ27
RinZ27 force-pushed the fix/email-translations branch from 28520de to a2151f5 Compare October 8, 2026 14:35
@RinZ27

RinZ27 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@NovaCode37 Fixed the locale files formatting by reverting them to main and appending only the new results.breaches.none key. Also wired up the existing results.emailrep.* and results.smtp.* keys in ScanResults.tsx as suggested, which meant removing the redundant warning symbols from the JSX.

@NovaCode37 NovaCode37 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is what I asked for. I pushed one small commit to keep pl.json in its multi-line style.

@NovaCode37 NovaCode37 added the hacktoberfest-accepted Counts toward Hacktoberfest label Oct 10, 2026
@NovaCode37
NovaCode37 merged commit 0ab9617 into NovaCode37:main Oct 10, 2026
8 checks passed
@RinZ27
RinZ27 deleted the fix/email-translations branch October 10, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Counts toward Hacktoberfest javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate the status lines and warnings inside the result cards

2 participants