diff --git a/.gitignore b/.gitignore index 58945f0800..844e742391 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ core/resource/i18n/en-US.json core/resource/i18n/es-ES.json core/resource/i18n/fr-FR.json core/resource/i18n/it-IT.json -core/resource/i18n/jp-JP.json +core/resource/i18n/ja-JP.json core/resource/i18n/multistoreLanguages.json core/resource/i18n/nl-NL.json core/resource/i18n/pl-PL.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dba3fb5be..6b3534261e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed sorting on category page and product tile sizing - @andrzejewsky (#3817) - Redirect from simple product using url_path - @benjick (#3804) - Mount app in 'beforeResolve' if it's not dispatched in 'onReady' - @gibkigonzo (#3669) +- change translation from jp-JP to ja-JP - @gibkigonzo (#3824) ### Changed / Improved - Changed pre commit hook to use NODE_ENV production to check for debugger statements - @resubaka (#3686) diff --git a/config/default.json b/config/default.json index 87a22db99d..b04fe152e8 100644 --- a/config/default.json +++ b/config/default.json @@ -447,7 +447,7 @@ "i18n": { "defaultCountry": "US", "defaultLanguage": "EN", - "availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "jp-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"], + "availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "ja-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"], "defaultLocale": "en-US", "currencyCode": "USD", "currencySign": "$", diff --git a/core/i18n/index.ts b/core/i18n/index.ts index 500b45aa51..d80a5bab36 100644 --- a/core/i18n/index.ts +++ b/core/i18n/index.ts @@ -33,7 +33,11 @@ const loadDateLocales = async (lang: string = 'en'): Promise => { const separatorIndex = localeCode.indexOf('-') if (separatorIndex) { localeCode = separatorIndex ? localeCode.substr(0, separatorIndex) : localeCode - await import(/* webpackChunkName: "dayjs-locales-[request]" */ `dayjs/locale/${localeCode}`) + try { + await import(/* webpackChunkName: "dayjs-locales-[request]" */ `dayjs/locale/${localeCode}`) + } catch (err) { + Logger.debug('Unable to load translation from dayjs')() + } } } } diff --git a/core/i18n/resource/i18n/jp-JP.csv b/core/i18n/resource/i18n/ja-JP.csv similarity index 100% rename from core/i18n/resource/i18n/jp-JP.csv rename to core/i18n/resource/i18n/ja-JP.csv diff --git a/docs/guide/cookbook/setup.md b/docs/guide/cookbook/setup.md index ea977f50b7..412e72d922 100644 --- a/docs/guide/cookbook/setup.md +++ b/docs/guide/cookbook/setup.md @@ -1255,7 +1255,7 @@ At [`vue-storefront/config/default.json`](https://github.com/DivanteLtd/vue-stor "i18n": { "defaultCountry": "US", "defaultLanguage": "EN", - "availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "jp-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"], + "availableLocale": ["en-US","de-DE","fr-FR","es-ES","nl-NL", "ja-JP", "ru-RU", "it-IT", "pt-BR", "pl-PL", "cs-CZ"], "defaultLocale": "en-US", "currencyCode": "USD", "currencySign": "$", diff --git a/src/themes/default/resource/i18n/jp-JP.csv b/src/themes/default/resource/i18n/ja-JP.csv similarity index 100% rename from src/themes/default/resource/i18n/jp-JP.csv rename to src/themes/default/resource/i18n/ja-JP.csv