New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aliyun-obv/i18n

Package Overview
Dependencies
Maintainers
2
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aliyun-obv/i18n - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

dist/i18n.d.ts
declare function getMsg(key: string): any;
declare const BaseI18n: {
declare const I18n: {
NODATA: any;

@@ -39,2 +39,2 @@ SELECTALL: any;

export { BaseI18n as default, getMsg, replaceI18nVariable };
export { I18n as default, getMsg, replaceI18nVariable };

@@ -0,2 +1,54 @@

const import_meta = {};
let mdsRemoteI18n = {};
if (__VITE__) {
if (process.env.NODE_ENV === "development") {
try {
mdsRemoteI18n = import_meta.glob(`./i18n.json`, { eager: true })["./i18n.json"];
} catch (e) {
console.log(e);
}
}
}
const descriptions = {
zh: {
mcmsKey: "zh_CN"
},
en: {
mcmsKey: "en_US"
},
ja: {
mcmsKey: "ja_JP"
},
zh_TW: {
mcmsKey: "zh_TW"
}
};
const init = () => {
var _a;
if (process.env.IGNORE_I18N) {
return;
}
const lang = "zh";
const desc = (_a = descriptions[lang]) != null ? _a : descriptions.en;
const cacheRemoteMDS = mdsRemoteI18n && mdsRemoteI18n[desc.mcmsKey] || {};
if (window["sls-console-aliyun-com"]) {
console.info("use mcms lang success.");
window.ALIYUN_SLS_CONSOLE_MESSAGE = Object.assign(
cacheRemoteMDS,
window["sls-console-aliyun-com"][desc.mcmsKey] || {}
);
} else {
window.ALIYUN_SLS_CONSOLE_MESSAGE = Object.assign(
cacheRemoteMDS,
window.ALIYUN_SLS_CONSOLE_MESSAGE || {}
);
}
};
let hasInit = false;
function getMsg(key) {
if (!hasInit) {
init();
hasInit = true;
}
if (process.env.IGNORE_I18N) {

@@ -11,3 +63,3 @@ return "";

}
const BaseI18n = {
const I18n = {
NODATA: getMsg("msg.no_data"),

@@ -85,3 +137,3 @@ SELECTALL: getMsg("lb.select_all"),

export { BaseI18n as default, getMsg, replaceI18nVariable };
export { I18n as default, getMsg, replaceI18nVariable };
//# sourceMappingURL=i18n.es.js.map

@@ -11,3 +11,3 @@ {

"devDependencies": {},
"version": "0.0.4"
"version": "0.0.5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc