Skip to content

Commit e78e30f

Browse files
committed
Add translations to components
1 parent d5bffce commit e78e30f

31 files changed

+119
-123
lines changed

src/components/DocsFooter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function FooterLink({
8080
/>
8181
<div className="flex flex-col overflow-hidden">
8282
<span className="text-sm font-bold tracking-wide no-underline uppercase text-secondary dark:text-secondary-dark group-focus:text-link dark:group-focus:text-link-dark group-focus:text-opacity-100">
83-
{type}
83+
{type === 'Previous' ? 'Попередня' : 'Наступна'}
8484
</span>
8585
<span className="text-lg break-words group-hover:underline">
8686
{title}

src/components/Layout/Feedback.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
6767
{exit: isSubmitted}
6868
)}>
6969
<p className="w-full text-lg font-bold text-primary dark:text-primary-dark me-4">
70-
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
70+
{isSubmitted ? 'Дякуємо за відгук!' : 'Ця сторінка корисна?'}
7171
</p>
7272
{!isSubmitted && (
7373
<button
74-
aria-label="Yes"
74+
aria-label="Так"
7575
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark me-2"
7676
onClick={() => {
7777
setIsSubmitted(true);
@@ -83,7 +83,7 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
8383
)}
8484
{!isSubmitted && (
8585
<button
86-
aria-label="No"
86+
aria-label="Ні"
8787
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark"
8888
onClick={() => {
8989
setIsSubmitted(true);

src/components/Layout/Footer.tsx

+23-27
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export function Footer() {
292292
// @ts-ignore
293293
window.__setUwu(false);
294294
}}>
295-
no uwu plz
295+
без uwu, будь ласка
296296
</div>
297297
<div
298298
className="uwu-hidden text-xs cursor-pointer hover:text-link hover:dark:text-link-dark hover:underline"
@@ -303,7 +303,7 @@ export function Footer() {
303303
uwu?
304304
</div>
305305
<div className="uwu-visible text-xs">
306-
Logo by
306+
Лого від
307307
<ExternalLink
308308
className="ms-1"
309309
href="https://twitter.com/sawaratsuki1004">
@@ -313,72 +313,68 @@ export function Footer() {
313313
</div>
314314
<div className="flex flex-col">
315315
<FooterLink href="/learn" isHeader={true}>
316-
Learn React
317-
</FooterLink>
318-
<FooterLink href="/learn/">Quick Start</FooterLink>
319-
<FooterLink href="/learn/installation">Installation</FooterLink>
320-
<FooterLink href="/learn/describing-the-ui">
321-
Describing the UI
316+
Вивчення React
322317
</FooterLink>
318+
<FooterLink href="/learn/">Швидкий старт</FooterLink>
319+
<FooterLink href="/learn/installation">Встановлення</FooterLink>
320+
<FooterLink href="/learn/describing-the-ui">Написання UI</FooterLink>
323321
<FooterLink href="/learn/adding-interactivity">
324-
Adding Interactivity
322+
Додавання інтерактивності
325323
</FooterLink>
326324
<FooterLink href="/learn/managing-state">Managing State</FooterLink>
327325
<FooterLink href="/learn/escape-hatches">Escape Hatches</FooterLink>
328326
</div>
329327
<div className="flex flex-col">
330328
<FooterLink href="/reference/react" isHeader={true}>
331-
API Reference
329+
Довідник API
332330
</FooterLink>
333-
<FooterLink href="/reference/react">React APIs</FooterLink>
334-
<FooterLink href="/reference/react-dom">React DOM APIs</FooterLink>
331+
<FooterLink href="/reference/react">React: API</FooterLink>
332+
<FooterLink href="/reference/react-dom">React DOM: API</FooterLink>
335333
</div>
336334
<div className="md:col-start-2 xl:col-start-4 flex flex-col">
337335
<FooterLink href="/community" isHeader={true}>
338-
Community
336+
Спільнота
339337
</FooterLink>
340338
<FooterLink href="https://github.com/facebook/react/blob/main/CODE_OF_CONDUCT.md">
341-
Code of Conduct
339+
Кодекс поведінки
342340
</FooterLink>
343-
<FooterLink href="/community/team">Meet the Team</FooterLink>
341+
<FooterLink href="/community/team">Команда React</FooterLink>
344342
<FooterLink href="/community/docs-contributors">
345-
Docs Contributors
346-
</FooterLink>
347-
<FooterLink href="/community/acknowledgements">
348-
Acknowledgements
343+
Автори документації
349344
</FooterLink>
345+
<FooterLink href="/community/acknowledgements">Подяки</FooterLink>
350346
</div>
351347
<div className="flex flex-col">
352-
<FooterLink isHeader={true}>More</FooterLink>
353-
<FooterLink href="/blog">Blog</FooterLink>
348+
<FooterLink isHeader={true}>Більше</FooterLink>
349+
<FooterLink href="/blog">Блог</FooterLink>
354350
<FooterLink href="https://reactnative.dev/">React Native</FooterLink>
355351
<FooterLink href="https://opensource.facebook.com/legal/privacy">
356-
Privacy
352+
Політика конфіденційності
357353
</FooterLink>
358354
<FooterLink href="https://opensource.fb.com/legal/terms/">
359-
Terms
355+
Умови використання
360356
</FooterLink>
361357
<div className="flex flex-row items-center mt-8 gap-x-2">
362358
<ExternalLink
363-
aria-label="React on Facebook"
359+
aria-label="React у Facebook"
364360
href="https://www.facebook.com/react"
365361
className={socialLinkClasses}>
366362
<IconFacebookCircle />
367363
</ExternalLink>
368364
<ExternalLink
369-
aria-label="React on Twitter"
365+
aria-label="React у Twitter"
370366
href="https://twitter.com/reactjs"
371367
className={socialLinkClasses}>
372368
<IconTwitter />
373369
</ExternalLink>
374370
<ExternalLink
375-
aria-label="React on Bluesky"
371+
aria-label="React у Bluesky"
376372
href="https://bsky.app/profile/react.dev"
377373
className={socialLinkClasses}>
378374
<IconBsky />
379375
</ExternalLink>
380376
<ExternalLink
381-
aria-label="React on Github"
377+
aria-label="React у Github"
382378
href="https://github.com/facebook/react"
383379
className={socialLinkClasses}>
384380
<IconGitHub />

src/components/Layout/Page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function Page({
132132
<link
133133
rel="alternate"
134134
type="application/rss+xml"
135-
title="React Blog RSS Feed"
135+
title="RSS-стрічка блогу React"
136136
href="/rss.xml"
137137
/>
138138
</Head>

src/components/Layout/Sidebar/SidebarLink.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ export function SidebarLink({
7777
{title}{' '}
7878
{version === 'major' && (
7979
<span
80-
title="- This feature is available in React 19 beta and the React canary channel"
80+
title="- ця функція доступна в бета-версії React 19 та каналі canary-версій React"
8181
className={`text-xs px-1 ms-1 rounded bg-gray-10 dark:bg-gray-40 dark:bg-opacity-20 text-gray-40 dark:text-gray-40`}>
8282
React 19
8383
</span>
8484
)}
8585
{version === 'canary' && (
8686
<IconCanary
87-
title=" - This feature is available in the latest Canary"
87+
title=" - ця функція доступна в останній canary-версії"
8888
className="ms-1 text-gray-30 dark:text-gray-60 inline-block w-3.5 h-3.5 align-[-3px]"
8989
/>
9090
)}

src/components/Layout/Toc.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Toc({headings}: {headings: Toc}) {
1616
<nav role="navigation" className="pt-20 sticky top-0 end-0">
1717
{headings.length > 0 && (
1818
<h2 className="mb-3 lg:mb-3 uppercase tracking-wide font-bold text-sm text-secondary dark:text-secondary-dark px-4 w-full">
19-
On this page
19+
На цій сторінці
2020
</h2>
2121
)}
2222
<div

src/components/Layout/TopNav/BrandMenu.tsx

+11-11
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
5050
sideOffset={0}
5151
align="end">
5252
<ContextMenu.Label className="ps-4 pt-2 text-base text-tertiary dark:text-tertiary-dark">
53-
Dark Mode
53+
Темний режим
5454
</ContextMenu.Label>
5555
<DownloadMenuItem
5656
fileName="react_logo_dark.svg"
5757
href="/images/brand/logo_dark.svg">
5858
<span className="w-8">
5959
<IconDownload />
6060
</span>
61-
<span>Logo SVG</span>
61+
<span>Лого як SVG</span>
6262
</DownloadMenuItem>
6363
<DownloadMenuItem
6464
fileName="react_wordmark_dark.svg"
6565
href="/images/brand/wordmark_dark.svg">
6666
<span className="w-8">
6767
<IconDownload />
6868
</span>
69-
<span>Wordmark SVG</span>
69+
<span>Шрифтове лого як SVG</span>
7070
</DownloadMenuItem>
7171
<MenuItem
7272
onSelect={async () => {
@@ -75,26 +75,26 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
7575
<span className="w-8">
7676
<IconCopy />
7777
</span>
78-
<span>Copy dark mode color</span>
78+
<span>Скопіювати колір темного режиму</span>
7979
</MenuItem>
8080
<ContextMenu.Label className="ps-4 text-base text-tertiary dark:text-tertiary-dark">
81-
Light Mode
81+
Світлий режим
8282
</ContextMenu.Label>
8383
<DownloadMenuItem
8484
fileName="react_logo_light.svg"
8585
href="/images/brand/logo_light.svg">
8686
<span className="w-8">
8787
<IconDownload />
8888
</span>
89-
<span>Logo SVG</span>
89+
<span>Лого SVG</span>
9090
</DownloadMenuItem>
9191
<DownloadMenuItem
9292
fileName="react_wordmark_light.svg"
9393
href="/images/brand/wordmark_light.svg">
9494
<span className="w-8">
9595
<IconDownload />
9696
</span>
97-
<span>Wordmark SVG</span>
97+
<span>Шрифтове лого як SVG</span>
9898
</DownloadMenuItem>
9999
<MenuItem
100100
onSelect={async () => {
@@ -103,7 +103,7 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
103103
<span className="w-8">
104104
<IconCopy />
105105
</span>
106-
<span>Copy light mode color</span>
106+
<span>Скопіювати колір світлого режиму</span>
107107
</MenuItem>
108108
<div className="uwu-visible flex flex-col">
109109
<ContextMenu.Separator className="" />
@@ -118,13 +118,13 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
118118
<span className="w-8">
119119
<IconClose />
120120
</span>
121-
<span>Turn off</span>
121+
<span>Вимкнути</span>
122122
</MenuItem>
123123
<DownloadMenuItem fileName="react_uwu_png" href="/images/uwu.png">
124124
<span className="w-8">
125125
<IconDownload />
126126
</span>
127-
<span>Logo PNG</span>
127+
<span>Лого як PNG</span>
128128
</DownloadMenuItem>
129129

130130
<ExternalLink
@@ -134,7 +134,7 @@ export default function BrandMenu({children}: {children: React.ReactNode}) {
134134
<span className="w-8">
135135
<IconNewPage />
136136
</span>
137-
<span>Logo by @sawaratsuki1004</span>
137+
<span>Лого від @sawaratsuki1004</span>
138138
</MenuItem>
139139
</ExternalLink>
140140
</div>

src/components/Layout/TopNav/TopNav.tsx

+17-17
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export default function TopNav({
253253
<div className="flex flex-row 3xl:flex-1 items-centers">
254254
<button
255255
type="button"
256-
aria-label="Menu"
256+
aria-label="Меню"
257257
onClick={() => setIsMenuOpen(!isMenuOpen)}
258258
className={cn(
259259
'active:scale-95 transition-transform flex lg:hidden w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link',
@@ -268,8 +268,8 @@ export default function TopNav({
268268
<div className="uwu-visible flex items-center justify-center h-full">
269269
<NextLink href="/">
270270
<Image
271-
alt="logo by @sawaratsuki1004"
272-
title="logo by @sawaratsuki1004"
271+
alt="лого від @sawaratsuki1004"
272+
title="лого від @sawaratsuki1004"
273273
className="h-8"
274274
priority
275275
width={63}
@@ -308,7 +308,7 @@ export default function TopNav({
308308
)}
309309
onClick={onOpenSearch}>
310310
<IconSearch className="align-middle me-3 text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
311-
Search
311+
Пошук
312312
<span className="hidden ms-auto sm:flex item-center me-1">
313313
<Kbd data-platform="mac"></Kbd>
314314
<Kbd data-platform="win" wide>
@@ -321,25 +321,25 @@ export default function TopNav({
321321
<div className="text-base justify-center items-center gap-1.5 flex 3xl:flex-1 flex-row 3xl:justify-end">
322322
<div className="mx-2.5 gap-1.5 hidden lg:flex">
323323
<NavItem isActive={section === 'learn'} url="/learn">
324-
Learn
324+
Вивчення
325325
</NavItem>
326326
<NavItem
327327
isActive={section === 'reference'}
328328
url="/reference/react">
329-
Reference
329+
Довідник
330330
</NavItem>
331331
<NavItem isActive={section === 'community'} url="/community">
332-
Community
332+
Спільнота
333333
</NavItem>
334334
<NavItem isActive={section === 'blog'} url="/blog">
335-
Blog
335+
Блог
336336
</NavItem>
337337
</div>
338338
<div className="flex w-full md:hidden"></div>
339339
<div className="flex items-center -space-x-2.5 xs:space-x-0 ">
340340
<div className="flex md:hidden">
341341
<button
342-
aria-label="Search"
342+
aria-label="Пошук"
343343
type="button"
344344
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 md:hidden hover:bg-secondary-button hover:dark:bg-secondary-button-dark outline-link"
345345
onClick={onOpenSearch}>
@@ -349,7 +349,7 @@ export default function TopNav({
349349
<div className="flex dark:hidden">
350350
<button
351351
type="button"
352-
aria-label="Use Dark Mode"
352+
aria-label="Використовувати темний режим"
353353
onClick={() => {
354354
window.__setPreferredTheme('dark');
355355
}}
@@ -360,7 +360,7 @@ export default function TopNav({
360360
<div className="hidden dark:flex">
361361
<button
362362
type="button"
363-
aria-label="Use Light Mode"
363+
aria-label="Використовувати світлий режим"
364364
onClick={() => {
365365
window.__setPreferredTheme('light');
366366
}}
@@ -371,7 +371,7 @@ export default function TopNav({
371371
<div className="flex">
372372
<Link
373373
href="/community/translations"
374-
aria-label="Translations"
374+
aria-label="Переклади"
375375
className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
376376
{languageIcon}
377377
</Link>
@@ -381,7 +381,7 @@ export default function TopNav({
381381
href="https://github.com/facebook/react/releases"
382382
target="_blank"
383383
rel="noreferrer noopener"
384-
aria-label="Open on GitHub"
384+
aria-label="Відкрити на GitHub"
385385
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
386386
{githubIcon}
387387
</Link>
@@ -408,20 +408,20 @@ export default function TopNav({
408408
<Suspense fallback={null}>
409409
<div className="ps-3 xs:ps-5 xs:gap-0.5 xs:text-base overflow-x-auto flex flex-row lg:hidden text-base font-bold text-secondary dark:text-secondary-dark">
410410
<NavItem isActive={section === 'learn'} url="/learn">
411-
Learn
411+
Вивчення
412412
</NavItem>
413413
<NavItem
414414
isActive={section === 'reference'}
415415
url="/reference/react">
416-
Reference
416+
Довідник
417417
</NavItem>
418418
<NavItem
419419
isActive={section === 'community'}
420420
url="/community">
421-
Community
421+
Спільнота
422422
</NavItem>
423423
<NavItem isActive={section === 'blog'} url="/blog">
424-
Blog
424+
Блог
425425
</NavItem>
426426
</div>
427427
<div

0 commit comments

Comments
 (0)