Skip to content
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

Update structs.md #2

Merged
merged 3 commits into from
Jul 4, 2017
Merged

Update structs.md #2

merged 3 commits into from
Jul 4, 2017

Conversation

Zabalkanskiy
Copy link
Contributor

No description provided.

@jarosluv
Copy link
Member

jarosluv commented Jul 2, 2017

@Zabalkanskiy спасибо за перевод!

Пожалуйста, добавьте --- самой первой строкой, иначе файл не скомпилируется.

@jarosluv jarosluv self-requested a review July 2, 2017 16:02
@@ -0,0 +1,103 @@
title: Структуры
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо добавить --- первой строчкой.

structs.md Outdated

## Определение структур

Для определения структуры используется `defstruct` конструкция:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше поменять местами на "конструкцияdefstruct"

structs.md Outdated

Для определения структуры используется `defstruct` конструкция:

```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше добавить название языка в блоках кода здесь и в остальных местах.

"```elixir"

structs.md Outdated
Структуры берут имя модуля, в котором они определены. В приведенном выше примере мы определили структуру с именем `User`.

Теперь мы можем создавать `User` структуры, используя синтаксис, аналогичный тому, который используется для создания `map`:
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structs.md Outdated
...> end
```

Список ключевых слов, используемый при определении defstruct , определяет, какие поля будет иметь структура вместе со значениями по умолчанию.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Убрать пробел перед запятой.

structs.md Outdated

Для определения структуры используется `defstruct` конструкция:
Для определения структуры в `elixir` используется `defstruct` конструкция:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zabalkanskiy может быть я не совсем понятно выразился, но это не те правки, которые нужно было сделать.

  1. Подзаголовок "Определение структур" нужно оставить как есть, это же прямой перевод.
  2. Поменять местами слова "defstruct" и "конструкция" нужно в этом предложении, чтобы получилось
    "Для определения структуры используется конструкция defstruct:".
  3. Слово "elixir" нужно добавить в блоках кода, чтобы компилятор понимал, какую подсветку синтаксиса использовать. Если вы хотите добавить блок кода на языке Эликсир, нужно после трёх косых обратных апострофов поставить название языка "elixir", чтобы получилось "```elixir".

Спасибо!

@jarosluv jarosluv merged commit ba1473f into wunsh:master Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants