From 0186183a7b61a57449f704a7ede470f981cabada Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Sun, 24 Jul 2022 17:45:10 +0200 Subject: [PATCH] Translate TracksPage --- frontend/src/pages/TracksPage.tsx | 27 +++++++++------------------ frontend/src/translations/en.yaml | 1 + 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/frontend/src/pages/TracksPage.tsx b/frontend/src/pages/TracksPage.tsx index 68e3a80..3942329 100644 --- a/frontend/src/pages/TracksPage.tsx +++ b/frontend/src/pages/TracksPage.tsx @@ -1,20 +1,11 @@ -import React, { useCallback } from "react"; -import { connect } from "react-redux"; -import { - Button, - Message, - Item, - Header, - Loader, - Pagination, - Icon, -} from "semantic-ui-react"; -import { useObservable } from "rxjs-hooks"; -import { Link } from "react-router-dom"; -import { of, from, concat } from "rxjs"; -import { map, switchMap, distinctUntilChanged } from "rxjs/operators"; -import _ from "lodash"; -import { useTranslation, Trans as Translate } from "react-i18next"; +import React, {useCallback} from 'react' +import {connect} from 'react-redux' +import {Button, Message, Item, Header, Loader, Pagination, Icon} from 'semantic-ui-react' +import {useObservable} from 'rxjs-hooks' +import {Link} from 'react-router-dom' +import {of, from, concat} from 'rxjs' +import {map, switchMap, distinctUntilChanged} from 'rxjs/operators' +import _ from 'lodash' import type { Track } from "types"; import { @@ -91,7 +82,7 @@ export function NoPublicTracksMessage() { ); } -function maxLength(t: string | null, max: number): string | null { +function maxLength(t: string|null, max: number): string|null { if (t && t.length > max) { return t.substring(0, max) + " ..."; } else { diff --git a/frontend/src/translations/en.yaml b/frontend/src/translations/en.yaml index 25b76ef..1246052 100644 --- a/frontend/src/translations/en.yaml +++ b/frontend/src/translations/en.yaml @@ -53,6 +53,7 @@ LoginButton: HomePage: mostRecentTrack: Most recent track + noPublicTracks: No public tracks yet. <1>Upload the first! Stats: title: Statistics