Repository navigation
feat(i18n): translate email card warnings in ScanResults - #523
Conversation
|
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. |
NovaCode37
left a comment
There was a problem hiding this comment.
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.
28520de to
a2151f5
Compare
|
@NovaCode37 Fixed the locale files formatting by reverting them to main and appending only the new |
NovaCode37
left a comment
There was a problem hiding this comment.
Thanks, this is what I asked for. I pushed one small commit to keep pl.json in its multi-line style.
Summary
Moved the hardcoded status lines from the Email/SMTP/Breaches cards into the locale system to partially resolve #519.
Changes
frontend/src/components/views/ScanResults.tsxwith{i18n('results.email.<key>')}.frontend/src/messages/*.json.⚠,✓) outside the translated text.Type of change
Testing
Screenshots
N/A