feat: add support i18n (#1468)

This commit is contained in:
JellyBrick
2023-12-01 01:30:46 +09:00
committed by GitHub
parent 7f71c36dc0
commit 7401cf69ad
65 changed files with 1226 additions and 303 deletions

View File

@ -6,6 +6,7 @@ import {
VudioVisualizer as vudio,
WaveVisualizer as wave,
} from './visualizers';
import { t } from '@/i18n';
type WaveColor = {
gradient: string[];
@ -57,8 +58,8 @@ export type VisualizerPluginConfig = {
};
export default createPlugin({
name: 'Visualizer',
description: 'Adds a visualizer to the player',
name: t('plugins.visualizer.name'),
description: t('plugins.visualizer.description'),
restartNeeded: true,
config: {
enabled: false,
@ -133,7 +134,7 @@ export default createPlugin({
return [
{
label: 'Type',
label: t('plugins.visualizer.menu.visualizer-type'),
submenu: visualizerTypes.map((visualizerType) => ({
label: visualizerType,
type: 'radio',