Skip to content

Commit a638e45

Browse files
committed
fix: missing translators
1 parent 9ff55b6 commit a638e45

6 files changed

Lines changed: 73 additions & 49 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@rsdoctor/rspack-plugin": "^1.1.10",
3535
"@rspack/cli": "^1.4.10",
3636
"@rspack/core": "^1.4.10",
37-
"@swc/core": "^1.13.2",
37+
"@swc/core": "^1.13.3",
3838
"@swc/jest": "^0.2.39",
3939
"@types/chrome": "0.1.1",
4040
"@types/decompress": "^4.2.7",
@@ -68,7 +68,7 @@
6868
},
6969
"dependencies": {
7070
"@element-plus/icons-vue": "^2.3.1",
71-
"@vueuse/core": "^13.5.0",
71+
"@vueuse/core": "^13.6.0",
7272
"countup.js": "^2.9.0",
7373
"echarts": "^5.6.0",
7474
"element-plus": "2.10.4",

src/api/crowdin.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,23 @@ export async function getTranslationStatus(): Promise<TranslationStatusInfo[]> {
3939
}
4040

4141
export async function getMembers(): Promise<MemberInfo[]> {
42-
const limit = 20
42+
const result: MemberInfo[] = []
4343
const auth = `Bearer ${PUBLIC_TOKEN}`
44-
const url = `https://api.crowdin.com/api/v2/projects/${CROWDIN_PROJECT_ID}/members?limit=${limit}`
45-
const response: AxiosResponse = await axios.get(url, {
46-
headers: { "Authorization": auth }
47-
})
48-
const data: { data: { data: MemberInfo }[] } = response.data
49-
return data.data.map(i => i.data)
44+
45+
const limit = 10
46+
let offset = 0
47+
while (true) {
48+
const url = `https://api.crowdin.com/api/v2/projects/${CROWDIN_PROJECT_ID}/members?limit=${limit}&offset=${offset}`
49+
const response: AxiosResponse = await axios.get(url, {
50+
headers: { "Authorization": auth }
51+
})
52+
const data: { data: { data: MemberInfo }[] } = response.data
53+
const newItems = data?.data?.map(i => i.data) ?? []
54+
result.push(...newItems)
55+
56+
if (newItems.length < limit) break
57+
58+
offset += limit
59+
}
60+
return result
5061
}

src/pages/app/components/About/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { type FunctionalComponent } from "vue"
1+
import { ElScrollbar } from 'element-plus'
2+
import { type FunctionalComponent, type StyleValue } from "vue"
23
import ContentContainer from "../common/ContentContainer"
34
import Description from "./Description"
45

56
const About: FunctionalComponent = () => (
6-
<ContentContainer>
7-
<Description />
8-
</ContentContainer>
7+
<ElScrollbar height="100%" style={{ width: '100%' } satisfies StyleValue}>
8+
<ContentContainer>
9+
<Description />
10+
</ContentContainer>
11+
</ElScrollbar>
912
)
1013
About.displayName = 'About'
1114

src/pages/app/components/DataManage/index.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77

88
import Flex from "@pages/components/Flex"
9-
import { defineComponent } from "vue"
9+
import { ElScrollbar } from 'element-plus'
10+
import { defineComponent, type StyleValue } from "vue"
1011
import ContentContainer from "../common/ContentContainer"
1112
import ClearPanel from "./ClearPanel"
1213
import MemoryInfo from "./MemoryInfo"
@@ -17,18 +18,20 @@ export default defineComponent(() => {
1718
initDataManage()
1819

1920
return () => (
20-
<ContentContainer>
21-
<Flex gap={22} height={490}>
22-
<Flex height='100%' flex={8}>
23-
<MemoryInfo />
21+
<ElScrollbar height="100%" style={{ width: '100%' } satisfies StyleValue}>
22+
<ContentContainer>
23+
<Flex gap={22} height={490}>
24+
<Flex height='100%' flex={8}>
25+
<MemoryInfo />
26+
</Flex>
27+
<Flex height='100%' flex={11}>
28+
<ClearPanel />
29+
</Flex>
30+
<Flex height='100%' flex={5}>
31+
<Migration />
32+
</Flex>
2433
</Flex>
25-
<Flex height='100%' flex={11}>
26-
<ClearPanel />
27-
</Flex>
28-
<Flex height='100%' flex={5}>
29-
<Migration />
30-
</Flex>
31-
</Flex>
32-
</ContentContainer >
34+
</ContentContainer >
35+
</ElScrollbar>
3336
)
3437
})

src/pages/app/components/HelpUs/index.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,34 @@ import { t } from "@app/locale"
33
import { Pointer } from "@element-plus/icons-vue"
44
import Box from "@pages/components/Box"
55
import { CROWDIN_HOMEPAGE } from "@util/constant/url"
6-
import { ElAlert, ElButton, ElCard } from "element-plus"
7-
import { type FunctionalComponent } from "vue"
6+
import { ElAlert, ElButton, ElCard, ElScrollbar } from "element-plus"
7+
import { type FunctionalComponent, type StyleValue } from "vue"
88
import ContentContainer from "../common/ContentContainer"
99
import MemberList from "./MemberList"
1010
import ProgressList from "./ProgressList"
1111

1212
const handleJump = () => createTabAfterCurrent(CROWDIN_HOMEPAGE)
1313

1414
const HelpUs: FunctionalComponent = () => (
15-
<ContentContainer>
16-
<ElCard>
17-
<ElAlert type="info" title={t(msg => msg.helpUs.title)}>
18-
<li>{t(msg => msg.helpUs.alert.l1)}</li>
19-
<li>{t(msg => msg.helpUs.alert.l2)}</li>
20-
<li>{t(msg => msg.helpUs.alert.l3)}</li>
21-
<li>{t(msg => msg.helpUs.alert.l4)}</li>
22-
</ElAlert>
23-
<Box marginBlock={30}>
24-
<ElButton type="primary" size="large" icon={Pointer} onClick={handleJump}>
25-
{t(msg => msg.helpUs.button)}
26-
</ElButton>
27-
</Box>
28-
<ProgressList />
29-
<MemberList />
30-
</ElCard>
31-
</ContentContainer>
15+
<ElScrollbar height="100%" style={{ width: '100%' } satisfies StyleValue}>
16+
<ContentContainer>
17+
<ElCard>
18+
<ElAlert type="info" title={t(msg => msg.helpUs.title)}>
19+
<li>{t(msg => msg.helpUs.alert.l1)}</li>
20+
<li>{t(msg => msg.helpUs.alert.l2)}</li>
21+
<li>{t(msg => msg.helpUs.alert.l3)}</li>
22+
<li>{t(msg => msg.helpUs.alert.l4)}</li>
23+
</ElAlert>
24+
<Box marginBlock={30}>
25+
<ElButton type="primary" size="large" icon={Pointer} onClick={handleJump}>
26+
{t(msg => msg.helpUs.button)}
27+
</ElButton>
28+
</Box>
29+
<ProgressList />
30+
<MemberList />
31+
</ElCard>
32+
</ContentContainer>
33+
</ElScrollbar>
3234
)
3335
HelpUs.displayName = 'HelpUs'
3436

src/pages/app/components/Option/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* https://opensource.org/licenses/MIT
66
*/
77
import { MediaSize, useMediaSize } from "@hooks/useMediaSize"
8-
import { defineComponent, ref, type Ref } from "vue"
8+
import { ElScrollbar } from 'element-plus'
9+
import { defineComponent, ref, type Ref, type StyleValue } from "vue"
910
import { type JSX } from "vue/jsx-runtime"
1011
import { type OptionCategory, type OptionInstance } from "./common"
1112
import AccessibilityOption from "./components/AccessibilityOption"
@@ -41,9 +42,13 @@ const _default = defineComponent(() => {
4142

4243
const handleReset = (cate: OptionCategory) => paneRefMap[cate]?.value?.reset?.()
4344

44-
return () => mediaSize.value <= MediaSize.sm
45-
? <Select v-slots={slots} />
46-
: <Tabs onReset={handleReset} v-slots={slots} />
45+
return () => (
46+
<ElScrollbar height="100%" style={{ width: '100%' } satisfies StyleValue}>
47+
{mediaSize.value <= MediaSize.sm
48+
? <Select v-slots={slots} />
49+
: <Tabs onReset={handleReset} v-slots={slots} />}
50+
</ElScrollbar>
51+
)
4752
})
4853

4954
export default _default

0 commit comments

Comments
 (0)