Skip to content

Commit

Permalink
Translate main file
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfacq committed Oct 5, 2023
1 parent 54762fc commit 81514ec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions locales/fr/docs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"docs.documentation.title": "Documentation",
"docs.documentation.tagline": "Tout ce dont vous avez besoin pour démarrer avec la technologie Adoptium",
"docs.documentation.placeholder": "Commencez à taper pour rechercher dans la documentation...",

"docs.get.temurin": "Obtenir Temurin",
"docs.install.temurin": "Installer Temurin",
"docs.download.temurin": "Télécharger Temurin",
Expand Down
7 changes: 4 additions & 3 deletions src/components/DocumentationHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { convert } from 'html-to-text'
import { useFlexSearch } from "react-use-flexsearch";
import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
import { Trans } from 'gatsby-plugin-react-i18next';

import './DocumentationHeader.scss';

Expand Down Expand Up @@ -43,8 +44,8 @@ const DocumentationHeader = ({
return (
<div className="docs-header p-5 text-center">
<div className="container">
<h1>Documentation</h1>
<div className="lead">Everything you need to get started with Adoptium technology</div>
<h1><Trans i18nKey='docs.documentation.title' defaults="Documentation"/></h1>
<div className="lead"><Trans i18nKey='docs.documentation.tagline' defaults="Everything you need to get started with Adoptium technology" /></div>
<div className="main-search-box pt-3 d-block mx-auto">
<Autocomplete
disablePortal
Expand All @@ -57,7 +58,7 @@ const DocumentationHeader = ({
renderInput={(params) =>
<TextField {...params}
onChange={e => setSearchQuery(e.target.value)}
label="Start typing to search the docs..."
label={<Trans i18nKey='docs.documentation.placeholder' defaults="Start typing to search the docs..." />}
/>
}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/__tests__/__snapshots__/docs.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ exports[`Docs page > renders correctly 1`] = `
class="container"
>
<h1>
Documentation
Text
</h1>
<div
class="lead"
>
Everything you need to get started with Adoptium technology
Text
</div>
<div
class="main-search-box pt-3 d-block mx-auto"
Expand All @@ -32,7 +32,7 @@ exports[`Docs page > renders correctly 1`] = `
for="combo-box-demo"
id="combo-box-demo-label"
>
Start typing to search the docs...
Text
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-adornedEnd MuiAutocomplete-inputRoot css-154xyx0-MuiInputBase-root-MuiOutlinedInput-root"
Expand Down Expand Up @@ -84,7 +84,7 @@ exports[`Docs page > renders correctly 1`] = `
class="css-yjsfm1"
>
<span>
Start typing to search the docs...
Text
</span>
</legend>
</fieldset>
Expand Down

0 comments on commit 81514ec

Please sign in to comment.