Skip to content

Commit 48a69a5

Browse files
committed
translate some descriptions
1 parent 5c254cc commit 48a69a5

File tree

1 file changed

+76
-63
lines changed

1 file changed

+76
-63
lines changed

src/components/Layout/HomeContent.js

Lines changed: 76 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function HomeContent() {
143143
React
144144
</h1>
145145
<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">
146-
The library for web and native user interfaces
146+
用於網頁與原生使用者介面的函式庫
147147
</p>
148148
<div className="mt-5 self-center flex gap-2 w-full sm:w-auto flex-col sm:flex-row">
149149
<ButtonLink
@@ -152,91 +152,95 @@ export function HomeContent() {
152152
size="lg"
153153
className="w-full sm:w-auto justify-center"
154154
label="Learn React">
155-
Learn React
155+
學習 React
156156
</ButtonLink>
157157
<ButtonLink
158158
href={'/reference/react'}
159159
type="secondary"
160160
size="lg"
161161
className="w-full sm:w-auto justify-center"
162162
label="API Reference">
163-
API Reference
163+
API 參考
164164
</ButtonLink>
165165
</div>
166166
</div>
167167

168168
<Section background="left-card">
169169
<Center>
170-
<Header>Create user interfaces from components</Header>
170+
<Header>從元件建立使用者介面</Header>
171171
<Para>
172-
React lets you build user interfaces out of individual pieces
173-
called components. Create your own React components like{' '}
174-
<Code>Thumbnail</Code>, <Code>LikeButton</Code>, and{' '}
175-
<Code>Video</Code>. Then combine them into entire screens, pages,
176-
and apps.
172+
React 讓你以稱為「元件」的獨立部分來建立使用者介面。
173+
<br />
174+
你也可以建立自己的 React 元件,例如: <Code>Thumbnail</Code>
175+
<Code>LikeButton</Code><Code>Video</Code>
176+
接著將它們組合成完整的畫面、頁面與應用程式。
177177
</Para>
178178
</Center>
179179
<FullBleed>
180180
<Example1 />
181181
</FullBleed>
182182
<Center>
183183
<Para>
184-
Whether you work on your own or with thousands of other
185-
developers, using React feels the same. It is designed to let you
186-
seamlessly combine components written by independent people,
187-
teams, and organizations.
184+
無論你是獨立開發,或與上千名開發者協作,使用 React
185+
的體驗都是一致的。
186+
它的設計讓你能無縫地組合來自個人開發者、團隊或組織的元件。
188187
</Para>
189188
</Center>
190189
</Section>
191190

192191
<Section background="right-card">
193192
<Center>
194-
<Header>Write components with code and markup</Header>
193+
<Header>使用程式碼與標記語法撰寫你的元件</Header>
195194
<Para>
196-
React components are JavaScript functions. Want to show some
197-
content conditionally? Use an <Code>if</Code> statement.
198-
Displaying a list? Try array <Code>map()</Code>. Learning React is
199-
learning programming.
195+
React 元件是使用JavaScript 函式。
196+
<br />
197+
想要依條件顯示內容嗎?使用 <Code>if</Code> 陳述式;
198+
<br />
199+
想要顯示一個列表嗎?試試陣列的 <Code>map()</Code><br />
200+
學習 React,就是在學習程式設計。
200201
</Para>
201202
</Center>
202203
<FullBleed>
203204
<Example2 />
204205
</FullBleed>
205206
<Center>
206207
<Para>
207-
This markup syntax is called JSX. It is a JavaScript syntax
208-
extension popularized by React. Putting JSX markup close to
209-
related rendering logic makes React components easy to create,
210-
maintain, and delete.
208+
這種標記語法稱為 JSX。 它是一種由 React 推廣的 JavaScript
209+
語法擴充。
210+
<br />將 JSX 標記與相關的渲染邏輯放在一起,讓 React
211+
元件更容易建立、維護與刪除。
211212
</Para>
212213
</Center>
213214
</Section>
214215

215216
<Section background="left-card">
216217
<Center>
217-
<Header>Add interactivity wherever you need it</Header>
218+
<Header>依據需求添加互動功能</Header>
218219
<Para>
219-
React components receive data and return what should appear on the
220-
screen. You can pass them new data in response to an interaction,
221-
like when the user types into an input. React will then update the
222-
screen to match the new data.
220+
React 元件會接收資料,並回傳要顯示在畫面上的內容。
221+
<br />
222+
當使用者與介面互動時,例如在輸入框輸入文字,你可以傳入新的資料。
223+
<br />
224+
React 會自動更新畫面,讓內容與最新資料一致。
223225
</Para>
224226
</Center>
225227
<FullBleed>
226228
<Example3 />
227229
</FullBleed>
228230
<Center>
229231
<Para>
230-
You don’t have to build your whole page in React. Add React to
231-
your existing HTML page, and render interactive React components
232-
anywhere on it.
232+
你不需要用 React 建立整個頁面。
233+
<br />
234+
只要將 React 加入現有的 HTML 頁面,
235+
<br />
236+
就能在頁面的任何地方渲染互動式的 React 元件。
233237
</Para>
234238
<div className="flex justify-start w-full lg:justify-center">
235239
<CTA
236240
color="gray"
237241
icon="code"
238242
href="/learn/add-react-to-an-existing-project">
239-
Add React to your page
243+
在你的頁面上添加React
240244
</CTA>
241245
</div>
242246
</Center>
@@ -245,14 +249,18 @@ export function HomeContent() {
245249
<Section background="right-card">
246250
<Center>
247251
<Header>
248-
Go full-stack <br className="hidden lg:inline" />
249-
with a framework
252+
透過框架
253+
<br className="hidden lg:inline" />
254+
打造全端應用
250255
</Header>
251256
<Para>
252-
React is a library. It lets you put components together, but it
253-
doesn’t prescribe how to do routing and data fetching. To build an
254-
entire app with React, we recommend a full-stack React framework
255-
like <Link href="https://nextjs.org">Next.js</Link> or{' '}
257+
React 是一個函式庫。
258+
<br />
259+
它讓你能將元件組合在一起,但不會規範路由或資料擷取的方式。
260+
<br />
261+
若要使用 React 建立完整的應用程式,我們建議使用全端 React 框架,
262+
<br />
263+
例如 <Link href="https://nextjs.org">Next.js</Link>{' '}
256264
<Link href="https://reactrouter.com">React Router</Link>.
257265
</Para>
258266
</Center>
@@ -261,30 +269,32 @@ export function HomeContent() {
261269
</FullBleed>
262270
<Center>
263271
<Para>
264-
React is also an architecture. Frameworks that implement it let
265-
you fetch data in asynchronous components that run on the server
266-
or even during the build. Read data from a file or a database, and
267-
pass it down to your interactive components.
272+
React 同時也是一種架構。
273+
<br />
274+
實作該架構的框架允許你在伺服器端,甚至在建置階段,於非同步元件中擷取資料。
275+
<br />
276+
你可以從檔案或資料庫讀取資料,並將它傳遞到互動式元件中。
268277
</Para>
269278
<div className="flex justify-start w-full lg:justify-center">
270279
<CTA
271280
color="gray"
272281
icon="framework"
273282
href="/learn/start-a-new-react-project">
274-
Get started with a framework
283+
從框架開始
275284
</CTA>
276285
</div>
277286
</Center>
278287
</Section>
279288
<Section background="left-card">
280289
<div className="mx-auto flex flex-col w-full">
281290
<div className="mx-auto max-w-4xl lg:text-center items-center px-5 flex flex-col">
282-
<Header>Use the best from every platform</Header>
291+
<Header>善用各平台的優勢</Header>
283292
<Para>
284-
People love web and native apps for different reasons. React
285-
lets you build both web apps and native apps using the same
286-
skills. It leans upon each platform’s unique strengths to let
287-
your interfaces feel just right on every platform.
293+
人們喜歡網頁和原生應用程式的原因不同。
294+
<br />
295+
React 讓你能運用相同的技能來開發兩者。
296+
<br />
297+
它善用各平台的獨特優勢,讓介面在每個平台上都感覺恰到好處。
288298
</Para>
289299
</div>
290300
<div className="max-w-7xl mx-auto flex flex-col lg:flex-row mt-16 mb-20 lg:mb-28 px-5 gap-20 lg:gap-5">
@@ -298,15 +308,18 @@ export function HomeContent() {
298308
<div className="bg-wash relative h-14 w-full" />
299309
<div className="relative flex items-start justify-center flex-col flex-1 pb-16 pt-5 gap-3 px-5 lg:px-10 lg:pt-8">
300310
<h4 className="leading-tight text-primary font-semibold text-3xl lg:text-4xl">
301-
Stay true to the web
311+
忠於網頁
302312
</h4>
303313
<p className="lg:text-xl leading-normal text-secondary">
304-
People expect web app pages to load fast. On the server,
305-
React lets you start streaming HTML while you’re still
306-
fetching data, progressively filling in the remaining
307-
content before any JavaScript code loads. On the client,
308-
React can use standard web APIs to keep your UI
309-
responsive even in the middle of rendering.
314+
使用者期望網頁應用程式能快速載入。
315+
<br />
316+
在伺服器端,React 允許你在仍在擷取資料時就開始串流傳送
317+
HTML,
318+
<br />
319+
並在 JavaScript 程式碼載入前逐步填入剩餘內容。
320+
在用戶端,React 可以利用標準的 Web API,
321+
<br />
322+
讓你的介面即使在渲染過程中也能保持即時回應。
310323
</p>
311324
</div>
312325
</div>
@@ -384,21 +397,21 @@ export function HomeContent() {
384397
</div>
385398
<div className="flex flex-col items-start justify-center pt-0 gap-3 px-2.5 lg:pt-8 lg:px-8">
386399
<h4 className="leading-tight text-primary dark:text-primary-dark font-semibold text-3xl lg:text-4xl">
387-
Go truly native
400+
真正的原生體驗
388401
</h4>
389402
<p className="h-full lg:text-xl text-secondary dark:text-secondary-dark leading-normal">
390-
People expect native apps to look and feel like their
391-
platform.{' '}
403+
人們期望原生應用程式在外觀與操作上都能符合各自的平台{' '}
392404
<Link href="https://reactnative.dev">
393405
React Native
394406
</Link>{' '}
395-
and{' '}
407+
{' '}
396408
<Link href="https://github.com/expo/expo">Expo</Link>{' '}
397-
let you build apps in React for Android, iOS, and
398-
more. They look and feel native because their UIs{' '}
399-
<i>are</i> truly native. It’s not a web view—your
400-
React components render real Android and iOS views
401-
provided by the platform.
409+
讓你能使用 React 來開發 Android、iOS
410+
以及更多平台的應用程式。
411+
<br />
412+
它們在外觀和操作如同原生應用程式,因為它們的使用者介面是真正的原生
413+
UI。 這並非透過網頁開啟,而是React
414+
元件直接渲染出平台所提供的原生 Android 與 iOS 畫面。
402415
</p>
403416
</div>
404417
</div>

0 commit comments

Comments
 (0)