Home | Trees | Indices | Help |
---|
|
Process ascription configurations, catalogs, and histories.
Note: For the moment, this module is only for internal use within Pology. Interfaces may change arbitrarily between any two Pology releases.
Author: Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>
License: GPLv3
Classes | |
AscConfig Representation of an ascription configuration file. |
|
AscUser Representation of an ascription user. |
|
AscPoint Representation of an ascription point. |
Functions | |||
[(AscConfig, [(string, string)*])*] |
|
||
[AscPoint*] |
|
||
[AscPoint*] |
|
||
|
|||
|
|||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
set(string*) |
|
||
set(string*) |
|
||
(Message_base, Catalog)->bool |
|
||
set(string*) |
|
||
set(string*) |
|
||
(Message_base, Catalog, [AscPoint*], AscConfig)->bool (shallow), (...)->int/None (history) |
|
||
|
Variables | |
fld_sep =
|
|
__package__ =
|
Function Details |
Build up ascription associations for catalog paths. For each catalog path, the ascription configuration to which it belongs is found and parsed, and the corresponding ascription catalog path assembled. The association is organized as list of two-tuples; the first element is the parsed ascription configuration, and the second element the list of two-tuples of original catalog paths and associated ascription catalog paths (whether the ascription catalog already exists or not). For example, if the input is: ["foo/alpha.po", "foo/bravo.po", "bar/november.po"] and the files are covered by ascription configurations at
[(AscConfig("foo/ascription-config"), [("foo/alpha.po", "foo-ascript/alpha.po"), ("foo/bravo.po", "foo-ascript/bravo.po")]), (AscConfig("bar/ascription-config"), [("bar/november.po", "bar-ascript/november.po")])] (assuming that both ascription configurations set
|
Collect ascription history of a message. The ascription history of Some ascription points may be due to merging with template, when the
ascriptions on a catalog were made just after merging. In many cases of
examining the history these ascriptions are not useful, so they can be
removed by setting Sometimes it may be convenient to operate on history in which the
translations of historical messages have been filtered, and this filter
can be specified with History normally extends in the past through merging with templates
(think of a paragraph-length message in which only one word was changed),
so it may contain messages with keys different from the current message
from some point and onwards. If only the history up to the earliest
message with equal key is desired, Sometimes it may be convenient to operate on incremental
history, in which every historical message is actually a partial
difference (added, removed or equal segments) from the previous
historical message. This can be requested by setting
|
Collect a segment of an ascription history.
|
Ascribe message modification.
|
Ascribe message review.
|
Whether two messages are equal from the ascription viewpoint.
|
Whether second message may have been derived from first by merging with templates.
|
Find first non fuzzy message in the ascription history.
|
Check whether the message has any parts which are tracked for ascription. For example, a pristine untranslated message is considered to have no tracked parts.
|
Parse ascription user specification. The user specification is a comma-separated list of user names. If the list starts with tilde (~), all users defined in the ascription configuration but for those listed will be selected (inverted selection). If an undefined user (according to ascription configuration) is mentioned, an exception is raised.
|
Parse review tag specification. The tag specification is a comma-separated list of tags. If the list starts with tilde (~), all review tags defined in the ascription configuration but for those listed will be selected (inverted selection). If an undefined tag (according to ascription configuration) is mentioned, an exception is raised.
|
Fetch a cached message matcher for the given expression, for use in ascription selectors. When this function is called for the first time on a new expression, the matcher function is created and cached. On subsequent invocations with the same expression, the matcher is fetched from the cache rather than created anew.
|
Fetch a cached set of users for the given user specification, for use in ascription selectors. When this function is called for the first time on a new combination
of user specification
|
Fetch a cached set of review tags for the given tag specification, for use in ascription selectors. When this function is called for the first time on a new combination
of tag specification
|
Build compound ascription selector out of string specifications of basic selectors. Selector specification string has the format NAME:ARG1:ARG2:... Instead of colon, separator can be any non-alphanumeric character used consistently, except for underscore and hyphen. The compound selector is obtained by constructing each basic selector according to the specification in turn, and linking them with AND-boolean semantics. Parameter
|
Import extensions to ascription functionality from a Python module. Additional selector factories can be introduced by defining the
asc_selector_factories = { # key: (function, can_be_used_as_history_selector), "specsel1": (selector_specsel1, True), "specsel2": (selector_specsel2, False), ... }
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jul 24 21:00:26 2014 | http://epydoc.sourceforge.net |