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
@@ -3,8 +3,6 @@ import "./add-role-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 { Notifications } from "../notifications";
|
||||
@@ -51,7 +49,7 @@ export class AddRoleDialog extends React.Component<Props> {
|
||||
|
||||
render() {
|
||||
const { ...dialogProps } = this.props;
|
||||
const header = <h5><Trans>Create Role</Trans></h5>;
|
||||
const header = <h5>Create Role</h5>;
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
@@ -63,12 +61,12 @@ export class AddRoleDialog extends React.Component<Props> {
|
||||
<Wizard header={header} done={this.close}>
|
||||
<WizardStep
|
||||
contentClass="flex gaps column"
|
||||
nextLabel={<Trans>Create</Trans>}
|
||||
nextLabel="Create"
|
||||
next={this.createRole}
|
||||
>
|
||||
<Input
|
||||
required autoFocus
|
||||
placeholder={_i18n._(t`Role name`)}
|
||||
placeholder={`Role name`}
|
||||
iconLeft="supervisor_account"
|
||||
value={this.roleName}
|
||||
onChange={v => this.roleName = v}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import "./role-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { DrawerTitle } from "../drawer";
|
||||
import { KubeEventDetails } from "../+events/kube-event-details";
|
||||
import { observer } from "mobx-react";
|
||||
@@ -25,25 +24,25 @@ export class RoleDetails extends React.Component<Props> {
|
||||
<div className="RoleDetails">
|
||||
<KubeObjectMeta object={role}/>
|
||||
|
||||
<DrawerTitle title={<Trans>Rules</Trans>}/>
|
||||
<DrawerTitle title="Rules"/>
|
||||
{rules.map(({ resourceNames, apiGroups, resources, verbs }, index) => {
|
||||
return (
|
||||
<div className="rule" key={index}>
|
||||
{resources && (
|
||||
<>
|
||||
<div className="name"><Trans>Resources</Trans></div>
|
||||
<div className="name">Resources</div>
|
||||
<div className="value">{resources.join(", ")}</div>
|
||||
</>
|
||||
)}
|
||||
{verbs && (
|
||||
<>
|
||||
<div className="name"><Trans>Verbs</Trans></div>
|
||||
<div className="name">Verbs</div>
|
||||
<div className="value">{verbs.join(", ")}</div>
|
||||
</>
|
||||
)}
|
||||
{apiGroups && (
|
||||
<>
|
||||
<div className="name"><Trans>Api Groups</Trans></div>
|
||||
<div className="name">Api Groups</div>
|
||||
<div className="value">
|
||||
{apiGroups
|
||||
.map(apiGroup => apiGroup === "" ? `'${apiGroup}'` : apiGroup)
|
||||
@@ -54,7 +53,7 @@ export class RoleDetails extends React.Component<Props> {
|
||||
)}
|
||||
{resourceNames && (
|
||||
<>
|
||||
<div className="name"><Trans>Resource Names</Trans></div>
|
||||
<div className="name">Resource Names</div>
|
||||
<div className="value">{resourceNames.join(", ")}</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -2,7 +2,6 @@ import "./roles.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { IRolesRouteParams } from "../+user-management/user-management.route";
|
||||
import { rolesStore } from "./roles.store";
|
||||
@@ -36,12 +35,12 @@ export class Roles extends React.Component<Props> {
|
||||
searchFilters={[
|
||||
(role: Role) => role.getSearchFields(),
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Roles</Trans>}
|
||||
renderHeaderTitle="Roles"
|
||||
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={(role: Role) => [
|
||||
role.getName(),
|
||||
@@ -51,7 +50,7 @@ export class Roles extends React.Component<Props> {
|
||||
]}
|
||||
addRemoveButtons={{
|
||||
onAdd: () => AddRoleDialog.open(),
|
||||
addTooltip: <Trans>Create new Role</Trans>,
|
||||
addTooltip: "Create new Role",
|
||||
}}
|
||||
/>
|
||||
<AddRoleDialog/>
|
||||
|
||||
Reference in new issue
Block a user