Add localization support (#333)

* Add updated i18n config and en locale
This commit is contained in:
Jeff 2023-10-30 19:22:45 -07:00 committed by GitHub
parent 11863fd4c1
commit 8430b1ec95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 2679 additions and 908 deletions

View file

@ -1,5 +1,6 @@
import { Center, Flex } from '@mantine/core';
import { useCallback, MouseEvent } from 'react';
import { Center, Flex } from '@mantine/core';
import { useTranslation } from 'react-i18next';
import {
RiAddBoxFill,
RiAddCircleFill,
@ -68,6 +69,7 @@ export const LibraryCommandItem = ({
itemType,
handlePlayQueueAdd,
}: LibraryCommandItemProps) => {
const { t } = useTranslation();
let Placeholder = RiAlbumFill;
switch (itemType) {
@ -153,7 +155,10 @@ export const LibraryCommandItem = ({
<Button
compact
size="md"
tooltip={{ label: 'Play', openDelay: 500 }}
tooltip={{
label: t('player.play', { postProcess: 'sentenceCase' }),
openDelay: 500,
}}
variant="default"
onClick={(e) => handlePlay(e, id, Play.NOW)}
>
@ -162,7 +167,11 @@ export const LibraryCommandItem = ({
<Button
compact
size="md"
tooltip={{ label: 'Add to queue', openDelay: 500 }}
tooltip={{
label: t('player.addLast', { postProcess: 'sentenceCase' }),
openDelay: 500,
}}
variant="default"
onClick={(e) => handlePlay(e, id, Play.LAST)}
>
@ -171,7 +180,10 @@ export const LibraryCommandItem = ({
<Button
compact
size="md"
tooltip={{ label: 'Play next', openDelay: 500 }}
tooltip={{
label: t('player.addNext', { postProcess: 'sentenceCase' }),
openDelay: 500,
}}
variant="default"
onClick={(e) => handlePlay(e, id, Play.NEXT)}
>