Skip to content
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

#24 #39

Merged
merged 8 commits into from
Dec 2, 2020
Merged

#24 #39

merged 8 commits into from
Dec 2, 2020

Conversation

nuo-promise
Copy link
Contributor

international complete

Copy link
Member

@dengliming dengliming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! Thanks.

Comment on lines +237 to +262
if (this.props.menuData.length > 0) {
for ( let i = 0 ; i < this.props.menuData.length; i+=1) {
if(this.props.menuData[i].path === '/plug') {
this.props.menuData[i].name = getIntlContent("SOUL.MENU.PLUGIN.LIST");
} else if(this.props.menuData[i].path === '/system'){
this.props.menuData[i].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT");
if(this.props.menuData[i].children.length > 0) {
for(let j = 0; j < this.props.menuData[i].children.length; j+=1) {
const childrenPath = this.props.menuData[i].children[j].path;
if(childrenPath === '/system/manage') {
this.props.menuData[i].children[j].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT.USER");
} else if(childrenPath === '/system/plugin') {
this.props.menuData[i].children[j].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT.PLUGIN");
} else if(childrenPath === '/system/auth') {
this.props.menuData[i].children[j].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT.AUTHEN");
} else if(childrenPath === '/system/metadata') {
this.props.menuData[i].children[j].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT.METADATA");
} else if(childrenPath === '/system/dict') {
this.props.menuData[i].children[j].name = getIntlContent("SOUL.MENU.SYSTEM.MANAGMENT.DICTIONARY");
}
}
}
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

个人建议这个地方可以下次优化下,看看能否菜单数据里面加多个属性标识不用通过path判断,通过标识去拼接一些前缀去获取国际化配置好点,这样不用每加一个菜单这里加多个判断

@nuo-promise
Copy link
Contributor Author

nuo-promise commented Dec 2, 2020 via email

@dengliming dengliming linked an issue Dec 2, 2020 that may be closed by this pull request
@dengliming dengliming merged commit 848b18d into apache:master Dec 2, 2020
@nuo-promise nuo-promise deleted the #24 branch December 2, 2020 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

页面支持国际化
2 participants