Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ladjs/i18n

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ladjs/i18n - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

22

lib/index.js

@@ -81,5 +81,3 @@ 'use strict';

translate(key, locale) {
var _config = this.config;
const logger = _config.logger,
phrases = _config.phrases;
const phrases = this.config.phrases;
// eslint-disable-next-line prefer-rest-params

@@ -92,6 +90,3 @@

const phrase = phrases[key];
if (typeof phrase !== 'string') {
logger.warn(`translation key missing: ${key}`);
return;
}
if (typeof phrase !== 'string') throw new Error(`translation key missing: ${key}`);
args = [{ phrase, locale }, ...args];

@@ -102,7 +97,7 @@ return i18n.api.t(...args);

middleware(ctx, next) {
var _config2 = this.config;
const locales = _config2.locales,
defaultLocale = _config2.defaultLocale,
phrases = _config2.phrases,
cookie = _config2.cookie;
var _config = this.config;
const locales = _config.locales,
defaultLocale = _config.defaultLocale,
phrases = _config.phrases,
cookie = _config.cookie;

@@ -202,2 +197,3 @@ // expose api methods to `ctx.request` and `ctx.state`

let redirect = `/${ctx.request.locale}${ctx.url}`;
if (redirect === `/${ctx.request.locale}/`) redirect = `/${ctx.request.locale}`;
if (!isEmpty(ctx.query)) redirect += `?${stringify(ctx.query)}`;

@@ -235,2 +231,2 @@ debug('no valid locale found in URL, redirecting to %s', redirect);

module.exports = I18N;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJyZXF1aXJlIiwiZXh0bmFtZSIsInJlc29sdmUiLCJzdHJpbmdpZnkiLCJCb29tIiwicyIsImlzRW1wdHkiLCJzb3J0QnkiLCJldmVyeSIsImlzRnVuY3Rpb24iLCJnZXRMYW5ndWFnZSIsIm1vbWVudCIsImkxOG4i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V4cGlyZXM6IG1vbWVudCgpXG4gICAgICAgIC5hZGQoMSwgJ3llYXInKVxuICAgICAgICAudG9EYXRlKClcbiAgICB9KTtcbiAgICBkZWJ1Zygnc2V0IGNvb2tpZXMgZm9yIGxvY2FsZSBcIiVzXCInLCBsb2NhbGUpO1xuXG4gICAgLy8gaWYgdGhlIHVzZXIgaXMgbG9nZ2VkIGluIGFuZCBjdHguaXNBdXRoZW50aWNhdGVkKCkgZXhpc3RzLFxuICAgIC8vIHRoZW4gc2F2ZSBpdCBhcyBgbGFzdF9sb2NhbGVgXG4gICAgaWYgKGlzRnVuY3Rpb24oY3R4LmlzQXV0aGVudGljYXRlZCkgJiYgY3R4LmlzQXV0aGVudGljYXRlZCgpKSB7XG4gICAgICBjdHguc3RhdGUudXNlci5sYXN0X2xvY2FsZSA9IGxvY2FsZTtcbiAgICAgIHRyeSB7XG4gICAgICAgIGF3YWl0IGN0eC5zdGF0ZS51c2VyLnNhdmUoKTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICB0aGlzLmNvbmZpZy5sb2dnZXIuZXJyb3IoZXJyKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbmV4dCgpO1xuICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gSTE4TjtcbiJdfQ==
{
"name": "@ladjs/i18n",
"description": "i18n wrapper and Koa middleware for Lad",
"version": "1.0.0",
"version": "1.1.0",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -14,2 +14,7 @@ "ava": {

},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"contributors": [

@@ -31,5 +36,5 @@ "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"

"devDependencies": {
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"ava": "^1.0.1",
"@commitlint/cli": "^7.3.1",
"@commitlint/config-conventional": "^7.3.1",
"ava": "^1.1.0",
"babel-cli": "^6.26.0",

@@ -36,0 +41,0 @@ "babel-preset-env": "^1.7.0",

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