Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
clear-i18n-loader
Advanced tools
A webpack loader for simple and clear i18n.
npm install --save clear-i18n-loader
Usually, use it as the last loader require("html!clear-i18n!./index.html")
.
This loader takes one JSON file for each file containing untranslated strings.
In the text files, put "^" around the untranslated strings.
<div>^Please help me translate this!^</div>
var str = '^Please help me translate this!^';
If you need the "^" character itself, write double.
<div>^Ha^^_^^ha!^ <span>^^_^^</span></div>
<!-- This means "Ha^_^ha!" need to be translated, and there is a "^_^" followed in the span. -->
Do not like "^" character? It is configurable! "`" character might look better, but it is used in ECMAScript 2015...
Tips: write options like this: clear-i18n?{"lang":"en","char":"^"}
lang
the target language. It is required, or translations are silently ignored.localePath
where the translation files locate. It is "[path][file].[ext].locale/" by default. The target file is a JSON file named current lang (i.e. "en.json") inside this dir.char
the "^" above. ONLY special ASCII characters are allowed!multiline
if there are multiline untranslated strings, please set this to true.generateFile
generate target translation files, collect and put untranslated strings in. I found this feature quite useful.MIT
FAQs
A webpack loader for simple and clear i18n.
We found that clear-i18n-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.