Skip to content

Commit

Permalink
Add translations of nightly-builds and downloads in French (#2637)
Browse files Browse the repository at this point in the history
* Add translations of nightly-builds and downloads in French

* Set 'defaults' for default text in EN

* Try to fix pb with jest (wobsoriano/vitest-canvas-mock#10 (comment))
  • Loading branch information
xavierfacq authored Jan 30, 2024
1 parent d32683e commit 023a554
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 42 deletions.
11 changes: 10 additions & 1 deletion locales/fr/download.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@
"Source Code Archive": "Code source",
"Any": "Tout",
"Installation guide": "Guide d'installation",
"Source Code": "Code source"
"Source Code": "Code source",
"archive.do.not.use.unsupported": "L’utilisation de versions anciennes, modifiées ou non prises en charge n’est pas recommandée.",
"archive.be.aware": "Veuillez noter que cette page contient d'anciennes versions d'Eclipse Temurin conservées à titre de référence. Les <latestReleasesLink>dernières versions</latestReleasesLink> doivent être utilisées pour le développement et la production.",
"download.not.available": "Non disponible",
"nightly.builds.unsupported.in.production": "Ces versions ne sont pas prises en charge et ne sont pas destinées à être utilisées en production.",
"vendor.selector.view": "Voir",
"vendor.selector.prior.to": "nightly builds avant le :",
"nightly.builds.be.aware": "Veuillez noter que cette archive contient des versions intermédiaires créées comme étape de développement vers une <fullReleaseLink>version officielle</fullReleaseLink>. Les builds intermédiaires sont éphémères et peuvent disparaître dans le futur.",
"nightly.builds.notice.title": "La note suivante s'applique aux versions intermédiaires :",
"nightly.builds.quoted.notice": "Il s'agit d'une version intermédiaire mise à disposition à des fins de test uniquement. Le code n'est pas testé et présumé incompatible avec la spécification Java SE. Vous ne devez pas déployer ou écrire dans ce code, mais plutôt utiliser la version testée et certifiée compatible Java SE du code. La redistribution de cette version doit conserver cet avis."
}
3 changes: 2 additions & 1 deletion locales/fr/temurin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"release.intro": "Eclipse Temurin est le projet open source Java SE basé sur OpenJDK. Temurin est disponible pour une <supportedPlatformsLink>large gamme de plates-formes</supportedPlatformsLink> et de versions de Java SE. Les dernières versions recommandées pour une utilisation en production sont répertoriées ci-dessous et sont régulièrement <supportLink>mises à jour et prises en charge</supportLink> par la communauté Adoptium. L'aide à la migration, les images de conteneurs et les guides d'installation des packages sont disponibles dans la <docsLink>section documentation</docsLink>.",
"Use the drop-down boxes below to filter the list of current releases.": "Utilisez la liste déroulante ci-dessous pour voir les versions actuelles.",
"Use the drop-down boxes below to filter the list of current releases.": "Utilisez les listes déroulantes ci-dessous pour filtrer les versions.",
"Use the drop-down boxes below to filter the list of releases.": "Utilisez les listes déroulantes ci-dessous pour filtrer les versions.",
"Previous releases are available in the Temurin archive.": "Les versions précédentes sont disponibles dans les archives Temurin.",
"Release Notes": "Notes de version",
"Installation Guide": "Guide d'installation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ exports[`TemurinArchiveTable component > renders correctly 1`] = `
class="btn"
style="width: 9em; background-color: rgb(215, 222, 233);"
>
Not Available
Text
</a>
</td>
<td
Expand Down
2 changes: 1 addition & 1 deletion src/components/TemurinArchiveTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const TemurinArchiveTable = ({results, updatePage}) => {
/>
) :
<a className="btn" style={{width: "9em", backgroundColor: "#D7DEE9"}}>
Not Available
<Trans i18nKey='download.not.available' defaults='Not Available' />
</a>
}
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ exports[`TemurinNightlyTable component > renders correctly 1`] = `
</a>
</td>
<td>
Not Available
Text
</td>
<td>
<a
Expand Down
2 changes: 1 addition & 1 deletion src/components/TemurinNightlyTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const TemurinNightlyTable = ({results}) => {
{asset.installer_link ? (
<td><Link to="/download" state={{ link: asset.installer_link, checksum: asset.installer_checksum }}>{asset.installer_extension}</Link></td>
) :
<td>Not Available</td>
<td><Trans i18nKey='download.not.available' defaults='Not Available' /></td>
}
<td><a href="" data-bs-toggle="modal" data-bs-target="#checksumModal" data-bs-checksum={asset.checksum}><Trans>Checksum</Trans></a></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ exports[`VersionSelector > updates the number of builds and build date when the
</div>
<div
class="input-group pb-5 d-flex justify-content-center"
style="line-height: 36px;"
>
<span
class="p-2"
>
View
</span>
/>
<select
aria-label="Filter by number of builds"
class="form-select form-select-sm"
Expand Down Expand Up @@ -80,9 +79,7 @@ exports[`VersionSelector > updates the number of builds and build date when the
</select>
<span
class="p-2"
>
nightly builds prior to:
</span>
/>
<div
class="MuiFormControl-root MuiTextField-root css-qixv09-MuiFormControl-root-MuiTextField-root"
>
Expand Down
6 changes: 3 additions & 3 deletions src/components/VersionSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ const VersionSelector = ({updater, releaseType, Table}) => {
</select>
</div>
{releaseType === "ea" && (
<div className="input-group pb-5 d-flex justify-content-center">
<span className='p-2'>View</span>
<div className="input-group pb-5 d-flex justify-content-center" style={{lineHeight: '36px'}}>
<span className='p-2'><Trans i18nKey='vendor.selector.view' defaults='View'/></span>
<select data-testid="build-num-filter" aria-label="Filter by number of builds" id="build-num-filter" onChange={(e) => setNumBuilds(e.target.value)} defaultValue={numBuilds} className="form-select form-select-sm" style={{ maxWidth: '5em' }}>
<option key={1} value={1}>1</option>
<option key={5} value={5}>5</option>
<option key={10} value={10}>10</option>
<option key={20} value={20}>20</option>
<option key={50} value={50}>50</option>
</select>
<span className='p-2'>nightly builds prior to:</span>
<span className='p-2'><Trans i18nKey='vendor.selector.prior.to' defaults='nightly builds prior to:'/></span>
<LocalizationProvider dateAdapter={AdapterDateFns} adapterLocale={locale}>
<DesktopDatePicker
label="Build Date"
Expand Down
10 changes: 2 additions & 8 deletions src/pages/temurin/__tests__/__snapshots__/archive.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,13 @@ exports[`Temurin Archive page > renders correctly 1`] = `
<div
class="callout callout-default text-start"
>
Please be aware that this archive contains old releases of Eclipse Temurin kept for reference. The
<a
href="/temurin/releases"
>
latest releases
</a>
should be used in development and production.
Text
<br />
<br />
<p
class="text-warning"
>
Using old, superseded, or otherwise unsupported builds is not recommended.
Text
</p>
</div>
<div
Expand Down
21 changes: 9 additions & 12 deletions src/pages/temurin/__tests__/__snapshots__/nightly.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,20 @@ exports[`Temurin Nightly page > renders correctly 1`] = `
<div
class="callout callout-default text-start"
>
Please be aware that this archive contains intermediate builds created as a development step towards a
<a
href="/temurin/releases"
>
full release
</a>
. Intermediate builds are ephemeral, and may disappear in the future.
Text
<br />
<br />
The following notice applies to intermediate builds:
Text
<br />
“This is an intermediate build made available for testing purposes only. The code is untested and presumed incompatible with the Java SE specification. You should not deploy or write to this code, but instead use the tested and certified Java SE compatible version of the code. Redistribution of this build must retain this notice.”
Text
<br />
<br />
<p
class="text-warning"
>
These builds are unsupported and not for use in production.
Text
</p>
</div>
<div
Expand Down Expand Up @@ -129,11 +125,12 @@ exports[`Temurin Nightly page > renders correctly 1`] = `
</div>
<div
class="input-group pb-5 d-flex justify-content-center"
style="line-height: 36px;"
>
<span
class="p-2"
>
View
Text
</span>
<select
aria-label="Filter by number of builds"
Expand Down Expand Up @@ -172,7 +169,7 @@ exports[`Temurin Nightly page > renders correctly 1`] = `
<span
class="p-2"
>
nightly builds prior to:
Text
</span>
<div
class="MuiFormControl-root MuiTextField-root css-qixv09-MuiFormControl-root-MuiTextField-root"
Expand Down
9 changes: 7 additions & 2 deletions src/pages/temurin/archive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import VersionSelector from '../../components/VersionSelector'
import ChecksumModal from '../../components/ChecksumModal'
import TemurinArchiveTable from '../../components/TemurinArchiveTable'
import { getAssetsForVersion } from '../../hooks'
import LinkText from '../../components/LinkText'

const TemurinReleases = () => (
<Layout>
Expand All @@ -18,10 +19,14 @@ const TemurinReleases = () => (
<h1 className='fw-light'>Archive</h1>
<div className='row align-items-center pt-2'>
<div className='callout callout-default text-start'>
Please be aware that this archive contains old releases of Eclipse Temurin kept for reference. The <Link to='/temurin/releases'>latest releases</Link> should be used in development and production.
<Trans i18nKey='archive.be.aware' defaults="Please be aware that this archive contains old releases of Eclipse Temurin kept for reference. The <latestReleasesLink>latest releases</latestReleasesLink> should be used in development and production."
components={{
latestReleasesLink: <LinkText href='/temurin/releases' />
}}
/>
<br />
<br />
<p className='text-warning'>Using old, superseded, or otherwise unsupported builds is not recommended.</p>
<p className='text-warning'><Trans i18nKey='archive.do.not.use.unsupported' defaults="Using old, superseded, or otherwise unsupported builds is not recommended." /></p>
</div>
<div className='btn-group'>
<Link to='/temurin/releases' className='btn btn-primary m-3'>
Expand Down
16 changes: 11 additions & 5 deletions src/pages/temurin/nightly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import VersionSelector from '../../components/VersionSelector'
import ChecksumModal from '../../components/ChecksumModal'
import TemurinNightlyTable from '../../components/TemurinNightlyTable'
import { getAssetsForVersion } from '../../hooks'
import LinkText from '../../components/LinkText'

const TemurinReleases = () => (
<Layout>
Expand All @@ -18,17 +19,22 @@ const TemurinReleases = () => (
<h1 className='fw-light'>Nightly builds</h1>
<div className='row align-items-center pt-2'>
<div className='callout callout-default text-start'>
Please be aware that this archive contains intermediate builds created as a development step towards a <Link to='/temurin/releases'>full release</Link>. Intermediate builds are ephemeral, and may disappear in the future.
<Trans i18nKey='nightly.builds.be.aware' defaults='Please be aware that this archive contains intermediate builds created as a development step towards a <fullReleaseLink>full release</fullReleaseLink>. Intermediate builds are ephemeral, and may disappear in the future.'
components= {{
fullReleaseLink: <LinkText href='/temurin/releases' />
}}
/>
<br />
<br />
The following notice applies to intermediate builds:
<Trans i18nKey='nightly.builds.notice.title' defaults='The following notice applies to intermediate builds:' />
<br />
&ldquo;This is an intermediate build made available for testing purposes only. The code is untested and presumed incompatible with the Java SE specification.
&ldquo;<Trans i18nKey='nightly.builds.quoted.notice' defaults='This is an intermediate build made available for testing purposes only. The code is untested and presumed incompatible with the Java SE specification.
You should not deploy or write to this code, but instead use the tested and certified Java SE compatible version of the code.
Redistribution of this build must retain this notice.&rdquo;
Redistribution of this build must retain this notice.' />&rdquo;
<br />
<br />
<p className='text-warning'>These builds are unsupported and not for use in production.</p>
<p className='text-warning'>
<Trans i18nKey='nightly.builds.unsupported.in.production' defaults='These builds are unsupported and not for use in production.' /></p>
</div>
<div className='btn-group'>
<Link to='/temurin/releases' className='btn btn-primary m-3'>
Expand Down
3 changes: 3 additions & 0 deletions vitest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ const IntersectionObserverMock = vi.fn(() => ({
}))

vi.stubGlobal('IntersectionObserver', IntersectionObserverMock)

vi.stubGlobal("jest", vi);

0 comments on commit 023a554

Please sign in to comment.