xlfpackage
Loads an XLF package for manipulation.
Last updated 2 years ago by docsplendid .
Original npm · Tarball · package.json
$ cnpm install xlfpackage 
SYNC missed versions from official npm registry.

XLF Package

Loads an XLF package for manipulation.

Methods

getPackage

Returns the entire package. Format is:

[
    {
        langLoc: 'de/common',
        path: 'de/common/blahblah.xlf'
        strings: [
            {
                id: '',
                source: '',
                target: '',
                state: '',
                note: ''
            }
        ]
    },
    {
        langLoc: 'pt/br',
        path: 'pt/br/blahblah.xlf'
        strings: [
            {
                id: '',
                source: '',
                target: '',
                state: '',
                note: ''
            }
        ]
    }
]

getStrings [onlyTranslated]

Returns all the strings in the following format:

[
    {
        id: '55555555555',
        source: 'blah',
        allTranslated: false,
        langs: {
            'es/common': '',
            'de/common': ''
        }
    }
]

updateString <id> <langsObject>

Updates the string with the given ID with an object matching the format of langs from a getString() object.

write [path]

Writes the xlf. Defaults to writing to the original package location.

Current Tags

  • 0.3.0                                ...           latest (2 years ago)

15 Versions

  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 17
Last Day 0
Last Week 0
Last Month 20
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |