Справка:Расширение:Перевод/Состояния групп сообщений

This page is a translated version of the page Help:Extension:Translate/Message group states and the translation is 41% complete.
LanguageStats позволяет проверить состояние каждой группы сообщений на этом языке

Эта страница содержит документацию по состояниям рабочего процесса группы сообщений. Представьте, что какая-то организация использует MediaWiki с Расширением перевода. Среди прочего, они используют вики для написания пресс-релизов. Что они делают? Сначала они пишут пресс-релиз в вики, затем делают его доступным для перевода и приглашают переводчиков работать над ним. Когда перевод готов, они могут опубликовать его в другом месте на своем сайте. Но как они узнают, что перевод готов или, что ещё важнее, выверен и исправлен (см. Обеспечение качества)? Что, если кто-то обнаружит ошибку и исправит её, и требуется обновить опубликованную версию?

Именно для этого случая предназначена функция рабочего процесса группы сообщений. Она позволяет присоединить тег к группе сообщений, указывающий на состояние, в котором она находится, например, «в процессе перевода», «вычитка», «готово» или «опубликовано». Это позволяет работающим над пресс-релизом пользователям с различными ролями явно раскрыть текущее состояние без необходимости других методов коммуникации. Переводчики могут указать, когда считают, что их перевод готов, а другие могут увидеть, какие переводы уже опубликованы. Администратор переводов может периодически проверять, какие переводы готовы, и публиковать их, а также обновлять уже опубликованные страницы. Это рабочий процесс (workflow).

Настройка

By default, this feature is disabled. It must be set up in the wiki configuration (LocalSettings.php ). You need to decide what states you want to configure, and assign them colors in the hex format. In addition you can choose the user groups that can by default change the states.

Here is a sample configuration:


$wgTranslateWorkflowStates = array(
     'new' => array( 'color' => 'FF0000' ), // red
     'needs_proofreading' => array( 'color' => '0000FF' ), // blue
     'ready' => array( 'color' => 'FFFF00' ), // yellow
     'published' => array( 'color' => '00FF00' ), // green
); 

$wgGroupPermissions['translator']['translate-groupreview'] = true;

Message groups can override the global workflow states and provide their own ones. They can do more granular permission control by state level. A state can only be selected by the user groups that have the specified right.

$wgTranslateWorkflowStates = array(
     'published' => array( 'color' => 'FF0000', 'right' => 'translate-publish' )
);

$wgGroupPermissions['translationadmin']['translate-publish'] = true;

Как пользоваться

 
On Special:Translate the status is shown and can be changed

Once the configuration is set, both Special:LanguageStats and Special:MessageGroupStats will show a new column for the current state, and the tables can be sorted by state. The state can be changed in Special:Translate: just choose the group and language and you will see the state in the top corner of the message group description.

This state applies to a single language of a single message group, say the whole Italian translation of the translatable page "Fréttinga". In contrast, individual translation units can be accepted and whole translatable pages can be discouraged from further translation.


Автоматические изменения состояния

Since September 2012 Translate supports automatic state changes. For example, when all the messages are translated, the state changes itself to proofreading, and when all messages have been proofread, the state changes to ready.

The conditions for these changes are called transitions. Transitions can have zero or more conditions on the following variables: UNTRANSLATED, OUTDATED, TRANSLATED, PROOFREAD. Each variable represents the number of messages in that state. UNTRANSLATED variable includes the OUTDATED messages. Each variable can be compared to three values: ZERO, NONZERO, MAX. For example transition to ready state would have condition PROOFREAD is MAX. See code example below.

The state of a language of a message group will be updated whenever a translation is changed or reviewed in that language. The state transitions are matched in the declaration order. All conditions must be fulfilled for the transition to match. If no transition matches, the message group will keep its existing state.

$wgTranslateWorkflowStates = array(
	// States
	// 'ready' => ( ... ),
	'state conditions' => array(
		array( 'ready', array( 'PROOFREAD' => 'MAX' ) ),
		array( 'proofreading', array( 'TRANSLATED' => 'MAX' ) ),
		array( 'unset', array( 'UNTRANSLATED' => 'MAX', 'OUTDATED' => 'ZERO', 'TRANSLATED' => 'ZERO' ) ),
		array( 'inprogress', array( 'UNTRANSLATED' => 'NONZERO' ) ),
	)
);