From 15961a9246a50eb7c09c9ecf0e49cd6a3b6cb611 Mon Sep 17 00:00:00 2001 From: Artem <90565172+Hekikai@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:23:58 +0300 Subject: [PATCH] =?UTF-8?q?feat(docs):=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=D0=BD=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20contribution=20(#137)=20(#237)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(docs): Сделан перевод для contribution (#137) * Update docs/5.community/4.contribution.md Co-authored-by: Alex Peshkov <1alexpeshkov@gmail.com> --------- Co-authored-by: Alex Peshkov <1alexpeshkov@gmail.com> --- docs/5.community/4.contribution.md | 184 ++++++++++++++--------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/docs/5.community/4.contribution.md b/docs/5.community/4.contribution.md index 3702d845a891..dc0e47df1815 100644 --- a/docs/5.community/4.contribution.md +++ b/docs/5.community/4.contribution.md @@ -1,133 +1,133 @@ --- -title: 'Contribution' -description: 'Nuxt is a community project - and so we love contributions of all kinds! ❤️' +title: 'Вклад' +description: 'Nuxt - это проект сообщества, и поэтому мы рады любому вкладу! ❤️' navigation.icon: i-ph-git-pull-request-duotone --- -There is a range of different ways you might be able to contribute to the Nuxt ecosystem. +Вы можете внести свой вклад в экосистему Nuxt разными способами. -## Ecosystem +## Экосистема -The Nuxt ecosystem includes many different projects and organizations: +Экосистема Nuxt включает в себя множество различных проектов и организаций: -* [nuxt/](https://github.com/nuxt) - core repositories for the Nuxt framework itself. [**nuxt/nuxt**](https://github.com/nuxt/nuxt) contains the Nuxt framework (both versions 2 and 3). -* [nuxt-modules/](https://github.com/nuxt-modules) - community-contributed and maintained modules and libraries. There is a [process to migrate a module](/docs/guide/going-further/modules/#joining-nuxt-modules-and-nuxtjs) to `nuxt-modules`. While these modules have individual maintainers, they are not dependent on a single person. -* [unjs/](https://github.com/unjs) - many of these libraries are used throughout the Nuxt ecosystem. They are designed to be universal libraries that are framework- and environment-agnostic. We welcome contributions and usage by other frameworks and projects. +* [nuxt/](https://github.com/nuxt) - основные репозитории для самого фреймворка Nuxt. [**nuxt/nuxt**](https://github.com/nuxt/nuxt) содержит фреймворк Nuxt (как версии 2, так и 3). +* [nuxt-modules/](https://github.com/nuxt-modules) - модули и библиотеки, созданные и поддерживаемые сообществом. Существует [процесс миграции модуля](/docs/guide/going-further/modules/#joining-nuxt-modules-and-nuxtjs) в `nuxt-modules`. Хотя у этих модулей есть отдельные мейнтейнеры, они не зависят от одного человека. +* [unjs/](https://github.com/unjs) - многие из этих библиотек используются во всей экосистеме Nuxt. Они разработаны как универсальные библиотеки, не зависящие от фреймворка и окружения. Мы приветствуем их вклад и использование в других фреймворках и проектах. -## How To Contribute +## Как внести вклад -### Triage Issues and Help Out in Discussions +### Решение проблем и помощь в обсуждениях -Check out the issues and discussions for the project you want to help. For example, here are [the issues board](https://github.com/nuxt/nuxt/issues) and [discussions](https://github.com/nuxt/nuxt/discussions) for Nuxt 3. Helping other users, sharing workarounds, creating reproductions, or even poking into a bug a little bit and sharing your findings makes a huge difference. +Просмотрите проблемы и обсуждения проекта, которому вы хотите помочь. Например, вот [доска проблем](https://github.com/nuxt/nuxt/issues) и [обсуждения](https://github.com/nuxt/nuxt/discussions) для Nuxt 3. Помощь другим пользователям, обмен обходными путями, воспроизведение проблемы кодом или даже небольшое исследование ошибки и обмен результатами - все это имеет огромное значение. -### Creating an Issue +### Создание issue -Thank you for taking the time to create an issue! ❤️ +Спасибо, что нашли время создать проблему! ❤️ -* **Reporting bugs**: Check out [our guide](/docs/community/reporting-bugs) for some things to do before opening an issue. +* **Отчеты об ошибках**: Ознакомьтесь с [нашим руководством](/docs/community/reporting-bugs), чтобы узнать, что нужно сделать, прежде чем открывать проблему. -* **Feature requests**: Check that there is not an existing issue or discussion covering the scope of the feature you have in mind. If the feature is to another part of the Nuxt ecosystem (such as a module), please consider raising a feature request there first. If the feature you have in mind is general or the API is not entirely clear, consider opening a discussion in the **Ideas** section to discuss with the community first. +* **Запросы на улучшение**: Проверьте, нет ли уже существующей проблемы или обсуждения, охватывающего область применения задуманной вами функции. Если функция относится к другой части экосистемы Nuxt (например, к модулю), пожалуйста, подумайте о том, чтобы сначала отправить feature request туда. Если задуманная вами функция носит общий характер или API не совсем понятен, подумайте о том, чтобы сначала открыть обсуждение в разделе **Ideas** для обсуждения с сообществом. -We'll do our best to follow our [internal issue decision making flowchart](https://mermaid.live/view#pako:eNqFlE1v2zAMhv8K4UuToslhx2Bo0TZt12Edhm7YMCAXWqJtorLk6qOpkfS_j7KdfpyWQ-BQr8mHL6nsCuU0FauiMm6rGvQRfq03FuRzvvvTYIQHthpcBT_ugQNwPHuZjheLxf4i1VDx8x4udrf5EBCOQvSsYg4ffS79KS9pmX9QALTgyid2KYB7Ih-4bmKWbDk2YB0E1gRUVaRi-FDmmjAmT3u4nB3DmoNKIUA1BsGSohA49jnVMQhHbDh_EZQUImyxh-gAtfaiG-KWSJ-N8nt6YtpCdgEeE5rXPOdav5YwWJIJU7zrvNADV9C7JBIyIC07Wxupkx3LFQ5vCkguRno5f9fP2qnUko0Y2dk9rGdvHAa9IIhVGlCp5FFNPN-ce4DKeXBd53xMliOLp9IZtyORQVsnrGm-WJzejtUu5fFqdr5FGQ3bLslYvGthjZbJTLpReZG5_lLYw7XQ_CbPVT92ws9gnEJj-v84dk-PiaXnmF1XGAaPsOsMKywNvYmG80ZohV8k4wDR9_N3KN_dHm5mh1lnkM5FsYzRfNiTvJoT5gnQsl6uxjqXLhkNQ9syHJ0UZZ8ERUIlNShr6N8gZDEliR-ow7QZa0fhY4LoHLRo-8N7ZxPwjRj5ZZYXpvOSNs9v3Jjs8NXB4ets92xan3zydXZHvj64lKMayh4-gZC1bjASW2ipLeWuzIuToiXfImu5rbucclMIc0ubYiWPGv3DptjYF9Fhiu5nb1Wxij7RSZE6jZHWjLXHtlhVaIJESXN0_m68_sO_wMs_oO9gyg) when responding to issues. +Мы приложим все усилия, чтобы следовать нашей [внутренней схеме принятия решений по вопросам](https://mermaid.live/view#pako:eNqFlE1v2zAMhv8K4UuToslhx2Bo0TZt12Edhm7YMCAXWqJtorLk6qOpkfS_j7KdfpyWQ-BQr8mHL6nsCuU0FauiMm6rGvQRfq03FuRzvvvTYIQHthpcBT_ugQNwPHuZjheLxf4i1VDx8x4udrf5EBCOQvSsYg4ffS79KS9pmX9QALTgyid2KYB7Ih-4bmKWbDk2YB0E1gRUVaRi-FDmmjAmT3u4nB3DmoNKIUA1BsGSohA49jnVMQhHbDh_EZQUImyxh-gAtfaiG-KWSJ-N8nt6YtpCdgEeE5rXPOdav5YwWJIJU7zrvNADV9C7JBIyIC07Wxupkx3LFQ5vCkguRno5f9fP2qnUko0Y2dk9rGdvHAa9IIhVGlCp5FFNPN-ce4DKeXBd53xMliOLp9IZtyORQVsnrGm-WJzejtUu5fFqdr5FGQ3bLslYvGthjZbJTLpReZG5_lLYw7XQ_CbPVT92ws9gnEJj-v84dk-PiaXnmF1XGAaPsOsMKywNvYmG80ZohV8k4wDR9_N3KN_dHm5mh1lnkM5FsYzRfNiTvJoT5gnQsl6uxjqXLhkNQ9syHJ0UZZ8ERUIlNShr6N8gZDEliR-ow7QZa0fhY4LoHLRo-8N7ZxPwjRj5ZZYXpvOSNs9v3Jjs8NXB4ets92xan3zydXZHvj64lKMayh4-gZC1bjASW2ipLeWuzIuToiXfImu5rbucclMIc0ubYiWPGv3DptjYF9Fhiu5nb1Wxij7RSZE6jZHWjLXHtlhVaIJESXN0_m68_sO_wMs_oO9gyg) при реагировании на вопросы. -### Send a Pull Request +### Отправить Pull Request -We always welcome pull requests! ❤️ +Мы всегда рады предоставленным PR! ❤️ -#### Before You Start +#### Прежде чем начать -Before you fix a bug, we recommend that you check whether **there's an issue that describes it**, as it's possible it's a documentation issue or that there is some context that would be helpful to know. +Прежде, чем исправлять ошибку, мы рекомендуем вам проверить, есть ли **уже проблема, в которой она описана**. Возможно, что это проблема документации, или есть какой-то контекст, который было бы полезно знать. -If you're working on a feature, then we ask that you **open a feature request issue first** to discuss with the maintainers whether the feature is desired - and the design of those features. This helps save time for both the maintainers and the contributors and means that features can be shipped faster. The issue **should be confirmed** by a framework team member before building out a feature in a pull request. +Если вы работаете над новой фичой, то мы просим вас **открыть сначала feature request**, чтобы обсудить с мейнтенерами, желательна ли эта функция, и каков ее дизайн. Это помогает сэкономить время как ментейнеров, так и авторов, и означает, что функции могут быть отправлены быстрее. Проблема **должна быть подтверждена** членом команды фреймворка, прежде чем создавать функцию в запросе на вынос. -For typo fixes, it's recommended to batch multiple typo fixes into one pull request to maintain a cleaner commit history. +Для исправления опечаток рекомендуется объединять несколько исправлений в один PR, чтобы сохранить чистую историю коммитов. -For bigger changes to Nuxt itself, we recommend that you first [create a Nuxt module](#create-a-module) and implement the feature there. This allows for quick proof-of-concept. You can then [create an RFC](#make-an-rfc) in the form of a discussion. As users adopt it and you gather feedback, it can then be refined and either added to Nuxt core or continue as a standalone module. +Для больших изменений в самом Nuxt мы рекомендуем сначала [создать модуль Nuxt](#create-a-module) и реализовать функцию в нем. Это позволит быстро проверить концепцию. Затем вы можете [создать RFC](#make-an-rfc) в форме обсуждения. По мере того как пользователи примут его и вы соберете отзывы, его можно будет доработать и добавить в ядро Nuxt или продолжить поддерживать как отдельный модуль. -#### Commit Conventions +#### Конвенции о коммитах -We use [Conventional Commits](https://www.conventionalcommits.org) for commit messages, which [allows a changelog to be auto-generated](https://github.com/unjs/changelogen) based on the commits. Please read the guide through if you aren't familiar with it already. +Мы используем [Conventional Commits](https://www.conventionalcommits.org) для сообщений коммитов, который [позволяет автоматически генерировать журнал изменений](https://github.com/unjs/changelogen) на основе коммитов. Пожалуйста, прочитайте руководство до конца, если вы с ним еще не знакомы. -Note that `fix:` and `feat:` are for **actual code changes** (that might affect logic). For typo or document changes, use `docs:` or `chore:` instead: +Обратите внимание, что `fix:` и `feat:` предназначены для **фактических изменений кода** (которые могут повлиять на логику). Для опечаток или изменений в документах используйте `docs:` или `chore:`: * ~~`fix: typo`~~ -> `docs: fix typo` -If you are working in a project with a monorepo, like `nuxt/nuxt`, ensure that you specify the main scope of your commit in brackets. For example: `feat(nuxi): add 'do-magic' command`. +Если вы работаете в проекте с монорепо, например `nuxt/nuxt`, убедитесь, что вы указали основную область применения вашего коммита в скобках. Например: `feat(nuxi): add 'do-magic' command`. -#### Making the Pull Request +#### Создание Pull Request -If you don't know how to send a pull request, we recommend reading [the guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). +Если вы не знаете, как отправлять pull request, рекомендуем прочитать [руководство](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). -When sending a pull request, make sure your PR's title also follows the [Commit Convention](#commit-conventions). +При отправке PR убедитесь, что название также соответствует [Commit Convention](#commit-conventions). -If your PR fixes or resolves existing issues, please make sure you mention them in the PR description. +Если ваш PR исправляет или решает существующие проблемы, пожалуйста, не забудьте упомянуть их в описании PR. -It's ok to have multiple commits in a single PR; you don't need to rebase or force push for your changes as we will use `Squash and Merge` to squash the commits into one commit when merging. +В одном PR может быть несколько коммитов; вам не нужно делать rebase или force push для ваших изменений, так как мы будем использовать `Squash and Merge` для слияния коммитов в один коммит при объединении. -We do not add any commit hooks to allow for quick commits. But before you make a pull request, you should ensure that any lint/test scripts are passing. +Мы не добавляем никаких commit-хуков, чтобы обеспечить быстрые коммиты. Но перед тем, как сделать pull request, вы должны убедиться, что все lint/test-скрипты прошли. -In general, please also make sure that there are no _unrelated_ changes in a PR. For example, if your editor has made any changes to whitespace or formatting elsewhere in a file that you edited, please revert these so it is more obvious what your PR changes. And please avoid including multiple unrelated features or fixes in a single PR. If it is possible to separate them, it is better to have multiple PRs to review and merge separately. In general, a PR should do _one thing only_. +В целом, пожалуйста, убедитесь, что в PR нет _несвязанных_ изменений. Например, если ваш редактор изменил пробельные символы или форматирование в другом месте файла, который вы редактировали, пожалуйста, верните их, чтобы было более очевидно, что изменяет ваш PR. И, пожалуйста, избегайте включения нескольких несвязанных функций или исправлений в один PR. Если есть возможность разделить их, лучше иметь несколько PR, чтобы рассматривать и объединять их отдельно. В целом, PR должен делать _только_ одну вещь. -#### Once You've Made a Pull Request +#### Как только вы создали Pull Request -Once you've made a pull request, we'll do our best to review it promptly. +Как только создали PR, мы сделаем все возможное, чтобы рассмотреть его в кратчайшие сроки. -If we assign it to a maintainer, then that means that person will take special care to review it and implement any changes that may be required. +Если мы назначаем на него мейнтейнера, это означает, что этот человек будет уделять особое внимание его рассмотрению и внесению изменений, которые могут потребоваться. -If we request changes on a PR, please ignore the red text! It doesn't mean we think it's a bad PR - it's just a way of easily telling the status of a list of pull requests at a glance. +Если мы просим внести изменения в PR, пожалуйста, не обращайте внимания на красный текст! Это не значит, что мы считаем PR плохим - это просто способ с первого взгляда определить статус списка запросов на исправление. -If we mark a PR as 'pending', that means we likely have another task to do in reviewing the PR - it's an internal note-to-self, and not necessarily a reflection on whether the PR is a good idea or not. We will do our best to explain via a comment the reason for the pending status. +Если мы помечаем PR как "pending", это означает, что у нас, скорее всего, есть еще одна задача по рассмотрению PR. Это внутренняя заметка для самих себя, и она не обязательно отражает, хороша ли эта идея или нет. Мы постараемся объяснить в комментарии причину статуса "pending". -We'll do our best to follow [our PR decision making flowchart](https://mermaid.live/view#pako:eNp9VE1v2kAQ_SsjXzBSEqlALlaUisSh0ACK2l4qcVm8Y9hi7672Iwly-O-ZtYPt5FAOCHbee_PmzdpVlCmOURLlhXrJ9sw4-JNuJNBnWs1UQafIQVjrERyWumAOv58-AJeXt29_0b7BXbWwwL0uRPa1vlZvcB_fF8oiMMmB2QM4BXkt3UoON7Lh3LWaDz2SVkK6QGt7DHvw0CKt5sxCKaQoWQEGtVHcZ04oGdw04LTVngW_LHOeFcURGGz97mw6PSv-iJdsi0UCA4nI7SfNwc3W3JZit3eQ1SZFDlKB15yswQ2MgbOjbYeatY3n8bcr-IWlekYYaJRcyB04I9gOB1CEfkF5dAVTzmFAtnqn4-bUYAiMMmHZgWhNPRhgus5mW2BATxq0NkIZ4Y4NbNjzE2ZchBzcHmGLe_ZMSKCcyRXyLrVFa_5n_PBK2xKy3kk9eOjULUdltk6C8kI-7NFDr8f4EVGDoqlp-wa4sJm3ltIMIuZ_mTQXJyTSkQZtunPqsKxShV9GKdkBYe1fHXjpbcjlvONlO9Kqx_M7YHmOmav_luxfE5zKwVs09hM5DLSupgYDlr5flDkwo7ykixKG-xDsUly1LZ-uY32dgDc7lG7YqwbNp0msJwmIUivjWFtfd-xRrEcJ7Omydz37qFplHOtxEp4GskI2qB5dRCWakglOz3oV8JuITJa4iRL6yZk5bKKNPBGOead-H2UWJc54vIiaW53SPgwrz4fIhVNm1bw76lfI6R2_MW21) when responding and reviewing to pull requests. +Мы приложим все усилия, чтобы следовать [нашей схеме принятия решений по PR](https://mermaid.live/view#pako:eNp9VE1v2kAQ_SsjXzBSEqlALlaUisSh0ACK2l4qcVm8Y9hi7672Iwly-O-ZtYPt5FAOCHbee_PmzdpVlCmOURLlhXrJ9sw4-JNuJNBnWs1UQafIQVjrERyWumAOv58-AJeXt29_0b7BXbWwwL0uRPa1vlZvcB_fF8oiMMmB2QM4BXkt3UoON7Lh3LWaDz2SVkK6QGt7DHvw0CKt5sxCKaQoWQEGtVHcZ04oGdw04LTVngW_LHOeFcURGGz97mw6PSv-iJdsi0UCA4nI7SfNwc3W3JZit3eQ1SZFDlKB15yswQ2MgbOjbYeatY3n8bcr-IWlekYYaJRcyB04I9gOB1CEfkF5dAVTzmFAtnqn4-bUYAiMMmHZgWhNPRhgus5mW2BATxq0NkIZ4Y4NbNjzE2ZchBzcHmGLe_ZMSKCcyRXyLrVFa_5n_PBK2xKy3kk9eOjULUdltk6C8kI-7NFDr8f4EVGDoqlp-wa4sJm3ltIMIuZ_mTQXJyTSkQZtunPqsKxShV9GKdkBYe1fHXjpbcjlvONlO9Kqx_M7YHmOmav_luxfE5zKwVs09hM5DLSupgYDlr5flDkwo7ykixKG-xDsUly1LZ-uY32dgDc7lG7YqwbNp0msJwmIUivjWFtfd-xRrEcJ7Omydz37qFplHOtxEp4GskI2qB5dRCWakglOz3oV8JuITJa4iRL6yZk5bKKNPBGOead-H2UWJc54vIiaW53SPgwrz4fIhVNm1bw76lfI6R2_MW21) при ответе и рассмотрении PR. -### Create a Module +### Создание модуля -If you've built something with Nuxt that's cool, why not [extract it into a module](/docs/guide/going-further/modules), so it can be shared with others? We have [many excellent modules already](/modules), but there's always room for more. +Если вы создали в Nuxt что-то классное, почему бы не [извлечь это в модуль](/docs/guide/going-further/modules), чтобы им могли поделиться другие? У нас уже есть [много отличных модулей](/modules), но всегда есть место для новых. -If you need help while building it, feel free to [check in with us](/docs/community/getting-help). +Если вам нужна помощь при создании модуля, не стесняйтесь [обращаться к нам](/docs/community/getting-help). -### Make an RFC +### Создание RFC -We highly recommend [creating a module](#create-a-module) first to test out big new features and gain community adoption. +Мы настоятельно рекомендуем сначала [создать модуль](#create-a-module), чтобы протестировать новые большие функции и получить одобрение сообщества. -If you have done this already, or it's not appropriate to create a new module, then please start by creating a new discussion. Make sure it explains your thinking as clearly as possible. Include code examples or function signatures for new APIs. Reference existing issues or pain points with examples. +Если вы уже сделали это, или создание нового модуля нецелесообразно, начните с создания нового обсуждения. Позаботьтесь о том, чтобы оно как можно яснее объясняло ваши мысли. Включите примеры кода или сигнатуры функций для новых API. Ссылайтесь на существующие проблемы или болевые точки с примерами. -If we think this should be an RFC, we'll change the category to RFC and broadcast it more widely for feedback. +Если мы сочтем, что это должно быть RFC, мы изменим категорию на RFC и распространим его более широко для получения отзывов. -An RFC will then move through the following stages: +Затем RFC проходит следующие стадии: -* `rfc: active` - currently open for comment -* `rfc: approved` - approved by the Nuxt team -* `rfc: ready to implement` - an issue has been created and assigned to implement -* `rfc: shipped` - implemented -* `rfc: archived` - not approved, but archived for future reference +* `rfc: active` - в настоящее время открыт для комментариев. +* `rfc: approved` - одобрено командой Nuxt. +* `rfc: ready to implement` - создано issue, назначена реализация. +* `rfc: shipped` - реализовано. +* `rfc: archived` - не одобрено, но заархивировано для будущего использования. -### Conventions Across Ecosystem +### Конвенции по всей экосистеме -The following conventions are _required_ within the `nuxt/` organization and recommended for other maintainers in the ecosystem. +Следующие соглашения являются _обязательными_ в организации `nuxt/` и рекомендуются для других сопровождающих в экосистеме. -#### Module Conventions +#### Конвенция модулей -Modules should follow the [Nuxt module template](https://github.com/nuxt/starter/tree/module). See [module guide](/docs/guide/going-further/modules) for more information. +Модули должны следовать шаблону [шаблон Nuxt-модуля](https://github.com/nuxt/starter/tree/module). Для получения дополнительной информации смотрите [Руководство по модулям](/docs/guide/going-further/modules). -#### Use Core `unjs/` Libraries +#### Использование основных библиотек `unjs/` -We recommend the following libraries which are used throughout the ecosystem: +Мы рекомендуем следующие библиотеки, которые используются во всей экосистеме: -* [pathe](https://github.com/unjs/pathe) - universal path utilities (replacement for node `path`) -* [ufo](https://github.com/unjs/ufo) - URL parsing and joining utilities -* [unbuild](https://github.com/unjs/unbuild) - rollup-powered build system -* ... check out the rest of the [unjs/](https://github.com/unjs) organization for many more! +* [pathe](https://github.com/unjs/pathe) - универсальные утилиты путей (замена для `path` от node) +* [ufo](https://github.com/unjs/ufo) - утилиты для парсинга и объединения URL-адресов +* [unbuild](https://github.com/unjs/unbuild) - система сборки на основе rollup +* ... проверьте остальные части организации [unjs/](https://github.com/unjs), чтобы найти много других библиотек! -#### Use ESM Syntax and Default to `type: module` +#### Используйте синтаксис ESM и значение по умолчанию `type: module`. -Most of the Nuxt ecosystem can consume ESM directly. In general we advocate that you avoid using CJS-specific code, such as `__dirname` and `require` statements. You can [read more about ESM](/docs/guide/concepts/esm). +Большая часть экосистемы Nuxt может использовать ESM напрямую. В целом, мы рекомендуем вам избегать использования специфического для CJS кода, такого как `__dirname` и `require` операторы. Вы можете [прочитать больше об ESM](/docs/guide/concepts/esm). -#### What's Corepack +#### Что такое Corepack -[Corepack](https://nodejs.org/api/corepack.html) makes sure you are using the correct version for package manager when you run corresponding commands. Projects might have `packageManager` field in their `package.json`. +[Corepack](https://nodejs.org/api/corepack.html) позволяет убедиться, что вы используете правильную версию менеджера пакетов при выполнении соответствующих команд. Проекты могут иметь поле `packageManager` в их `package.json`. -Under projects with configuration as shown below, Corepack will install `v7.5.0` of `pnpm` (if you don't have it already) and use it to run your commands. +В проектах с конфигурацией, как показано ниже, Corepack установит `v7.5.0` `pnpm` (если у вас его еще нет) и будет использовать его для выполнения ваших команд. ```jsonc [package.json] { @@ -135,13 +135,13 @@ Under projects with configuration as shown below, Corepack will install `v7.5.0` } ``` -#### Use ESLint +#### Используйте ESLint -We use [ESLint](https://eslint.org) for both linting and formatting with [`@nuxt/eslint-config`](https://github.com/nuxt/eslint-config). +Мы используем [ESLint](https://eslint.org) как для линтинга, так и для форматирования с помощью [`@nuxt/eslint-config`](https://github.com/nuxt/eslint-config). -##### IDE Setup +##### Настройка IDE -We recommend using [VS Code](https://code.visualstudio.com) along with the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). If you would like, you can enable auto-fix and formatting when you save the code you are editing: +Мы рекомендуем использовать [VS Code](https://code.visualstudio.com) вместе с [расширением ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). При желании вы можете включить авто-исправление и форматирование при сохранении редактируемого кода: ```json [settings.json] { @@ -152,56 +152,56 @@ We recommend using [VS Code](https://code.visualstudio.com) along with the [ESLi } ``` -#### No Prettier +#### Prettier'а нет -Since ESLint is already configured to format the code, there is no need to duplicate the functionality with Prettier. To format the code, you can run `yarn lint --fix`, `pnpm lint --fix`, or `bun run lint --fix` or referring the [ESLint section](#use-eslint) for IDE Setup. +Поскольку ESLint уже настроен на форматирование кода, нет необходимости дублировать эту функциональность в Prettier. Чтобы отформатировать код, вы можете запустить `yarn lint --fix`, `pnpm lint --fix`, `bun run lint --fix` или обратиться к разделу [ESLint](#use-eslint) для настройки IDE. -If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict. +Если в вашем редакторе установлен Prettier, мы рекомендуем отключить его при работе над проектом, чтобы избежать конфликтов. -**Note**: [we are discussing](https://github.com/nuxt/eslint-config/issues/224) enabling Prettier in future. +**Примечание**: [мы обсуждаем](https://github.com/nuxt/eslint-config/issues/224) включение функции Prettier в будущем. -#### Package Manager +#### Менеджер пакетов -For libraries, we recommend `pnpm`. For modules, we still recommend `yarn` but we may well switch this recommendation to `pnpm` in future once we support plug and play mode with Nuxt itself. +Для библиотек мы рекомендуем `pnpm`. Для модулей мы по-прежнему рекомендуем `yarn`, но в будущем, возможно, сменим эту рекомендацию на `pnpm`, как только поддержим режим plug-and-play с самим Nuxt. -It is important to enable Corepack to ensure you are on the same version of the package manager as the project. Corepack is built-in to new node versions for seamless package manager integration. +Важно включить Corepack, чтобы убедиться, что вы используете ту же версию пакетного менеджера, что и проект. Corepack встроен в новые версии node для беспрепятственной интеграции с менеджером пакетов. -To enable it, run +Чтобы включить его, выполните команду: ```bash [Terminal] corepack enable ``` -You only need to do this one time, after Node.js is installed on your computer. +Это нужно сделать только один раз, после установки Node.js на ваш компьютер. -## Documentation Style Guide +## Руководство по стилю документации -Documentation is an essential part of Nuxt. We aim to be an intuitive framework - and a big part of that is making sure that both the developer experience and the docs are perfect across the ecosystem. 👌 +Документация - важная часть Nuxt. Мы стремимся быть интуитивно понятным фреймворком - и большая часть этой цели заключается в том, чтобы убедиться, что и опыт разработчиков, и документация совершенны во всей экосистеме. 👌 -Here are some tips that may help improve your documentation: +Вот несколько советов, которые могут помочь улучшить вашу документацию: -* Avoid subjective words like _simply_, _just_, _obviously..._ when possible. +* По возможности избегайте таких субъективных слов, как _просто_, _только_, _очевидно_. - Keep in mind your readers can have different backgrounds and experiences. Therefore, these words don't convey meaning and can be harmful. + Не забывайте, что у ваших читателей может быть разное образование и опыт. Поэтому такие слова не передают смысл и могут навредить. ::caution{ icon="i-ph-x-circle-duotone"} - Simply make sure the function returns a promise. + Просто убедитесь, что функция возвращает промис. :: ::tip{icon="i-ph-check-circle-duotone"} - Make sure the function returns a [promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + Убедитесь, что функция возвращает [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). :: -* Prefer [active voice](https://developers.google.com/tech-writing/one/active-voice). +* Предпочитайте [активный залог](https://developers.google.com/tech-writing/one/active-voice). ::caution{icon="i-ph-x-circle-duotone"} - An error will be thrown by Nuxt. + Ошибка будет выброшена Nuxt. :: ::tip{icon="i-ph-check-circle-duotone"} - Nuxt will throw an error. + Nuxt выбросит ошибку. :: ::read-more{to="/docs/community/framework-contribution#documentation-guide"} -Learn how to contribute to the documentation. +Узнайте, как внести свой вклад в документацию. ::