Skip to content

feat: Add romanized lyrics display for Japanese and Chinese#218

Closed
peter9811 wants to merge 1 commit intotranxuanthang:mainfrom
peter9811:add-romanized
Closed

feat: Add romanized lyrics display for Japanese and Chinese#218
peter9811 wants to merge 1 commit intotranxuanthang:mainfrom
peter9811:add-romanized

Conversation

@peter9811
Copy link

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.

isn't working perfectly, but is a big step:
image

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.
@peter9811
Copy link
Author

#206 @AARP41298, do you want to have a review here?

@peter9811 peter9811 force-pushed the add-romanized branch 2 times, most recently from b126654 to 929bbef Compare June 3, 2025 06:39
@peter9811
Copy link
Author

Closing this, adding a new one. The bump that I did, don't let the build run

@peter9811 peter9811 closed this Jun 4, 2025
@peter9811 peter9811 deleted the add-romanized branch June 4, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant