
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ngx-i18nsupport-lib
Advanced tools
A Typescript library to work with Angular generated i18n files (xliff, xmb)
A Typescript library to work with Angular generated i18n files (XLIFF Version 1.2 and 2.0, XMB)
npm install ngx-i18nsupport-lib --save-dev
This class is the entry point of the library.
You can use TranslationMessagesFileFactory
to load Angular generated message files.
The format of the files can be XLIFF 1.2, XLIFF 2.0 or XMB.
It returns a format independent abstraction of the file content, which is described in the interfade ITranslationMessagesFile
Example
// Usage of fromFileContent to read a file with a known format
let filename = ...;
let encoding = 'UTF-8';
let content = fs.readFileSync(filename, encoding);
let file: ITranslationMessagesFile
= TranslationMessagesFileFactory.fromFileContent('xlf', content, filename, encoding);
console.log(Utils.format('Translation from %s to %s',
file.sourceLanguage(),
file.targetLanguage()));
file.forEachTransUnit((tu: ITransUnit) => {
console.log(tu.sourceContent());
});
You can also use fromUnknownFormatFileContent
to read a file of any supported format.
The library will detect the correct file format:
...
let file: ITranslationMessagesFile
= TranslationMessagesFileFactory.fromUnknownFormatFileContent(content, filename, encoding);
A messages file.
For API details have a look at the interface.
A single translation contained in the messages file.
For API details have a look at the interface.
npm test
This will run a testsuite that checks all relevant aspects of the library.
I did not really think about contributions, because it is just a small experimental project.
But if you are interesting, send me an email, so that we can discuss it.
FAQs
A Typescript library to work with Angular generated i18n files (xliff, xmb)
The npm package ngx-i18nsupport-lib receives a total of 10,937 weekly downloads. As such, ngx-i18nsupport-lib popularity was classified as popular.
We found that ngx-i18nsupport-lib 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.