po4av0.69

Locale::Po4a::AsciiDoc

Section: Инструменты Po4a (3pm)
Updated: 2023-01-01
Index Return to Main Contents
 

НАЗВАНИЕ

Locale::Po4a::AsciiDoc: преобразование документов AsciiDoc в/из PO-файлы  

ОПИСАНИЕ

Целью проекта po4a (PO for anything, PO везде и для всего) является облегчение процесса перевода (и что более важно — поддержки перевода), используя инструменты gettext в тех случаях, когда их применение может выглядеть неожиданным, например для документации.

Locale::Po4a::AsciiDoc — это модуль, предназначенным для помощи в переводе документации в формате AsciiDoc.  

ПАРАМЕТРЫ ПРИНИМАЕМЫЕ ЭТИМ МОДУЛЕМ

Ниже приведены специфические для данного модуля параметры:
definitions
Имя файла с po4a-определениями (definitions), которые описаны в разделе ВСТРОЕННЫЕ НАСТРОЙКИ ПОВЕДЕНИЯ. Вы можете использовать этот параметр, если добавить эти определения непосредственно в переводимый документ не является возможным.

В файле с определениями строки должны начинаться не, как комментарии, с двух слешей, а сразу с po4a:.

entry
Список атрибутов, разделённых пробелом, значения которых должны переводиться. По умолчанию ни какие атрибуты не считаются переводимыми.
macro
Список определений макросов (macro definitions), разделённых пробелом.
style
Список определений стилей (style definitions), разделённых пробелами.
forcewrap
Enable automatic line wrapping in non-verbatim blocks, even if the result could be misinterpreted by AsciiDoc formatters.

By default, po4a will not wrap the produced AsciiDoc files because a manual inspection is mandated to ensure that the wrapping does not change the formatting. Consider for instance the following list item:

 * a long sentence that is ending with a number 1. A second sentence.

If the wrapping leads to the following presentation, the item is split into a numbered sub-list. To make things worse, only the speakers of the language used in the translation can inspect the situation.

 * a long sentence that is ending with a number
   1. A second sentence.

Note that not wrapping the files produced by po4a should not be a problem since those files are meant to be processed automatically. They should not be regarded as source files anyway.

With this option, po4a will produce better-looking source files, that may lead to possibly erroneous formatted outputs.

noimagetargets
По умолчанию, дабы дать переводчикам возможность вставлять в документ локализованные версии изображений, ссылки на них являются переводимыми строками. Это можно изменить, указав данный параметр.
tablecells
Этот параметр является флагом, при указании которого таблицы будут разбиты на ячейки. Разбиение ограничивается только ячейками без какого-либо разбора их содержимого.
compat
Switch parsing rules to compatibility with different tools. Available options are ``asciidoc'' or ``asciidoctor''. Asciidoctor has stricter parsing rules, such as equality of length of opening and closing block fences.
nolinting
Disable linting messages. When the source code cannot be fixed for clearer document structure, these messages are useless.
yfm_keys
Comma-separated list of keys to process for translation in the YAML Front Matter section. All other keys are skipped. Keys are matched with a case-sensitive match. If yfm_paths and yfm_keys are used together, values are included if they are matched by at least one of the options. Array values are always translated, unless the yfm_skip_array option is provided.
yfm_skip_array
Do not translate array values in the YAML Front Matter section.
yfm_paths
Comma-separated list of hash paths to process for extraction in the YAML Front Matter section, all other paths are skipped. Paths are matched with a case-sensitive match. If yfm_paths and yfm_keys are used together, values are included if they are matched by at least one of the options. Arrays values are always returned unless the yfm_skip_array option is provided.
 

ВСТРОЕННЫЕ НАСТРОЙКИ ПОВЕДЕНИЯ

Поведение модуля AsciiDoc может быть настроено строками в документе начинающимися с //po4a:. Эти строки рассматриваются, как команды данному парсеру. Возможно задать следующие команды:
//po4a: macro имя[список атрибутов]
This describes in detail the parameters of a macro; name must be a valid macro name, and it ends with an underscore if the target must be translated.

The attribute list argument is a comma separated list which contains information about translatable arguments. This list contains either numbers, to define positional parameters, or named attributes.

Если в начало имени добавлен знак плюс (+), то макрос и все его аргументы переводятся как единое целое. В этом случае нет необходимости задавать список аргументов, но скобки всё равно должны присутствовать.

//po4a: style [список атрибутов]
This describes in detail which attributes of a style must be translated.

The attribute list argument is a comma separated list which contains information about translatable arguments. This list contains either numbers, to define positional parameters, or named attributes. The first attribute is the style name, it will not be translated.

Если в начало имени стиля добавлен знак плюс (+), то весь список атрибутов переводится как единое целое. В этом случае нет необходимости задавать список атрибутов.

Если в начало имени стиля добавлен знак минус (-), то его атрибуты не будут переводиться.

//po4a: entry имя
Этот параметр объявляет значение атрибута переводимым. По умолчанию все оные не являются таковыми.
 

СОСТОЯНИЕ ЭТОГО МОДУЛЯ

Успешно протестирован на простых файлах AsciiDoc.  

АВТОРЫ

 Николя Франсуа (Nicolas François) <nicolas.francois@centraliens.net>
 Денис Барбье (Denis Barbier) <barbier@linuxfr.org>

 

АВТОРСКИЕ ПРАВА И ЛИЦЕНЗИИ

 Copyright © 2005-2008 Николя Франсуа (Nicolas FRANÇOIS) <nicolas.francois@centraliens.net>.
 Copyright © 2012 Денис Барбье (Denis BARBIER) <barbier@linuxfr.org>.
 Copyright © 2017 Мартин Кенсон (Martin Quinson) <mquinson#debian.org>.

Данная программа является свободным программным обеспечением; вы можете распространять и/или изменять её на условиях Универсальной общественной лицензии (GPL) GNU (см. файл COPYING).

__END__

# LocalWords: Charset charset AsciiDoc tablecells po UTF gettext msgid nostrip


 

Index

НАЗВАНИЕ
ОПИСАНИЕ
ПАРАМЕТРЫ ПРИНИМАЕМЫЕ ЭТИМ МОДУЛЕМ
ВСТРОЕННЫЕ НАСТРОЙКИ ПОВЕДЕНИЯ
СОСТОЯНИЕ ЭТОГО МОДУЛЯ
АВТОРЫ
АВТОРСКИЕ ПРАВА И ЛИЦЕНЗИИ

This document was created by using the manual pages.
Time: 01:12:42 GMT, January 01, 2023
català Deutsch English Esperanto español français hrvatski Magyar Italiano 日本語 Bokmål Nederlands polski Português Português (Brasil) Русский српски језик український 简体中文 简体中文 (how to set the default document language)