
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.
@ng1005/baidu_translate_web_api
Advanced tools
Baidu web translate to api, baidu translate for vite-plugin-auto-i18n
Baidu web translate to sample api, for i18n.
The class BaiduTranslator
is support for vite-plugin-auto-i18n
npm install @ng1005/baidu_translate_web_api -D
pnpm install @ng1005/baidu_translate_web_api -D
yarn add @ng1005/baidu_translate_web_api -D
import {translate,BaiduTranslator,SEPARATOR,language} from '@ng1005/baidu_translate_web_api'
//The support language
console.log(language)
//translate
translate('test product','en','zh').then((res)=>{
console.log('res----',res)
}).catch(e=>{
console.log(e)
})
//translate array
translate(['test','product'].join(SEPARATOR),'en','zh').then(res=>{
console.log('res---',res.split(SEPARATOR))
}).catch(e=>{
console.log('error---',e)
})
//translate class for vite-plugin-auto-i18n
let baidu=new BaiduTranslator({})
baidu.translate('test case!','en','zh').then(res=>{
console.log('res---',res)
}).catch(e=>{
console.log('error---',e)
})
// vite-plugin-auto-i18n config in vite.config.ts
import {BaiduTranslator} from '@ng1005/baidu_translate_web_api'
const i18nPlugin = vitePluginsAutoI18n({
option: {
globalPath: './lang',
namespace: 'lang',
distPath: './dist/assets',
distKey: 'index',
targetLangList: ['en', 'ko', 'ja'],
originLang: 'zh-cn',
translator: new BaiduTranslator({
// proxy: {
// host: '127.0.0.1',
// port: 8899,
// protocol: 'http'
// }
})
}
})
Use jest test
pnpm install
pnpm run build
af: 'Afrikaans',
sq: 'Albanian',
am: 'Amharic',
ar: 'Arabic',
hy: 'Armenian',
az: 'Azerbaijani',
eu: 'Basque',
be: 'Belarusian',
bn: 'Bengali',
bs: 'Bosnian',
bg: 'Bulgarian',
ca: 'Catalan',
ceb: 'Cebuano',
ny: 'Chichewa',
zh: 'Chinese Simplified',
'zh-cn': 'Chinese Simplified',
'zh-tw': 'Chinese Traditional',
co: 'Corsican',
hr: 'Croatian',
cs: 'Czech',
da: 'Danish',
nl: 'Dutch',
en: 'English',
eo: 'Esperanto',
et: 'Estonian',
tl: 'Filipino',
fi: 'Finnish',
fr: 'French',
fy: 'Frisian',
gl: 'Galician',
ka: 'Georgian',
de: 'German',
el: 'Greek',
gu: 'Gujarati',
ht: 'Haitian Creole',
ha: 'Hausa',
haw: 'Hawaiian',
iw: 'Hebrew',
hi: 'Hindi',
hmn: 'Hmong',
hu: 'Hungarian',
is: 'Icelandic',
ig: 'Igbo',
id: 'Indonesian',
ga: 'Irish',
it: 'Italian',
ja: 'Japanese',
jw: 'Javanese',
kn: 'Kannada',
kk: 'Kazakh',
km: 'Khmer',
ko: 'Korean',
ku: 'Kurdish (Kurmanji)',
ky: 'Kyrgyz',
lo: 'Lao',
la: 'Latin',
lv: 'Latvian',
lt: 'Lithuanian',
lb: 'Luxembourgish',
mk: 'Macedonian',
mg: 'Malagasy',
ms: 'Malay',
ml: 'Malayalam',
mt: 'Maltese',
mi: 'Maori',
mr: 'Marathi',
mn: 'Mongolian',
my: 'Myanmar (Burmese)',
ne: 'Nepali',
no: 'Norwegian',
ps: 'Pashto',
fa: 'Persian',
pl: 'Polish',
pt: 'Portuguese',
ma: 'Punjabi',
ro: 'Romanian',
ru: 'Russian',
sm: 'Samoan',
gd: 'Scots Gaelic',
sr: 'Serbian',
st: 'Sesotho',
sn: 'Shona',
sd: 'Sindhi',
si: 'Sinhala',
sk: 'Slovak',
sl: 'Slovenian',
so: 'Somali',
es: 'Spanish',
su: 'Sundanese',
sw: 'Swahili',
sv: 'Swedish',
tg: 'Tajik',
ta: 'Tamil',
te: 'Telugu',
th: 'Thai',
tr: 'Turkish',
uk: 'Ukrainian',
ur: 'Urdu',
uz: 'Uzbek',
vi: 'Vietnamese',
cy: 'Welsh',
xh: 'Xhosa',
yi: 'Yiddish',
yo: 'Yoruba',
zu: 'Zulu'
FAQs
Baidu web translate to api, baidu translate for vite-plugin-auto-i18n
The npm package @ng1005/baidu_translate_web_api receives a total of 0 weekly downloads. As such, @ng1005/baidu_translate_web_api popularity was classified as not popular.
We found that @ng1005/baidu_translate_web_api 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
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.