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

egg-i18n

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-i18n - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

3

app.js

@@ -107,4 +107,5 @@ 'use strict';

/* istanbul ignore next */
app.config.i18n.dirs = Array.isArray(app.config.i18n.dirs) ? app.config.i18n.dirs : [];
// 按 egg > 插件 > 框架 > 应用的顺序遍历 config/locales 目录,加载所有配置文件
app.config.i18n.dirs = app.config.i18n.dirs || [];
for (const unit of app.loader.getLoadUnits()) {

@@ -111,0 +112,0 @@ app.config.i18n.dirs.push(path.join(unit.path, 'config/locales'));

'use strict';
const path = require('path');
module.exports = () => {
module.exports = appInfo => {
const exports = {};

@@ -13,3 +11,3 @@

* @property {String} defaultLocale - 默认语言是美式英语,毕竟支持多语言,基本都是以英语为母板
* @property {String} dir - 多语言资源文件存放路径,不建议修改
* @property {Array} dirs - 多语言资源文件存放路径,不建议修改
* @property {String} queryField - 设置当前语言的 query 参数字段名,默认通过 `query.locale` 获取

@@ -24,3 +22,3 @@ * 如果你想修改为 `query.lang`,那么请通过修改此配置实现

defaultLocale: 'en_US',
dir: path.join(appInfo.baseDir, 'config/locales'),
dirs: [],
queryField: 'locale',

@@ -27,0 +25,0 @@ cookieField: 'locale',

1.1.1 / 2017-04-19
==================
* fix: config.i18n.dir should be config.i18n.dirs (#6)
1.1.0 / 2017-01-13

@@ -3,0 +8,0 @@ ==================

{
"name": "egg-i18n",
"version": "1.1.0",
"version": "1.1.1",
"eggPlugin": {

@@ -5,0 +5,0 @@ "name": "i18n"

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