Skip to content

Commit

Permalink
fix: missing cellMeridiemFormat in all locales (#842)
Browse files Browse the repository at this point in the history
* fix: missing cellMeridiemFormat in all locales

* fix: missing cellMeridiemFormat in all locales

* fix: missing cellMeridiemFormat in all locales

* fix: missing cellMeridiemFormat in all locales

* fix: missing cellMeridiemFormat in all locales

* fix: missing cellMeridiemFormat in all locales
  • Loading branch information
afc163 committed Jul 12, 2024
1 parent 04b3232 commit 1ac03de
Show file tree
Hide file tree
Showing 77 changed files with 398 additions and 292 deletions.
2 changes: 1 addition & 1 deletion .fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
});
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": ["prettier --ignore-unknown --write"]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
> It has not been updated for a long time and will be maintained from now on. More in [releases](https://github.com/react-component/picker/releases).
---

## 0.6.0

- support `maxColumnsPerRow`.
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# rc-picker

[![NPM version][npm-image]][npm-url]
[![build status][github-actions-image]][github-actions-url]
[![Codecov][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[![NPM version][npm-image]][npm-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]

[npm-image]: http://img.shields.io/npm/v/rc-picker.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-picker
Expand Down Expand Up @@ -106,7 +102,7 @@ render(<Picker />, mountNode);
### RangePicker

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| prefixCls | String | rc-picker | prefixCls of this component |
| className | String | '' | additional css class of root dom |
| style | React.CSSProperties | | additional style of root dom node |
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"test": "rc-test",
"coverage": "father test --coverage",
"now-build": "npm run build"
"now-build": "npm run build",
"prepare": "npx husky"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
Expand All @@ -62,13 +63,15 @@
"dayjs": "1.x",
"dumi": "^2.1.15",
"eslint": "^8.56.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-unicorn": "^54.0.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-unicorn": "^54.0.0",
"father": "^4.0.0",
"glob": "^10.4.1",
"husky": "^9.0.11",
"less": "^4.2.0",
"lint-staged": "^15.2.7",
"luxon": "3.x",
"mockdate": "^3.0.2",
"moment": "^2.24.0",
Expand Down
5 changes: 2 additions & 3 deletions src/locale/ar_EG.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'ar_EG',
today: 'اليوم',
now: 'الأن',
Expand All @@ -14,11 +16,8 @@ const locale: Locale = {
monthSelect: 'اختيار الشهر',
yearSelect: 'اختيار السنة',
decadeSelect: 'اختيار العقد',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'الشهر السابق (PageUp)',
nextMonth: 'الشهر التالى(PageDown)',
previousYear: 'العام السابق (Control + left)',
Expand Down
5 changes: 2 additions & 3 deletions src/locale/az_AZ.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'az_AZ',
today: 'Bugün',
now: 'İndi',
Expand All @@ -15,11 +17,8 @@ const locale: Locale = {
monthSelect: 'Ay seç',
yearSelect: 'il seç',
decadeSelect: 'Onillik seçin',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Əvvəlki ay (PageUp)',
nextMonth: 'Növbəti ay (PageDown)',
previousYear: 'Sonuncu il (Control + left)',
Expand Down
5 changes: 2 additions & 3 deletions src/locale/bg_BG.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'bg_BG',
today: 'Днес',
now: 'Сега',
Expand All @@ -14,11 +16,8 @@ const locale: Locale = {
monthSelect: 'Избор на месец',
yearSelect: 'Избор на година',
decadeSelect: 'Десетилетие',
yearFormat: 'YYYY',
dateFormat: 'D M YYYY',
dayFormat: 'D',
dateTimeFormat: 'D M YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Предишен месец (PageUp)',
nextMonth: 'Следващ месец (PageDown)',
previousYear: 'Последна година (Control + left)',
Expand Down
5 changes: 2 additions & 3 deletions src/locale/bn_BD.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'bn_BD',
today: 'আজ',
now: 'এখন',
Expand All @@ -15,11 +17,8 @@ const locale: Locale = {
monthSelect: 'মাস পছন্দ করুন',
yearSelect: 'বছর পছন্দ করুন',
decadeSelect: 'একটি দশক পছন্দ করুন',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'গত মাস (PageUp)',
nextMonth: 'আগামী মাস (PageDown)',
previousYear: 'গত বছর (Control + left)',
Expand Down
56 changes: 29 additions & 27 deletions src/locale/by_BY.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
locale: 'by_BY',
today: 'Сёння',
now: 'Зараз',
backToToday: 'Дадзеная дата',
ok: 'OK',
clear: 'Ачысціць',
month: 'Месяц',
year: 'Год',
timeSelect: 'Выбраць час',
dateSelect: 'Выбраць дату',
weekSelect: 'Выбраць тыдзень',
monthSelect: 'Выбраць месяц',
yearSelect: 'Выбраць год',
decadeSelect: 'Выбраць дзесяцігоддзе',
yearFormat: 'YYYY',
dateFormat: 'D-M-YYYY',
dayFormat: 'D',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Папярэдні месяц (PageUp)',
nextMonth: 'Наступны месяц (PageDown)',
previousYear: 'Папярэдні год (Control + left)',
nextYear: 'Наступны год (Control + right)',
previousDecade: 'Папярэдняе дзесяцігоддзе',
nextDecade: 'Наступнае дзесяцігоддзе',
previousCentury: 'Папярэдні век',
nextCentury: 'Наступны век',
...commonLocale,
locale: 'by_BY',
today: 'Сёння',
now: 'Зараз',
backToToday: 'Дадзеная дата',
ok: 'OK',
clear: 'Ачысціць',
month: 'Месяц',
year: 'Год',
timeSelect: 'Выбраць час',
dateSelect: 'Выбраць дату',
weekSelect: 'Выбраць тыдзень',
monthSelect: 'Выбраць месяц',
yearSelect: 'Выбраць год',
decadeSelect: 'Выбраць дзесяцігоддзе',

dateFormat: 'D-M-YYYY',

dateTimeFormat: 'D-M-YYYY HH:mm:ss',

previousMonth: 'Папярэдні месяц (PageUp)',
nextMonth: 'Наступны месяц (PageDown)',
previousYear: 'Папярэдні год (Control + left)',
nextYear: 'Наступны год (Control + right)',
previousDecade: 'Папярэдняе дзесяцігоддзе',
nextDecade: 'Наступнае дзесяцігоддзе',
previousCentury: 'Папярэдні век',
nextCentury: 'Наступны век',
};

export default locale;
5 changes: 2 additions & 3 deletions src/locale/ca_ES.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'ca_ES',
today: 'Avui',
now: 'Ara',
Expand All @@ -14,11 +16,8 @@ const locale: Locale = {
monthSelect: 'Escollir un mes',
yearSelect: 'Escollir un any',
decadeSelect: 'Escollir una dècada',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes següent (PageDown)',
previousYear: 'Any anterior (Control + left)',
Expand Down
8 changes: 8 additions & 0 deletions src/locale/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { Locale } from '../interface';

export const commonLocale: Partial<Locale> = {
yearFormat: 'YYYY',
dayFormat: 'D',
cellMeridiemFormat: 'A',
monthBeforeYear: true,
};
8 changes: 5 additions & 3 deletions src/locale/cs_CZ.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'cs_CZ',
today: 'Dnes',
now: 'Nyní',
Expand All @@ -14,11 +16,11 @@ const locale: Locale = {
monthSelect: 'Vyberte měsíc',
yearSelect: 'Vyberte rok',
decadeSelect: 'Vyberte dekádu',
yearFormat: 'YYYY',

dateFormat: 'D.M.YYYY',
dayFormat: 'D',

dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Předchozí měsíc (PageUp)',
nextMonth: 'Následující (PageDown)',
previousYear: 'Předchozí rok (Control + left)',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/da_DK.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'da_DK',
today: 'I dag',
now: 'Nu',
Expand All @@ -14,11 +16,11 @@ const locale: Locale = {
monthSelect: 'Vælg måned',
yearSelect: 'Vælg år',
decadeSelect: 'Vælg årti',
yearFormat: 'YYYY',

dateFormat: 'D/M/YYYY',
dayFormat: 'D',

dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Forrige måned (Page Up)',
nextMonth: 'Næste måned (Page Down)',
previousYear: 'Forrige år (Ctrl-venstre pil)',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/de_DE.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'de_DE',
today: 'Heute',
now: 'Jetzt',
Expand All @@ -14,11 +16,11 @@ const locale: Locale = {
monthSelect: 'Wähle einen Monat',
yearSelect: 'Wähle ein Jahr',
decadeSelect: 'Wähle ein Jahrzehnt',
yearFormat: 'YYYY',

dateFormat: 'D.M.YYYY',
dayFormat: 'D',

dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Vorheriger Monat (PageUp)',
nextMonth: 'Nächster Monat (PageDown)',
previousYear: 'Vorheriges Jahr (Ctrl + left)',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/el_GR.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'el_GR',
today: 'Σήμερα',
now: 'Τώρα',
Expand All @@ -14,11 +16,11 @@ const locale: Locale = {
monthSelect: 'Επιλογή μήνα',
yearSelect: 'Επιλογή έτους',
decadeSelect: 'Επιλογή δεκαετίας',
yearFormat: 'YYYY',

dateFormat: 'D/M/YYYY',
dayFormat: 'D',

dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Προηγούμενος μήνας (PageUp)',
nextMonth: 'Επόμενος μήνας (PageDown)',
previousYear: 'Προηγούμενο έτος (Control + αριστερά)',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/en_GB.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'en_GB',
today: 'Today',
now: 'Now',
Expand All @@ -14,11 +16,11 @@ const locale: Locale = {
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',

dateFormat: 'D/M/YYYY',
dayFormat: 'D',

dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
Expand Down
8 changes: 5 additions & 3 deletions src/locale/en_US.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { commonLocale } from './common';
import type { Locale } from '../interface';

const locale: Locale = {
...commonLocale,
locale: 'en_US',
today: 'Today',
now: 'Now',
Expand All @@ -15,11 +17,11 @@ const locale: Locale = {
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',

dateFormat: 'M/D/YYYY',
dayFormat: 'D',

dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,

previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
Expand Down
Loading

0 comments on commit 1ac03de

Please sign in to comment.