Skip to content

recranet/angular-gettext-tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

480 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@recranet/angular-gettext-tools

Tools for extracting/compiling angular-gettext strings.

Modernized fork of angular-gettext-tools with a minimal dependency tree. The public API is unchanged.

Used to construct build tools for angular-gettext.

Requirements

  • Node.js 22 or newer.

Only three runtime dependencies, all small and well-maintained:

  • @babel/parser — JavaScript/TypeScript parsing (zero dependencies)
  • htmlparser2 — forgiving HTML parsing (small, zero-dependency packages)
  • pofile — PO file parsing/serialization (zero dependencies)

Development

npm install
npm test

Tests run on the built-in Node.js test runner (node --test), so there are no development dependencies.

Implementations:

Check the website for usage instructions: http://angular-gettext.rocketeer.be/.

Options

All options and defaults are displayed below:

{
    "startDelim": "{{",
    "endDelim": "}}",
    "markerName": "gettext",
    "markerNames": [],
    "markerNamePlural": null,
    "markerNamesPlural": [],
    "moduleName": "gettextCatalog",
    "moduleMethodString": "getString",
    "moduleMethodPlural": "getPlural",
    "attribute": "translate",
    "attributes": [],
    "lineNumbers": true,
    "filterName": "translate",
    "format": "javascript",
    "defaultLanguage": false,
    "requirejs": false
}

License

(The MIT License)

Copyright (C) 2013-2015 by Ruben Vermeersch <ruben@rocketeer.be>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

About

Tools for extracting/compiling angular-gettext strings.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%