gettext-handlebars
Advanced tools
Comparing version 0.6.1 to 0.7.0
65
index.js
@@ -11,34 +11,3 @@ 'use strict'; | ||
// default JavaScript keywords from | ||
// https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html | ||
keywordSpec = keywordSpec || { | ||
_: { | ||
msgid: 0 | ||
}, | ||
gettext: { | ||
msgid: 0 | ||
}, | ||
dgettext: { | ||
msgid: 1 | ||
}, | ||
dcgettext: { | ||
msgid: 1 | ||
}, | ||
ngettext: { | ||
msgid: 0, | ||
msgid_plural: 1 | ||
}, | ||
dngettext: { | ||
msgid: 1, | ||
msgid_plural: 2 | ||
}, | ||
pgettext: { | ||
msgctxt: 0, | ||
msgid: 1 | ||
}, | ||
dpgettext: { | ||
msgctxt: 1, | ||
msgid: 2 | ||
} | ||
}; | ||
keywordSpec = keywordSpec || Parser.keywordSpec; | ||
@@ -78,2 +47,34 @@ Object.keys(keywordSpec).forEach(function (keyword) { | ||
// default keywords, copied from GNU xgettext's JavaScript keywords | ||
Parser.keywordSpec = { | ||
_: { | ||
msgid: 0 | ||
}, | ||
gettext: { | ||
msgid: 0 | ||
}, | ||
dgettext: { | ||
msgid: 1 | ||
}, | ||
dcgettext: { | ||
msgid: 1 | ||
}, | ||
ngettext: { | ||
msgid: 0, | ||
msgid_plural: 1 | ||
}, | ||
dngettext: { | ||
msgid: 1, | ||
msgid_plural: 2 | ||
}, | ||
pgettext: { | ||
msgctxt: 0, | ||
msgid: 1 | ||
}, | ||
dpgettext: { | ||
msgctxt: 1, | ||
msgid: 2 | ||
} | ||
}; | ||
// Same as what Jed.js uses | ||
@@ -80,0 +81,0 @@ Parser.contextDelimiter = String.fromCharCode(4); |
{ | ||
"name": "gettext-handlebars", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "Extract translatable strings from Handlebars templates", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"eslint": "3.12.2", | ||
"eslint": "3.13.0", | ||
"mocha": "3.2.0" | ||
@@ -37,0 +37,0 @@ }, |
9360