Skip to content

Commit 1eea7fe

Browse files
refactor(locale): normalize database data (#2873)
1 parent 425997f commit 1eea7fe

File tree

9 files changed

+70
-71
lines changed

9 files changed

+70
-71
lines changed

scripts/generate-locales.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) {
313313
const legacyDefinitions = ['app', 'cell_phone', 'team'];
314314
const definitionsToSkip = [
315315
'company',
316-
'database',
317316
'date',
318317
'finance',
319318
'internet',
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default [
2-
'utf8_unicode_ci',
3-
'utf8_general_ci',
4-
'utf8_bin',
52
'ascii_bin',
63
'ascii_general_ci',
74
'cp1250_bin',
85
'cp1250_general_ci',
6+
'utf8_bin',
7+
'utf8_general_ci',
8+
'utf8_unicode_ci',
99
];

src/locales/base/database/engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default ['InnoDB', 'MyISAM', 'MEMORY', 'CSV', 'BLACKHOLE', 'ARCHIVE'];
1+
export default ['ARCHIVE', 'BLACKHOLE', 'CSV', 'InnoDB', 'MEMORY', 'MyISAM'];

src/locales/base/database/type.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
export default [
2-
'int',
3-
'varchar',
4-
'text',
2+
'bigint',
3+
'binary',
4+
'bit',
5+
'blob',
6+
'boolean',
57
'date',
68
'datetime',
7-
'tinyint',
8-
'time',
9-
'timestamp',
10-
'smallint',
11-
'mediumint',
12-
'bigint',
139
'decimal',
14-
'float',
1510
'double',
16-
'real',
17-
'bit',
18-
'boolean',
19-
'serial',
20-
'blob',
21-
'binary',
2211
'enum',
23-
'set',
12+
'float',
2413
'geometry',
14+
'int',
15+
'mediumint',
2516
'point',
17+
'real',
18+
'serial',
19+
'set',
20+
'smallint',
21+
'text',
22+
'time',
23+
'timestamp',
24+
'tinyint',
25+
'varchar',
2626
];

src/locales/de/database/column.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
export default [
2-
'id',
3-
'titel',
4-
'name',
2+
'aktualisiertAm',
3+
'artikelnummer',
4+
'avatar',
5+
'bearbeitetAm',
56
'email',
6-
'telefonnummer',
7-
'token',
7+
'erstelltAm',
8+
'geburtsdatum',
89
'gruppe',
10+
'id',
911
'kategorie',
10-
'passwort',
1112
'kommentar',
12-
'avatar',
13+
'nachname',
14+
'name',
15+
'passwort',
1316
'status',
14-
'erstelltAm',
15-
'aktualisiertAm',
16-
'bearbeitetAm',
17+
'telefonnummer',
18+
'titel',
19+
'token',
1720
'vorname',
18-
'nachname',
19-
'geburtsdatum',
20-
'artikelnummer',
2121
];

src/locales/en/database/column.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
export default [
2-
'id',
3-
'title',
4-
'name',
2+
'avatar',
3+
'category',
4+
'comment',
5+
'createdAt',
56
'email',
6-
'phone',
7-
'token',
87
'group',
9-
'category',
8+
'id',
9+
'name',
1010
'password',
11-
'comment',
12-
'avatar',
11+
'phone',
1312
'status',
14-
'createdAt',
13+
'title',
14+
'token',
1515
'updatedAt',
1616
];

src/locales/eo/database/column.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export default [
2-
'identigilo',
3-
'titolo',
4-
'nomo',
5-
'telefonnumero',
62
'grupo',
3+
'identigilo',
74
'kategorio',
8-
'pasvorto',
95
'komento',
6+
'nomo',
7+
'pasvorto',
108
'profilbildo',
119
'stato',
10+
'telefonnumero',
11+
'titolo',
1212
];

src/locales/zh_CN/database/column.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
export default [
2-
'标识',
3-
'标题',
4-
'名称',
5-
'邮箱',
6-
'手机',
72
'令牌',
8-
'组别',
9-
'类别',
3+
'创建于',
4+
'名称',
5+
'头像',
106
'密码',
7+
'手机',
8+
'更新于',
9+
'标识',
10+
'标题',
1111
'注释',
12-
'头像',
1312
'状态',
14-
'创建于',
15-
'更新于',
13+
'类别',
14+
'组别',
15+
'邮箱',
1616
];
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`database > 42 > collation 1`] = `"utf8_bin"`;
3+
exports[`database > 42 > collation 1`] = `"cp1250_bin"`;
44

5-
exports[`database > 42 > column 1`] = `"token"`;
5+
exports[`database > 42 > column 1`] = `"group"`;
66

7-
exports[`database > 42 > engine 1`] = `"MEMORY"`;
7+
exports[`database > 42 > engine 1`] = `"CSV"`;
88

99
exports[`database > 42 > mongodbObjectId 1`] = `"8ead331ddf0fc4446b96d368"`;
1010

11-
exports[`database > 42 > type 1`] = `"smallint"`;
11+
exports[`database > 42 > type 1`] = `"double"`;
1212

13-
exports[`database > 1211 > collation 1`] = `"cp1250_general_ci"`;
13+
exports[`database > 1211 > collation 1`] = `"utf8_unicode_ci"`;
1414

15-
exports[`database > 1211 > column 1`] = `"createdAt"`;
15+
exports[`database > 1211 > column 1`] = `"token"`;
1616

17-
exports[`database > 1211 > engine 1`] = `"ARCHIVE"`;
17+
exports[`database > 1211 > engine 1`] = `"MyISAM"`;
1818

1919
exports[`database > 1211 > mongodbObjectId 1`] = `"ed4fefa7fbaec9dc4c48fa8e"`;
2020

21-
exports[`database > 1211 > type 1`] = `"geometry"`;
21+
exports[`database > 1211 > type 1`] = `"tinyint"`;
2222

23-
exports[`database > 1337 > collation 1`] = `"utf8_general_ci"`;
23+
exports[`database > 1337 > collation 1`] = `"ascii_general_ci"`;
2424

25-
exports[`database > 1337 > column 1`] = `"email"`;
25+
exports[`database > 1337 > column 1`] = `"createdAt"`;
2626

27-
exports[`database > 1337 > engine 1`] = `"MyISAM"`;
27+
exports[`database > 1337 > engine 1`] = `"BLACKHOLE"`;
2828

2929
exports[`database > 1337 > mongodbObjectId 1`] = `"536a7b5fa28d2f9bb79ca46e"`;
3030

31-
exports[`database > 1337 > type 1`] = `"time"`;
31+
exports[`database > 1337 > type 1`] = `"datetime"`;

0 commit comments

Comments
 (0)