From 2313e4d9eac9638780f86584f387ec359a65a959 Mon Sep 17 00:00:00 2001 From: Sora <8521327+SoraKasvgano@users.noreply.github.com> Date: Mon, 19 Jan 2026 13:29:19 +0800 Subject: [PATCH] Localize share URLs and embed code labels Replaced hardcoded labels for share URLs and embed code in ShareEdit.jsx with localized strings. Added corresponding entries to en.json for improved internationalization support. --- ui/src/i18n/en.json | 3 +++ ui/src/share/ShareEdit.jsx | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json index 600fa74af..15a513aa8 100644 --- a/ui/src/i18n/en.json +++ b/ui/src/i18n/en.json @@ -561,6 +561,9 @@ "delete_user_title": "Delete user '%{name}'", "delete_user_content": "Are you sure you want to delete this user and all their data (including playlists and preferences)?", "remove_missing_title": "Remove missing files", + "shareUrl": "Share URL", + "aplayerEmbedUrl": "APlayer Embed URL", + "navidromeMusicPlayer": "Navidrome Music Player", "remove_missing_content": "Are you sure you want to remove the selected missing files from the database? This will remove permanently any references to them, including their play counts and ratings.", "remove_all_missing_title": "Remove all missing files", "remove_all_missing_content": "Are you sure you want to remove all missing files from the database? This will permanently remove any references to them, including their play counts and ratings.", diff --git a/ui/src/share/ShareEdit.jsx b/ui/src/share/ShareEdit.jsx index 009581511..9412c7d36 100644 --- a/ui/src/share/ShareEdit.jsx +++ b/ui/src/share/ShareEdit.jsx @@ -5,6 +5,7 @@ import { NumberField, SimpleForm, TextInput, + useTranslate, } from 'react-admin' import { sharePlayerUrl, shareAPlayerUrl } from '../utils' import { Link, Box, Typography, Divider } from '@material-ui/core' @@ -14,6 +15,7 @@ import { EmbedCodeField } from './EmbedCodeField' export const ShareEdit = (props) => { const { id, basePath, hasCreate, ...rest } = props + const translate = useTranslate() const url = sharePlayerUrl(id) const aplayerUrl = shareAPlayerUrl(id) return ( @@ -21,7 +23,7 @@ export const ShareEdit = (props) => { - Share URL + {translate('message.shareUrl')} {url} @@ -29,7 +31,7 @@ export const ShareEdit = (props) => { - APlayer Embed URL + {translate('message.aplayerEmbedUrl')} {aplayerUrl} @@ -38,7 +40,7 @@ export const ShareEdit = (props) => { - +