diff --git a/Makefile b/Makefile index 416300f..b17a0ae 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ black: -black server/ python/ -TARGETS = csslint jslint phplint mo po pot +TARGETS = csslint jslint phplint mo po pot poedit define TARGETS_TEMPLATE diff --git a/docs/cap-gettext-extractor.mjs b/docs/cap-gettext-extractor.mjs new file mode 100644 index 0000000..cc1a53e --- /dev/null +++ b/docs/cap-gettext-extractor.mjs @@ -0,0 +1,184 @@ +import { GettextExtractor, JsExtractors, HtmlExtractors } from 'gettext-extractor'; +import sfc from '@vue/compiler-sfc'; +import { glob } from 'glob'; +import { readFileSync } from 'node:fs'; +import { ArgumentParser } from 'argparse'; +import sourceMap from 'source-map'; +import _ from 'lodash-es'; + +const sourceMaps = {}; + +const JSExtractor = new GettextExtractor(); +const VueExtractor = new GettextExtractor(); + +/** + * Extractor for JS files and