Skip to content

Commit 727b4f7

Browse files
authored
🎊 feat: update langs i18n (#415)
1 parent 062387b commit 727b4f7

File tree

17 files changed

+116
-81
lines changed

17 files changed

+116
-81
lines changed

.stylelintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = {
4040
}
4141
],
4242
'property-no-unknown': null,
43+
'scss/at-rule-no-unknown': null,
4344
'at-rule-empty-line-before': [
4445
'always',
4546
{

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"vue.volar",
4+
"antfu.iconify",
45
"dbaeumer.vscode-eslint",
56
"stylelint.vscode-stylelint"
67
]

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"css.customData": [".vscode/tailwind.json"],
23
"editor.formatOnSave": false,
34

45
// Auto fix

.vscode/tailwind.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

src/components/Layout/LayoutView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export default defineComponent({
3636
:title="_t('result.title')"
3737
>
3838
<ul>
39-
<li>111</li>
40-
<li>222</li>
41-
<li>333</li>
39+
<li>Test Menu 这里放菜单1</li>
40+
<li>Test Menu 这里放菜单2</li>
41+
<li>Test Menu 这里放菜单3</li>
4242
</ul>
4343
</LayoutSection>
4444
</template>

src/components/Navigation/Side/SideAction.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineComponent({
3333
:key="item"
3434
class="action-item"
3535
>
36-
Action {{ item }}
36+
{{ _t('nav.action') }}{{ item }}
3737
</li>
3838
</ul>
3939
</div>

src/locales/lang/en.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ export default {
77
goback: 'Back to the previous page',
88
empty: 'No data available',
99
i18nTest: 'Test internationalization',
10-
pleaseInput: 'Please Input'
10+
pleaseInput: 'Please Input',
11+
btnCancel: 'Cancel',
12+
btnConfirm: 'Confirm'
13+
},
14+
nav: {
15+
action: 'Action'
1116
},
1217
login: {
1318
hydl: 'Hi, Welcome',

src/locales/lang/zh-hans.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ export default {
55
goback: '返回',
66
empty: '无可用数据',
77
i18nTest: '测试国际化',
8-
pleaseInput: '请输入'
8+
pleaseInput: '请输入',
9+
btnCancel: '取消',
10+
btnConfirm: '确定'
11+
},
12+
nav: {
13+
action: '操作'
914
},
1015
login: {
1116
hydl: '欢迎登录',

src/modules/Project/components/ProjectItem.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ async function handlePublish (projectId) {
188188
}
189189
190190
.project-item__name-desc {
191-
flex: 1;
192-
overflow: hidden;
191+
--at-apply: flex-1 overflow-hidden;
193192
194193
.project-item__name-desc__corpname {
195194
display: flex;

src/modules/Project/data/index.ts

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,39 @@
1+
const date = new Date()
2+
const [, id] = String(Math.random()).split('.')
3+
const today = `${ date.getFullYear() }-${ date.getMonth() + 1 }-${ date.getDate() }`
4+
15
export const projectDetail = {
2-
id: Math.random(),
3-
name: '测试项目',
4-
corpName: '测试公司',
5-
notes: '备注',
6+
id,
7+
name: 'This is Test Name 测试项目',
8+
corpName: 'This is Test Company 测试公司',
9+
notes: 'This is Test Remarks 备注',
610
isPublished: false,
7-
createTime: '2023.01.29'
11+
createTime: today
812
}
913

1014
export const projectList = [
1115
{
1216
id: '111',
13-
name: '测试项目',
14-
corpName: '测试公司',
15-
notes: '备注备注',
17+
name: 'Test Name 测试项目',
18+
corpName: 'Test Company 测试公司',
19+
notes: 'Test Remarks 备注',
1620
isPublished: false,
17-
createTime: '2023.01.29'
21+
createTime: today
1822
},
1923
{
2024
id: '222',
21-
name: '测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目测试项目',
22-
corpName: '测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司测试公司',
23-
notes: '备注备注',
25+
name: 'This is Test Test Test Test Name',
26+
corpName: 'This is Test Test Test Company',
27+
notes: 'Remarks.... 这是备注😄',
2428
isPublished: true,
25-
createTime: '2023.03.29'
29+
createTime: today
2630
},
2731
{
2832
id: '333',
29-
name: '测试项目',
30-
corpName: '测试公司',
31-
notes: '',
33+
name: 'This is Test Test Test Test Name',
34+
corpName: 'This is Test Test Test 中文名称',
35+
notes: '中文备注',
3236
isPublished: false,
33-
createTime: '2023.02.29'
37+
createTime: today
3438
}
3539
]
36-
37-
export const corporationList = [
38-
'Alabama', 'Alaska', 'Arizona',
39-
'测试', '测试1', '测试2', '测试3',
40-
'Arkansas', 'California', 'Colorado',
41-
'Connecticut', 'Delaware', 'Florida',
42-
'Georgia', 'Hawaii', 'Idaho', 'Illinois',
43-
'Indiana', 'Iowa', 'Kansas', 'Kentucky',
44-
'Louisiana', 'Maine', 'Maryland',
45-
'Massachusetts', 'Michigan', 'Minnesota',
46-
'Mississippi', 'Missouri', 'Montana',
47-
'Nebraska', 'Nevada', 'New Hampshire',
48-
'New Jersey', 'New Mexico', 'New York',
49-
'North Carolina', 'North Dakota', 'Ohio',
50-
'Oklahoma', 'Oregon', 'Pennsylvania',
51-
'Rhode Island', 'South Carolina',
52-
'South Dakota', 'Tennessee', 'Texas',
53-
'Utah', 'Vermont', 'Virginia',
54-
'Washington', 'West Virginia', 'Wisconsin',
55-
'Wyoming'
56-
]

0 commit comments

Comments
 (0)