ddddxxx / LyricsX

🎢 Ultimate lyrics app for macOS.
Mozilla Public License 2.0
4.62k stars 382 forks source link

Prefer bilingual lyrics: Should also work without [tt] word-precision lines and also for [tr:] languages other than Chinese (zh-Hans) #627

Open porg opened 4 months ago

porg commented 4 months ago

Preferences β†’ General β†’ Prefer bilingual lyrics

Currently only works if ...

  1. there are three identical timestamp instances
  2. the 2nd identical timestamp instance translation language is Chinese, [tr:zh-Hans]
  3. the 3rd identical timestamp instance starts with a [tt] and contains the word-precision timestamps

Please also support

Sample Files

βœ… Works β€” Word precision + Chinese translation

song.tt.zh-hans.lrcx :

[00:15.019]one two three four
[00:15.019][tr:zh-Hans]1 2 3 4
[00:15.019][tt]<0,0><614,5><925,11><1301,15><1799,18><1984,19><2175,20><2425,21><2611,22><3731,23><3731>
[00:22.056]five six seven
[00:22.056][tr:zh-Hans]5 6 7
[00:22.056][tt]<0,0><554,5><741,9><991,14><1302,15><1486,16><1792,17><1792>

❌ Fails β€” Word precision + German translation

song.tt.de.lrcx :

[00:15.019]one two three four
[00:15.019][tr:de]eins zwei drei vier
[00:15.019][tt]<0,0><614,5><925,11><1301,15><1799,18><1984,19><2175,20><2425,21><2611,22><3731,23><3731>
[00:22.056]five six seven
[00:22.056][tr:de]fΓΌnf sechs sieben
[00:22.056][tt]<0,0><554,5><741,9><991,14><1302,15><1486,16><1792,17><1792>

❌ Fails β€” Line precision + Chinese translation

song.zh-hans.lrcx

[00:15.019]one two three four
[00:15.019][tr:zh-Hans]1 2 3 4
[00:22.056]five six seven
[00:22.056][tr:zh-Hans]5 6 7