Skip to content

Commit 6a55bc5

Browse files
committed
fix: zh locale support
1 parent afaf448 commit 6a55bc5

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@ module.exports = {
88
format: ['camelCase', 'PascalCase', 'UPPER_CASE', 'snake_case'],
99
leadingUnderscore: 'allowSingleOrDouble',
1010
},
11+
{
12+
selector: 'variable',
13+
modifiers: ['destructured'],
14+
format: null,
15+
},
16+
{
17+
selector: [
18+
'classProperty',
19+
'objectLiteralProperty',
20+
'typeProperty',
21+
'classMethod',
22+
'objectLiteralMethod',
23+
'typeMethod',
24+
'accessor',
25+
'enumMember',
26+
],
27+
modifiers: ['requiresQuotes'],
28+
format: null,
29+
},
1130
{
1231
selector: 'enum',
1332
format: ['PascalCase'],
File renamed without changes.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"files": [
9797
"bin",
9898
"docs",
99+
"locales",
99100
"public",
100101
"sql",
101102
"views",

src/core/i18n.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import path from 'path';
22
import { I18n } from 'i18n';
33

4-
export const i18n = new I18n({
5-
locales: ['en', 'cn'],
4+
export const i18n = new I18n();
5+
6+
i18n.configure({
67
directory: path.join(__dirname, '../../locales'),
78
defaultLocale: 'en',
89
});

0 commit comments

Comments
 (0)