Skip to content

Translate the field labels inside the result cards (about 66 left in English) #464

Description

@NovaCode37

#439 and #444 translated the card titles, tooltips and aria-labels, but the field names inside the cards are still English literals. In frontend/src/components/views/ScanResults.tsx there are about 66 of them, almost all DtRow labels:

<DtRow label="Country" value={...} />
<DtRow label="Followers" value={...} />
<DtRow label="Total Stars" value={...} />

So someone using the Russian or Chinese interface gets a translated card title over a block of English field names. grep -noE 'label="[A-Z][a-z][^"]+"' frontend/src/components/views/ScanResults.tsx lists them with line numbers.

What to do:

  • Replace each literal with label={i18n('...')}.
  • Many cards already have a key group under results.* in messages/en.json (results.whois, results.github and so on); put the field keys there. Labels that repeat across cards, like Country, Name or Type, can share a key under results.fields.* instead of being added nine times.
  • Every new key goes into all ten files in messages/, real translations where you can and the English text where you cannot. npm run test:i18n checks that the locales line up. Edit the JSON by hand; re-saving it through a library rewrites the whole file.

This is a lot for one pull request. Splitting it by card is welcome; say in the PR which cards it covers so the next person can take the rest.

Done when that grep returns nothing for ScanResults.tsx and npm run build passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

hacktoberfestOpen for Hacktoberfest contributionshelp wantedExtra attention is neededjavascriptPull requests that update javascript code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions