Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Suoslex committed Sep 25, 2024
1 parent 80f9a65 commit 53e18cf
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
"dynamicIsImage": "enable background image",
"followCurrentLyric": "follow current lyric",
"lyricAlignment": "lyric alignment",
"lyricOffset": "lyrics offset (ms)",
"lyricGap": "lyric gap",
"lyricSize": "lyric size",
"opacity": "opacity",
Expand All @@ -366,7 +367,8 @@
"lyrics": "lyrics",
"related": "related",
"upNext": "up next",
"visualizer": "visualizer"
"visualizer": "visualizer",
"noLyrics": "no lyrics found"
},
"genreList": {
"showAlbums": "show $t(entity.genre_one) $t(entity.album_other)",
Expand Down
19 changes: 11 additions & 8 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"artist_one": "автор",
"artist_few": "автора",
"artist_other": "исполнители",
"artist_many": "авторов",
"artist_many": "исполнителей",
"folderWithCount_one": "{{count}} папка",
"folderWithCount_few": "{{count}} папки",
"folderWithCount_many": "{{count}} папок",
Expand Down Expand Up @@ -281,7 +281,7 @@
"communityRating": "рейтинг сообщества",
"favorited": "любимый",
"albumArtist": "$t(entity.albumArtist_one)",
"isFavorited": "любимый",
"isFavorited": "любимые",
"bpm": "уд./мин.",
"disc": "диск",
"biography": "биография",
Expand All @@ -294,13 +294,13 @@
"playCount": "количество воспроизведений",
"recentlyUpdated": "обновленные недавно",
"channels": "$t(common.channel_other)",
"recentlyPlayed": "недавно проигрывался",
"recentlyPlayed": "проигрывались недавно",
"owner": "$t(common.owner)",
"title": "название",
"rating": "рейтинг",
"search": "поиск",
"genre": "$t(entity.genre_one)",
"recentlyAdded": "добавлен недавно",
"recentlyAdded": "недавно добавленные",
"note": "заметка",
"name": "название",
"releaseDate": "дата выхода",
Expand All @@ -311,7 +311,7 @@
"id": "",
"songCount": "количество песен",
"isPublic": "публичный",
"random": "случайный",
"random": "случайно",
"lastPlayed": "последний раз проигрывалась",
"toYear": "до года",
"album": "$t(entity.album_one)",
Expand Down Expand Up @@ -352,7 +352,7 @@
},
"page": {
"sidebar": {
"nowPlaying": "сейчас проигрывается",
"nowPlaying": "сейчас играет",
"playlists": "$t(entity.playlist_other)",
"search": "$t(common.search)",
"tracks": "$t(entity.track_other)",
Expand All @@ -375,14 +375,17 @@
"showLyricProvider": "показать источник слов",
"unsynchronized": "не синхронизировано",
"lyricAlignment": "выравнивание слов песни",
"lyricOffset": "задержка слов (мсек)",
"useImageAspectRatio": "использовать соотношение сторон изображения",
"lyricGap": "пробел между словами",
"dynamicIsImage": "включить фоновое изображение",
"dynamicImageBlur": "сила размытия изображения"
},
"upNext": "играет",
"lyrics": "слова",
"related": "похожие"
"related": "похожие",
"visualizer": "визуализатор",
"noLyrics": "слова для песни не найдены"
},
"appMenu": {
"selectServer": "список серверов",
Expand Down Expand Up @@ -478,7 +481,7 @@
"viewAll": "посмотреть всё",
"appearsOn": "появляется в",
"viewDiscography": "посмотреть дискографию",
"relatedArtists": "похож на $t(entity.artist_other)",
"relatedArtists": "похож на $t(entity.artist_many)",
"viewAllTracks": "посмотреть все $t(entity.track_other)",
"recentReleases": "недавние релизы",
"about": "О {{artist}}",
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/features/lyrics/lyrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
import { Center, Group } from '@mantine/core';
import { AnimatePresence, motion } from 'framer-motion';
import { ErrorBoundary } from 'react-error-boundary';
import { useTranslation } from 'react-i18next';
import { RiInformationFill } from 'react-icons/ri';
import styled from 'styled-components';
import { useSongLyricsByRemoteId, useSongLyricsBySong } from './queries/lyric-query';
Expand Down Expand Up @@ -86,6 +87,7 @@ const ScrollContainer = styled(motion.div)`
export const Lyrics = () => {
const currentSong = useCurrentSong();
const lyricsSettings = useLyricsSettings();
const { t } = useTranslation();
const [index, setIndex] = useState(0);
const [translatedLyrics, setTranslatedLyrics] = useState<string | null>(null);
const [showTranslation, setShowTranslation] = useState(false);
Expand Down Expand Up @@ -217,7 +219,9 @@ export const Lyrics = () => {
order={3}
weight={700}
>
No lyrics found
{t('page.fullscreenPlayer.noLyrics', {
postProcess: 'sentenceCase',
})}
</TextTitle>
</Group>
</Center>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const FullScreenPlayerQueue = () => {
items.push({
active: activeTab === 'visualizer',
icon: <RiFileTextLine size="1.5rem" />,
label: t('page.fullscreenPlayer.visualizer'),
label: t('page.fullscreenPlayer.visualizer', { postProcess: 'titleCase' }),
onClick: () => setStore({ activeTab: 'visualizer' }),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ const Controls = () => {
</Option.Control>
</Option>
<Option>
<Option.Label>Lyrics offset (ms)</Option.Label>
<Option.Label>
{t('page.fullscreenPlayer.config.lyricOffset', {
postProcess: 'sentenceCase',
})}
</Option.Label>
<Option.Control>
<NumberInput
defaultValue={lyricConfig.delayMs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export const SongListHeaderFilters = ({ gridRef, tableRef }: SongListHeaderFilte
icon={<RiRefreshLine />}
onClick={handleRefresh}
>
Refresh
{t('common.refresh', { postProcess: 'titleCase' })}
</DropdownMenu.Item>
</DropdownMenu.Dropdown>
</DropdownMenu>
Expand Down

0 comments on commit 53e18cf

Please sign in to comment.