feat: show only the translated subtitle once translation finishes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
triandClaude Opus 5.5 committed 2026-10-28 00:17:34 +07:00
1 parent 6b5742b2ca
commit 169cb1360b
5 files changed
+22 -15

No files matched your search

+1 -1
View File
@@ -141,7 +141,7 @@ Kirigami.Page {
TranslationService {
id: translator
onTranslated: (subtitleUrl, fromCache) => {
mpv.showSecondarySubtitleFile(subtitleUrl,
mpv.showTranslatedSubtitleFile(subtitleUrl,
KI18n.i18nc("@item:inlistbox subtitle track, %1 is a language", "%1 (translated)", QtPotatoSettings.targetLanguage))
mpv.showText(fromCache
? KI18n.i18nc("@info:osd", "Loaded the saved translation")
+1 -1
View File
@@ -116,7 +116,7 @@ QQC2.Popup {
text: KI18n.i18nc("@action:button", "Translate Subtitle into %1", QtPotatoSettings.targetLanguage)
onClicked: popup.translator.translate(popup.mpv.currentUrl, popup.currentTrack, popup.mpv.mediaTitle)
QQC2.ToolTip.text: KI18n.i18nc("@info:tooltip", "Translates the subtitle chosen above and shows the result as the secondary subtitle")
QQC2.ToolTip.text: KI18n.i18nc("@info:tooltip", "Translates the subtitle chosen above and shows the result in its place")
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}