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-namespace-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 { namespaceStore } from "./namespace.store";
|
||||
@@ -55,7 +53,7 @@ export class AddNamespaceDialog extends React.Component<Props> {
|
||||
render() {
|
||||
const { ...dialogProps } = this.props;
|
||||
const { namespace } = this;
|
||||
const header = <h5><Trans>Create Namespace</Trans></h5>;
|
||||
const header = <h5>Create Namespace</h5>;
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
@@ -68,13 +66,13 @@ export class AddNamespaceDialog extends React.Component<Props> {
|
||||
<Wizard header={header} done={this.close}>
|
||||
<WizardStep
|
||||
contentClass="flex gaps column"
|
||||
nextLabel={<Trans>Create</Trans>}
|
||||
nextLabel="Create"
|
||||
next={this.addNamespace}
|
||||
>
|
||||
<Input
|
||||
required autoFocus
|
||||
iconLeft="layers"
|
||||
placeholder={_i18n._(t`Namespace`)}
|
||||
placeholder={`Namespace`}
|
||||
validators={systemName}
|
||||
value={namespace} onChange={v => this.namespace = v.toLowerCase()}
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,6 @@ import "./namespace-details.scss";
|
||||
import React from "react";
|
||||
import { computed } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { DrawerItem } from "../drawer";
|
||||
import { cssNames } from "../../utils";
|
||||
import { Namespace } from "../../api/endpoints";
|
||||
@@ -39,11 +38,11 @@ export class NamespaceDetails extends React.Component<Props> {
|
||||
<div className="NamespaceDetails">
|
||||
<KubeObjectMeta object={namespace}/>
|
||||
|
||||
<DrawerItem name={<Trans>Status</Trans>}>
|
||||
<DrawerItem name="Status">
|
||||
<span className={cssNames("status", status.toLowerCase())}>{status}</span>
|
||||
</DrawerItem>
|
||||
|
||||
<DrawerItem name={<Trans>Resource Quotas</Trans>} className="quotas flex align-center">
|
||||
<DrawerItem name="Resource Quotas" className="quotas flex align-center">
|
||||
{!this.quotas && resourceQuotaStore.isLoading && <Spinner/>}
|
||||
{this.quotas.map(quota => {
|
||||
return (
|
||||
|
||||
@@ -3,12 +3,10 @@ import "./namespace-select.scss";
|
||||
import React from "react";
|
||||
import { computed } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { t, Trans } from "@lingui/macro";
|
||||
import { Select, SelectOption, SelectProps } from "../select";
|
||||
import { cssNames, noop } from "../../utils";
|
||||
import { Icon } from "../icon";
|
||||
import { namespaceStore } from "./namespace.store";
|
||||
import { _i18n } from "../../i18n";
|
||||
import { FilterIcon } from "../item-object-list/filter-icon";
|
||||
import { FilterType } from "../item-object-list/page-filters.store";
|
||||
|
||||
@@ -23,7 +21,7 @@ const defaultProps: Partial<Props> = {
|
||||
showIcons: true,
|
||||
showClusterOption: false,
|
||||
get clusterOptionLabel() {
|
||||
return _i18n._(t`Cluster`);
|
||||
return `Cluster`;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -87,10 +85,10 @@ export class NamespaceSelect extends React.Component<Props> {
|
||||
export class NamespaceSelectFilter extends React.Component {
|
||||
render() {
|
||||
const { contextNs, hasContext, toggleContext } = namespaceStore;
|
||||
let placeholder = <Trans>All namespaces</Trans>;
|
||||
let placeholder = <>All namespaces</>;
|
||||
|
||||
if (contextNs.length == 1) placeholder = <Trans>Namespace: {contextNs[0]}</Trans>;
|
||||
if (contextNs.length >= 2) placeholder = <Trans>Namespaces: {contextNs.join(", ")}</Trans>;
|
||||
if (contextNs.length == 1) placeholder = <>Namespace: {contextNs[0]}</>;
|
||||
if (contextNs.length >= 2) placeholder = <>Namespaces: {contextNs.join(", ")}</>;
|
||||
|
||||
return (
|
||||
<NamespaceSelect
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import "./namespaces.scss";
|
||||
|
||||
import React from "react";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { Namespace, NamespaceStatus } from "../../api/endpoints";
|
||||
import { AddNamespaceDialog } from "./add-namespace-dialog";
|
||||
import { TabLayout } from "../layout/tab-layout";
|
||||
@@ -39,13 +38,13 @@ export class Namespaces extends React.Component<Props> {
|
||||
(item: Namespace) => item.getSearchFields(),
|
||||
(item: Namespace) => item.getStatus()
|
||||
]}
|
||||
renderHeaderTitle={<Trans>Namespaces</Trans>}
|
||||
renderHeaderTitle="Namespaces"
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ title: "Name", className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Labels</Trans>, className: "labels", sortBy: sortBy.labels },
|
||||
{ title: <Trans>Age</Trans>, className: "age", sortBy: sortBy.age },
|
||||
{ title: <Trans>Status</Trans>, className: "status", sortBy: sortBy.status },
|
||||
{ title: "Labels", className: "labels", sortBy: sortBy.labels },
|
||||
{ title: "Age", className: "age", sortBy: sortBy.age },
|
||||
{ title: "Status", className: "status", sortBy: sortBy.status },
|
||||
]}
|
||||
renderTableContents={(item: Namespace) => [
|
||||
item.getName(),
|
||||
@@ -55,7 +54,7 @@ export class Namespaces extends React.Component<Props> {
|
||||
{ title: item.getStatus(), className: item.getStatus().toLowerCase() },
|
||||
]}
|
||||
addRemoveButtons={{
|
||||
addTooltip: <Trans>Add Namespace</Trans>,
|
||||
addTooltip: "Add Namespace",
|
||||
onAdd: () => AddNamespaceDialog.open(),
|
||||
}}
|
||||
customizeTableRowProps={(item: Namespace) => ({
|
||||
|
||||
Reference in new issue
Block a user