Tools for extracting/compiling angular-gettext strings.
Used to construct build tools for angular-gettext.
You probably want to use one of the build plugins that wrap this library instead. Current implementations:
angular-gettext-tools has two components: an Extractor for extracting
translatable strings into a POT file,
and a Compiler for converting PO files
into a format that the runtime library (angular-gettext)
can consume.
For more information, check out the official website.
All Extractor options are optional.
Delimiter that starts your Angular expressions. If you're using
custom delimiters
for your Angular expressions, you should set the the Extractor can parse your
expressions. Defaults to {{, which is Angular's default.
Delimiter that ends your Angular expressions. Defaults to }}, which is
Angular's default.
String to use as marker when parsing JavaScript for extractable strings.
Defaults to gettext.
Array of additional markers. If you're using a custom service that wraps
angular-gettext, you'll probably want to pass the name of your service here
so angular-gettext-tools can extract your strings.
false to disable outputting line numbers in PO file references. Defaults to
true.
Object mapping file extensions to extraction strategies. Valid
strategies are html or js. For example, if you have a file foo.bar you
want parsed as HTML, pass {extensions: {foo: 'html'}} to the Extractor.
Callback to post process the resulting PO file. Passed a
pofile object.
All Compiler options are optional.
Output format. javascript or json. Defaults to javascript for ease of use,
but for more control over how strings are loaded into your app, consider using
json and then generating your own JavaScript to suit your needs.
Name of the Angular module to output. Only used if format is javascript.
Defaults to gettext.
Whether to wrap the output in a RequireJS module. Only
used if format is javascript. Defaults to false.
(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.
