Miss any of our Open RFC calls?Watch the recordings here! »

xlfpackage

0.0.5 • Public • Published

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

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.

Keywords

none

Install

npm i [email protected]

Version

0.0.5

License

none

Last publish

Collaborators

  • avatar