
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
一个易用、低侵入的多语言翻译工具,适合中大型前端项目的国际化需求。
pnpm add easy-lang
# 或
npm install easy-lang
# 或
yarn add easy-lang
// translation.json
{
"错误": {
"zh_CN": "错误",
"zh_HK": "錯誤",
"en": "Error"
},
"保存": {
"zh_CN": "保存",
"zh_HK": "保存",
"en": "Save"
}
}
import { createI18nTool } from "easy-lang";
import translations from "./translation.json";
const i18n = createI18nTool<typeof translations, "zh_CN" | "zh_HK" | "en">({
defaultLang: "en",
langs: ["zh_CN", "zh_HK", "en"],
translations,
});
// 获取翻译
i18n.$t("错误"); // => "Error"
// 切换语言
i18n.changeLang("zh_CN");
支持在翻译文本中使用 {变量名}
,如:
{
"欢迎": {
"en": "Welcome, {name}!"
}
}
调用:
i18n.$t("欢迎", { name: "Tom" }); // => "Welcome, Tom!"
未翻译的 key 会自动收集到 untranslatedList
,便于后续补全。
本项目使用 vitest 进行单元测试。
pnpm test
pnpm build
MIT
FAQs
An easy-to-use, low-intrusion translation tool
The npm package easy-lang receives a total of 25 weekly downloads. As such, easy-lang popularity was classified as not popular.
We found that easy-lang demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.