-
Couldn't load subscription status.
- Fork 127
docs: translation for useId page #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дякую за PR!
Запити на зміни мають бути виправлені і перевірені у всій статті. Немає вимог, коли має бути виправлено, це буде просто послідовна асинхронна взаємодія перевірка-зміни-перевірка-зміни-перевірка тощо.
Рекомендую локально запустити документацію і перевірити, по-перше, чому падає збірка, по-друге, після виправлення цього відкрити сторінку і подивитися на переклад як читач, можливо, захочеться щось переписати, щоб було зрозуміліше.
Якщо будуть складніші питання чи потрібна серйозніша допомога або консультації, то є дискорд-сервер https://discord.gg/WM6PmCpp7W
| <Intro> | ||
|
|
||
| `useId` is a React Hook for generating unique IDs that can be passed to accessibility attributes. | ||
| `useId` — це хук для генерації унікальних ID, які можуть передаватись як атрибути доступності. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `useId` — це хук для генерації унікальних ID, які можуть передаватись як атрибути доступності. | |
| `useId` — це хук для генерації унікальних ідентифікаторів (_далі_ — ID), які можуть передаватися як атрибути доступності. |
- я би ввела на початку назву українською, а потім вже використовувала б англійську абревіатуру
- чергування
| --- | ||
|
|
||
| ## Reference {/*reference*/} | ||
| ## Референс {/*reference*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## Референс {/*reference*/} | |
| ## Опис {/*reference*/} |
| ### `useId()` {/*useid*/} | ||
|
|
||
| Call `useId` at the top level of your component to generate a unique ID: | ||
| Викликайте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Викликайте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID: | |
| Викличте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID: |
- тут зазвичай доконаний вид використовували
- треба подумати, чи рід у ID буде середній за саме словом айді суб'єктивно (мені теж хочеться середнього роду, хоч айді може бути жіночого роду для як ідентифікацяя) або чоловічий за ідентифікатором. я поки не буду виправляти
| #### Параметри {/*parameters*/} | ||
| `useId` does not take any parameters. | ||
| `useId` не приймає ніяких параметрів. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `useId` не приймає ніяких параметрів. | |
| `useId` не приймає жодних параметрів. |
https://onlinecorrector.com.ua/%D0%B6%D0%BE%D0%B4%D0%BD%D0%B8%D0%B9-2/
| #### Результат {/*returns*/} | ||
| `useId` returns a unique ID string associated with this particular `useId` call in this particular component. | ||
| `useId` повертає унікальну ID строку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `useId` повертає унікальну ID строку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті. | |
| `useId` повертає унікальну ID-стрічку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті. |
- почитати про прикладку https://uk.wikipedia.org/wiki/%D0%9F%D1%80%D0%B8%D0%BA%D0%BB%D0%B0%D0%B4%D0%BA%D0%B0 і її правопис
- у нас наразі перехід на cтрічку/cтрічкову змінну для string
| <!DOCTYPE html> | ||
| <html> | ||
| <head><title>My app</title></head> | ||
| <head><title>Мій додаток</title></head> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <head><title>Мій додаток</title></head> | |
| <head><title>Мій застосунок</title></head> |
| function PasswordField() { | ||
| const passwordHintId = useId(); | ||
| console.log('Generated identifier:', passwordHintId) | ||
| console.log('Згенеруй ідентифікатор:', passwordHintId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| console.log('Згенеруй ідентифікатор:', passwordHintId) | |
| console.log('Згенерований ідентифікатор:', passwordHintId) |
| --- | ||
| ### Using the same ID prefix on the client and the server {/*using-the-same-id-prefix-on-the-client-and-the-server*/} | ||
| ### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/} | |
| ### Використання однакового ID-префікса на клієнті та сервері {/*using-the-same-id-prefix-on-the-client-and-the-server*/} |
| ### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/} | ||
| If you [render multiple independent React apps on the same page](#specifying-a-shared-prefix-for-all-generated-ids), and some of these apps are server-rendered, make sure that the `identifierPrefix` you pass to the [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) call on the client side is the same as the `identifierPrefix` you pass to the [server APIs](/reference/react-dom/server) such as [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream) | ||
| Якщо ви [рендерите декілька незалежних React застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, запевниться, що `identifierPrefix`, який ви передаєте в [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) викликається на клієнтській стороні, так само як `identifierPrefix`, який ви передаєте в [server APIs](/reference/react-dom/server), наприклад [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Якщо ви [рендерите декілька незалежних React застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, запевниться, що `identifierPrefix`, який ви передаєте в [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) викликається на клієнтській стороні, так само як `identifierPrefix`, який ви передаєте в [server APIs](/reference/react-dom/server), наприклад [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream) | |
| Якщо ви [рендерите декілька незалежних React-застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, перевірте, що `identifierPrefix`, який ви передаєте до [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) на клієнті, є тим самим `identifierPrefix`, який ви передаєте до [серверних API](/reference/react-dom/server), наприклад, [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream) |
| ``` | ||
| You do not need to pass `identifierPrefix` if you only have one React app on the page. | ||
| Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React застосунок на сторінці. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React застосунок на сторінці. | |
| Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React-застосунок на сторінці. |
Hi all,
Here is my translation of the
useIddocumentation page.Feel free to review and write your comments.