Package translate :: Package storage :: Module csvl10n

[hide private]
[frames] | no frames]

# Module csvl10n

source code

classes that hold units of comma-separated values (.csv) files (csvunit) or entire files (csvfile) for use with localisation

Classes | [hide private]

| SimpleDictReader
| DefaultDialect
| csvunit
| csvfile This class represents a .csv file with various lines.

Functions | [hide private]

from_unicode(text, encoding='utf-8') | source code

to_unicode(text, encoding='utf-8') | source code

try_dialects(inputfile, fieldnames, dialect) | source code

valid_fieldnames(fieldnames) check if fieldnames are valid | source code

detect_header(sample, dialect, fieldnames) Test if file has a header or not, also returns number of columns in first row | source code

Variables | [hide private]

| canonical_field_names = `'location', 'source', 'target', 'id', `...``
| fieldname_map = `{'original': 'source', 'untranslated': 'source`...``

Imports: csv, logging, codecs, StringIO, sparse, base

Variables Details | [hide private]

### canonical_field_names

Value:

      'location', 'source', 'target', 'id', 'fuzzy', 'context', 'translator_
      comments', 'developer_comments'

### fieldname_map

Value:

      {'original': 'source', 'untranslated': 'source', 'translated': 'target
      ', 'translation': 'target', 'identified': 'id', 'key': 'id', 'label':
      'id', 'transaltor comments': 'translator_comments', 'notes': 'translat
      or_comments', 'developer comments': 'developer_comments', 'state': 'fu
      zzy',}