diff --git a/.changeset/grumpy-worms-jog.md b/.changeset/grumpy-worms-jog.md new file mode 100644 index 0000000000..84edfc7f45 --- /dev/null +++ b/.changeset/grumpy-worms-jog.md @@ -0,0 +1,6 @@ +--- +'@commercetools-uikit/calendar-time-utils': patch +'@commercetools-uikit/i18n': patch +--- + +remove japanese locale support diff --git a/docs/.storybook/configs/intl-context.js b/docs/.storybook/configs/intl-context.js index 36149b6641..b6d9ab7a97 100644 --- a/docs/.storybook/configs/intl-context.js +++ b/docs/.storybook/configs/intl-context.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import { IntlProvider } from 'react-intl'; -const locales = ['en', 'en-GB', 'de', 'es', 'fr-FR', 'ja', 'zh-CN']; +const locales = ['en', 'en-GB', 'de', 'es', 'fr-FR', 'zh-CN']; const getMessagesForLocale = (locale) => { switch (locale) { @@ -17,8 +17,6 @@ const getMessagesForLocale = (locale) => { return require('../../../packages/i18n/data/fr-FR.json'); case 'zh-CN': return require('../../../packages/i18n/data/zh-CN.json'); - case 'ja': - return require('../../../packages/i18n/data/ja.json'); default: throw new Error(`Unable to load messages for locale ${locale}.`); } @@ -38,8 +36,6 @@ const namifyLocale = (locale) => { return 'Français'; case 'zh-CN': return '简化字'; - case 'ja': - return '日本人'; default: return locale; } diff --git a/docs/.storybook/webpack.config.js b/docs/.storybook/webpack.config.js index 5619635a6b..3bcc50addf 100644 --- a/docs/.storybook/webpack.config.js +++ b/docs/.storybook/webpack.config.js @@ -13,7 +13,7 @@ const sourceFolders = [ module.exports = ({ config }) => { config.plugins.push( new MomentLocalesPlugin({ - localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja', 'en-gb'], + localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'en-gb'], }) ); diff --git a/package.json b/package.json index 864d856039..6a8200dc24 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build": "./scripts/build.sh", "build:watch": "./scripts/build_watch.sh", "start": "yarn --cwd docs start", - "extract-intl": "formatjs extract --format=./packages/i18n/transifex-transformer.js --out-file=./packages/i18n/data/core.json '{packages,src/components}/**/messages.js'", + "extract-intl": "formatjs extract --format=./packages/i18n/transifex-transformer.js --out-file=./packages/i18n/data/core.json '{packages,src/components}/**/messages.ts'", "compile-intl": "yarn workspace @commercetools-uikit/i18n compile-data", "lint": "jest --projects jest.eslint.config.js", "lint:js": "jest --config jest.eslint.config.js", diff --git a/packages/calendar-time-utils/src/calendar-time.spec.js b/packages/calendar-time-utils/src/calendar-time.spec.js index a06d3d7665..1a3cfbc442 100644 --- a/packages/calendar-time-utils/src/calendar-time.spec.js +++ b/packages/calendar-time-utils/src/calendar-time.spec.js @@ -8,7 +8,6 @@ describe('getLocalizedDateTimeFormatPattern', () => { 'en-AU': 'DD/MM/YYYY', es: 'DD/MM/AAAA', 'fr-FR': 'JJ/MM/AAAA', - ja: '年/月/日', 'zh-CN': '年/月/日', xx: 'MM/DD/YYYY', // unknown locale returns the default pattern moment provides }; @@ -20,7 +19,6 @@ describe('getLocalizedDateTimeFormatPattern', () => { 'en-AU': 'HH:mm AM/PM', es: 'HH:mm', 'fr-FR': 'HH:mm', - ja: '午前/午後 時:分', 'zh-CN': '小时:分钟', xx: 'h:mm A', // unknown locale returns the default pattern moment provides }; @@ -32,7 +30,6 @@ describe('getLocalizedDateTimeFormatPattern', () => { 'en-AU': 'DD/MM/YYYY - HH:mm AM/PM', es: 'DD/MM/AAAA - HH:mm', 'fr-FR': 'JJ/MM/AAAA - HH:mm', - ja: '年/月/日 - 午前/午後 時:分', 'zh-CN': '年/月/日 - 小时:分钟', xx: 'MM/DD/YYYY - h:mm A', // unknown locale returns the default pattern moment provides }; diff --git a/packages/calendar-time-utils/src/formats.ts b/packages/calendar-time-utils/src/formats.ts index b1f44a6215..5320eed98d 100644 --- a/packages/calendar-time-utils/src/formats.ts +++ b/packages/calendar-time-utils/src/formats.ts @@ -50,14 +50,6 @@ export const DATE_FORMAT_LOCALIZED_MAPPINGS: TLocalizedDateFormatMapping = { [formatToken.DD]: 'JJ', [formatToken.YYYY]: 'AAAA', }, - ja: { - // YYYY/MM/DD - HH:mm -> 年/月/日 - 午前/午後 時:分 - [formatToken.HH]: '午前/午後 時', - [formatToken.mm]: '分', - [formatToken.DD]: '日', - [formatToken.MM]: '月', - [formatToken.YYYY]: '年', - }, 'zh-CN': { // YYYY/MM/DD - HH:mm -> 年/月/日 - 小时:分钟 [formatToken.HH]: '小时', diff --git a/packages/i18n/data/core.json b/packages/i18n/data/core.json index 4f3af423ba..20e8199880 100644 --- a/packages/i18n/data/core.json +++ b/packages/i18n/data/core.json @@ -24,10 +24,6 @@ "UIKit.DataTableManager.TableSettings.columnManagerOption": "Column manager", "UIKit.DataTableManager.TableSettings.displaySettingsOption": "Display settings", "UIKit.DataTableManager.TableSettings.placeholder": "Table settings", - "UIKit.DateInput.placeholder": "MM/DD/YYYY", - "UIKit.DateRangeInput.placeholder": "MM/DD/YYYY - MM/DD/YYYY", - "UIKit.DateTimeInput.placeholder": "MM/DD/YYYY - HH:mm AM/PM", - "UIKit.DateTimeInput.timePlaceholder": "HH:mm AM/PM", "UIKit.FieldErrors.invalidFractionalNumber": "A whole number is required.", "UIKit.FieldErrors.invalidNegativeNumber": "Negative number is not supported.", "UIKit.FieldErrors.missingRequiredField": "This field is required. Provide a value.", diff --git a/packages/i18n/data/ja.json b/packages/i18n/data/ja.json deleted file mode 100644 index e2bcccdfb4..0000000000 --- a/packages/i18n/data/ja.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "UIKit.CalendarHeader.nextMonthTooltip": "来月", - "UIKit.CalendarHeader.nextYearTooltip": "来年", - "UIKit.CalendarHeader.previousMonthTooltip": "先月", - "UIKit.CalendarHeader.previousYearTooltip": "昨年", - "UIKit.CalendarHeader.todayTooltip": "今日", - "UIKit.ClearButton.clearButtonLabel": "クリア", - "UIKit.CreatableSelectInput.createLabel": "「{inputValue}」を作成", - "UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint": "上記の入力検索を使ってもっと属性を読み込む", - "UIKit.DataTableManager.ColumnManager.closeButtonLabel": "閉じる", - "UIKit.DataTableManager.ColumnManager.hiddenColumns": "非表示列", - "UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow": "非表示列はありません。", - "UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow": "表示列が選択されていません。", - "UIKit.DataTableManager.ColumnManager.title": "列管理", - "UIKit.DataTableManager.ColumnSelectorGroups.visible": "表示列", - "UIKit.DataTableManager.DensityManager.closeButtonLabel": "閉じる", - "UIKit.DataTableManager.DensityManager.densityDisplayCompactOption": "最小", - "UIKit.DataTableManager.DensityManager.densityDisplayDefaultOption": "既定", - "UIKit.DataTableManager.DensityManager.densityDisplaySubtitle": "行間と列幅", - "UIKit.DataTableManager.DensityManager.textWrappingAllWrapVisibleOption": "全テキストを表示。", - "UIKit.DataTableManager.DensityManager.textWrappingShowHideOnDemandOption": "テキストの一部を表示。必要に応じて残りを表示。", - "UIKit.DataTableManager.DensityManager.textWrappingSubtitle": "テキスト表示", - "UIKit.DataTableManager.DensityManager.title": "表のレイアウト設定", - "UIKit.DataTableManager.TableSettings.columnManagerOption": "表示列の管理", - "UIKit.DataTableManager.TableSettings.displaySettingsOption": "レイアウト設定", - "UIKit.DataTableManager.TableSettings.placeholder": "表の設定", - "UIKit.DateInput.placeholder": "年/月/日", - "UIKit.DateRangeInput.placeholder": "年/月/日 - 年/月/日", - "UIKit.DateTimeInput.placeholder": "年/月/日 - 午前/午後 時:分", - "UIKit.DateTimeInput.timePlaceholder": "午前/午後 時:分", - "UIKit.FieldErrors.invalidFractionalNumber": "整数を入力して下さい", - "UIKit.FieldErrors.invalidNegativeNumber": "0より小さい数には対応していません。", - "UIKit.FieldErrors.missingRequiredField": "必須フィールドです。値を入力して下さい。", - "UIKit.LocalizedMoneyInput.hide": "通貨を隠す ({remainingCurrencies})", - "UIKit.LocalizedMoneyInput.missingRequiredField": "必須フィールドです。少なくとも値を一つ入力して下さい。", - "UIKit.LocalizedMoneyInput.show": "全通貨を表示 ({remainingCurrencies})", - "UIKit.LocalizedTextInput.hide": "言語を隠す ({remainingLanguages})", - "UIKit.LocalizedTextInput.missingRequiredField": "必須フィールドです。少なくとも値を一つ入力して下さい。", - "UIKit.LocalizedTextInput.show": "全言語を表示 ({remainingLanguages})", - "UIKit.MoneyInput.highPrecision": "価格", - "UIKit.MultilineTextInput.collapse": "閉じる", - "UIKit.MultilineTextInput.expand": "開く", - "UIKit.Pagination.PageNavigator.nextPageLabel": "次のページ", - "UIKit.Pagination.PageNavigator.page": "ページ", - "UIKit.Pagination.PageNavigator.pageCount": "{count}ページ中", - "UIKit.Pagination.PageNavigator.previousPageLabel": "前のページ", - "UIKit.Pagination.PageSizeSelector.pageSize": "1ページの表示数({count}個のアイテム)", - "UIKit.PasswordField.hide": "隠す", - "UIKit.PasswordField.show": "表示", - "UIKit.RichTextBody.boldButtonLabel": "太字", - "UIKit.RichTextBody.expandButtonLabel": "開く", - "UIKit.RichTextBody.italicButtonLabel": "斜体", - "UIKit.RichTextBody.moreStylesDropdownLabel": "その他のスタイル", - "UIKit.RichTextBody.moreStylesDropdownOptionStrikethrough": "取り消し線", - "UIKit.RichTextBody.moreStylesDropdownOptionSubscript": "添字", - "UIKit.RichTextBody.moreStylesDropdownOptionSuperscript": "上付き文字", - "UIKit.RichTextBody.orderedListButtonLabel": "段落番号", - "UIKit.RichTextBody.redoButtonLabel": "やり直す", - "UIKit.RichTextBody.styleDropdownLabel": "スタイル", - "UIKit.RichTextBody.styleDropdownOptionH1": "見出し H1", - "UIKit.RichTextBody.styleDropdownOptionH2": "見出し H2", - "UIKit.RichTextBody.styleDropdownOptionH3": "見出し H3", - "UIKit.RichTextBody.styleDropdownOptionH4": "見出し H4", - "UIKit.RichTextBody.styleDropdownOptionH5": "見出し H5", - "UIKit.RichTextBody.styleDropdownOptionParagraph": "段落", - "UIKit.RichTextBody.styleDropdownOptionPreformatted": "整形済み", - "UIKit.RichTextBody.styleDropdownOptionQuote": "引用", - "UIKit.RichTextBody.underlinedButtonLabel": "下線", - "UIKit.RichTextBody.undoButtonLabel": "元に戻す", - "UIKit.RichTextBody.unorderedListButtonLabel": "箇条書き", - "UIKit.SearchSelectInput.loadingOptionsMessage": "完全一致を読み込んでいます", - "UIKit.SearchSelectInput.noOptionsMessage": "検索用語に一致するものが見つかりません", - "UIKit.SearchSelectInput.placeholderMessage": "検索", - "UIKit.SelectInput.loadingOptions": "読み込み中", - "UIKit.SelectInput.noOptionsMessageWithInputValue": "オプションなし", - "UIKit.SelectInput.noOptionsMessageWithoutInputValue": "オプションなし", - "UIKit.SelectInput.placeholder": "選択して下さい", - "UIKit.TimeInput.placeholder": "午前/午後 時:分" -}