Repository navigation
feat: completely translate all ScanResult fields into 10 languages - #528
abhijeetnardele24-hash wants to merge 10 commits into
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, this is a big one and the structure is right: no reformatting, only added keys, and no English label left in ScanResults.tsx. The translations need a pass before merge, though. Several read like machine translation that misread the context:
copyOnionUrlis a Tor.onionaddress, not the vegetable. Every locale has it as "onion" the plant: Zwiebel, cebolla, oignon, cipolla, cebula, cebola, Soğan, 洋葱, and in Russian «лука». Keep.onionas a technical term, for example «Скопировать .onion-адрес», "Copy .onion address".carrieris the phone network operator, not a transporter. Russian already uses «Оператор» elsewhere inresults.phone.carrier; German, Spanish, French, Italian, Polish, Turkish and Chinese have the transport sense (Träger, Transportador, Transporteur, Vettore, Przewoźnik, Taşıyıcı, 载体). Portuguese «Operadora» is right.copyEmailin Russian is «Копировать письмо», which means copy the letter. It copies an address: «Копировать email».asnin Russian is «АСН». It is an abbreviation and staysASN, as in the other locales.
Where a key already exists with a reviewed translation (results.phone.carrier, results.telegram.bio and so on), reusing it is safer than adding a second one. If you are not sure about a language, the English text is a better placeholder than a guess; the Russian strings were reviewed by a native speaker in #347, so they are worth matching.
|
Thanks for catching those! I definitely leaned a bit too hard on the literal translations there. I've updated |
NovaCode37
left a comment
There was a problem hiding this comment.
The translation fixes look right now, thanks. Two things still keep this from merging:
- The locale files are still re-serialized. en.json alone has hundreds of changed lines because the compact one-line objects (
caps,toolsand so on) were expanded. Please reset the ten files to main (git checkout origin/main -- frontend/src/messages/) and add only the new keys by hand, in the style of the lines around them. i18nwas renamed totacross ScanResults.tsx. That touches every line that uses it and conflicts with other open PRs on the same file. Please keep the existing namei18nand only change the lines you are translating.
Also note #523 is about to land and covers the email card warnings and results.breaches.none, so skip those.
|
Thanks so much for the detailed review! I've gone ahead and pushed the requested fixes:
Let me know if this looks good to go or if you need any other tweaks! |
NovaCode37
left a comment
There was a problem hiding this comment.
Closer, the locale files are now small diffs. Three things left:
- The new
results.fieldsblock is English in nine of the ten locales. In ru.json onlycopyEmailandcopyOnionUrlare translated, everything else is "Copy IP", "Company", "Joined" and so on, and de, es, fr, it, pl, pt, tr and zh are fully English. That is the whole point of the PR, so each locale needs real translations. - The rename now went the other way. Main uses
tin the small components at the top of ScanResults.tsx (the map, the graph, the module status line) andi18nin the main component. Leave each one as it is on main and only change the lines that swap a hardcoded string for a key. frontend/package-lock.jsonchanged (peerflags added,libcremoved). That comes from a local npm install with a different npm version. Please drop it:git checkout origin/main -- frontend/package-lock.json.
|
All done! Thanks for catching those. I've pushed the fixes for all three:
Let me know if this hits the mark! |
Hey! The issue mentioned splitting this up by card, but I just went ahead and translated all 66 labels across all 10 languages at once. I added the new
results.fieldskeys to every single JSON file inmessages/(falling back cleanly), and updatedScanResults.tsxto uset()everywhere. Passednpm run test:i18nandnpm run buildwith zero issues. Let me know if you want any of the translation phrasing tweaked!