Skip to content

Commit 127d1ff

Browse files
committed
Support Arabic
1 parent d61c7f5 commit 127d1ff

Some content is hidden

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

65 files changed

+722
-353
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
2828
"@babel/preset-env": "^7.25.8",
2929
"@crowdin/crowdin-api-client": "^1.37.1",
30-
"@types/chrome": "0.0.277",
30+
"@types/chrome": "0.0.278",
3131
"@types/copy-webpack-plugin": "^10.1.0",
3232
"@types/decompress": "^4.2.7",
3333
"@types/echarts": "^4.9.22",
3434
"@types/generate-json-webpack-plugin": "^0.3.7",
3535
"@types/jest": "^29.5.13",
36-
"@types/node": "^22.7.5",
36+
"@types/node": "^22.7.6",
3737
"@types/psl": "^1.1.3",
3838
"@types/punycode": "^2.1.4",
3939
"@types/webpack": "^5.28.5",
@@ -46,21 +46,21 @@
4646
"eslint": "^9.12.0",
4747
"filemanager-webpack-plugin": "^8.0.0",
4848
"generate-json-webpack-plugin": "^2.0.0",
49-
"html-webpack-plugin": "^5.6.0",
49+
"html-webpack-plugin": "^5.6.2",
5050
"jest": "^29.7.0",
5151
"jest-environment-jsdom": "^29.7.0",
5252
"mini-css-extract-plugin": "^2.9.1",
5353
"postcss": "^8.4.47",
5454
"postcss-loader": "^8.1.1",
5555
"postcss-rtlcss": "^5.5.0",
56-
"sass": "^1.79.5",
56+
"sass": "^1.80.2",
5757
"sass-loader": "^16.0.2",
5858
"style-loader": "^4.0.0",
5959
"ts-jest": "^29.2.5",
6060
"ts-loader": "^9.5.1",
6161
"ts-node": "^10.9.2",
6262
"tsconfig-paths": "^4.2.0",
63-
"tslib": "^2.7.0",
63+
"tslib": "^2.8.0",
6464
"typescript": "5.6.3",
6565
"url-loader": "^4.1.1",
6666
"webpack": "^5.95.0",

public/app.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

public/side.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

script/crowdin/client.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,12 @@ async function buildProjectTranslation(this: CrowdinClient, branchId: number) {
256256
skipUntranslatedStrings: true,
257257
})
258258
const buildId = buildRes?.data?.id
259-
const res = await this.crowdin.translationsApi.downloadTranslations(PROJECT_ID, buildId)
260-
return res?.data?.url
259+
while (true) {
260+
// Wait finished
261+
const res = await this.crowdin.translationsApi.downloadTranslations(PROJECT_ID, buildId)
262+
const url = res?.data?.url
263+
if (url) return url
264+
}
261265
}
262266

263267
/**

script/crowdin/common.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type ItemSet = {
1717
[path: string]: string
1818
}
1919

20-
export const ALL_CROWDIN_LANGUAGES = ['zh-TW', 'ja', 'pt-PT', 'uk', 'es-ES', 'de', 'fr', 'ru'] as const
20+
export const ALL_CROWDIN_LANGUAGES = ['zh-TW', 'ja', 'pt-PT', 'uk', 'es-ES', 'de', 'fr', 'ru', 'ar'] as const
2121

2222
/**
2323
* The language code of crowdin
@@ -38,6 +38,7 @@ export const ALL_TRANS_LOCALES: timer.Locale[] = [
3838
'de',
3939
'fr',
4040
'ru',
41+
'ar',
4142
]
4243

4344
const CROWDIN_I18N_MAP: Record<CrowdinLanguage, timer.Locale> = {
@@ -49,6 +50,7 @@ const CROWDIN_I18N_MAP: Record<CrowdinLanguage, timer.Locale> = {
4950
de: 'de',
5051
fr: 'fr',
5152
ru: 'ru',
53+
ar: 'ar',
5254
}
5355

5456
const I18N_CROWDIN_MAP: Record<timer.OptionalLocale, CrowdinLanguage> = {
@@ -60,6 +62,7 @@ const I18N_CROWDIN_MAP: Record<timer.OptionalLocale, CrowdinLanguage> = {
6062
de: 'de',
6163
fr: 'fr',
6264
ru: 'ru',
65+
ar: 'ar',
6366
}
6467

6568
export const crowdinLangOf = (locale: timer.Locale) => I18N_CROWDIN_MAP[locale]
@@ -143,7 +146,7 @@ export async function mergeMessage(
143146
const pathSeg = path.split('.')
144147
fillItem(pathSeg, 0, newMessage, text)
145148
})
146-
existMessages[locale] = newMessage
149+
Object.entries(newMessage).length && (existMessages[locale] = newMessage)
147150
})
148151

149152
const newFileContent = JSON.stringify(existMessages, null, 4)

src/app/Layout/menu/Side.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const _default = defineComponent(() => {
5151

5252
return () => (
5353
<div class="menu-container">
54-
<ElMenu defaultActive={currentActive.value}>
54+
<ElMenu defaultActive={currentActive.value} style={{ border: 'none' }}>
5555
{MENUS.map(menu => <ElMenuItemGroup title={t(menu.title)}>
5656
{menu.children.map(item => renderMenuLeaf(item, router, currentActive))}
5757
</ElMenuItemGroup>)}

src/app/Layout/style.sass

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
.el-aside
33
width: 240px
44
.el-menu
5+
height: 100%
6+
padding-top: 10px
57
padding-bottom: 10px
8+
.el-menu-item
9+
font-family: Roboto,San Francisco,Helvetica Neue,Helvetica,Arial,PingFangSC-Light,Hiragina Sans GB,WenQuanYi Micro Hei,microsoft yahei ui,microsoft yahei,sans-serif
10+
.el-icon
11+
font-size: 18px !important
12+
.el-menu-item.is-active
13+
background: var(--el-menu-item-active-bg-color)
614
.menu-container
715
min-height: 100vh
816
background-color: var(--el-menu-bg-color)

src/app/components/Analysis/components/AnalysisFilter.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
* https://opensource.org/licenses/MIT
66
*/
77

8-
import { ElOption, ElSelect, ElTag } from "element-plus"
9-
import { type PropType, watch, defineComponent } from "vue"
10-
import statService, { HostSet } from "@service/stat-service"
11-
import siteService from "@service/site-service"
12-
import { t } from "@app/locale"
138
import TimeFormatFilterItem from "@app/components/common/TimeFormatFilterItem"
14-
import { labelOfHostInfo } from "../util"
9+
import { t } from "@app/locale"
1510
import { useRequest, useState } from "@hooks"
11+
import siteService from "@service/site-service"
12+
import statService, { HostSet } from "@service/stat-service"
13+
import { ElOption, ElSelect, ElTag } from "element-plus"
14+
import { defineComponent, type PropType, watch } from "vue"
15+
import { labelOfHostInfo } from "../util"
1616

1717
const calcUniqueKey = ({ host, virtual, merged }: timer.site.SiteInfo) => `${host}${virtual ? 1 : 0}${merged ? 1 : 0}`
1818

@@ -81,9 +81,9 @@ const _default = defineComponent({
8181
setup(props, ctx) {
8282
const defaultSite: timer.site.SiteKey = props.site
8383
const [domainKey, setDomainKey] = useState(defaultSite ? calcKey(defaultSite) : '')
84-
const { data: trendDomainOptions, loading: trendSearching, refresh: searchRemote } = useRequest<string, timer.site.SiteInfo[]>(
84+
const { data: trendDomainOptions, loading: trendSearching, refresh: searchRemote } = useRequest<[string], timer.site.SiteInfo[]>(
8585
fetchDomain,
86-
{ defaultValue: defaultSite ? [defaultSite] : [], manual: true }
86+
{ defaultValue: defaultSite ? [defaultSite] : [], manual: true },
8787
)
8888
const [timeFormat, setTimeFormat] = useState(props.timeFormat)
8989
watch(domainKey, () => ctx.emit('siteChange', calcSite(domainKey.value)))

src/app/components/Dashboard/components/Calendar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const fetchData = async (): Promise<BizOption> => {
4242
}
4343

4444
const _default = defineComponent(() => {
45-
const { data } = useRequest<void, BizOption>(fetchData)
45+
const { data } = useRequest(fetchData)
4646
const { elRef } = useEcharts(Wrapper, data)
4747

4848
return () => (

src/app/components/Limit/LimitTable/column/LimitOperationColumn.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const LOCALE_WIDTH: { [locale in timer.Locale]: number } = {
5252
de: 250,
5353
fr: 230,
5454
ru: 240,
55+
ar: 220,
5556
}
5657

5758
const _default = defineComponent({

0 commit comments

Comments
 (0)