mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove lingui (#1874)
* remove lingui Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * babelless Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * tweak ts-loader options Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * tweak renderer webpack config Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
050603a7b3
commit
a03da3c572
163 files changed
+1140
-12003
No files matched your search
+6
-8
@@ -3,8 +3,6 @@ import "./create-service-account-dialog.scss";
|
||||
import React from "react";
|
||||
import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { t, Trans } from "@lingui/macro";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { Dialog, DialogProps } from "../dialog";
|
||||
import { Wizard, WizardStep } from "../wizard";
|
||||
import { SubTitle } from "../layout/sub-title";
|
||||
@@ -54,7 +52,7 @@ export class CreateServiceAccountDialog extends React.Component<Props> {
|
||||
render() {
|
||||
const { ...dialogProps } = this.props;
|
||||
const { name, namespace } = this;
|
||||
const header = <h5><Trans>Create Service Account</Trans></h5>;
|
||||
const header = <h5>Create Service Account</h5>;
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
@@ -64,15 +62,15 @@ export class CreateServiceAccountDialog extends React.Component<Props> {
|
||||
close={this.close}
|
||||
>
|
||||
<Wizard header={header} done={this.close}>
|
||||
<WizardStep nextLabel={<Trans>Create</Trans>} next={this.createAccount}>
|
||||
<SubTitle title={<Trans>Account Name</Trans>} />
|
||||
<WizardStep nextLabel="Create" next={this.createAccount}>
|
||||
<SubTitle title="Account Name" />
|
||||
<Input
|
||||
autoFocus required
|
||||
placeholder={_i18n._(t`Enter a name`)}
|
||||
placeholder={`Enter a name`}
|
||||
validators={systemName}
|
||||
value={name} onChange={v => this.name = v.toLowerCase()}
|
||||
/>
|
||||
<SubTitle title={<Trans>Namespace</Trans>} />
|
||||
<SubTitle title="Namespace" />
|
||||
<NamespaceSelect
|
||||
themeName="light"
|
||||
value={namespace}
|
||||
@@ -83,4 +81,4 @@ export class CreateServiceAccountDialog extends React.Component<Props> {
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -2,7 +2,6 @@ import "./service-accounts-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { autorun, observable } from "mobx";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Spinner } from "../spinner";
|
||||
import { ServiceAccountsSecret } from "./service-accounts-secret";
|
||||
import { DrawerItem, DrawerTitle } from "../drawer";
|
||||
@@ -76,7 +75,7 @@ export class ServiceAccountsDetails extends React.Component<Props> {
|
||||
{secret.getName()}
|
||||
<Icon
|
||||
small material="warning"
|
||||
tooltip={<Trans>Secret is not found</Trans>}
|
||||
tooltip="Secret is not found"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -120,17 +119,17 @@ export class ServiceAccountsDetails extends React.Component<Props> {
|
||||
<KubeObjectMeta object={serviceAccount}/>
|
||||
|
||||
{tokens.length > 0 &&
|
||||
<DrawerItem name={<Trans>Tokens</Trans>} className="links">
|
||||
<DrawerItem name="Tokens" className="links">
|
||||
{this.renderSecretLinks(tokens)}
|
||||
</DrawerItem>
|
||||
}
|
||||
{imagePullSecrets.length > 0 &&
|
||||
<DrawerItem name={<Trans>ImagePullSecrets</Trans>} className="links">
|
||||
<DrawerItem name="ImagePullSecrets" className="links">
|
||||
{this.renderImagePullSecrets()}
|
||||
</DrawerItem>
|
||||
}
|
||||
|
||||
<DrawerTitle title={<Trans>Mountable secrets</Trans>}/>
|
||||
<DrawerTitle title="Mountable secrets"/>
|
||||
<div className="secrets">
|
||||
{this.renderSecrets()}
|
||||
</div>
|
||||
|
||||
+6
-7
@@ -2,7 +2,6 @@ import "./service-accounts-secret.scss";
|
||||
|
||||
import React from "react";
|
||||
import moment from "moment";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Icon } from "../icon";
|
||||
import { Secret } from "../../api/endpoints/secret.api";
|
||||
import { prevDefault } from "../../utils";
|
||||
@@ -31,7 +30,7 @@ export class ServiceAccountsSecret extends React.Component<Props, State> {
|
||||
<span className="asterisks">{Array(16).fill("•").join("")}</span>
|
||||
<Icon
|
||||
small material="lock_open"
|
||||
tooltip={<Trans>Show value</Trans>}
|
||||
tooltip="Show value"
|
||||
onClick={prevDefault(() => this.setState({ showToken: true }))}
|
||||
/>
|
||||
</>
|
||||
@@ -49,24 +48,24 @@ export class ServiceAccountsSecret extends React.Component<Props, State> {
|
||||
return (
|
||||
<div className="ServiceAccountsSecret box grow-fixed">
|
||||
<div className="secret-row">
|
||||
<span className="name"><Trans>Name</Trans>: </span>
|
||||
<span className="name">Name: </span>
|
||||
<span className="value">{name}</span>
|
||||
</div>
|
||||
<div className="secret-row">
|
||||
<span className="name"><Trans>Value</Trans>: </span>
|
||||
<span className="name">Value: </span>
|
||||
<span className="value flex align-center">{this.renderSecretValue()}</span>
|
||||
</div>
|
||||
<div className="secret-row">
|
||||
<span className="name"><Trans>Created at</Trans>: </span>
|
||||
<span className="name">Created at: </span>
|
||||
<span className="value" title={creationTimestamp}>
|
||||
{moment(creationTimestamp).format("LLL")}
|
||||
</span>
|
||||
</div>
|
||||
<div className="secret-row">
|
||||
<span className="name"><Trans>Type</Trans>: </span>
|
||||
<span className="name">Type: </span>
|
||||
<span className="value">{type}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import "./service-accounts.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { ServiceAccount } from "../../api/endpoints/service-accounts.api";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
||||
@@ -40,12 +39,12 @@ export class ServiceAccounts extends React.Component<Props> {
|
||||
searchFilters={[
|
||||
(account: ServiceAccount) => account.getSearchFields(),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Service Accounts</Trans>}
|
||||
renderHeaderTitle="Service Accounts"
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Namespace</Trans>, className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(account: ServiceAccount) => [
|
||||
account.getName(),
|
||||
@@ -58,7 +57,7 @@ export class ServiceAccounts extends React.Component<Props> {
|
||||
}}
|
||||
addRemoveButtons={{
|
||||
onAdd: () => CreateServiceAccountDialog.open(),
|
||||
addTooltip: <Trans>Create new Service Account</Trans>,
|
||||
addTooltip: "Create new Service Account",
|
||||
}}
|
||||
/>
|
||||
<CreateServiceAccountDialog/>
|
||||
@@ -73,7 +72,7 @@ function ServiceAccountMenu(props: KubeObjectMenuProps<ServiceAccount>) {
|
||||
return (
|
||||
<MenuItem onClick={() => openServiceAccountKubeConfig(object)}>
|
||||
<Icon material="insert_drive_file" title="Kubeconfig File" interactive={toolbar}/>
|
||||
<span className="title"><Trans>Kubeconfig</Trans></span>
|
||||
<span className="title">Kubeconfig</span>
|
||||
</MenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user