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:
Jari Kolehmainen authored and GitHub committed 2020-12-29 14:53:34 +02:00
1 parent 050603a7b3
commit a03da3c572
163 files changed
+1140 -12003

No files matched your search

@@ -3,8 +3,6 @@ import "./add-quota-dialog.scss";
import React from "react";
import { computed, 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 { Input } from "../input";
@@ -129,7 +127,7 @@ export class AddQuotaDialog extends React.Component<Props> {
render() {
const { ...dialogProps } = this.props;
const header = <h5><Trans>Create ResourceQuota</Trans></h5>;
const header = <h5>Create ResourceQuota</h5>;
return (
<Dialog
@@ -142,41 +140,41 @@ export class AddQuotaDialog extends React.Component<Props> {
<WizardStep
contentClass="flex gaps column"
disabledNext={!this.namespace}
nextLabel={<Trans>Create</Trans>}
nextLabel="Create"
next={this.addQuota}
>
<div className="flex gaps">
<Input
required autoFocus
placeholder={_i18n._(t`ResourceQuota name`)}
placeholder={`ResourceQuota name`}
validators={systemName}
value={this.quotaName} onChange={v => this.quotaName = v.toLowerCase()}
className="box grow"
/>
</div>
<SubTitle title={<Trans>Namespace</Trans>} />
<SubTitle title="Namespace" />
<NamespaceSelect
value={this.namespace}
placeholder={_i18n._(t`Namespace`)}
placeholder={`Namespace`}
themeName="light"
className="box grow"
onChange={({ value }) => this.namespace = value}
/>
<SubTitle title={<Trans>Values</Trans>} />
<SubTitle title="Values" />
<div className="flex gaps align-center">
<Select
className="quota-select"
themeName="light"
placeholder={_i18n._(t`Select a quota..`)}
placeholder={`Select a quota..`}
options={this.quotaOptions}
value={this.quotaSelectValue}
onChange={({ value }) => this.quotaSelectValue = value}
/>
<Input
maxLength={10}
placeholder={_i18n._(t`Value`)}
placeholder={`Value`}
value={this.quotaInputValue}
onChange={v => this.quotaInputValue = v}
onKeyDown={this.onInputQuota}
@@ -185,7 +183,7 @@ export class AddQuotaDialog extends React.Component<Props> {
<Button round primary onClick={this.setQuota}>
<Icon
material={this.quotas[this.quotaSelectValue] ? "edit" : "add"}
tooltip={_i18n._(t`Set quota`)}
tooltip={`Set quota`}
/>
</Button>
</div>
@@ -2,7 +2,6 @@ import "./resource-quota-details.scss";
import React from "react";
import kebabCase from "lodash/kebabCase";
import { observer } from "mobx-react";
import { Trans } from "@lingui/macro";
import { DrawerItem, DrawerTitle } from "../drawer";
import { cpuUnitsToNumber, cssNames, unitsToBytes, metricUnitsToNumber } from "../../utils";
import { KubeObjectDetailsProps } from "../kube-object";
@@ -45,7 +44,7 @@ function renderQuotas(quota: ResourceQuota): JSX.Element[] {
max={max}
value={current}
tooltip={
<p><Trans>Set</Trans>: {value}. <Trans>Usage</Trans>: {`${usage}%`}</p>
<p>Set: {value}. Usage: {`${usage}%`}</p>
}
/>
</div>
@@ -64,18 +63,18 @@ export class ResourceQuotaDetails extends React.Component<Props> {
<div className="ResourceQuotaDetails">
<KubeObjectMeta object={quota}/>
<DrawerItem name={<Trans>Quotas</Trans>} className="quota-list">
<DrawerItem name="Quotas" className="quota-list">
{renderQuotas(quota)}
</DrawerItem>
{quota.getScopeSelector().length > 0 && (
<>
<DrawerTitle title={<Trans>Scope Selector</Trans>}/>
<DrawerTitle title="Scope Selector"/>
<Table className="paths">
<TableHead>
<TableCell><Trans>Operator</Trans></TableCell>
<TableCell><Trans>Scope name</Trans></TableCell>
<TableCell><Trans>Values</Trans></TableCell>
<TableCell>Operator</TableCell>
<TableCell>Scope name</TableCell>
<TableCell>Values</TableCell>
</TableHead>
{
quota.getScopeSelector().map((selector, index) => {
@@ -2,7 +2,6 @@ import "./resource-quotas.scss";
import React from "react";
import { observer } from "mobx-react";
import { Trans } from "@lingui/macro";
import { RouteComponentProps } from "react-router";
import { KubeObjectListLayout } from "../kube-object";
import { ResourceQuota } from "../../api/endpoints/resource-quota.api";
@@ -36,12 +35,12 @@ export class ResourceQuotas extends React.Component<Props> {
(item: ResourceQuota) => item.getSearchFields(),
(item: ResourceQuota) => item.getName(),
]}
renderHeaderTitle={<Trans>Resource Quotas</Trans>}
renderHeaderTitle="Resource Quotas"
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={(resourceQuota: ResourceQuota) => [
resourceQuota.getName(),
@@ -51,7 +50,7 @@ export class ResourceQuotas extends React.Component<Props> {
]}
addRemoveButtons={{
onAdd: () => AddQuotaDialog.open(),
addTooltip: <Trans>Create new ResourceQuota</Trans>
addTooltip: "Create new ResourceQuota"
}}
/>
<AddQuotaDialog/>