New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added English Version #188
base: main
Are you sure you want to change the base?
Conversation
I suggest you try to translate this file first: Finally, for t(""), you need to fill in the string in English, not Chinese, and the Chinese translation should be placed in For example: 登出 You should write: t('account.Log out'), and add translate json: client/public/locales/zh/common.json {
....
account: {
Log out: "登出"
}
...
} client/public/locales/en/common.json {
....
account: {
Log out: "Log out"
}
...
}
`` |
tried to translate this file: client/src/pages/account/index.tsx am I on the wrong path again? please confirm |
|
8d5ffaf
to
2556c19
Compare
yes.
I mean, you can try to modify the file: |
Hi @c121914yu , I did the required changes, please review it |
@@ -60,7 +60,7 @@ export const streamFetch = ({ | |||
}); | |||
} else { | |||
return reject({ | |||
message: errMsg || '响应过程出现异常~', | |||
message: errMsg || 'There is an exception in the response process~', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server error prompt can not be translated first, I think about the server error how to implement i18n
@@ -63,7 +65,7 @@ const APIKeyModal = ({ onClose }: { onClose: () => void }) => { | |||
API 秘钥管理 | |||
</Box> | |||
<Box fontSize={'sm'} color={'myGray.600'}> | |||
如果你不想 API 秘钥被滥用,请勿将秘钥直接放置在前端使用~ | |||
{t('如果你不想 API 秘钥被滥用,请勿将秘钥直接放置在前端使用~')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to write it in English.
Example: t('user.Open API Tips')
en: If you do not want the API key to be abused, do not place the key directly on the front end
zh: 如果你不想 API 秘钥被滥用,请勿将秘钥直接放置在前端使用~
@@ -16,7 +16,7 @@ const ContextModal = ({ | |||
<MyModal | |||
isOpen={true} | |||
onClose={onClose} | |||
title={`完整对话记录(${context.length}条)`} | |||
title={t(`full conversation log(${context.length}strip)`)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a translation with variables, you need to write:
t('chat.Full Context n strip', {length: context.length})
en.json:
"chat":{
"Full Context n strip": "Full context ({{length}}) strip"
}
zh.json
"chat":{
"Full Context n strip": "完整对话记录 ({{length}}) 条"
}
You need to pull the latest code and resolve conflicts first, and I recommend committing a small amount of code first. And I gave some code comment. There are too many modified files, it is not convenient for me to merge after correction, please submit fewer files for the first time. |
#160
Added English version