Help:Extension:Translate/Insertables/ru

Переводимые строки часто содержат разметку, которая должна быть сохранена в переводе в неизменном виде. Вводить такую разметку может быть медленно и трудно, поскольку она содержит специальные символы и символьные коды, которые можно перепутать с переводимым текстом. Insertable is a piece of markup that is presented to the translator as a button or other interface element. Clicking the button inserts the piece of markup into the translation to the current cursor position.

Each message group can have one. This class is responsible for generating a list of s. Each   has three parts:


 * 1) What to display to the user
 * 2) What is inserted before cursor position in the translation
 * 3) What is inserted after cursor position in the translation

Translate extension comes with  built-in. Suggesters for other type of content can be found in the translatewiki.net git repository.

Пример кода
Here is an example about adding insertables support for existing file based message group: FreeCol. The YAML file has been trimmed for brevity. The newly added lines are highlighted.

FreeCol.yaml:

Suggester.php:

The parameters to Insertable are: