diff --git a/.gitignore b/.gitignore index 9069dc6d6c..15c6ca7cb5 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 ba5e3659c4..fd8d3ccb1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed null value of search input - @AdKamil (#3778) - Sorting fixed on category page - @AdKamil (#3785) - Mount app in 'beforeResolve' if it's not dispatched in 'onReady' - @gibkigonzo (#3669) +- change translation from jp-JP to ja-JP - @gibkigonzo (#3824) ## [1.10.4] - 18.10.2019 diff --git a/config/default.json b/config/default.json index 8be8043abf..41ae29c797 100644 --- a/config/default.json +++ b/config/default.json @@ -403,7 +403,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 e785373eb6..ec26ca9629 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" */ `dayjs/locale/${localeCode}`) + try { + await import(/* webpackChunkName: "dayjs-locales" */ `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 fef18375d8..81201c4221 100644 --- a/docs/guide/cookbook/setup.md +++ b/docs/guide/cookbook/setup.md @@ -1259,7 +1259,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