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

nuxt-i18n

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-i18n - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Change Log

<a name="2.0.0"></a>
# [2.0.0](https://github.com/paulgv/nuxt-i18n/compare/v1.0.2...v2.0.0) (2018-01-26)
### Features
* Improved dynamic nested routes support ([e08935e](https://github.com/paulgv/nuxt-i18n/commit/e08935e))
### BREAKING CHANGES
* Custom routes translations now use routes `chunkName` instead of `name`, you should update your config accordlingly.
<a name="1.1.0"></a>

@@ -7,0 +19,0 @@ # [1.1.0](https://github.com/paulgv/nuxt-i18n/compare/v1.0.2...v1.1.0) (2018-01-22)

7

lib/routes.js

@@ -36,4 +36,5 @@ const { has } = require('lodash')

locales.forEach((locale) => {
const { component } = baseRoute
const { component, chunkName } = baseRoute
let { path, name, children } = baseRoute
const cleanChunkName = chunkName.replace(/^pages\//, '');
if (children) {

@@ -50,4 +51,4 @@ children = generateRoutes({

const { code } = locale
if (has(routesOptions, `${name}.${code}`)) {
path = routesOptions[name][code]
if (has(routesOptions, `${cleanChunkName}.${code}`)) {
path = routesOptions[cleanChunkName][code]
}

@@ -54,0 +55,0 @@ // Don't change path when current route is a child

{
"name": "nuxt-i18n",
"version": "1.1.0",
"version": "2.0.0",
"description": "i18n for Nuxt",

@@ -41,4 +41,4 @@ "license": "MIT",

"devDependencies": {
"nuxt-module-builder": "latest"
"nuxt-module-builder": "^1.0.0"
}
}

@@ -233,3 +233,3 @@ # nuxt-i18n

},
'category-slug': {
'category/_slug': {
fr: '/categorie/:slug'

@@ -236,0 +236,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