diff --git a/src/components/subtitleeditor/subtitleeditor.js b/src/components/subtitleeditor/subtitleeditor.js index 572cccc1fa..ffe05ae5c3 100644 --- a/src/components/subtitleeditor/subtitleeditor.js +++ b/src/components/subtitleeditor/subtitleeditor.js @@ -194,7 +194,8 @@ function renderSearchResults(context, results) { html += ''; - const bodyClass = result.Comment || result.IsHashMatch ? 'three-line' : 'two-line'; + const hasAnyFlags = result.IsHashMatch || result.AiTranslated || result.MachineTranslated || result.Forced || result.HearingImpaired; + const bodyClass = result.Comment || hasAnyFlags ? 'three-line' : 'two-line'; html += '
'; @@ -206,16 +207,45 @@ function renderSearchResults(context, results) { } if (result.DownloadCount != null) { - html += '' + globalize.translate('DownloadsValue', result.DownloadCount) + ''; + html += '' + globalize.translate('DownloadsValue', result.DownloadCount) + ''; } + + if (result.FrameRate) { + html += '' + globalize.translate('Framerate') + ': ' + result.FrameRate + ''; + } + html += '
'; if (result.Comment) { - html += '
' + escapeHtml(result.Comment) + '
'; + html += '
' + escapeHtml(result.Comment) + '
'; } - if (result.IsHashMatch) { - html += '
' + globalize.translate('PerfectMatch') + '
'; + if (hasAnyFlags) { + html += '
'; + + const spanOpen = ''; + + if (result.IsHashMatch) { + html += spanOpen + globalize.translate('PerfectMatch') + ''; + } + + if (result.AiTranslated) { + html += spanOpen + globalize.translate('AiTranslated') + ''; + } + + if (result.MachineTranslated) { + html += spanOpen + globalize.translate('MachineTranslated') + ''; + } + + if (result.Forced) { + html += spanOpen + globalize.translate('ForeignPartsOnly') + ''; + } + + if (result.HearingImpaired) { + html += spanOpen + globalize.translate('HearingImpairedShort') + ''; + } + + html += '
'; } html += ''; diff --git a/src/components/subtitleeditor/subtitleeditor.scss b/src/components/subtitleeditor/subtitleeditor.scss index 08e6faffba..578e82ddd2 100644 --- a/src/components/subtitleeditor/subtitleeditor.scss +++ b/src/components/subtitleeditor/subtitleeditor.scss @@ -1,3 +1,11 @@ .originalSubtitleFileLabel { margin-right: 1em; } + +.subtitleFeaturePillow { + background: #00a4dc; + color: #000; + padding: 0.3em 1em; + border-radius: 1000em; + margin-right: 0.25em; +} diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 67e4d5d5ca..91b91b44ea 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1718,5 +1718,9 @@ "LabelTonemappingMode": "Tone mapping mode", "TonemappingModeHelp": "Select the tone mapping mode. If you experience blown out highlights try switching to the RGB mode.", "Unknown": "Unknown", - "AllowAv1Encoding": "Allow encoding in AV1 format" + "AllowAv1Encoding": "Allow encoding in AV1 format", + "AiTranslated": "AI Translated", + "MachineTranslated": "Machine Translated", + "ForeignPartsOnly": "Forced/Foreign parts only", + "HearingImpairedShort": "HI/SDH" }