froments(name,
args=( ) ,
kwargs={ } ,
vfilter=None,
testsub=False)
|
|
Resolve trapnakron references in translation using XML entity format
[hook factory].
If an entity cannot be resolved as trapnakron reference, warning is
output and the entity is left unresolved. Instead of leaving the entity
unresolved, an illustrative expansion for the property key given by the
reference can be substituted by setting the testsub
parameter to True .
Entities in a given message can be manually ignored through
ignore-entity: translation comment, which contains
comma-separated list of entity names:
# ignore-entity: foo, bar
msgid "Blah, blah, &foo;, blah, blah, &bar;."
msgstr "Бла, бла, &foo;, бла, бла, &bar;."
Standard XML and HTML entities are ignored by default.
- Parameters:
name (string) - suffix of trapnakron constructor, e.g. "ui" for trapnakron_ui
args (tuple) - positional arguments to send to the constructor
kwargs (dict) - keyword arguments to send to the constructor
vfilter (string or (string)->string) - format string (with single %s directive) or function
to apply to every resolved reference
testsub (bool) - whether to substitute test forms in place of undefined references
- Returns:
(msgstr, msg, cat) -> msgstr
- type F3C hook
|