Translations by theadmin

theadmin has submitted the following strings to this translation. Contributions are visually coded: currently used translations, unreviewed suggestions, rejected suggestions.

136 of 36 results
1.
Python Statements
2014-11-03
Операторы Python
2.
Ren'Py is written in the Python programming language, and includes support for including python code inside Ren'Py scripts. Python support can be used for many things, from setting a flag to creating new displayables. This chapter covers ways in which Ren'Py scripts can directly invoke Python code, through the various python statements.
2014-11-03
Ren'Py написан на языке программирования Python, и позволяет выполнять код на Python внутри программ Ren'Py. Поддержка Python используется для многих вещей, от задания флагов до создания новых отображаемых объектов. В этой главе рассказаны способы вызова кода на Python в Ren'Py.
3.
Python
2014-11-03
Python
4.
The python statement takes a block of python code, and runs that code when control reaches the statement. A basic python statement can be very simple::
2014-11-03
Оператор python принимает блок кода на Python и выполняет его. Пример простого оператора python::
5.
Python statements can get more complex, when necessary::
2014-11-03
При необходимости, операторы python могут принимать более сложные формы::
6.
There are two modifiers to the python statement that change its behavior:
2014-11-03
Существует два модификатора для оператора python, изменяющих его поведение:
7.
``hide``
2014-11-03
``hide``
8.
If given the hide modifier, the python statement will run the code in an anonymous scope. The scope will be lost when the python block terminates.
2014-11-03
Если используется модификатор hide, операции Python будут выполнятся в анонимной области видимости, которая будет потеряна по завершении выполнения блока.
9.
This allows python code to use temporary variables that can't be saved - but it means that the store needs to be accessed as fields on the store object, rather than directly.
2014-11-03
Это позволяет использовать в коде Python временные переменные которые не нужно сохранять, но это также означает, что напрямую доступа к сохраняемым переменным нет, и нужно получать доступ к ним из объекта store.
10.
``in``
2014-11-03
``in``
11.
The ``in`` modifier takes a name. Instead of executing in the default store, the python code will execute in the store that name.
2014-11-03
Модификатор ``in`` принимает имя и выполняет код на Python в области видимости с этим именем.
12.
One-line Python Statement
2014-11-03
Однострочный оператор Python
13.
A common case is to have a single line of python that runs in the default store. For example, a python one-liner can be used to initialize or update a flag. To make writing python one-liners more convenient, there is the one-line python statement.
2014-11-03
Часто требуется написать одну строку Python, выполняемую в области видимости по умолчанию. Например, это может быть использовано для установки или обновления флага. Для упрощения написания однострочных операции, существует однострочный оператор Python.
14.
The one-line python statement begins with the dollar-sign ($) character, and contains all of the code on that line. Here are some example of python one-liners::
2014-11-03
Однострочный оператор начинается со знака доллара ($) и содержит весь код на этой строке. Вот примеры::
15.
Python one-liners always run in the default store.
2014-11-03
Однострочные операторы всегда выполняются в области видимости по умолчанию.
16.
Init Python Statement
2014-11-03
Оператор init python
17.
The ``init python`` statement runs python code at initialization time, before the game loads. Among other things, this code can be used to define classes and functions, or to initialize styles, config variables, or persistent data. ::
2014-11-03
Оператор ``init python`` выполняет код Python во время инициализации, до загрузки игры. Он может определять классы, функции, инициализировать стили, настройки или постоянные данные. ::
18.
A priority number can be placed between ``init`` and ``python``. When a priority is not given, 0 is used. Init statements are run in priority order, from lowest to highest. Init statements of the same priority are run in unicode order by filename, and then from top to bottom within a file.
2014-11-03
Между словами ``init`` и ``python`` можно разместить число-приоритет. Без приоритета используется 0. Операции инициализации выполняются в порядке приоритета, от низшего к высшему. Операторы одинакового приоритета выполняются сверху вниз, в алфавитном порядке файлов.
19.
To avoid conflict with Ren'Py, creators should use priorities in the range -999 to 999. Priorities of less than 0 are generally used for libraries and to set up themes. Normal init code should have a priority of 0 or higher.
2014-11-03
Во избежание конфликтов с Ren'Py, следует использовать приоритеты от -999 до 999. Приоритеты ниже нуля используются библиотеками для настройки тем, нормальный код должен использовать приоритет 0 или выше.
20.
Init python statements also take the ``hide`` or ``in`` clauses.
2014-11-03
Операции init python также принимают модификаторы ``hide`` и ``in``.
21.
Variables that have their value set in an init python block are not saved, loaded, and do not participate in rollback, unless the object the variable refers to is changed.
2014-11-03
Переменные, значение которых установлено в блоке init python, не сохраняются, не загружаются и не учавствуют в откате.
22.
Define Statement
2014-11-03
Оператор define
23.
The define statement sets a single variable in the default store to a value at init time. For example::
2014-11-03
Оператор define устанавливает переменную во время инициализации. То есть::
24.
is equivalent to::
2014-11-03
эквивалентно::
25.
One advantage of using the define statement is that it records the filename and line number at which the assignment occured, and makes that available to the navigation feature of the launcher.
2014-11-03
Преимущество использования оператора define состоит в том, что он хранит имя файла и номер строки на которой произведено присваивание, и делает это доступным в навигации Launcher.
26.
Names in the Store
2014-11-03
Имена в областях видимости
27.
The default place that Ren'Py stores Python variables is called the store. It's important to make sure that the names you use in the store do not conflict.
2014-11-03
Место, где Ren'Py хранит переменные Python, называется областью видимости. Важно, чтобы имена, используемые вами в одной области, не конфликтовали.
28.
The define statement assigns a value to a variable, even when it's used to define a character. This means that it's not possible to use the same name for a character and a flag.
2014-11-03
Оператор define присваивает переменной значение, даже если она определяет персонажа. Это значит, что нельзя использовать одно и то же имя для персонажа и флага.
29.
The following faulty code::
2014-11-03
Следующий код::
30.
will not work, because the variable `e` is being used as both a character and a flag. Other things that are usually placed into the store are transitions and transforms.
2014-11-03
не будет работать, так как `e` используется как персонаж и как флаг. Другие вещи, помещаемые в область видимости - переходы и трансформации.
31.
Names beginning with underscore (\_) are reserved for Ren'Py's internal use. In addition, there is an :ref:`Index of Reserved Names <reserved-names>`.
2014-11-03
Имена, начинающиеся с подчеркивания (\_) зарезервированы для внутреннего использования Ren'Py. Помимо этого, существует :ref:`Индекс зарезервированных имен <reserved-names>`.
32.
Other Named Stores
2014-11-03
Другие области видимости
33.
Named stores provide a way of organizing python code into modules. By placing code in modules, you can minimize the chance of name conflicts.
2014-11-04
Именованные области видимости предоставляют возможность организовать код Python по модулям. Храня код в модулях, можно избежать конфликтов имен.
34.
Named stores can be accessed by supplying the ``in`` clause to ``python`` or ``init python``, code can run accessed in a named store. Each store corresponds to a python module. The default store is ``store``, while a named store is accessed as ``store``.`name`. These python modules can be imported using the python import statement, while names in the modules can be imported using the python from statement.
2014-11-04
Доступ к областям видимости можно получить используя модификатор ``in`` для блоков ``python`` и ``init python``. Каждая область видимости соответствует модулю Python. Область видимости по умолчанию - ``store``. Доступ к дополнительным областям видимости можно получить так: ``store``.`name`. Модули Python можно импортировать используя оператор import, а отдельные имена из модулей можно получить оператором from.
35.
For example::
2014-11-04
Например::
36.
Named stores participate in save, load, and rollback in the same way that the default store does.
2014-11-04
Именованные области видимости учавствуют в процедурах сохранения и загрузки так же, как и область видимости по умолчанию.