Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(media): change translations prefix
Elian Doran7777f7289377
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex abd12b6986..fdd6f9fb2d 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1036,7 +1036,7 @@"file_preview_not_available": "File preview is not available for this file format.","too_big": "The preview only shows the first {{maxNumChars}} characters of the file for performance reasons. Download the file and open it externally to be able to see the entire content."},- "video": {+ "media": {"play": "Play (Space)","pause": "Pause (Space)","back-10s": "Back 10s (Left arrow key)",diff --git a/apps/client/src/widgets/type_widgets/file/Audio.tsx b/apps/client/src/widgets/type_widgets/file/Audio.tsxindex 676997fd63..36eda0b774 100644--- a/apps/client/src/widgets/type_widgets/file/Audio.tsx+++ b/apps/client/src/widgets/type_widgets/file/Audio.tsx@@ -27,7 +27,7 @@ export default function AudioPreview({ note }: { note: FNote }) {const onError = useCallback(() => setError(true), []);if (error) {- return <NoItems icon="bx bx-volume-mute" text={t("video.unsupported-format", { mime: note.mime.replace("/", "-") })} />;+ return <NoItems icon="bx bx-volume-mute" text={t("media.unsupported-format", { mime: note.mime.replace("/", "-") })} />;}return (@@ -53,9 +53,9 @@ export default function AudioPreview({ note }: { note: FNote }) {<div className="center"><div className="spacer" />- <SkipButton mediaRef={audioRef} seconds={-10} icon="bx bx-rewind" text={t("video.back-10s")} />+ <SkipButton mediaRef={audioRef} seconds={-10} icon="bx bx-rewind" text={t("media.back-10s")} /><PlayPauseButton mediaRef={audioRef} playing={playing} />- <SkipButton mediaRef={audioRef} seconds={30} icon="bx bx-fast-forward" text={t("video.forward-30s")} />+ <SkipButton mediaRef={audioRef} seconds={30} icon="bx bx-fast-forward" text={t("media.forward-30s")} /><LoopButton mediaRef={audioRef} /></div>diff --git a/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx b/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsxindex 66aeffae80..edd689d98e 100644--- a/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx+++ b/apps/client/src/widgets/type_widgets/file/MediaPlayer.tsx@@ -72,7 +72,7 @@ export function PlayPauseButton({ mediaRef, playing }: { mediaRef: RefObject<HTM<ActionButtonclassName="play-button"icon={playing ? "bx bx-pause" : "bx bx-play"}- text={playing ? t("video.pause") : t("video.play")}+ text={playing ? t("media.pause") : t("media.play")}onClick={togglePlayback}/>);@@ -121,7 +121,7 @@ export function VolumeControl({ mediaRef }: { mediaRef: RefObject<HTMLVideoEleme<div class="media-volume-row"><ActionButtonicon={muted || volume === 0 ? "bx bx-volume-mute" : volume < 0.5 ? "bx bx-volume-low" : "bx bx-volume-full"}- text={muted ? t("video.unmute") : t("video.mute")}+ text={muted ? t("media.unmute") : t("media.mute")}onClick={toggleMute}/><input@@ -173,7 +173,7 @@ export function LoopButton({ mediaRef }: { mediaRef: RefObject<HTMLVideoElement<ActionButtonclassName={loop ? "active" : ""}icon="bx bx-repeat"- text={loop ? t("video.disable-loop") : t("video.loop")}+ text={loop ? t("media.disable-loop") : t("media.loop")}onClick={toggle}/>);@@ -211,7 +211,7 @@ export function PlaybackSpeed({ mediaRef }: { mediaRef: RefObject<HTMLVideoEleme<Icon icon="bx bx-tachometer" /><span class="media-speed-label">{speed}x</span></>}- title={t("video.playback-speed")}+ title={t("media.playback-speed")}>{PLAYBACK_SPEEDS.map((rate) => (<li key={rate}>diff --git a/apps/client/src/widgets/type_widgets/file/Video.tsx b/apps/client/src/widgets/type_widgets/file/Video.tsxindex e9cdde4ea0..d8a2c42009 100644--- a/apps/client/src/widgets/type_widgets/file/Video.tsx+++ b/apps/client/src/widgets/type_widgets/file/Video.tsx@@ -40,7 +40,7 @@ export default function VideoPreview({ note }: { note: FNote }) {const onKeyDown = useKeyboardShortcuts(videoRef, wrapperRef, togglePlayback, flashControls);if (error) {- return <NoItems icon="bx bx-video-off" text={t("video.unsupported-format", { mime: note.mime.replace("/", "-") })} />;+ return <NoItems icon="bx bx-video-off" text={t("media.unsupported-format", { mime: note.mime.replace("/", "-") })} />;}return (@@ -64,9 +64,9 @@ export default function VideoPreview({ note }: { note: FNote }) {</div><div className="center"><div className="spacer" />- <SkipButton mediaRef={videoRef} seconds={-10} icon="bx bx-rewind" text={t("video.back-10s")} />+ <SkipButton mediaRef={videoRef} seconds={-10} icon="bx bx-rewind" text={t("media.back-10s")} /><PlayPauseButton mediaRef={videoRef} playing={playing} />- <SkipButton mediaRef={videoRef} seconds={30} icon="bx bx-fast-forward" text={t("video.forward-30s")} />+ <SkipButton mediaRef={videoRef} seconds={30} icon="bx bx-fast-forward" text={t("media.forward-30s")} /><LoopButton mediaRef={videoRef} /></div><div className="right">@@ -198,7 +198,7 @@ function RotateButton({ videoRef }: { videoRef: RefObject<HTMLVideoElement> }) {return (<ActionButtonicon="bx bx-rotate-right"- text={t("video.rotate")}+ text={t("media.rotate")}onClick={rotate}/>);@@ -219,7 +219,7 @@ function ZoomToFitButton({ videoRef }: { videoRef: RefObject<HTMLVideoElement> }<ActionButtonclassName={fitted ? "active" : ""}icon={fitted ? "bx bx-collapse" : "bx bx-expand"}- text={fitted ? t("video.zoom-reset") : t("video.zoom-to-fit")}+ text={fitted ? t("media.zoom-reset") : t("media.zoom-to-fit")}onClick={toggle}/>);@@ -262,7 +262,7 @@ function PictureInPictureButton({ videoRef }: { videoRef: RefObject<HTMLVideoElereturn (<ActionButtonicon={active ? "bx bx-exit" : "bx bx-window-open"}- text={active ? t("video.exit-picture-in-picture") : t("video.picture-in-picture")}+ text={active ? t("media.exit-picture-in-picture") : t("media.picture-in-picture")}onClick={toggle}/>);@@ -291,7 +291,7 @@ function FullscreenButton({ targetRef }: { targetRef: RefObject<HTMLElement> })return (<ActionButtonicon={isFullscreen ? "bx bx-exit-fullscreen" : "bx bx-fullscreen"}- text={isFullscreen ? t("video.exit-fullscreen") : t("video.fullscreen")}+ text={isFullscreen ? t("media.exit-fullscreen") : t("media.fullscreen")}onClick={toggleFullscreen}/>);