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
@@ -1,7 +1,6 @@
|
||||
import "./crd-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Link } from "react-router-dom";
|
||||
import { observer } from "mobx-react";
|
||||
import { CustomResourceDefinition } from "../../api/endpoints/crd.api";
|
||||
@@ -32,24 +31,24 @@ export class CRDDetails extends React.Component<Props> {
|
||||
<div className="CRDDetails">
|
||||
<KubeObjectMeta object={crd}/>
|
||||
|
||||
<DrawerItem name={<Trans>Group</Trans>}>
|
||||
<DrawerItem name="Group">
|
||||
{crd.getGroup()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Version</Trans>}>
|
||||
<DrawerItem name="Version">
|
||||
{crd.getVersion()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Stored versions</Trans>}>
|
||||
<DrawerItem name="Stored versions">
|
||||
{crd.getStoredVersions()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Scope</Trans>}>
|
||||
<DrawerItem name="Scope">
|
||||
{crd.getScope()}
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Resource</Trans>}>
|
||||
<DrawerItem name="Resource">
|
||||
<Link to={crd.getResourceUrl()}>
|
||||
{crd.getResourceTitle()}
|
||||
</Link>
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Conversion</Trans>} className="flex gaps align-flex-start">
|
||||
<DrawerItem name="Conversion" className="flex gaps align-flex-start">
|
||||
<Input
|
||||
multiLine
|
||||
theme="round-black"
|
||||
@@ -58,7 +57,7 @@ export class CRDDetails extends React.Component<Props> {
|
||||
readOnly
|
||||
/>
|
||||
</DrawerItem>
|
||||
<DrawerItem name={<Trans>Conditions</Trans>} className="conditions" labelsOnly>
|
||||
<DrawerItem name="Conditions" className="conditions" labelsOnly>
|
||||
{
|
||||
crd.getConditions().map(condition => {
|
||||
const { type, message, lastTransitionTime, status } = condition;
|
||||
@@ -71,7 +70,7 @@ export class CRDDetails extends React.Component<Props> {
|
||||
tooltip={(
|
||||
<>
|
||||
<p>{message}</p>
|
||||
<p><Trans>Last transition time: {lastTransitionTime}</Trans></p>
|
||||
<p>Last transition time: {lastTransitionTime}</p>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
@@ -79,13 +78,13 @@ export class CRDDetails extends React.Component<Props> {
|
||||
})
|
||||
}
|
||||
</DrawerItem>
|
||||
<DrawerTitle title={<Trans>Names</Trans>}/>
|
||||
<DrawerTitle title="Names"/>
|
||||
<Table selectable className="names box grow">
|
||||
<TableHead>
|
||||
<TableCell><Trans>plural</Trans></TableCell>
|
||||
<TableCell><Trans>singular</Trans></TableCell>
|
||||
<TableCell><Trans>kind</Trans></TableCell>
|
||||
<TableCell><Trans>listKind</Trans></TableCell>
|
||||
<TableCell>plural</TableCell>
|
||||
<TableCell>singular</TableCell>
|
||||
<TableCell>kind</TableCell>
|
||||
<TableCell>listKind</TableCell>
|
||||
</TableHead>
|
||||
<TableRow>
|
||||
<TableCell>{plural}</TableCell>
|
||||
@@ -96,12 +95,12 @@ export class CRDDetails extends React.Component<Props> {
|
||||
</Table>
|
||||
{printerColumns.length > 0 &&
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Additional Printer Columns</Trans>}/>
|
||||
<DrawerTitle title="Additional Printer Columns"/>
|
||||
<Table selectable className="printer-columns box grow">
|
||||
<TableHead>
|
||||
<TableCell className="name"><Trans>Name</Trans></TableCell>
|
||||
<TableCell className="type"><Trans>Type</Trans></TableCell>
|
||||
<TableCell className="json-path"><Trans>JSON Path</Trans></TableCell>
|
||||
<TableCell className="name">Name</TableCell>
|
||||
<TableCell className="type">Type</TableCell>
|
||||
<TableCell className="json-path">JSON Path</TableCell>
|
||||
</TableHead>
|
||||
{
|
||||
printerColumns.map((column, index) => {
|
||||
@@ -123,7 +122,7 @@ export class CRDDetails extends React.Component<Props> {
|
||||
}
|
||||
{validation &&
|
||||
<>
|
||||
<DrawerTitle title={<Trans>Validation</Trans>}/>
|
||||
<DrawerTitle title="Validation"/>
|
||||
<AceEditor
|
||||
mode="json"
|
||||
className="validation"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import "./crd-list.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { computed } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { Link } from "react-router-dom";
|
||||
@@ -66,12 +65,12 @@ export class CrdList extends React.Component {
|
||||
return selectedGroups.length ? items.filter(item => selectedGroups.includes(item.getGroup())) : items;
|
||||
}
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Custom Resources</Trans>}
|
||||
renderHeaderTitle="Custom Resources"
|
||||
customizeHeader={() => {
|
||||
let placeholder = <Trans>All groups</Trans>;
|
||||
let placeholder = <>All groups</>;
|
||||
|
||||
if (selectedGroups.length == 1) placeholder = <><Trans>Group</Trans>: {selectedGroups[0]}</>;
|
||||
if (selectedGroups.length >= 2) placeholder = <><Trans>Groups</Trans>: {selectedGroups.join(", ")}</>;
|
||||
if (selectedGroups.length == 1) placeholder = <>Group: {selectedGroups[0]}</>;
|
||||
if (selectedGroups.length >= 2) placeholder = <>Groups: {selectedGroups.join(", ")}</>;
|
||||
|
||||
return {
|
||||
// todo: move to global filters
|
||||
@@ -98,11 +97,11 @@ export class CrdList extends React.Component {
|
||||
};
|
||||
}}
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Resource</Trans>, className: "kind", sortBy: sortBy.kind },
|
||||
{ title: <Trans>Group</Trans>, className: "group", sortBy: sortBy.group },
|
||||
{ title: <Trans>Version</Trans>, className: "version", sortBy: sortBy.group },
|
||||
{ title: <Trans>Scope</Trans>, className: "scope", sortBy: sortBy.scope },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Resource", className: "kind", sortBy: sortBy.kind },
|
||||
{ title: "Group", className: "group", sortBy: sortBy.group },
|
||||
{ title: "Version", className: "version", sortBy: sortBy.group },
|
||||
{ title: "Scope", className: "scope", sortBy: sortBy.scope },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(crd: CustomResourceDefinition) => [
|
||||
<Link key="link" to={crd.getResourceUrl()} onClick={stopPropagation}>
|
||||
|
||||
@@ -2,7 +2,6 @@ import "./crd-resource-details.scss";
|
||||
|
||||
import React from "react";
|
||||
import jsonPath from "jsonpath";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { observer } from "mobx-react";
|
||||
import { computed } from "mobx";
|
||||
import { cssNames } from "../../utils";
|
||||
@@ -71,7 +70,7 @@ export class CrdResourceDetails extends React.Component<Props> {
|
||||
));
|
||||
|
||||
return (
|
||||
<DrawerItem name={<Trans>Status</Trans>} className="status" labelsOnly>
|
||||
<DrawerItem name="Status" className="status" labelsOnly>
|
||||
{conditions}
|
||||
</DrawerItem>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,6 @@ import "./crd-resources.scss";
|
||||
import React from "react";
|
||||
import jsonPath from "jsonpath";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import { KubeObject } from "../../api/kube-object";
|
||||
@@ -76,8 +75,8 @@ export class CrdResources extends React.Component<Props> {
|
||||
]}
|
||||
renderHeaderTitle={crd.getResourceTitle()}
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
isNamespaced && { title: <Trans>Namespace</Trans>, className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
isNamespaced && { title: "Namespace", className: "namespace", sortBy: sortBy.namespace },
|
||||
...extraColumns.map(column => {
|
||||
const { name } = column;
|
||||
|
||||
@@ -87,7 +86,7 @@ export class CrdResources extends React.Component<Props> {
|
||||
sortBy: name
|
||||
};
|
||||
}),
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
]}
|
||||
renderTableContents={(crdInstance: KubeObject) => [
|
||||
crdInstance.getName(),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Redirect, Route, Switch } from "react-router";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { TabLayout, TabLayoutRoute } from "../layout/tab-layout";
|
||||
import { crdResourcesRoute, crdRoute, crdURL, crdDefinitionsRoute } from "./crd.route";
|
||||
import { CrdList } from "./crd-list";
|
||||
@@ -12,7 +11,7 @@ export class CustomResources extends React.Component {
|
||||
static get tabRoutes(): TabLayoutRoute[] {
|
||||
return [
|
||||
{
|
||||
title: <Trans>Definitions</Trans>,
|
||||
title: "Definitions",
|
||||
component: CustomResources,
|
||||
url: crdURL(),
|
||||
routePath: crdRoute.path.toString(),
|
||||
@@ -31,4 +30,4 @@ export class CustomResources extends React.Component {
|
||||
</TabLayout>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user