diff --git a/scm-ui/ui-webapp/public/locales/de/repos.json b/scm-ui/ui-webapp/public/locales/de/repos.json index a2f9f21495..535a03c4de 100644 --- a/scm-ui/ui-webapp/public/locales/de/repos.json +++ b/scm-ui/ui-webapp/public/locales/de/repos.json @@ -149,7 +149,9 @@ "description": "Beschreibung", "notYetComputed": "Noch nicht berechnet; Der Wert wird in Kürze aktualisiert", "computationAborted": "Die Berechnung dauert zu lange und wurde abgebrochen", - "subRepository": "Subrepository:" + "subRepository": "Subrepository", + "folder": "Ordner", + "file": "Datei" }, "content": { "historyButton": "History", diff --git a/scm-ui/ui-webapp/public/locales/en/repos.json b/scm-ui/ui-webapp/public/locales/en/repos.json index cb3e79adc5..aacc11f1f9 100644 --- a/scm-ui/ui-webapp/public/locales/en/repos.json +++ b/scm-ui/ui-webapp/public/locales/en/repos.json @@ -149,7 +149,9 @@ "description": "Description", "notYetComputed": "Not yet computed, will be updated in a short while", "computationAborted": "The computation took too long and was aborted", - "subRepository": "Subrepository:" + "subRepository": "Subrepository", + "folder": "Folder", + "file": "File" }, "content": { "historyButton": "History", diff --git a/scm-ui/ui-webapp/public/locales/es/repos.json b/scm-ui/ui-webapp/public/locales/es/repos.json index 2fcd690fa3..013d31edad 100644 --- a/scm-ui/ui-webapp/public/locales/es/repos.json +++ b/scm-ui/ui-webapp/public/locales/es/repos.json @@ -110,7 +110,9 @@ "description": "Descripción", "notYetComputed": "Aún no calculado, se actualizará en poco tiempo", "computationAborted": "El cálculo tomó demasiado tiempo y fue abortado", - "subRepository": "Subrepositorio:" + "subRepository": "Subrepositorio", + "folder": "Carpeta", + "file": "Ficha" }, "content": { "historyButton": "Historia", diff --git a/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx b/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx index a966a400d8..e3a3ed6089 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx @@ -21,24 +21,23 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React from "react"; +import React, { FC } from "react"; import { File } from "@scm-manager/ui-types"; +import { Icon } from "@scm-manager/ui-components"; +import { useTranslation } from "react-i18next"; type Props = { file: File; }; -class FileIcon extends React.Component { - render() { - const { file } = this.props; - let icon = "fas fa-file"; - if (file.subRepository) { - icon = "far fa-folder"; - } else if (file.directory) { - icon = "fas fa-folder"; - } - return ; +const FileIcon: FC = ({ file }) => { + const [t] = useTranslation("repos"); + if (file.subRepository) { + return ; + } else if (file.directory) { + return ; } -} + return ; +}; export default FileIcon; diff --git a/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx b/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx index 063476908a..8cd0ba1f0d 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/content/FileLink.tsx @@ -86,7 +86,7 @@ const FileLink: FC = ({ baseUrl, file, children }) => { return {children}; } else { return ( - + {children} );