Package translate :: Package storage :: Package placeables |
[hide private]
[frames] | no frames]

# Source Code for Package translate.storage.placeables

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  #
     4  # Copyright 2008-2009 Zuza Software Foundation
     5  #
     6  # This file is part of the Translate Toolkit.
     7  #
     8  # This program is free software; you can redistribute it and/or modify
     9  # it under the terms of the GNU General Public License as published by
    10  # the Free Software Foundation; either version 2 of the License, or
    11  # (at your option) any later version.
    12  #
    13  # This program is distributed in the hope that it will be useful,
    14  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  # GNU General Public License for more details.
    17  #
    18  # You should have received a copy of the GNU General Public License
    19  # along with this program; if not, see <http://www.gnu.org/licenses/>.
    20
    21  """
    22  This module implements basic functionality to support placeables.
    23
    24  A placeable is used to represent things like:
    25    1. Substitutions
    26
    27       For example, in ODF, footnotes appear in the ODF XML
    28       where they are defined; so if we extract a paragraph with some
    29       footnotes, the translator will have a lot of additional XML to with;
    30       so we separate the footnotes out into separate translation units and
    31       mark their positions in the original text with placeables.
    32
    33    2. Hiding of inline formatting data
    34
    35       The translator doesn't want to have to deal with all the weird
    36       formatting conventions of wherever the text came from.
    37
    38    3. Marking variables
    39
    40       This is an old issue - translators translate variable names which
    41       should remain untranslated. We can wrap placeables around variable
    42       names to avoid this.
    43
    44  The placeables model follows the XLIFF standard's list of placeables.
    45  Please refer to the XLIFF specification to get a better understanding.
    46  """
    47
    48  import base
    49  import interfaces
    50  import general
    51  import xliff
    52  from base import *
    53  from base import __all__ as all_your_base
    54  from strelem import StringElem
    55  from parse import parse
    56
    57  __all__ = ['base', 'interfaces', 'general', 'parse', 'StringElem', 'xliff'] + all_your_base
    58