feat: Add romanized lyrics display for Japanese and Chinese#218
Closed
peter9811 wants to merge 1 commit intotranxuanthang:mainfrom
Closed
feat: Add romanized lyrics display for Japanese and Chinese#218peter9811 wants to merge 1 commit intotranxuanthang:mainfrom
peter9811 wants to merge 1 commit intotranxuanthang:mainfrom
Conversation
This feature allows you to view romanized versions of Japanese (Romaji)
and Chinese (Pinyin) lyrics.
Key changes:
- Installed `wanakana` for Japanese romanization and `pinyin` for Chinese
romanization.
- Created utility functions in `src/utils/romanization.js` to handle
language detection and text conversion.
- Modified `PlainLyricsViewer.vue` and `LyricsViewer.vue` to include:
- A toggle button to enable/disable romanization.
- Logic to detect the language of the lyrics.
- Display of romanized text above the original lyrics when enabled.
- Added unit tests for the romanization utility functions using Vitest
in `src/utils/romanization.test.js`.
The romanization appears in both the expanded and mini lyric views.
For synchronized lyrics, each line is romanized individually.
For plain lyrics, the entire text block is romanized.
Author
|
#206 @AARP41298, do you want to have a review here? |
b126654 to
929bbef
Compare
Author
|
Closing this, adding a new one. The bump that I did, don't let the build run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This feature allows you to view romanized versions of Japanese (Romaji) and Chinese (Pinyin) lyrics.
Key changes:
wanakanafor Japanese romanization andpinyinfor Chinese romanization.src/utils/romanization.jsto handle language detection and text conversion.PlainLyricsViewer.vueandLyricsViewer.vueto include:src/utils/romanization.test.js.The romanization appears in both the expanded and mini lyric views. For synchronized lyrics, each line is romanized individually. For plain lyrics, the entire text block is romanized.
isn't working perfectly, but is a big step:
