Skip to content

Commit 1ac03de

Browse files
authored
fix: missing cellMeridiemFormat in all locales (#842)
* 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
1 parent 04b3232 commit 1ac03de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+398
-292
lines changed

.fatherrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { defineConfig } from 'father';
22

33
export default defineConfig({
44
plugins: ['@rc-component/father-plugin'],
5-
});
5+
});

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*": ["prettier --ignore-unknown --write"]
3+
}

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
> 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).
2828
2929
---
30+
3031
## 0.6.0
3132

3233
- support `maxColumnsPerRow`.

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# rc-picker
22

3-
[![NPM version][npm-image]][npm-url]
4-
[![build status][github-actions-image]][github-actions-url]
5-
[![Codecov][codecov-image]][codecov-url]
6-
[![npm download][download-image]][download-url]
7-
[![bundle size][bundlephobia-image]][bundlephobia-url]
3+
[![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]
84

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

108104
| Property | Type | Default | Description |
109-
| --- | --- | --- | --- |
105+
| --- | --- | --- | --- | --- |
110106
| prefixCls | String | rc-picker | prefixCls of this component |
111107
| className | String | '' | additional css class of root dom |
112108
| style | React.CSSProperties | | additional style of root dom node |

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
3636
"test": "rc-test",
3737
"coverage": "father test --coverage",
38-
"now-build": "npm run build"
38+
"now-build": "npm run build",
39+
"prepare": "npx husky"
3940
},
4041
"dependencies": {
4142
"@babel/runtime": "^7.24.7",
@@ -62,13 +63,15 @@
6263
"dayjs": "1.x",
6364
"dumi": "^2.1.15",
6465
"eslint": "^8.56.0",
66+
"eslint-plugin-eslint-comments": "^3.2.0",
6567
"eslint-plugin-jest": "^27.6.0",
66-
"eslint-plugin-unicorn": "^54.0.0",
6768
"eslint-plugin-react-hooks": "^4.6.0",
68-
"eslint-plugin-eslint-comments": "^3.2.0",
69+
"eslint-plugin-unicorn": "^54.0.0",
6970
"father": "^4.0.0",
7071
"glob": "^10.4.1",
72+
"husky": "^9.0.11",
7173
"less": "^4.2.0",
74+
"lint-staged": "^15.2.7",
7275
"luxon": "3.x",
7376
"mockdate": "^3.0.2",
7477
"moment": "^2.24.0",

src/locale/ar_EG.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'ar_EG',
57
today: 'اليوم',
68
now: 'الأن',
@@ -14,11 +16,8 @@ const locale: Locale = {
1416
monthSelect: 'اختيار الشهر',
1517
yearSelect: 'اختيار السنة',
1618
decadeSelect: 'اختيار العقد',
17-
yearFormat: 'YYYY',
1819
dateFormat: 'M/D/YYYY',
19-
dayFormat: 'D',
2020
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
21-
monthBeforeYear: true,
2221
previousMonth: 'الشهر السابق (PageUp)',
2322
nextMonth: 'الشهر التالى(PageDown)',
2423
previousYear: 'العام السابق (Control + left)',

src/locale/az_AZ.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'az_AZ',
57
today: 'Bugün',
68
now: 'İndi',
@@ -15,11 +17,8 @@ const locale: Locale = {
1517
monthSelect: 'Ay seç',
1618
yearSelect: 'il seç',
1719
decadeSelect: 'Onillik seçin',
18-
yearFormat: 'YYYY',
1920
dateFormat: 'D.M.YYYY',
20-
dayFormat: 'D',
2121
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
22-
monthBeforeYear: true,
2322
previousMonth: 'Əvvəlki ay (PageUp)',
2423
nextMonth: 'Növbəti ay (PageDown)',
2524
previousYear: 'Sonuncu il (Control + left)',

src/locale/bg_BG.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'bg_BG',
57
today: 'Днес',
68
now: 'Сега',
@@ -14,11 +16,8 @@ const locale: Locale = {
1416
monthSelect: 'Избор на месец',
1517
yearSelect: 'Избор на година',
1618
decadeSelect: 'Десетилетие',
17-
yearFormat: 'YYYY',
1819
dateFormat: 'D M YYYY',
19-
dayFormat: 'D',
2020
dateTimeFormat: 'D M YYYY HH:mm:ss',
21-
monthBeforeYear: true,
2221
previousMonth: 'Предишен месец (PageUp)',
2322
nextMonth: 'Следващ месец (PageDown)',
2423
previousYear: 'Последна година (Control + left)',

src/locale/bn_BD.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'bn_BD',
57
today: 'আজ',
68
now: 'এখন',
@@ -15,11 +17,8 @@ const locale: Locale = {
1517
monthSelect: 'মাস পছন্দ করুন',
1618
yearSelect: 'বছর পছন্দ করুন',
1719
decadeSelect: 'একটি দশক পছন্দ করুন',
18-
yearFormat: 'YYYY',
1920
dateFormat: 'M/D/YYYY',
20-
dayFormat: 'D',
2121
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
22-
monthBeforeYear: true,
2322
previousMonth: 'গত মাস (PageUp)',
2423
nextMonth: 'আগামী মাস (PageDown)',
2524
previousYear: 'গত বছর (Control + left)',

src/locale/by_BY.ts

+29-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
4-
locale: 'by_BY',
5-
today: 'Сёння',
6-
now: 'Зараз',
7-
backToToday: 'Дадзеная дата',
8-
ok: 'OK',
9-
clear: 'Ачысціць',
10-
month: 'Месяц',
11-
year: 'Год',
12-
timeSelect: 'Выбраць час',
13-
dateSelect: 'Выбраць дату',
14-
weekSelect: 'Выбраць тыдзень',
15-
monthSelect: 'Выбраць месяц',
16-
yearSelect: 'Выбраць год',
17-
decadeSelect: 'Выбраць дзесяцігоддзе',
18-
yearFormat: 'YYYY',
19-
dateFormat: 'D-M-YYYY',
20-
dayFormat: 'D',
21-
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
22-
monthBeforeYear: true,
23-
previousMonth: 'Папярэдні месяц (PageUp)',
24-
nextMonth: 'Наступны месяц (PageDown)',
25-
previousYear: 'Папярэдні год (Control + left)',
26-
nextYear: 'Наступны год (Control + right)',
27-
previousDecade: 'Папярэдняе дзесяцігоддзе',
28-
nextDecade: 'Наступнае дзесяцігоддзе',
29-
previousCentury: 'Папярэдні век',
30-
nextCentury: 'Наступны век',
5+
...commonLocale,
6+
locale: 'by_BY',
7+
today: 'Сёння',
8+
now: 'Зараз',
9+
backToToday: 'Дадзеная дата',
10+
ok: 'OK',
11+
clear: 'Ачысціць',
12+
month: 'Месяц',
13+
year: 'Год',
14+
timeSelect: 'Выбраць час',
15+
dateSelect: 'Выбраць дату',
16+
weekSelect: 'Выбраць тыдзень',
17+
monthSelect: 'Выбраць месяц',
18+
yearSelect: 'Выбраць год',
19+
decadeSelect: 'Выбраць дзесяцігоддзе',
20+
21+
dateFormat: 'D-M-YYYY',
22+
23+
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
24+
25+
previousMonth: 'Папярэдні месяц (PageUp)',
26+
nextMonth: 'Наступны месяц (PageDown)',
27+
previousYear: 'Папярэдні год (Control + left)',
28+
nextYear: 'Наступны год (Control + right)',
29+
previousDecade: 'Папярэдняе дзесяцігоддзе',
30+
nextDecade: 'Наступнае дзесяцігоддзе',
31+
previousCentury: 'Папярэдні век',
32+
nextCentury: 'Наступны век',
3133
};
3234

3335
export default locale;

src/locale/ca_ES.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'ca_ES',
57
today: 'Avui',
68
now: 'Ara',
@@ -14,11 +16,8 @@ const locale: Locale = {
1416
monthSelect: 'Escollir un mes',
1517
yearSelect: 'Escollir un any',
1618
decadeSelect: 'Escollir una dècada',
17-
yearFormat: 'YYYY',
1819
dateFormat: 'D/M/YYYY',
19-
dayFormat: 'D',
2020
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
21-
monthBeforeYear: true,
2221
previousMonth: 'Mes anterior (PageUp)',
2322
nextMonth: 'Mes següent (PageDown)',
2423
previousYear: 'Any anterior (Control + left)',

src/locale/common.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Locale } from '../interface';
2+
3+
export const commonLocale: Partial<Locale> = {
4+
yearFormat: 'YYYY',
5+
dayFormat: 'D',
6+
cellMeridiemFormat: 'A',
7+
monthBeforeYear: true,
8+
};

src/locale/cs_CZ.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'cs_CZ',
57
today: 'Dnes',
68
now: 'Nyní',
@@ -14,11 +16,11 @@ const locale: Locale = {
1416
monthSelect: 'Vyberte měsíc',
1517
yearSelect: 'Vyberte rok',
1618
decadeSelect: 'Vyberte dekádu',
17-
yearFormat: 'YYYY',
19+
1820
dateFormat: 'D.M.YYYY',
19-
dayFormat: 'D',
21+
2022
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
21-
monthBeforeYear: true,
23+
2224
previousMonth: 'Předchozí měsíc (PageUp)',
2325
nextMonth: 'Následující (PageDown)',
2426
previousYear: 'Předchozí rok (Control + left)',

src/locale/da_DK.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'da_DK',
57
today: 'I dag',
68
now: 'Nu',
@@ -14,11 +16,11 @@ const locale: Locale = {
1416
monthSelect: 'Vælg måned',
1517
yearSelect: 'Vælg år',
1618
decadeSelect: 'Vælg årti',
17-
yearFormat: 'YYYY',
19+
1820
dateFormat: 'D/M/YYYY',
19-
dayFormat: 'D',
21+
2022
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
21-
monthBeforeYear: true,
23+
2224
previousMonth: 'Forrige måned (Page Up)',
2325
nextMonth: 'Næste måned (Page Down)',
2426
previousYear: 'Forrige år (Ctrl-venstre pil)',

src/locale/de_DE.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'de_DE',
57
today: 'Heute',
68
now: 'Jetzt',
@@ -14,11 +16,11 @@ const locale: Locale = {
1416
monthSelect: 'Wähle einen Monat',
1517
yearSelect: 'Wähle ein Jahr',
1618
decadeSelect: 'Wähle ein Jahrzehnt',
17-
yearFormat: 'YYYY',
19+
1820
dateFormat: 'D.M.YYYY',
19-
dayFormat: 'D',
21+
2022
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
21-
monthBeforeYear: true,
23+
2224
previousMonth: 'Vorheriger Monat (PageUp)',
2325
nextMonth: 'Nächster Monat (PageDown)',
2426
previousYear: 'Vorheriges Jahr (Ctrl + left)',

src/locale/el_GR.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'el_GR',
57
today: 'Σήμερα',
68
now: 'Τώρα',
@@ -14,11 +16,11 @@ const locale: Locale = {
1416
monthSelect: 'Επιλογή μήνα',
1517
yearSelect: 'Επιλογή έτους',
1618
decadeSelect: 'Επιλογή δεκαετίας',
17-
yearFormat: 'YYYY',
19+
1820
dateFormat: 'D/M/YYYY',
19-
dayFormat: 'D',
21+
2022
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
21-
monthBeforeYear: true,
23+
2224
previousMonth: 'Προηγούμενος μήνας (PageUp)',
2325
nextMonth: 'Επόμενος μήνας (PageDown)',
2426
previousYear: 'Προηγούμενο έτος (Control + αριστερά)',

src/locale/en_GB.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'en_GB',
57
today: 'Today',
68
now: 'Now',
@@ -14,11 +16,11 @@ const locale: Locale = {
1416
monthSelect: 'Choose a month',
1517
yearSelect: 'Choose a year',
1618
decadeSelect: 'Choose a decade',
17-
yearFormat: 'YYYY',
19+
1820
dateFormat: 'D/M/YYYY',
19-
dayFormat: 'D',
21+
2022
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
21-
monthBeforeYear: true,
23+
2224
previousMonth: 'Previous month (PageUp)',
2325
nextMonth: 'Next month (PageDown)',
2426
previousYear: 'Last year (Control + left)',

src/locale/en_US.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { commonLocale } from './common';
12
import type { Locale } from '../interface';
23

34
const locale: Locale = {
5+
...commonLocale,
46
locale: 'en_US',
57
today: 'Today',
68
now: 'Now',
@@ -15,11 +17,11 @@ const locale: Locale = {
1517
monthSelect: 'Choose a month',
1618
yearSelect: 'Choose a year',
1719
decadeSelect: 'Choose a decade',
18-
yearFormat: 'YYYY',
20+
1921
dateFormat: 'M/D/YYYY',
20-
dayFormat: 'D',
22+
2123
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
22-
monthBeforeYear: true,
24+
2325
previousMonth: 'Previous month (PageUp)',
2426
nextMonth: 'Next month (PageDown)',
2527
previousYear: 'Last year (Control + left)',

0 commit comments

Comments
 (0)