Package translate :: Package storage :: Module trados

[hide private]
[frames] | no frames]

# Module trados

source code

Manage the Trados .txt Translation Memory format

A Trados file looks like this:

       <TrU>
       <CrD>18012000, 13:18:35
       <CrU>CAROL-ANN
       <UsC>0
       <Seg L=EN_GB>Association for Road Safety \endash  Conference
       <Seg L=DE_DE>Tagung der Gesellschaft für Verkehrssicherheit
       </TrU>
       <TrU>
       <CrD>18012000, 13:19:14
       <CrU>CAROL-ANN
       <UsC>0
       <Seg L=EN_GB>Road Safety Education in our Schools
       <Seg L=DE_DE>Verkehrserziehung an Schulen
       </TrU>

Classes | [hide private]

| TradosTxtDate Manages the timestamps in the Trados .txt format of DDMMYYY, hh:mm:ss
| TradosUnit
| TradosSoup
| TradosTxtTmFile A Trados translation memory file

Functions | [hide private]

unescape(text) Convert Trados text to normal Unicode string | source code

escape(text) Convert Unicode string to Trodas escapes | source code

Variables | [hide private]

| TRADOS_TIMEFORMAT = `"%d%m%Y, %H:%M:%S"` Time format used by Trados .txt
| RTF_ESCAPES = `{ur"\emdash": u"—", ur"\endash": u"–", ur"\emspa`...`` RTF control to Unicode map

Imports: re, time, BeautifulStoneSoup, base

Variables Details | [hide private]

### RTF_ESCAPES

RTF control to Unicode map

Value:

      {ur"\emdash": u"—", ur"\endash": u"–", ur"\emspace": u"\u2003", ur"\en
      space": u"\u2002", ur"\bullet": u"•", ur"\lquote": u"‘", ur"\rquote":
      u"’", ur"\ldblquote": u"“", ur"\rdblquote": u"”", ur"\~": u"\u00a0", u
      r"\-": u"\u00ad", ur"\_": u"‑",}