support Kugou LRC, optimize navigation, and add context-aware romanizer#2030
Merged
Conversation
…rillic Chinese: tonal sandhi for 一/不, Erhua (儿化) suffix merging. Japanese: irregular compounds (今日/明日/昨日), ん→m before b/p (Hepburn), both ッ/っ sokuon variants, 非自立 morpheme spacing. Cyrillic: ь palatalization of preceding consonant output (нь→ny, ть→ty…), ъ hard sign silenced, е context-split (ye vs e), ё always yo.
Add POLYPHONE_OVERRIDE table (50 entries) and CONTEXT_PINYIN map for neighbor-based disambiguation. getPinyin() now checks context and override before falling back to Pinyin4j, fixing common 多音字 errors in song lyrics (行/长/重/乐/得 etc.).
- Fix compile error: Regex("\s+") → Regex("""\s+""") (raw string) in
romanizeChinese — \s is not a valid Kotlin string escape (line 423)
- Replace all java.lang.StringBuilder usages with Kotlin StringBuilder
(romanizeKorean, romanizeHindi, romanizePunjabi, romanizeChinese,
processCyrillicWordByWord, processUkrainian, processBelarusian)
- Remove unused variable origTrans in parseLyrics
- Deduplicate double matrix.map(Offset(...)) calls in
List<PathNode>.transform — each MoveTo/LineTo now computed once
- Translate all Spanish comments and KDocs to English for consistency
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.
Description
This PR introduces comprehensive updates to lyrics handling, page navigation animations, and language romanization.
Key Changes
Lyrics & Navigation:
Context-Aware Romanizer:
POLYPHONE_OVERRIDEtable andCONTEXT_PINYINmap for neighbor-based disambiguation (resolving common duōyīnzì like 行/长/重/乐/得). Added handling for tonal sandhi (一/不) and Erhua (儿化) suffix merging. Falls back to Pinyin4j.Closes #1895