Rename checksum and hash fields (#6600)

Checksum -> MD5 Checksum
Hash -> oshash with hover showing OpenSubtitles Hash.
Also internationalised perceptual hash hover text.
This commit is contained in:
WithoutPants 2026-02-25 10:54:40 +11:00 committed by GitHub
parent 410dd27d93
commit 14105a2d54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 8 deletions

View file

@ -1,6 +1,6 @@
import React, { useState } from "react";
import { Accordion, Button, Card } from "react-bootstrap";
import { FormattedMessage, FormattedTime } from "react-intl";
import { FormattedMessage, FormattedTime, useIntl } from "react-intl";
import { TruncatedText } from "src/components/Shared/TruncatedText";
import { DeleteFilesDialog } from "src/components/Shared/DeleteFilesDialog";
import { RevealInFilesystemButton } from "src/components/Shared/RevealInFilesystemButton";
@ -24,6 +24,7 @@ interface IFileInfoPanelProps {
const FileInfoPanel: React.FC<IFileInfoPanelProps> = (
props: IFileInfoPanelProps
) => {
const intl = useIntl();
const checksum = props.file.fingerprints.find((f) => f.type === "md5");
const phash = props.file.fingerprints.find((f) => f.type === "phash");
@ -38,10 +39,10 @@ const FileInfoPanel: React.FC<IFileInfoPanelProps> = (
</dd>
</>
)}
<TextField id="media_info.checksum" value={checksum?.value} truncate />
<TextField id="media_info.md5" value={checksum?.value} truncate />
<URLField
id="media_info.phash"
abbr="Perceptual hash"
abbr={intl.formatMessage({ id: "media_info.phash_meaning" })}
value={phash?.value}
url={NavUtils.makeImagesPHashMatchUrl(phash?.value)}
target="_self"

View file

@ -60,11 +60,16 @@ const FileInfoPanel: React.FC<IFileInfoPanelProps> = (
</dd>
</>
)}
<TextField id="media_info.hash" value={oshash?.value} truncate />
<TextField id="media_info.checksum" value={checksum?.value} truncate />
<TextField
id="media_info.oshash"
abbr={intl.formatMessage({ id: "media_info.oshash_meaning" })}
value={oshash?.value}
truncate
/>
<TextField id="media_info.md5" value={checksum?.value} truncate />
<URLField
id="media_info.phash"
abbr="Perceptual hash"
abbr={intl.formatMessage({ id: "media_info.phash_meaning" })}
value={phash?.value}
url={NavUtils.makeScenesPHashMatchUrl(phash?.value)}
target="_self"

View file

@ -1254,16 +1254,18 @@
"measurements": "Measurements",
"media_info": {
"audio_codec": "Audio Codec",
"checksum": "Checksum",
"downloaded_from": "Downloaded From",
"hash": "Hash",
"interactive_speed": "Interactive Speed",
"md5": "MD5 Checksum",
"o_count": "O Count",
"oshash": "oshash",
"oshash_meaning": "OpenSubtitles Hash",
"performer_card": {
"age": "{age} {years_old}",
"age_context": "{age} {years_old} at production"
},
"phash": "PHash",
"phash_meaning": "Perceptual Hash",
"play_count": "Play Count",
"play_duration": "Play Duration",
"stream": "Stream",