Skip to content

Commit

Permalink
Fix BoreholeNumbersPreview Font and Remove translation text (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt authored Aug 15, 2024
2 parents f455be5 + f229907 commit 5f9f866
Show file tree
Hide file tree
Showing 46 changed files with 232 additions and 497 deletions.
1 change: 0 additions & 1 deletion src/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" href="/favicon.ico" />
<link href="/fonts/fonts.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet" />

<style>
Expand Down
93 changes: 0 additions & 93 deletions src/client/public/fonts/OFL.txt

This file was deleted.

40 changes: 0 additions & 40 deletions src/client/public/fonts/fonts.css

This file was deleted.

Binary file removed src/client/public/fonts/lato-v17-latin-700.woff
Binary file not shown.
Binary file removed src/client/public/fonts/lato-v17-latin-700.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/client/public/fonts/lato-v17-latin-italic.woff
Binary file not shown.
Binary file removed src/client/public/fonts/lato-v17-latin-italic.woff2
Binary file not shown.
Binary file not shown.
Binary file removed src/client/public/fonts/lato-v17-latin-regular.woff2
Binary file not shown.
6 changes: 4 additions & 2 deletions src/client/src/components/buttons/buttons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { forwardRef } from "react";
import TranslationText from "../legacyComponents/translationText";
import { Button } from "@mui/material";
import AddIcon from "@mui/icons-material/Add";
import EditIcon from "../../assets/icons/edit.svg?react";
Expand All @@ -9,11 +8,14 @@ import SaveIcon from "@mui/icons-material/Save";
import TrashIcon from "../../assets/icons/trash.svg?react";
import CheckmarkIcon from "../../assets/icons/checkmark.svg?react";
import { ButtonProps } from "./buttonsInterface";
import { capitalizeFirstLetter } from "../../utils.ts";
import { useTranslation } from "react-i18next";

export const BdmsBaseButton = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
const { t } = useTranslation();
return (
<Button ref={ref} {...props} data-cy={props.label?.toLowerCase() + "-button"} startIcon={props.icon}>
<TranslationText firstUpperCase id={props.label} />
{props.label && capitalizeFirstLetter(t(props.label))}
</Button>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import _ from "lodash";
import { loadDomains } from "../../../../api-lib/index.js";

import { Form, Header } from "semantic-ui-react";
import TranslationText from "../../translationText.jsx";

class DomainDropdown extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -115,7 +114,7 @@ class DomainDropdown extends React.Component {
}

render() {
const { domains, schema, search, multiple, additionalValues, readOnly } = this.props,
const { domains, schema, search, multiple, additionalValues, readOnly, t } = this.props,
{ selected } = this.state;
if (!Object.prototype.hasOwnProperty.call(domains.data, schema)) {
if (domains.isFetching === true) {
Expand All @@ -134,7 +133,7 @@ class DomainDropdown extends React.Component {
style={{
color: "red",
}}>
<TranslationText id="reset" />
{t("reset")}
</span>
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { withTranslation } from "react-i18next";
import _ from "lodash";
import { loadDomains } from "../../../../api-lib/index.js";
import { Dropdown, Form, Header, Icon, Input, List, Modal } from "semantic-ui-react";
import TranslationText from "../../translationText.jsx";
import DomainText from "../domainText.jsx";

class DomainTree extends React.Component {
Expand Down Expand Up @@ -157,7 +156,7 @@ class DomainTree extends React.Component {
}

render() {
const { domains, schema, isEditable } = this.props;
const { domains, schema, isEditable, t } = this.props;
if (!Object.prototype.hasOwnProperty.call(domains.data, schema)) {
if (domains.isFetching === true) {
return "loading translations";
Expand All @@ -173,7 +172,7 @@ class DomainTree extends React.Component {
style={{
color: "red",
}}>
<TranslationText id="reset" />
{t("reset")}
</span>
),
},
Expand Down Expand Up @@ -215,7 +214,7 @@ class DomainTree extends React.Component {
style={{
color: "red",
}}>
<TranslationText id="reset" />
{t("reset")}
</span>
),
},
Expand Down Expand Up @@ -367,9 +366,7 @@ class DomainTree extends React.Component {
flex: "1 1 100%",
}}>
<Form.Field>
<label>
<TranslationText id="filterByHierarchicalUnits" />
</label>
<label>{t("filterByHierarchicalUnits")}</label>
</Form.Field>
</Form>
{this.state.levels.map((lev, idx) => {
Expand Down Expand Up @@ -465,9 +462,7 @@ class DomainTree extends React.Component {
flex: "1 1 100%",
}}>
<Form.Field>
<label>
<TranslationText id="filterByName" />
</label>
<label>{t("filterByName")}</label>
<Input
fluid
icon="search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class MultipleForm extends React.Component {
<Form.Field key={"workgroup"}>
<label>{t("workgroup")}</label>
{workgroups.length === 0 ? (
<TranslationText id="disabled" />
t("disabled")
) : workgroups.length === 1 ? (
workgroups[0].workgroup
) : (
Expand Down
10 changes: 3 additions & 7 deletions src/client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/* body {
margin: 0;
padding: 0;
font-family: sans-serif;
} */

.ol-popup {
position: absolute;
background-color: white;
Expand Down Expand Up @@ -138,7 +134,7 @@
cursor: default !important;
}

.selectable:hover {
.selectable:hover {
background-color: rgb(233, 233, 233);
}

Expand All @@ -149,4 +145,4 @@

.Mui-checked {
color: black !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { withTranslation } from "react-i18next";
import { Button, Checkbox, Icon, Table, TextArea } from "semantic-ui-react";
import DateText from "../../../../components/legacyComponents/dateText.js";
import DownloadLink from "../downloadlink.jsx";
import TranslationText from "../../../../components/legacyComponents/translationText.jsx";
import { downloadBoreholeAttachment } from "../../../../api/fetchApiV2.js";

const FilesTableComponent = props => {
const { t } = props;
return (
<div
className="flex_col flex_fill"
Expand All @@ -16,23 +16,11 @@ const FilesTableComponent = props => {
<Table singleLine>
<Table.Header>
<Table.Row>
{props.editor === true && (
<Table.HeaderCell>
<TranslationText id="public" />
</Table.HeaderCell>
)}
<Table.HeaderCell>
<TranslationText id="name" />
</Table.HeaderCell>
<Table.HeaderCell>
<TranslationText id="description" />
</Table.HeaderCell>
<Table.HeaderCell>
<TranslationText id="type" />
</Table.HeaderCell>
<Table.HeaderCell>
<TranslationText id="uploaded" />
</Table.HeaderCell>
{props.editor === true && <Table.HeaderCell>{t("public")}</Table.HeaderCell>}
<Table.HeaderCell>{t("name")}</Table.HeaderCell>
<Table.HeaderCell>{t("description")}</Table.HeaderCell>
<Table.HeaderCell>{t("type")}</Table.HeaderCell>
<Table.HeaderCell>{t("uploaded")}</Table.HeaderCell>
{props.unlocked === true ? <Table.HeaderCell /> : null}
</Table.Row>
</Table.Header>
Expand Down
5 changes: 2 additions & 3 deletions src/client/src/pages/detail/detailPageContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import _ from "lodash";
import { Redirect, Route, Switch, withRouter } from "react-router-dom";
import { loadBorehole, patchBorehole, updateBorehole } from "../../api-lib";
import EditorBoreholeFilesTable from "./attachments/table/editorBoreholeFilesTable.tsx";
import TranslationText from "../../components/legacyComponents/translationText.jsx";
import { Dimmer, Loader } from "semantic-ui-react";
import Lithology from "./form/stratigraphy/lithology";
import IdentifierSegment from "./form/location/indentifierSegment.jsx";
Expand Down Expand Up @@ -273,9 +272,9 @@ class DetailPageContent extends React.Component {
<Loader>
{(() => {
if (borehole.isFetching || this.state.loadingFetch === true) {
return <TranslationText id="layer_loading_fetch" />;
return t("layer_loading_fetch");
} else if (this.state.creationFetch === true) {
return <TranslationText id="layer_creation_fetch" />;
return t("layer_creation_fetch");
}
})()}
</Loader>
Expand Down
Loading

0 comments on commit 5f9f866

Please sign in to comment.