scripts/excel-to-xliff.js
// Helper function to an XLIFF file.
Helper function to an XLIFF file.
Helper function to an XLIFF file .
function writeXliff(filename, namespace, units) {
        const js = {
            resources: {},
            sourceLanguage: sourceLanguage,
            targetLanguage: targetLanguage,
        }
        js.resources[namespace] = units
        jsToXliff12(js, (err, res) => {
            fs.writeFile(dir + path.sep + filename, res, function(err) {
                if (err) {
                    return console.log(err);
                }
            });
        });
    }
function writeXliff ( filename , namespace , units ) { const js = { resources : { } , sourceLanguage : sourceLanguage , targetLanguage : targetLanguage , } js . resources [ namespace ] = units jsToXliff12 ( js , ( err , res ) => { fs . writeFile ( dir + path . sep + filename , res , function ( err ) { if ( err ) { return console . log ( err ) ; } } ) ; } ) ; }
Helper function to an XLIFF file.
Helper function to an XLIFF file .