Skip to content

Commit

Permalink
feat(docs) Обновление переводов
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Bochkarev committed Jun 1, 2024
1 parent 24e2b79 commit 158cf54
Show file tree
Hide file tree
Showing 109 changed files with 335 additions and 334 deletions.
2 changes: 1 addition & 1 deletion docs/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Nuxt по умолчанию поставляется с встроенными

:read-more{title="Секция развертывания" to="/docs/getting-started/deployment"}

### Modular
### Модульная система

Система модулей позволяет расширять Nuxt за счет пользовательских функций и интеграции со сторонними(third-party) сервисами.

Expand Down
18 changes: 9 additions & 9 deletions docs/1.getting-started/11.testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bun add --dev @nuxt/test-utils vitest @vue/test-utils happy-dom playwright-core

We currently ship an environment for unit testing code that needs a [Nuxt](https://nuxt.com) runtime environment. It currently _only has support for `vitest`_ (although contribution to add other runtimes would be welcome).

### Setup
### Настройка

1. Add `@nuxt/test-utils/module` to your `nuxt.config` file (optional). It adds a Vitest integration to your Nuxt DevTools which supports running your unit tests in development.

Expand Down Expand Up @@ -414,16 +414,16 @@ If you prefer to use `@vue/test-utils` on its own for unit testing in Nuxt, and

::code-group
```bash [yarn]
yarn add --dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
yarn add --dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
```
```bash [npm]
npm i --save-dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
npm i --save-dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
```
```bash [pnpm]
pnpm add -D vitest @vue/test-utils happy-dom @vitejs/plugin-vue
pnpm add -D vitest @vue/test-utils happy-dom @vitejs/plugin-vue
```
```bash [bun]
bun add --dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
bun add --dev vitest @vue/test-utils happy-dom @vitejs/plugin-vue
```
::

Expand All @@ -432,7 +432,7 @@ If you prefer to use `@vue/test-utils` on its own for unit testing in Nuxt, and
```ts twoslash
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
plugins: [vue()],
test: {
Expand Down Expand Up @@ -465,9 +465,9 @@ If you prefer to use `@vue/test-utils` on its own for unit testing in Nuxt, and
```ts twoslash
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'

import HelloWorld from './HelloWorld.vue'

describe('HelloWorld', () => {
it('component renders Hello world properly', () => {
const wrapper = mount(HelloWorld)
Expand Down Expand Up @@ -499,7 +499,7 @@ Congratulations, you're all set to start unit testing with `@vue/test-utils` in

For end-to-end testing, we support [Vitest](https://github.com/vitest-dev/vitest), [Jest](https://jestjs.io), [Cucumber](https://cucumber.io/) and [Playwright](https://playwright.dev/) as test runners.

### Setup
### Настройка

In each `describe` block where you are taking advantage of the `@nuxt/test-utils/e2e` helper methods, you will need to set up the test context before beginning.

Expand Down
46 changes: 23 additions & 23 deletions docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,37 +127,37 @@ const appConfig = useAppConfig()
- `runtimeConfig`: Приватные или публичные токены, которые необходимо указать после сборки с использованием переменных среды.
- `app.config`: Публичные токены, которые определяются во время сборки, конфигурация веб-сайта - например, тема, заголовок и любая конфигурация проекта, которая не является конфиденциальной.

Feature | `runtimeConfig` | `app.config`
-------------------------------|------------------|-------------------
Сторона клиента | Гидратация | Вместе со сборкой
Переменные среды | ✅ Да | ❌ Нет
Реактивность | ✅ Да | ✅ Да
Поддержка типов | ✅ Частично | ✅ Да
Конфигурация по запросу | ❌ Нет | ✅ Да
Горячая замена модулей (HMR) | ❌ Нет | ✅ Да
Непримитивные типы JS | ❌ Нет | ✅ Да
Feature | `runtimeConfig` | `app.config`
-----------------------------|-----------------|------------------
Сторона клиента | Гидратация | Вместе со сборкой
Переменные среды | ✅ Да | ❌ Нет
Реактивность | ✅ Да | ✅ Да
Поддержка типов | ✅ Частично | ✅ Да
Конфигурация по запросу | ❌ Нет | ✅ Да
Горячая замена модулей (HMR) | ❌ Нет | ✅ Да
Непримитивные типы JS | ❌ Нет | ✅ Да

## Внешние конфигурационные файлы

Nuxt использует файл [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) как единственный источник правды и пропускает чтение внешних файлов конфигурации. В процессе создания вашего проекта вам может потребоваться настроить их. В следующей таблице представлены общие конфигурации и, где это применимо, как их можно настроить с помощью Nuxt.

Имя | Файл конфигурации | Как настроить
---------------------------------------------|---------------------------|-------------------------
[Nitro](https://nitro.unjs.io) | ~~`nitro.config.ts`~~ | Используйте ключ [`nitro`](/docs/api/nuxt-config#nitro) в `nuxt.config`
[PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Используйте ключ [`postcss`](/docs/api/nuxt-config#postcss) в `nuxt.config`
[Vite](https://vitejs.dev) | ~~`vite.config.ts`~~ | Используйте ключ [`vite`](/docs/api/nuxt-config#vite) в `nuxt.config`
[webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Используйте ключ [`webpack`](/docs/api/nuxt-config#webpack-1) в `nuxt.config`
Имя | Файл конфигурации | Как настроить
----------------------------------|-------------------------|------------------------------------------------------------------------------
[Nitro](https://nitro.unjs.io) | ~~`nitro.config.ts`~~ | Используйте ключ [`nitro`](/docs/api/nuxt-config#nitro) в `nuxt.config`
[PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Используйте ключ [`postcss`](/docs/api/nuxt-config#postcss) в `nuxt.config`
[Vite](https://vitejs.dev) | ~~`vite.config.ts`~~ | Используйте ключ [`vite`](/docs/api/nuxt-config#vite) в `nuxt.config`
[webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Используйте ключ [`webpack`](/docs/api/nuxt-config#webpack-1) в `nuxt.config`

Вот список других распространенных конфигурационных файлов:

Имя | Файл конфигурации | Как настроить
---------------------------------------------|-------------------------|--------------------------
[TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [Больше информации](/docs/guide/concepts/typescript#nuxttsconfigjson)
[ESLint](https://eslint.org) | `eslint.config.js` | [Больше информации](https://eslint.org/docs/latest/use/configure/configuration-files)
[Prettier](https://prettier.io) | `.prettierrc.json` | [Больше информации](https://prettier.io/docs/en/configuration.html)
[Stylelint](https://stylelint.io) | `.stylelintrc.json` | [Больше информации](https://stylelint.io/user-guide/configure)
[TailwindCSS](https://tailwindcss.com) | `tailwind.config.js` | [Больше информации](https://tailwindcss.nuxtjs.org/tailwind/config)
[Vitest](https://vitest.dev) | `vitest.config.ts` | [Больше информации](https://vitest.dev/config)
Имя | Файл конфигурации | Как настроить
---------------------------------------------|----------------------|--------------------------------------------------------------------------------------
[TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [Больше информации](/docs/guide/concepts/typescript#nuxttsconfigjson)
[ESLint](https://eslint.org) | `eslint.config.js` | [Больше информации](https://eslint.org/docs/latest/use/configure/configuration-files)
[Prettier](https://prettier.io) | `.prettierrc.json` | [Больше информации](https://prettier.io/docs/en/configuration.html)
[Stylelint](https://stylelint.io) | `.stylelintrc.json` | [Больше информации](https://stylelint.io/user-guide/configure)
[TailwindCSS](https://tailwindcss.com) | `tailwind.config.js` | [Больше информации](https://tailwindcss.nuxtjs.org/tailwind/config)
[Vitest](https://vitest.dev) | `vitest.config.ts` | [Больше информации](https://vitest.dev/config)

## Конфигурация Vue

Expand Down
6 changes: 3 additions & 3 deletions docs/1.getting-started/4.assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The [`public/`](/docs/guide/directory-structure/public) directory is used as a p

You can get a file in the [`public/`](/docs/guide/directory-structure/public) directory from your application's code or from a browser by the root URL `/`.

### Example
### Пример

For example, referencing an image file in the `public/img/` directory, available at the static URL `/img/nuxt.png`:

Expand All @@ -33,7 +33,7 @@ By convention, Nuxt uses the [`assets/`](/docs/guide/directory-structure/assets)

In your application's code, you can reference a file located in the [`assets/`](/docs/guide/directory-structure/assets) directory by using the `~/assets/` path.

### Example
### Пример

For example, referencing an image file that will be processed if a build tool is configured to handle this file extension:

Expand All @@ -51,7 +51,7 @@ Nuxt won't serve files in the [`assets/`](/docs/guide/directory-structure/assets

To globally insert statements in your Nuxt components styles, you can use the [`Vite`](/docs/api/nuxt-config#vite) option at your [`nuxt.config`](/docs/api/nuxt-config) file.

#### Example
#### Пример

In this example, there is a [sass partial](https://sass-lang.com/documentation/at-rules/use#partials) file containing color variables to be used by your Nuxt [pages](/docs/guide/directory-structure/pages) and [components](/docs/guide/directory-structure/components)

Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/5.seo-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ useHead({
</script>
```

## Examples
## Примеры

### With `definePageMeta`

Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/6.data-fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ When fetching data from the `server` directory, the response is serialized using
Learn more about `JSON.stringify` limitations.
::

### Example
### Пример

```ts [server/api/foo.ts]
export default defineEventHandler(() => {
Expand Down
8 changes: 4 additions & 4 deletions docs/1.getting-started/7.state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Such state will be shared across all users visiting your website and can lead to
Instead use `const useX = () => useState('x')`
::

## Examples
## Примеры

### Basic Usage
### Базовое использование

In this example, we use a component-local counter state. Any other component that uses `useState('counter')` shares the same reactive state.

Expand Down Expand Up @@ -81,7 +81,7 @@ This is similar to the [`nuxtServerInit` action](https://v2.nuxt.com/docs/direct

:read-more{to="/docs/api/utils/call-once"}

### Usage with Pinia
### Использование с Pinia

In this example, we leverage the [Pinia module](/modules/pinia) to create a global store and use it across the app.

Expand Down Expand Up @@ -122,7 +122,7 @@ await callOnce(website.fetch)
```
::

## Advanced Usage
## Расширенное использование

::code-group
```ts [composables/locale.ts]
Expand Down
4 changes: 2 additions & 2 deletions docs/1.getting-started/9.layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ One of the core features of Nuxt 3 is the layers and extending support. You can
- Create Nuxt themes
- Enhance code organization by implementing a modular architecture and support Domain-Driven Design (DDD) pattern in large scale projects.

## Usage
## Использование

You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file.

Expand Down Expand Up @@ -55,7 +55,7 @@ Watch a video from Learn Vue about Nuxt Layers.
Watch a video from Alexander Lichter about Nuxt Layers.
::

## Examples
## Примеры

::card-group
::card
Expand Down
4 changes: 2 additions & 2 deletions docs/1.getting-started/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: Get Started
titleTemplate: '%s · Get Started with Nuxt'
title: Начать
titleTemplate: '%s · Начните работать с Nuxt'
icon: i-ph-rocket-launch-duotone
4 changes: 2 additions & 2 deletions docs/2.guide/1.concepts/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: Key Concepts
titleTemplate: '%s · Nuxt Concepts'
title: Ключевые концепции
titleTemplate: '%s · Концепции Nuxt'
icon: i-ph-medal-duotone
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.components.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ If a component is meant to be rendered only client-side, you can add the `.clien
```vue [pages/example.vue]
<template>
<div>
<!-- this component will only be rendered on client side -->
<!-- этот компонент будет отображаться только на стороне клиента -->
<Comments />
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/1.composables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Use the composables/ directory to auto-import your Vue composables
navigation.icon: i-ph-folder-duotone
---

## Usage
## Использование

**Method 1:** Using named export

Expand Down Expand Up @@ -56,7 +56,7 @@ Be aware that you have to run [`nuxi prepare`](/docs/api/commands/prepare), [`nu
If you create a composable without having the dev server running, TypeScript will throw an error, such as `Cannot find name 'useBar'.`
::

## Examples
## Примеры

### Nested Composables

Expand Down
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/1.middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Name of middleware are normalized to kebab-case: `myMiddleware` becomes `my-midd
Route middleware run within the Vue part of your Nuxt app. Despite the similar name, they are completely different from [server middleware](/docs/guide/directory-structure/server#server-middleware), which are run in the Nitro server part of your app.
::

## Usage
## Использование

Route middleware are navigation guards that receive the current route and the next route as arguments.

Expand Down Expand Up @@ -150,7 +150,7 @@ export default defineNuxtPlugin(() => {
})
```

## Example
## Пример

```bash [Directory Structure]
-| middleware/
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ navigation.icon: i-ph-folder-duotone
To reduce your application's bundle size, this directory is **optional**, meaning that [`vue-router`](https://router.vuejs.org) won't be included if you only use [`app.vue`](/docs/guide/directory-structure/app). To force the pages system, set `pages: true` in `nuxt.config` or have a [`app/router.options.ts`](/docs/guide/going-further/custom-routing#using-approuteroptions).
::

## Usage
## Использование

Pages are Vue components and can have any [valid extension](/docs/api/configuration/nuxt-config#extensions) that Nuxt supports (by default `.vue`, `.js`, `.jsx`, `.mjs`, `.ts` or `.tsx`).

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.server.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export default defineEventHandler((event) => {
})
```

## Advanced Usage
## Расширенное использование

### Nitro Config

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ navigation.icon: i-ph-folder-duotone

The main purpose of the [`utils/` directory](/docs/guide/directory-structure/utils) is to allow a semantic distinction between your Vue composables and other auto-imported utility functions.

## Usage
## Использование

**Method 1:** Using named export

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/2.nuxtignore.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It is subject to the same specification as [`.gitignore`](/docs/guide/directory-
You can also configure [`ignoreOptions`](/docs/api/nuxt-config#ignoreoptions), [`ignorePrefix`](/docs/api/nuxt-config#ignoreprefix) and [`ignore`](/docs/api/nuxt-config#ignore) in your `nuxt.config` file.
::

## Usage
## Использование

```bash [.nuxtignore]
# ignore layout foo.vue
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/3.app-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineAppConfig({
Do not put any secret values inside `app.config` file. It is exposed to the user client bundle.
::

## Usage
## Использование

To expose config and environment variables to the rest of your app, you will need to define configuration in `app.config` file.

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/3.app.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ With Nuxt 3, the [`pages/`](/docs/guide/directory-structure/pages) directory is

:link-example{to="/docs/examples/hello-world"}

## Usage with Pages
## Использование with Pages

If you have a [`pages/`](/docs/guide/directory-structure/pages) directory, to display the current page, use the [`<NuxtPage>`](/docs/api/components/nuxt-page) component:

Expand Down
1 change: 1 addition & 0 deletions docs/2.guide/2.directory-structure/3.error.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Although it is called an 'error page' it's not a route and shouldn't be placed i
The error page has a single prop - `error` which contains an error for you to handle.

The `error` object provides the following fields:

```ts
{
statusCode: number
Expand Down
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: Directory Structure
titleTemplate: '%s · Nuxt Directory Structure'
title: Структура директории
titleTemplate: '%s · Структура директории Nuxt'
icon: i-ph-folders-duotone
2 changes: 1 addition & 1 deletion docs/2.guide/3.going-further/10.runtime-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ It is advised to use environment variables that match the structure of your `run
Watch a video from Alexander Lichter showcasing the top mistake developers make using runtimeConfig.
::

#### Example
#### Пример

```sh [.env]
NUXT_API_SECRET=api_secret_token
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/3.going-further/4.kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Nuxt Kit provides composable utilities to make interacting with [Nuxt Hooks](/do
Discover all Nuxt Kit utilities.
::

## Usage
## Использование

### Install Dependency

Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/3.going-further/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: Going Further
title: Идем дальше
titleTemplate: '%s · Nuxt Advanced'
icon: i-ph-star-duotone
4 changes: 2 additions & 2 deletions docs/2.guide/4.recipes/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title: Recipes
titleTemplate: '%s · Recipes'
title: Рецепты
titleTemplate: '%s · Рецепты'
icon: i-ph-cooking-pot-duotone
2 changes: 1 addition & 1 deletion docs/2.guide/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
title: 'Guide'
title: 'Руководство'
icon: i-ph-book-open-duotone
Loading

0 comments on commit 158cf54

Please sign in to comment.