Skip to content

Commit c3b7db1

Browse files
authored
Merge pull request #449 from reactjs/copy/homepage-atf
Homepage: traduction au-dessus du fold
2 parents eddddda + 487afb4 commit c3b7db1

File tree

3 files changed

+54
-49
lines changed

3 files changed

+54
-49
lines changed

src/components/Layout/HomeContent.js

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33
*/
44

55
import {
6+
Fragment,
7+
Suspense,
68
createContext,
79
memo,
8-
useState,
910
useContext,
10-
useId,
11-
Fragment,
12-
Suspense,
1311
useEffect,
12+
useId,
13+
useReducer,
1414
useRef,
15+
useState,
1516
useTransition,
16-
useReducer,
1717
} from 'react';
18-
import cn from 'classnames';
19-
import NextLink from 'next/link';
2018

21-
import ButtonLink from '../ButtonLink';
22-
import {IconRestart} from '../Icon/IconRestart';
2319
import BlogCard from 'components/MDX/BlogCard';
20+
import ButtonLink from '../ButtonLink';
21+
import CodeBlock from 'components/MDX/CodeBlock';
22+
import {ExternalLink} from 'components/ExternalLink';
2423
import {IconChevron} from 'components/Icon/IconChevron';
24+
import {IconNavArrow} from 'components/Icon/IconNavArrow';
25+
import {IconRestart} from '../Icon/IconRestart';
2526
import {IconSearch} from 'components/Icon/IconSearch';
26-
import {Logo} from 'components/Logo';
2727
import Link from 'components/MDX/Link';
28-
import CodeBlock from 'components/MDX/CodeBlock';
29-
import {IconNavArrow} from 'components/Icon/IconNavArrow';
30-
import {ExternalLink} from 'components/ExternalLink';
28+
import {Logo} from 'components/Logo';
29+
import NextLink from 'next/link';
30+
import cn from 'classnames';
3131
import sidebarBlog from '../../sidebarBlog.json';
3232

3333
function Section({children, background = null}) {
@@ -131,48 +131,51 @@ export function HomeContent() {
131131
React
132132
</h1>
133133
<p className="text-4xl font-display max-w-lg md:max-w-full py-1 text-center text-secondary dark:text-primary-dark leading-snug self-center">
134-
The library for web and native user interfaces
134+
La bibliothèque pour des interfaces utilisateurs web et natives
135135
</p>
136136
<div className="mt-5 self-center flex gap-2 w-full sm:w-auto flex-col sm:flex-row">
137137
<ButtonLink
138138
href={'/learn'}
139139
type="primary"
140140
size="lg"
141141
className="w-full sm:w-auto justify-center"
142-
label="Learn React">
143-
Learn React
142+
label="Apprenez React">
143+
Apprenez React
144144
</ButtonLink>
145145
<ButtonLink
146146
href={'/reference/react'}
147147
type="secondary"
148148
size="lg"
149149
className="w-full sm:w-auto justify-center"
150-
label="API Reference">
151-
API Reference
150+
label="Référence de l’API">
151+
Référence de l’API
152152
</ButtonLink>
153153
</div>
154154
</div>
155155

156156
<Section background="left-card">
157157
<Center>
158-
<Header>Create user interfaces from components</Header>
158+
<Header>
159+
Créez des interfaces utilisateurs à l’aide de composants
160+
</Header>
159161
<Para>
160-
React lets you build user interfaces out of individual pieces
161-
called components. Create your own React components like{' '}
162-
<Code>Thumbnail</Code>, <Code>LikeButton</Code>, and{' '}
163-
<Code>Video</Code>. Then combine them into entire screens, pages,
164-
and apps.
162+
React vous permet de construire des interfaces utilisateurs à
163+
partir de briques individuelles appelées composants. Créez vos
164+
propres composants tels que <Code>Thumbnail</Code>,{' '}
165+
<Code>LikeButton</Code>, et <Code>Video</Code>. Puis combinez-les
166+
pour produire des écrans, pages et applis entières.
165167
</Para>
166168
</Center>
167169
<FullBleed>
168170
<Example1 />
169171
</FullBleed>
170172
<Center>
171173
<Para>
172-
Whether you work on your own or with thousands of other
173-
developers, using React feels the same. It is designed to let you
174-
seamlessly combine components written by independent people,
175-
teams, and organizations.
174+
Que vous travailliez dans votre coin ou avec des milliers d’autres
175+
développeur·se·s, l’utilisation de React est la même. React est
176+
conçu pour vous permettre de combiner sans effort des composants
177+
produits par des acteurs distincts, qu’il s’agisse de personnes,
178+
d’équipes ou d’organisations entières.
176179
</Para>
177180
</Center>
178181
</Section>
@@ -922,8 +925,8 @@ function Example1() {
922925
<Video
923926
video={{
924927
id: 'ex1-0',
925-
title: 'My video',
926-
description: 'Video description',
928+
title: 'Ma vidéo',
929+
description: 'Description de la vidéo',
927930
image: 'blue',
928931
url: null,
929932
}}

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,30 @@
22
* Copyright (c) Facebook, Inc. and its affiliates.
33
*/
44

5+
import * as React from 'react';
6+
57
import {
6-
useState,
7-
useRef,
8+
Suspense,
9+
startTransition,
810
useCallback,
911
useEffect,
10-
startTransition,
11-
Suspense,
12+
useRef,
13+
useState,
1214
} from 'react';
13-
import * as React from 'react';
14-
import cn from 'classnames';
15-
import NextLink from 'next/link';
16-
import {useRouter} from 'next/router';
1715
import {disableBodyScroll, enableBodyScroll} from 'body-scroll-lock';
1816

17+
import {Feedback} from '../Feedback';
1918
import {IconClose} from 'components/Icon/IconClose';
2019
import {IconHamburger} from 'components/Icon/IconHamburger';
2120
import {IconSearch} from 'components/Icon/IconSearch';
22-
import {Search} from 'components/Search';
2321
import {Logo} from '../../Logo';
24-
import {Feedback} from '../Feedback';
25-
import {SidebarRouteTree} from '../Sidebar/SidebarRouteTree';
22+
import NextLink from 'next/link';
2623
import type {RouteItem} from '../getRouteMeta';
24+
import {Search} from 'components/Search';
2725
import {SidebarLink} from '../Sidebar';
26+
import {SidebarRouteTree} from '../Sidebar/SidebarRouteTree';
27+
import cn from 'classnames';
28+
import {useRouter} from 'next/router';
2829

2930
declare global {
3031
interface Window {
@@ -268,7 +269,7 @@ export default function TopNav({
268269
)}
269270
onClick={onOpenSearch}>
270271
<IconSearch className="mr-3 align-middle text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
271-
Search
272+
Recherche
272273
<span className="ml-auto hidden sm:flex item-center mr-1">
273274
<Kbd data-platform="mac"></Kbd>
274275
<Kbd data-platform="win" wide>
@@ -281,15 +282,15 @@ export default function TopNav({
281282
<div className="text-base justify-center items-center gap-1.5 flex 3xl:flex-1 flex-row 3xl:justify-end">
282283
<div className="mx-2.5 gap-1.5 hidden lg:flex">
283284
<NavItem isActive={section === 'learn'} url="/learn">
284-
Learn
285+
Apprendre
285286
</NavItem>
286287
<NavItem
287288
isActive={section === 'reference'}
288289
url="/reference/react">
289-
Reference
290+
Référence
290291
</NavItem>
291292
<NavItem isActive={section === 'community'} url="/community">
292-
Community
293+
Communauté
293294
</NavItem>
294295
<NavItem isActive={section === 'blog'} url="/blog">
295296
Blog

src/components/SocialBanner.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
*
44
*/
55

6-
import {useRef, useEffect} from 'react';
7-
import cn from 'classnames';
6+
import {useEffect, useRef} from 'react';
7+
88
import {ExternalLink} from './ExternalLink';
9+
import cn from 'classnames';
910

10-
const bannerText = 'Support Ukraine 🇺🇦';
11+
const bannerText = 'Soutenez l’Ukraine 🇺🇦';
1112
const bannerLink = 'https://opensource.fb.com/support-ukraine';
12-
const bannerLinkText = 'Help Provide Humanitarian Aid to Ukraine';
13+
const bannerLinkText = 'Aidez-nous à fournir une aide humanitaire à l’Ukraine';
1314

1415
export default function SocialBanner() {
1516
const ref = useRef<HTMLDivElement | null>(null);

0 commit comments

Comments
 (0)