From 1435828e0eff6c729fcb5036e70ca3f6f5d5a6e1 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Wed, 17 Jun 2020 13:27:54 +0200 Subject: [PATCH] fix small review findings --- scm-ui/ui-components/src/repos/annotate/Annotate.tsx | 2 +- scm-ui/ui-components/src/repos/annotate/Popover.tsx | 4 +++- scm-ui/ui-webapp/public/locales/de/repos.json | 1 + scm-ui/ui-webapp/public/locales/en/repos.json | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scm-ui/ui-components/src/repos/annotate/Annotate.tsx b/scm-ui/ui-components/src/repos/annotate/Annotate.tsx index 9ee38a7733..d95b24fcdf 100644 --- a/scm-ui/ui-components/src/repos/annotate/Annotate.tsx +++ b/scm-ui/ui-components/src/repos/annotate/Annotate.tsx @@ -103,7 +103,7 @@ const Annotate: FC = ({ source, repository, baseDate }) => { node, stylesheet, useInlineStyles, - key: `code-segement${i}` + key: `code-segment${i}` }); if (i + 1 < rows.length) { diff --git a/scm-ui/ui-components/src/repos/annotate/Popover.tsx b/scm-ui/ui-components/src/repos/annotate/Popover.tsx index 1c4590af04..5d47abc030 100644 --- a/scm-ui/ui-components/src/repos/annotate/Popover.tsx +++ b/scm-ui/ui-components/src/repos/annotate/Popover.tsx @@ -31,6 +31,7 @@ import { DateInput } from "../../useDateFormatter"; import { Repository, AnnotatedLine } from "@scm-manager/ui-types"; import AuthorImage from "./AuthorImage"; import { Action } from "./actions"; +import {useTranslation} from "react-i18next"; const PopoverContainer = styled.div` position: absolute; @@ -89,6 +90,7 @@ type PopoverProps = { }; const Popover: FC = ({ annotation, offsetTop, repository, baseDate, dispatch }) => { + const [t] = useTranslation("repos"); const [height, setHeight] = useState(125); const ref = useRef(null); useLayoutEffect(() => { @@ -127,7 +129,7 @@ const Popover: FC = ({ annotation, offsetTop, repository, baseDate

- Changeset{" "} + {t("changeset.label") + " "} {shortRevision(annotation.revision)} diff --git a/scm-ui/ui-webapp/public/locales/de/repos.json b/scm-ui/ui-webapp/public/locales/de/repos.json index 83734035b2..e19307b65c 100644 --- a/scm-ui/ui-webapp/public/locales/de/repos.json +++ b/scm-ui/ui-webapp/public/locales/de/repos.json @@ -82,6 +82,7 @@ "collapseDiffs": "Auf-/Zuklappen" }, "changeset": { + "label": "Changeset", "description": "Beschreibung", "summary": "Changeset <0/> wurde <1/> committet", "shortSummary": "Committet <0/> <1/>", diff --git a/scm-ui/ui-webapp/public/locales/en/repos.json b/scm-ui/ui-webapp/public/locales/en/repos.json index 3d585da048..97d202dfed 100644 --- a/scm-ui/ui-webapp/public/locales/en/repos.json +++ b/scm-ui/ui-webapp/public/locales/en/repos.json @@ -82,6 +82,7 @@ "collapseDiffs": "Collapse" }, "changeset": { + "label": "Changeset", "description": "Description", "summary": "Changeset <0/> was committed <1/>", "shortSummary": "Committed <0/> <1/>",