easygettext
Advanced tools
Comparing version 1.0.3 to 1.1.0
#!/usr/bin/env node | ||
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
/* eslint no-console:0 */ | ||
var _fs = require('fs'); | ||
@@ -22,2 +18,5 @@ | ||
var argv = (0, _minimist2.default)(process.argv.slice(2)); | ||
/* eslint no-console:0 */ | ||
var files = argv._.sort() || []; | ||
@@ -50,3 +49,3 @@ var outputFile = argv.output || null; | ||
} else { | ||
_extends(translationData[data.headers.Language], data.messages); | ||
Object.assign(translationData[data.headers.Language], data.messages); | ||
} | ||
@@ -53,0 +52,0 @@ } catch (e) { |
@@ -29,4 +29,4 @@ 'use strict'; | ||
* "Thank you": { | ||
* "à ma mère": "Merci, m'man", | ||
* "à mon patron": "Je vous remercie", | ||
* "a ma mère": "Merci, m'man", | ||
* "a mon patron": "Je vous remercie", | ||
* } | ||
@@ -51,3 +51,3 @@ * } | ||
} | ||
// Add an array for plural, a single string for singular. | ||
// Add array for plural, single string for singular. | ||
messages[item.msgid][ctx] = item.msgstr.length === 1 ? item.msgstr[0] : item.msgstr; | ||
@@ -84,3 +84,3 @@ } | ||
if (!catalog.headers.Language) { | ||
throw new Error('No Language headers found!'); | ||
throw new Error('No Language header found!'); | ||
} | ||
@@ -87,0 +87,0 @@ return { |
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _compile = require('./compile.js'); | ||
@@ -14,3 +12,3 @@ | ||
return _extends({ | ||
return Object.assign({ | ||
msgid: 'Hello world', | ||
@@ -17,0 +15,0 @@ msgctxt: null, |
@@ -27,6 +27,7 @@ #!/usr/bin/env node | ||
var argv = (0, _minimist2.default)(process.argv.slice(2)); | ||
var files = argv._.sort(); | ||
var files = argv._.sort() || []; | ||
var quietMode = argv.quiet || false; | ||
var outputFile = argv.output || null; | ||
if (!files || files.length === 0) { | ||
if (!quietMode && (!files || files.length === 0)) { | ||
console.log('Usage:\n\tgettext-extract [--output OUTFILE] <FILES>'); | ||
@@ -50,4 +51,3 @@ process.exit(1); | ||
file = file.replace(/\.jade$/, '.html'); | ||
// Add empty require function to the context to avoid errors with webpack require inside jade | ||
data = _jade2.default.render(data, { pretty: true, require: function require() {} }); | ||
data = _jade2.default.render(data, { pretty: true }); | ||
} | ||
@@ -54,0 +54,0 @@ extractor.parse(file, data); |
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -106,3 +104,2 @@ | ||
poItem.msgid_plural = this.plural; | ||
poItem.msgstr = this.plural ? ['', ''] : []; | ||
poItem.extractedComments = this.comment ? [this.comment] : []; | ||
@@ -122,3 +119,3 @@ return poItem; | ||
this.options = _extends({ | ||
this.options = Object.assign({ | ||
startDelim: '{{', | ||
@@ -143,3 +140,3 @@ endDelim: '}}', | ||
var end = _this.options.endDelim.replace(ESCAPE_REGEX, '\\$&'); | ||
return new RegExp(start + '.*[\\\'"](.*)[\\\'"]\\s*\\|\\s*' + attribute + '.*' + end); | ||
return new RegExp(start + '\\s*[\\\'"](.*)[\\\'"]\\s*\\|\\s*' + attribute + '\\s*' + end); | ||
}); | ||
@@ -257,3 +254,3 @@ } | ||
var reference = new TranslationReference(filename, content, el.startIndex); | ||
if (this._hasTranslationToken(node)) { | ||
if (this._hasTranslateAttribute(node)) { | ||
var text = node.html().trim(); | ||
@@ -295,6 +292,6 @@ if (text.length !== 0) { | ||
}, { | ||
key: '_hasTranslationToken', | ||
value: function _hasTranslationToken(node) { | ||
return this.options.attributes.some(function (keyword) { | ||
return node.is(keyword) || node.attr(keyword) !== undefined; | ||
key: '_hasTranslateAttribute', | ||
value: function _hasTranslateAttribute(node) { | ||
return this.options.attributes.some(function (attrName) { | ||
return node.attr(attrName) !== undefined; | ||
}); | ||
@@ -301,0 +298,0 @@ } |
@@ -25,3 +25,3 @@ 'use strict'; | ||
it('should output a correct POT file from multiple HTML fixtures', function () { | ||
it('should output a correct POT file from multiple HTML fitures', function () { | ||
var extractor = new _extract.Extractor(); | ||
@@ -40,15 +40,2 @@ extractor.parse(fixtures.FILENAME_0, fixtures.HTML0_CTX0); | ||
it('should output a correct POT file using keyword as tag', function () { | ||
var extractor = new _extract.Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML4_TAG0); | ||
extractor.parse(fixtures.FILENAME_1, fixtures.HTML4_TAG1); | ||
(0, _chai.expect)(extractor.toString()).to.equal(fixtures.POT_OUTPUT_TAGS); | ||
}); | ||
it('should only translate a html block once', function () { | ||
var extractor = new _extract.Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML4_TAG2); | ||
(0, _chai.expect)(extractor.toString()).to.equal(fixtures.POT_OUTPUT_MULTIPLE_TAGS); | ||
}); | ||
it('should merge multiple references correctly and not duplicate', function () { | ||
@@ -77,8 +64,2 @@ var extractor = new _extract.Extractor(); | ||
}); | ||
it('should lexicographically sort the translations', function () { | ||
var extractor = new _extract.Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML_SORTING); | ||
(0, _chai.expect)(extractor.toString()).to.equal(fixtures.POT_OUTPUT_SORTED); | ||
}); | ||
}); | ||
@@ -122,8 +103,4 @@ | ||
(0, _chai.expect)(data1[0].text).to.equal('Hola, mujer'); | ||
var data2 = extractor._extractTranslationData(fixtures.FILENAME_0, fixtures.HTML3_FILTER2); | ||
(0, _chai.expect)(data2.length).to.equal(1); | ||
(0, _chai.expect)(data2[0].text).to.equal('Hola, hola'); | ||
}); | ||
}); | ||
//# sourceMappingURL=extract.spec.js.map |
@@ -20,22 +20,11 @@ 'use strict'; | ||
var HTML3_FILTER1 = exports.HTML3_FILTER1 = "<h2 tooltip=\"{{'Hola, mujer'|i18n}}\">StufStuff</h2>"; | ||
var HTML3_FILTER2 = exports.HTML3_FILTER2 = "<h2 tooltip=\"{{ a || 'Hola, hola'|i18n }}\">StufStuff</h2>"; | ||
var HTML4_TAG0 = exports.HTML4_TAG0 = '<translate>Duck</translate>'; | ||
var HTML4_TAG1 = exports.HTML4_TAG1 = '<i18n>Dice</i18n>'; | ||
var HTML4_TAG2 = exports.HTML4_TAG2 = '<i18n translate>overtranslate</i18n>'; | ||
var HTML_LONG = exports.HTML_LONG = '\n <div class="col-xs-4">\n <h4 translate="translate" translate-context="Pour maman">Hello world</h4>\n <h2 translate="" i18n-plural=\'We work\'>I work</h2>\n <tr>\n <th translate="translate">Net amount</th>\n <td class="text-right" translate i18n-comment=\'foo is important\'>{{ ::foo }} deadwine</td>\n </tr>\n <th tronslate>This is not translated</th>\n <tr>\n <th translate>Paid amount</th>\n <h2 translate="" i18n-context=\'other context\'>I work</h2>\n <td class="text-right" i18n>something {{ bar }} is here</td>\n </tr>\n'; | ||
var HTML_SORTING = exports.HTML_SORTING = '\n <i18n>f</i18n>\n <i18n>0</i18n>\n <i18n>c</i18n>\n <i18n>abu</i18n>\n <i18n>2 mississipi</i18n>\n <i18n>b</i18n>\n <i18n>a</i18n>\n <i18n>1 mississippi</i18n>\n <i18n>e</i18n>\n <i18n>12 mississipi</i18n>\n <i18n>g</i18n>\n <i18n>3</i18n>\n <i18n>aba</i18n>\n <i18n>2</i18n>\n <i18n>d</i18n>\n'; | ||
var POT_OUTPUT_0 = exports.POT_OUTPUT_0 = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgctxt "For charlie"\nmsgid "Hello world"\nmsgstr ""\n'; | ||
var POT_OUTPUT_1 = exports.POT_OUTPUT_1 = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgctxt "For charlie"\nmsgid "Hello world"\nmsgstr ""\n\n#: bar.htm\nmsgid "I work"\nmsgid_plural "We work"\nmsgstr[0] ""\nmsgstr[1] ""\n'; | ||
var POT_OUTPUT_1 = exports.POT_OUTPUT_1 = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgctxt "For charlie"\nmsgid "Hello world"\nmsgstr ""\n\n#: bar.htm\nmsgid "I work"\nmsgid_plural "We work"\nmsgstr ""\n'; | ||
var POT_OUTPUT_CONTEXTS = exports.POT_OUTPUT_CONTEXTS = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgctxt "For charlie"\nmsgid "Hello world"\nmsgstr ""\n\n#: bar.htm\nmsgctxt "For jacques"\nmsgid "Hello world"\nmsgstr ""\n'; | ||
var POT_OUTPUT_TAGS = exports.POT_OUTPUT_TAGS = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: bar.htm\nmsgid "Dice"\nmsgstr ""\n\n#: foo.htm\nmsgid "Duck"\nmsgstr ""\n'; | ||
var POT_OUTPUT_MULTIPLE_TAGS = exports.POT_OUTPUT_MULTIPLE_TAGS = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgid "overtranslate"\nmsgstr ""\n'; | ||
var POT_OUTPUT_MULTIREF = exports.POT_OUTPUT_MULTIREF = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\n#: bar.htm\nmsgctxt "For charlie"\nmsgid "Hello world"\nmsgstr ""\n'; | ||
@@ -45,4 +34,2 @@ | ||
var POT_OUTPUT_SORTED = exports.POT_OUTPUT_SORTED = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=utf-8\\n"\n"Content-Transfer-Encoding: 8bit\\n"\n"Generated-By: easygettext\\n"\n"Project-Id-Version: \\n"\n\n#: foo.htm\nmsgid "0"\nmsgstr ""\n\n#: foo.htm\nmsgid "1 mississippi"\nmsgstr ""\n\n#: foo.htm\nmsgid "12 mississipi"\nmsgstr ""\n\n#: foo.htm\nmsgid "2"\nmsgstr ""\n\n#: foo.htm\nmsgid "2 mississipi"\nmsgstr ""\n\n#: foo.htm\nmsgid "3"\nmsgstr ""\n\n#: foo.htm\nmsgid "a"\nmsgstr ""\n\n#: foo.htm\nmsgid "aba"\nmsgstr ""\n\n#: foo.htm\nmsgid "abu"\nmsgstr ""\n\n#: foo.htm\nmsgid "b"\nmsgstr ""\n\n#: foo.htm\nmsgid "c"\nmsgstr ""\n\n#: foo.htm\nmsgid "d"\nmsgstr ""\n\n#: foo.htm\nmsgid "e"\nmsgstr ""\n\n#: foo.htm\nmsgid "f"\nmsgstr ""\n\n#: foo.htm\nmsgid "g"\nmsgstr ""\n'; | ||
var INPUT_PO = exports.INPUT_PO = 'msgid ""\nmsgstr ""\n"Content-Type: text/plain; charset=UTF-8\n"\n"Content-Transfer-Encoding: 8bit\n"\n"Project-Id-Version: \n"\n"Last-Translator: Automatically generated\n"\n"Language-Team: none\n"\n"Language: fr\n"\n"MIME-Version: 1.0\n"\n"Plural-Forms: nplurals=2; plural=(n > 1);\n"\n\nmsgid "Hello, you !"\nmsgstr "Salut, toi !"\n\nmsgctxt "In spanish"\nmsgid "Hello, you !"\nmsgstr "Hola ustedes !"\n\nmsgid "(1 attempt)"\nmsgid_plural "({{ remaining }} attempts)"\nmsgstr[0] "(1 tentative)"\nmsgstr[1] "({{ remaining }} tentatives)"\n\n#, fuzzy\nmsgid "Action"\nmsgstr "Something"\n\nmsgid "Action failure"\nmsgstr ""'; | ||
@@ -49,0 +36,0 @@ |
{ | ||
"name": "easygettext", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "Simple tools to extract gettext strings", | ||
@@ -10,5 +10,4 @@ "main": "dist/index", | ||
}, | ||
"publishConfig": {"registry":"https://registry.npmjs.org"}, | ||
"scripts": { | ||
"prepublish": "babel --presets es2015 --plugins transform-object-assign --source-maps true src --out-dir dist/", | ||
"prepublish": "babel --presets es2015 --source-maps true src --out-dir dist/", | ||
"test": "mocha --compilers js:babel-core/register src/**/*.spec.js", | ||
@@ -24,3 +23,2 @@ "cover": "babel-node node_modules/isparta/bin/isparta cover --report text node_modules/mocha/bin/_mocha -- src/**/*.spec.js" | ||
"babel-core": "^6.2.1", | ||
"babel-plugin-transform-object-assign": "^6.1.18", | ||
"babel-preset-es2015": "^6.1.18", | ||
@@ -45,4 +43,6 @@ "chai": "^3.4.1", | ||
"src", | ||
"dist" | ||
"dist", | ||
"package.json", | ||
"README.md" | ||
] | ||
} |
@@ -11,3 +11,3 @@ # easygettext | ||
[angular-gettext](https://angular-gettext.rocketeer.be/) is a very neat tool, that comes with Grunt tooling | ||
to extract translation tokens from your Jade/HTML templates and JavaScript code. | ||
to extract translation tokens from your Jade/HTML templates and Javascript code. | ||
@@ -53,5 +53,3 @@ Unfortunately, this has two drawbacks: | ||
<div translate translate-plural="Hello worlds">Hello World</div> | ||
<div placeholder="{{ 'Hello World' | translate }}"></div> | ||
<div placeholder="{{ scopeVariable || ('Hello World' | translate) }}"></div> | ||
<translate>Hello World</translate> | ||
<div placeholder="{{ 'Hello World' | translate}}"></div> | ||
``` | ||
@@ -67,3 +65,3 @@ | ||
``` | ||
gettext-compile --output cn-translations.json cn.po | ||
gettext-compile --output translations.json fr.po en.po de.po | ||
``` | ||
@@ -70,0 +68,0 @@ |
@@ -18,4 +18,4 @@ import Pofile from 'pofile'; | ||
* "Thank you": { | ||
* "à ma mère": "Merci, m'man", | ||
* "à mon patron": "Je vous remercie", | ||
* "a ma mère": "Merci, m'man", | ||
* "a mon patron": "Je vous remercie", | ||
* } | ||
@@ -33,3 +33,3 @@ * } | ||
} | ||
// Add an array for plural, a single string for singular. | ||
// Add array for plural, single string for singular. | ||
messages[item.msgid][ctx] = item.msgstr.length === 1 ? item.msgstr[0] : item.msgstr; | ||
@@ -52,3 +52,3 @@ } | ||
if (!catalog.headers.Language) { | ||
throw new Error('No Language headers found!'); | ||
throw new Error('No Language header found!'); | ||
} | ||
@@ -55,0 +55,0 @@ return { |
@@ -16,6 +16,7 @@ #!/usr/bin/env node | ||
const argv = minimist(process.argv.slice(2)); | ||
const files = argv._.sort(); | ||
const files = argv._.sort() || []; | ||
const quietMode = argv.quiet || false; | ||
const outputFile = argv.output || null; | ||
if (!files || files.length === 0) { | ||
if (!quietMode && (!files || files.length === 0)) { | ||
console.log('Usage:\n\tgettext-extract [--output OUTFILE] <FILES>'); | ||
@@ -40,4 +41,3 @@ process.exit(1); | ||
file = file.replace(/\.jade$/, '.html'); | ||
// Add empty require function to the context to avoid errors with webpack require inside jade | ||
data = jade.render(data, {pretty: true, require: function(){}}); | ||
data = jade.render(data, {pretty: true}); | ||
} | ||
@@ -44,0 +44,0 @@ extractor.parse(file, data); |
@@ -64,3 +64,2 @@ import cheerio from 'cheerio'; | ||
poItem.msgid_plural = this.plural; | ||
poItem.msgstr = this.plural ? ['', ''] : []; | ||
poItem.extractedComments = this.comment ? [this.comment] : []; | ||
@@ -95,3 +94,3 @@ return poItem; | ||
const end = this.options.endDelim.replace(ESCAPE_REGEX, '\\$&'); | ||
return new RegExp(`${start}.*[\\'"](.*)[\\'"]\\s*\\|\\s*${attribute}.*${end}`); | ||
return new RegExp(`${start}\\s*[\\'"](.*)[\\'"]\\s*\\|\\s*${attribute}\\s*${end}`); | ||
}); | ||
@@ -160,3 +159,3 @@ } | ||
const reference = new TranslationReference(filename, content, el.startIndex); | ||
if (this._hasTranslationToken(node)) { | ||
if (this._hasTranslateAttribute(node)) { | ||
const text = node.html().trim(); | ||
@@ -188,5 +187,5 @@ if (text.length !== 0) { | ||
_hasTranslationToken(node) { | ||
return this.options.attributes.some((keyword) => node.is(keyword) || node.attr(keyword) !== undefined); | ||
_hasTranslateAttribute(node) { | ||
return this.options.attributes.some((attrName) => node.attr(attrName) !== undefined); | ||
} | ||
} |
@@ -16,3 +16,3 @@ import {Extractor} from './extract.js'; | ||
it('should output a correct POT file from multiple HTML fixtures', () => { | ||
it('should output a correct POT file from multiple HTML fitures', () => { | ||
const extractor = new Extractor(); | ||
@@ -31,15 +31,2 @@ extractor.parse(fixtures.FILENAME_0, fixtures.HTML0_CTX0); | ||
it('should output a correct POT file using keyword as tag', () => { | ||
const extractor = new Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML4_TAG0); | ||
extractor.parse(fixtures.FILENAME_1, fixtures.HTML4_TAG1); | ||
expect(extractor.toString()).to.equal(fixtures.POT_OUTPUT_TAGS); | ||
}); | ||
it('should only translate a html block once', () => { | ||
const extractor = new Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML4_TAG2); | ||
expect(extractor.toString()).to.equal(fixtures.POT_OUTPUT_MULTIPLE_TAGS); | ||
}); | ||
it('should merge multiple references correctly and not duplicate', () => { | ||
@@ -68,8 +55,2 @@ const extractor = new Extractor(); | ||
it('should lexicographically sort the translations', () => { | ||
const extractor = new Extractor(); | ||
extractor.parse(fixtures.FILENAME_0, fixtures.HTML_SORTING); | ||
expect(extractor.toString()).to.equal(fixtures.POT_OUTPUT_SORTED); | ||
}); | ||
}); | ||
@@ -114,7 +95,3 @@ | ||
expect(data1[0].text).to.equal('Hola, mujer'); | ||
const data2 = extractor._extractTranslationData(fixtures.FILENAME_0, fixtures.HTML3_FILTER2); | ||
expect(data2.length).to.equal(1); | ||
expect(data2[0].text).to.equal('Hola, hola'); | ||
}); | ||
}); |
@@ -18,8 +18,3 @@ export const FILENAME_0 = 'foo.htm'; | ||
export const HTML3_FILTER1 = "<h2 tooltip=\"{{'Hola, mujer'|i18n}}\">StufStuff</h2>"; | ||
export const HTML3_FILTER2 = "<h2 tooltip=\"{{ a || 'Hola, hola'|i18n }}\">StufStuff</h2>"; | ||
export const HTML4_TAG0 = '<translate>Duck</translate>'; | ||
export const HTML4_TAG1 = '<i18n>Dice</i18n>'; | ||
export const HTML4_TAG2 = '<i18n translate>overtranslate</i18n>'; | ||
export const HTML_LONG = ` | ||
@@ -41,19 +36,2 @@ <div class="col-xs-4"> | ||
export const HTML_SORTING = ` | ||
<i18n>f</i18n> | ||
<i18n>0</i18n> | ||
<i18n>c</i18n> | ||
<i18n>abu</i18n> | ||
<i18n>2 mississipi</i18n> | ||
<i18n>b</i18n> | ||
<i18n>a</i18n> | ||
<i18n>1 mississippi</i18n> | ||
<i18n>e</i18n> | ||
<i18n>12 mississipi</i18n> | ||
<i18n>g</i18n> | ||
<i18n>3</i18n> | ||
<i18n>aba</i18n> | ||
<i18n>2</i18n> | ||
<i18n>d</i18n> | ||
`; | ||
@@ -88,4 +66,3 @@ export const POT_OUTPUT_0 = `msgid "" | ||
msgid_plural "We work" | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
msgstr "" | ||
`; | ||
@@ -111,31 +88,2 @@ | ||
export const POT_OUTPUT_TAGS = `msgid "" | ||
msgstr "" | ||
"Content-Type: text/plain; charset=utf-8\\n" | ||
"Content-Transfer-Encoding: 8bit\\n" | ||
"Generated-By: easygettext\\n" | ||
"Project-Id-Version: \\n" | ||
#: bar.htm | ||
msgid "Dice" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "Duck" | ||
msgstr "" | ||
`; | ||
export const POT_OUTPUT_MULTIPLE_TAGS = `msgid "" | ||
msgstr "" | ||
"Content-Type: text/plain; charset=utf-8\\n" | ||
"Content-Transfer-Encoding: 8bit\\n" | ||
"Generated-By: easygettext\\n" | ||
"Project-Id-Version: \\n" | ||
#: foo.htm | ||
msgid "overtranslate" | ||
msgstr "" | ||
`; | ||
export const POT_OUTPUT_MULTIREF = `msgid "" | ||
@@ -170,70 +118,2 @@ msgstr "" | ||
export const POT_OUTPUT_SORTED= `msgid "" | ||
msgstr "" | ||
"Content-Type: text/plain; charset=utf-8\\n" | ||
"Content-Transfer-Encoding: 8bit\\n" | ||
"Generated-By: easygettext\\n" | ||
"Project-Id-Version: \\n" | ||
#: foo.htm | ||
msgid "0" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "1 mississippi" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "12 mississipi" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "2" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "2 mississipi" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "3" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "a" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "aba" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "abu" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "b" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "c" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "d" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "e" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "f" | ||
msgstr "" | ||
#: foo.htm | ||
msgid "g" | ||
msgstr "" | ||
`; | ||
export const INPUT_PO = `msgid "" | ||
@@ -240,0 +120,0 @@ msgstr "" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8
0
92827
1189
90