mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-07 21:03:27 +02:00
hide lyric translation line if same as parent (#2311)
This commit is contained in:
@@ -181,6 +181,7 @@ export const KaraokeLyricLine = memo(
|
||||
pronunciationText,
|
||||
romajiCueLines,
|
||||
romajiText,
|
||||
text,
|
||||
translatedText,
|
||||
translationCueLines,
|
||||
...props
|
||||
@@ -258,6 +259,7 @@ export const KaraokeLyricLine = memo(
|
||||
styles.overlayLine,
|
||||
)}
|
||||
{translationCueLine &&
|
||||
translationCueLine.value !== cueLine.value &&
|
||||
renderOverlayCueLineRow(
|
||||
translationCueLine,
|
||||
lineIndex,
|
||||
@@ -276,7 +278,7 @@ export const KaraokeLyricLine = memo(
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{!hasSyncedTranslation && translatedText && (
|
||||
{!hasSyncedTranslation && translatedText && translatedText !== text && (
|
||||
<span
|
||||
className={styles.translationLine}
|
||||
dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }}
|
||||
|
||||
@@ -47,7 +47,7 @@ export const LyricLine = memo(
|
||||
dangerouslySetInnerHTML={{ __html: sanitize(romajiText) }}
|
||||
/>
|
||||
)}
|
||||
{translatedText && (
|
||||
{translatedText && translatedText !== text && (
|
||||
<span dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }} />
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@@ -439,6 +439,7 @@ export const SynchronizedKaraokeLyrics = ({
|
||||
? (syncedRomajiLyrics[idx] ?? null)
|
||||
: undefined
|
||||
}
|
||||
text={getLyricLineText(rawLine)}
|
||||
translatedText={translationText}
|
||||
translationCueLines={translationCueLines}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user