Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
gettext-handlebars
Advanced tools
Readme
Extract translatable strings from Handlebars template strings.
It can be used stand-alone or through gmarty/gettext.
Creates a new parser.
The keywordspec
parameter is optional, with the default being:
{
gettext: ['msgid'],
_: ['msgid'],
ngettext: ['msgid', 'msgid_plural'],
n_: ['msgid', 'msgid_plural'],
pgettext: ['msgctxt', 'msgid'],
p_: ['msgctxt', 'msgid'],
npgettext: ['msgctxt', 'msgid', 'msgid_plural'],
np_: ['msgctxt', 'msgid', 'msgid_plural']
}
Each keyword (key) requires array of strings indicating the order of expected PO fields.
For example npgettext: ['msgctxt', 'msgid', 'msgid_plural']
indicates that the
npgettext
handlebars helper takes arguments of form {{npgettext "context" "string" "plural" ...}}
Parses the template
string for Handlebars expressions using the keywordspec.
It returns an object with this structure:
{
msgid1: {
line: [1, 3]
},
msgid2: {
line: [2],
plural: 'msgid_plural'
},
context\u0004msgid2: {
line: [4]
}
}
git clone git@github.com:smhg/gettext-handlebars.git
npm i
npm run lint
npm test
FAQs
Extract translatable strings from Handlebars templates
The npm package gettext-handlebars receives a total of 966 weekly downloads. As such, gettext-handlebars popularity was classified as not popular.
We found that gettext-handlebars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.