refactor: update UI text and error messages to English for better accessibility

This commit is contained in:
Laisky.Cai
2025-01-19 12:59:58 +00:00
parent 76ba80d406
commit 13b1b165bd
62 changed files with 805 additions and 805 deletions

View File

@@ -173,7 +173,7 @@ func testChannels(notify bool, scope string) error {
testAllChannelsLock.Lock()
if testAllChannelsRunning {
testAllChannelsLock.Unlock()
return errors.New("测试已在运行中")
return errors.New("Test is already running")
}
testAllChannelsRunning = true
testAllChannelsLock.Unlock()
@@ -194,11 +194,11 @@ func testChannels(notify bool, scope string) error {
tok := time.Now()
milliseconds := tok.Sub(tik).Milliseconds()
if isChannelEnabled && milliseconds > disableThreshold {
err = fmt.Errorf("响应时间 %.2fs 超过阈值 %.2fs", float64(milliseconds)/1000.0, float64(disableThreshold)/1000.0)
err = fmt.Errorf("Response time %.2fs exceeds threshold %.2fs", float64(milliseconds)/1000.0, float64(disableThreshold)/1000.0)
if config.AutomaticDisableChannelEnabled {
monitor.DisableChannel(channel.Id, channel.Name, err.Error())
} else {
_ = message.Notify(message.ByAll, fmt.Sprintf("渠道 %s %d测试超时", channel.Name, channel.Id), "", err.Error())
_ = message.Notify(message.ByAll, fmt.Sprintf("Channel %s %dTest超时", channel.Name, channel.Id), "", err.Error())
}
}
if isChannelEnabled && monitor.ShouldDisableChannel(openaiErr, -1) {
@@ -214,7 +214,7 @@ func testChannels(notify bool, scope string) error {
testAllChannelsRunning = false
testAllChannelsLock.Unlock()
if notify {
err := message.Notify(message.ByAll, "渠道测试完成", "", "渠道测试完成,如果没有收到禁用通知,说明所有渠道都正常")
err := message.Notify(message.ByAll, "Channel test completed", "", "Channel test completed, if you have not received the disable notification, it means that all channels are normal")
if err != nil {
logger.SysError(fmt.Sprintf("failed to send email: %s", err.Error()))
}