fix: add "sure to delete" to i18n (#1627)

* add "Sure to delete" to i18n(#1569)

* fix: add sure to delete to i18n
This commit is contained in:
陈温鹏
2023-03-07 22:38:48 +08:00
committed by GitHub
parent ff4af6bb4e
commit 7c4a6fea02
27 changed files with 27 additions and 18 deletions

View File

@@ -205,7 +205,7 @@ class AdapterListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/adapters/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/adapters/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete adapter: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteAdapter(index)} onConfirm={() => this.deleteAdapter(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -233,7 +233,7 @@ class ApplicationListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/applications/${record.organization}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/applications/${record.organization}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete application: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteApplication(index)} onConfirm={() => this.deleteApplication(index)}
disabled={record.name === "app-built-in"} disabled={record.name === "app-built-in"}
> >

View File

@@ -169,7 +169,7 @@ class CertListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/certs/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/certs/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete cert: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteCert(index)} onConfirm={() => this.deleteCert(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -140,7 +140,7 @@ class LdapListPage extends React.Component {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}}
onClick={() => Setting.goToLink(`/ldap/${record.id}`)}>{i18next.t("general:Edit")}</Button> onClick={() => Setting.goToLink(`/ldap/${record.id}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete LDAP Config: ${record.serverName} ?`} title={i18next.t("general:Sure to delete") + `: ${record.serverName} ?`}
onConfirm={() => this.deleteLdap(index)} onConfirm={() => this.deleteLdap(index)}
> >
<Button style={{marginBottom: "10px"}} <Button style={{marginBottom: "10px"}}

View File

@@ -158,7 +158,7 @@ class LdapTable extends React.Component {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}}
onClick={() => Setting.goToLink(`/ldap/${record.id}`)}>{i18next.t("general:Edit")}</Button> onClick={() => Setting.goToLink(`/ldap/${record.id}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete LDAP Config: ${record.serverName} ?`} title={i18next.t("general:Sure to delete") + `: ${record.serverName} ?`}
onConfirm={() => this.deleteRow(table, index)} onConfirm={() => this.deleteRow(table, index)}
> >
<Button style={{marginBottom: "10px"}} <Button style={{marginBottom: "10px"}}

View File

@@ -143,7 +143,7 @@ class ModelListPage extends BaseListPage {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary"
onClick={() => this.props.history.push(`/models/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> onClick={() => this.props.history.push(`/models/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete model: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteModel(index)} onConfirm={() => this.deleteModel(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -227,7 +227,7 @@ class OrganizationListPage extends BaseListPage {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/organizations/${record.name}/users`)}>{i18next.t("general:Users")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/organizations/${record.name}/users`)}>{i18next.t("general:Users")}</Button>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/organizations/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/organizations/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete organization: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteOrganization(index)} onConfirm={() => this.deleteOrganization(index)}
disabled={record.name === "built-in"} disabled={record.name === "built-in"}
> >

View File

@@ -223,7 +223,7 @@ class PaymentListPage extends BaseListPage {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/payments/${record.name}/result`)}>{i18next.t("payment:Result")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/payments/${record.name}/result`)}>{i18next.t("payment:Result")}</Button>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/payments/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/payments/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete payment: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deletePayment(index)} onConfirm={() => this.deletePayment(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -301,7 +301,7 @@ class PermissionListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/permissions/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/permissions/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete permission: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deletePermission(index)} onConfirm={() => this.deletePermission(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -240,7 +240,7 @@ class ProductListPage extends BaseListPage {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/products/${record.name}/buy`)}>{i18next.t("product:Buy")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/products/${record.name}/buy`)}>{i18next.t("product:Buy")}</Button>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/products/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/products/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete product: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteProduct(index)} onConfirm={() => this.deleteProduct(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -207,7 +207,7 @@ class ProviderListPage extends BaseListPage {
<div> <div>
<Button disabled={!Setting.isAdminUser(this.props.account) && (record.owner !== this.props.account.owner)} style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/providers/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button disabled={!Setting.isAdminUser(this.props.account) && (record.owner !== this.props.account.owner)} style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/providers/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete provider: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteProvider(index)} onConfirm={() => this.deleteProvider(index)}
> >
<Button disabled={!Setting.isAdminUser(this.props.account) && (record.owner !== this.props.account.owner)} style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button disabled={!Setting.isAdminUser(this.props.account) && (record.owner !== this.props.account.owner)} style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -246,7 +246,7 @@ class ResourceListPage extends BaseListPage {
<div> <div>
{/* <Button style={{marginTop: '10px', marginBottom: '10px', marginRight: '10px'}} type="primary" onClick={() => this.props.history.push(`/resources/${record.name}`)}>{i18next.t("general:Edit")}</Button>*/} {/* <Button style={{marginTop: '10px', marginBottom: '10px', marginRight: '10px'}} type="primary" onClick={() => this.props.history.push(`/resources/${record.name}`)}>{i18next.t("general:Edit")}</Button>*/}
<Popconfirm <Popconfirm
title={`Sure to delete resource: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteResource(index)} onConfirm={() => this.deleteResource(index)}
okText={i18next.t("user:OK")} okText={i18next.t("user:OK")}
cancelText={i18next.t("user:Cancel")} cancelText={i18next.t("user:Cancel")}

View File

@@ -176,7 +176,7 @@ class RoleListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/roles/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/roles/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete role: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteRole(index)} onConfirm={() => this.deleteRole(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -98,7 +98,7 @@ class SessionListPage extends BaseListPage {
return ( return (
<div> <div>
<Popconfirm <Popconfirm
title={`Sure to delete session: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteSession(index)} onConfirm={() => this.deleteSession(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -233,7 +233,7 @@ class SyncerListPage extends BaseListPage {
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.runSyncer(index)}>{i18next.t("general:Sync")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.runSyncer(index)}>{i18next.t("general:Sync")}</Button>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/syncers/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} onClick={() => this.props.history.push(`/syncers/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete syncer: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteSyncer(index)} onConfirm={() => this.deleteSyncer(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -202,7 +202,7 @@ class TokenListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/tokens/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/tokens/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete token: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteToken(index)} onConfirm={() => this.deleteToken(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -342,7 +342,7 @@ class UserListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/users/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/users/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete user: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteUser(index)} onConfirm={() => this.deleteUser(index)}
disabled={disabled} disabled={disabled}
> >

View File

@@ -198,7 +198,7 @@ class WebhookListPage extends BaseListPage {
<div> <div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/webhooks/${record.name}`)}>{i18next.t("general:Edit")}</Button> <Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/webhooks/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Popconfirm <Popconfirm
title={`Sure to delete webhook: ${record.name} ?`} title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteWebhook(index)} onConfirm={() => this.deleteWebhook(index)}
> >
<Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button> <Button style={{marginBottom: "10px"}} type="primary" danger>{i18next.t("general:Delete")}</Button>

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Syncers", "Syncers": "Syncers",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Syncers", "Syncers": "Syncers",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sincronizador", "Sync": "Sincronizador",
"Syncers": "Sincronizadores", "Syncers": "Sincronizadores",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Synchronisateurs", "Syncers": "Synchronisateurs",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Syncers", "Syncers": "Syncers",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Syncers", "Syncers": "Syncers",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Синхронизаторы", "Syncers": "Синхронизаторы",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "Successfully saved", "Successfully saved": "Successfully saved",
"Supported country codes": "Supported country codes", "Supported country codes": "Supported country codes",
"Supported country codes - Tooltip": "Supported country codes - Tooltip", "Supported country codes - Tooltip": "Supported country codes - Tooltip",
"Sure to delete": "Sure to delete",
"Swagger": "Swagger", "Swagger": "Swagger",
"Sync": "Sync", "Sync": "Sync",
"Syncers": "Syncers", "Syncers": "Syncers",

View File

@@ -254,6 +254,7 @@
"Successfully saved": "保存成功", "Successfully saved": "保存成功",
"Supported country codes": "支持的国家代码", "Supported country codes": "支持的国家代码",
"Supported country codes - Tooltip": "支持发送短信的国家 - Tooltip", "Supported country codes - Tooltip": "支持发送短信的国家 - Tooltip",
"Sure to delete": "确定删除",
"Swagger": "API文档", "Swagger": "API文档",
"Sync": "同步", "Sync": "同步",
"Syncers": "同步器", "Syncers": "同步器",