-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: i18n #4162
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
fix: i18n #4162
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,11 @@ export default { | |
| serialNo: '序列号', | ||
| remark: '备注', | ||
| update: '更新', | ||
| authorize: '授权给' | ||
| authorize: '授权给', | ||
| inner_admin: '系统管理员', | ||
| inner_wsm: '工作空间管理员', | ||
| inner_user: '普通用户', | ||
|
|
||
| }, | ||
| time: { | ||
| daysLater: '天后', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your code is mostly structured correctly, but there are a few minor improvements and optimizations that could be considered:
By applying these small adjustments, the code will remain concise and readable while maintaining its intended functionality. |
||
|
|
||
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 code has several potential issues and areas for improvement:
Computed Property Efficiency: The
role_listcomputation does not memoize its result, which can lead to unnecessary re-renders whenuser.userInfo.role_namechanges. Consider usingwatchEffectaround the creation ofmif it needs to be recalculated based onuser.userInfo.Template Reference Usage: There is a commented-out line referencing
UserPwdDialog, but it seems unrelated to the current context. Remove this reference or add appropriate logic.Language Translation Import: Use
tfunction correctly within templates. Ensure that the locale files (en.json, etc.) contain the keys specified inm.Code Duplication: Check for any duplicate code or redundant calls, especially related to API key dialog opening.
Here’s an improved version with some of these considerations:
Key Changes:
computedproperty more efficiently.tfunction.