Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
translation-adapter-ts
Advanced tools
The translation adapter for i18n_mrg tool support in TypeScript projects.
npm i translation-adapter-ts
import {PofileTransformer} from "/src/PofileTransformer";
let transformer = new PofileTransformer();
transformer.transformDirectory('i18n/ru_RU/LC_MESSAGES');
transformer.transformDirectory('i18n/zh_CN/LC_MESSAGES');
import {Localizator} from "/src/Localizator";
import {LanguageEnum} from "/src/Enums/LanguageEnum";
import * as data from "/test/translationFiles/test.json";
import {readFileSync} from "fs";
Localizator.addTranslation(LanguageEnum.RU, data);
Localizator.addTranslation(LanguageEnum.CN, readFileSync('/test/translationFiles/cn.json'));
Localizator.setDefaultLanguge(LanguageEnum.EN);
Localizator.setLanguage(LanguageEnum.RU);
import {__} from '/src/Main.ts';
console.log(__("Test string"));
console.log(__("Hello, %s", __("world")));
console.log(__("Hey %hello% %world%!"), {"%world%": __('world'), "hello": __("Hello")}); // In case if placeholder order may be different in different languages
FAQs
The translation adapter for i18n_mrg tool support in TypeScript projects.
The npm package translation-adapter-ts receives a total of 64 weekly downloads. As such, translation-adapter-ts popularity was classified as not popular.
We found that translation-adapter-ts 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.