Giter Site home page Giter Site logo

filter-xlf's Introduction

filter-xlf

Node command line util to filter XLF files on attribute values that start with a value.

Supports XLF version 1.2.

Angular extract-i18n scans both source files and node_modules and extract i18n labels. With this tool the labels from node_modules can be removed.

Or, when a repo contains several lib packages, extract-i18n generates 1 xlf file. With this tool, the xlf file can be spit per lib-package and added to the libs.

ts-node index.ts  -id !lib -s ./src/assets/i18n/source.xlf -t ./src/assets/i18n/target.xlf

-id = id starts with value. Prefix with ! to select nodes that do not start with that value -s = source XML document path -t = target XML document path

idStartsWith xpathFilterPattern
lib //ns:trans-unit[not(starts-with(@id, "lib"))]
!lib //ns:trans-unit[(starts-with(@id, "lib"))]

nodes which are selected by the xpathFilterPattern are filtered out

filter-xlf's People

Contributors

areijngoudt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.