Support i18n of id

This commit is contained in:
Gucheng Wang
2023-03-19 19:56:56 +08:00
parent 5989c4ff34
commit 98f962f818
10 changed files with 932 additions and 6 deletions

View File

@ -133,6 +133,11 @@ class OAuthWidget extends React.Component {
}
}
let linkButtonWidth = "110px";
if (Setting.getLanguage() === "id") {
linkButtonWidth = "160px";
}
return (
<Row key={provider.name} style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={this.props.labelSpan}>
@ -165,10 +170,10 @@ class OAuthWidget extends React.Component {
{
linkedValue === "" ? (
<a key={provider.displayName} href={user.id !== account.id ? null : Provider.getAuthUrl(application, provider, "link")}>
<Button style={{marginLeft: "20px", width: "110px"}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
<Button style={{marginLeft: "20px", width: linkButtonWidth}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
</a>
) : (
<Button disabled={!providerItem.canUnlink && !account.isGlobalAdmin} style={{marginLeft: "20px", width: "110px"}} onClick={() => this.unlinkUser(provider.type)}>{i18next.t("user:Unlink")}</Button>
<Button disabled={!providerItem.canUnlink && !account.isGlobalAdmin} style={{marginLeft: "20px", width: linkButtonWidth}} onClick={() => this.unlinkUser(provider.type)}>{i18next.t("user:Unlink")}</Button>
)
}
</Col>