├── .npmignore ├── test ├── fixtures │ ├── line_numbers.html │ ├── ejs.ejs │ ├── comments2.html │ ├── erb.erb │ ├── custom-attribute.html │ ├── context.html │ ├── module.js │ ├── delim.html │ ├── quotes.html │ ├── complete │ │ ├── README.md │ │ └── issue23.html │ ├── empty.html │ ├── js-in-script-tags │ │ ├── no-type.html │ │ ├── not-javascript.html │ │ └── type-javascript.html │ ├── jsp.jsp │ ├── php.php │ ├── tag.tag │ ├── template-literal-separated.js │ ├── strip.html │ ├── issue_188.html │ ├── line_numbers.js │ ├── second.html │ ├── custom.js_extension │ ├── escaped-quotes.html │ ├── custom_module.js │ ├── custom_method.js │ ├── duplicate-comments.html │ ├── tapestry.tml │ ├── comments.html │ ├── source.js │ ├── filter-custom.html │ ├── filter.html │ ├── single.html │ ├── custom.extension │ ├── custom_marker_name.js │ ├── inline-templates.html │ ├── multifilter-custom.html │ ├── multifilter.html │ ├── translate-element.html │ ├── context-custom.html │ ├── concat.js │ ├── es6-export.js │ ├── merge.html │ ├── ts.tsx │ ├── escaped_quotes-custom.html │ ├── escaped_quotes.html │ ├── corrupt.html │ ├── filter-custom-standard-attribute.html │ ├── filter-in-multiple-expression-attributes-custom.html │ ├── issue_188.ts │ ├── plural.html │ ├── filter-in-multiple-expression-attributes.html │ ├── es6-import.js │ ├── bind-once.html │ ├── multifilter-custom-standard-attribute.html │ ├── custom_marker_name_plural.js │ ├── multi-line-comments.js │ ├── escaped_quotes-custom-standard-attribute.html │ ├── filter-data-attributes.html │ ├── ts.ts │ ├── filter-in-multiple-expression-attributes-custom-standard-attribute.html │ ├── entities.html │ ├── sort.html │ ├── deeppath_catalog.js │ ├── deeppath_catalog_invalid.js │ ├── template-literal-component.js │ ├── DecoratedClassWithProperties.ts │ ├── es6-dynamic-import.js │ ├── custom_marker_names.js │ ├── catalog.js │ ├── ngif.html │ ├── no_delimiter.html │ ├── source-property.js │ ├── depth │ │ └── fr.po │ ├── custom_marker_names_plural.js │ ├── obsolete.po │ ├── es6-class.js │ ├── empty.po │ ├── fuzzy.po │ ├── data.html │ ├── context.po │ ├── fr.po │ ├── nl.po │ ├── inconvertible_html_entities.po │ ├── comments.js │ ├── comments.ts │ ├── widget.html │ └── convertible_html_entities.po ├── utils.js ├── extract_template_literal.js ├── extract_quotes.js ├── issue_188.js ├── extract_javascript_custom_module_method.js ├── extract_multiline.js ├── extract_complete.js ├── extract_plurals.js ├── extract_line_numbers.js ├── extract_custom_filters.js ├── extract_filters.js ├── extract_comments.js ├── extract_extensions.js ├── extract_custom_filter_standard_attribute.js ├── extract_javascript.js ├── extract_regex.js ├── compile.js └── extract.js ├── .gitignore ├── index.js ├── .travis.yml ├── .jshintrc ├── LICENSE ├── package.json ├── .jscs.json ├── Gruntfile.js ├── README.md └── lib ├── compile.js └── extract.js /.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | tmp 3 | Gruntfile.coffee 4 | .npmignore 5 | -------------------------------------------------------------------------------- /test/fixtures/line_numbers.html: -------------------------------------------------------------------------------- 1 |
Translate this
2 | -------------------------------------------------------------------------------- /test/fixtures/erb.erb: -------------------------------------------------------------------------------- 1 | <%# ERB comment %> 2 | <% @foo %> 3 | message 4 | -------------------------------------------------------------------------------- /test/fixtures/custom-attribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/fixtures/context.html: -------------------------------------------------------------------------------- 1 |4 | Hello! 5 |
6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/fixtures/issue_188.html: -------------------------------------------------------------------------------- 1 |This is a test
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/custom.js_extension: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("customController", function (gettext) { 2 | var myString = gettext("Hello custom"); 3 | }); 4 | -------------------------------------------------------------------------------- /test/fixtures/escaped-quotes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/custom_module.js: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("helloController", function (LabelService) { 2 | var myString = LabelService.getString("Hello"); 3 | }); 4 | -------------------------------------------------------------------------------- /test/fixtures/js-in-script-tags/not-javascript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/js-in-script-tags/type-javascript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/custom_method.js: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("helloController", function (gettextCatalog) { 2 | var myString = gettextCatalog.getTranslation("Hello"); 3 | }); 4 | -------------------------------------------------------------------------------- /test/fixtures/duplicate-comments.html: -------------------------------------------------------------------------------- 1 |Translate this
2 |Translate this
3 | -------------------------------------------------------------------------------- /test/fixtures/tapestry.tml: -------------------------------------------------------------------------------- 1 | 2 |Translate this
2 |And this
3 | -------------------------------------------------------------------------------- /test/fixtures/source.js: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("helloController", function (gettext) { 2 | var myString = gettext("Hello"); 3 | gettext(); // Should be ignored. 4 | }); 5 | -------------------------------------------------------------------------------- /test/fixtures/filter-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{'Second'|trans}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{'Second'|translate}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/single.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |Hello!
5 | polo 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/custom.extension: -------------------------------------------------------------------------------- 1 | 2 | 3 |This is a test to show support for custom extensions
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/fixtures/custom_marker_name.js: -------------------------------------------------------------------------------- 1 | window.__ = function(str) { return str; }; 2 | 3 | angular.module("myApp").controller("customController", function (gettext) { 4 | var myString = __("Hello custom"); 5 | }); 6 | -------------------------------------------------------------------------------- /test/fixtures/inline-templates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/multifilter-custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{'World'|trans|lowercase}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/multifilter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{'Second'|translate|lowercase}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/fixtures/translate-element.html: -------------------------------------------------------------------------------- 1 |Bird
6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/fixtures/ts.tsx: -------------------------------------------------------------------------------- 1 | const Test = () => ( 2 |5 | {gettext(`One 6 | Two 7 | Three`)} 8 |
9 |a
4 |c
5 |b
6 |d
7 |d
8 |d
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/fixtures/deeppath_catalog.js: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("helloController", function (gettextCatalog) { 2 | var obj = { 3 | gettextCatalog: gettextCatalog }; 4 | var myString = obj.gettextCatalog.getString("Hello"); 5 | var myString2 = obj.gettextCatalog.getPlural(3, "Bird", "Birds"); 6 | }); 7 | -------------------------------------------------------------------------------- /test/fixtures/deeppath_catalog_invalid.js: -------------------------------------------------------------------------------- 1 | angular.module("myApp").controller("helloController", function (gettextCatalog) { 2 | var obj = {[ 3 | gettextCatalog: gettextCatalog }; 4 | var myString = obj.gettextCatalog.getString("Hello"); 5 | var myString2 = obj.gettextCatalog.getPlural(3, "Bird", "Birds"); 6 | }); 7 | -------------------------------------------------------------------------------- /test/fixtures/template-literal-component.js: -------------------------------------------------------------------------------- 1 | class MyLiteralController { 2 | /* @ngInject */ 3 | constructor() {} 4 | } 5 | 6 | export const MyLiteralComponent = { 7 | controller: MyLiteralController, 8 | bindings: {}, 9 | template: ` 10 || {{col.caption}} |
|---|
| {{row[col.id]}} |
| {{titles[contact.customertitleid]}} {{contact.firstname}} {{contact.middlename}} {{contact.lastname}} | ||
|---|---|---|
| {{address.type}} | {{'Address'|translate}} | {{address.street1}} {{address.street2}} 2 | {{address.zip}} {{address.city}} 3 | {{address.country}} (Show on map) |
| Birth date | {{contact.birthdate}} | |
| {{contact.email}} | ||
| {{phone.type}} | {{phone.number}} | |
| Subscribed to | {{newsletters[nl]}} | |
| Preferences | {{newsletterpreferences[pref]}} | |
| {{stat.key}} | {{stat.value}} |
|---|