-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lyrics-plus): translation Below-mode Individual copy implementation #3308
Conversation
Does it fix #3303? |
@rxri |
ok. converting to draft for now then |
When changing the |
cool. is it ready now then |
fix duplication active issues between @rxri It's not yet. I think I just need to do one last thing. |
for songs in languages that support translation but not conversion (e.g., English), the Convert option is disabled. @rxri I'll wrap it up here. There are more changes, but I'll include them in the next pull request. |
since i have access to @copilot, let's see what he has to say lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (10)
CustomApps/lyrics-plus/Utils.js:99
- The variable name 'conver' in the convertParsedToLRC and convertParsedToUnsynced functions is likely a typo. It should be renamed to 'converted' or something more descriptive.
const rawLyrics = lyrics[0].originalText ? lyrics.map((line) => line.originalText).join(" ") : lyrics.map((line) => line.text).join(" ");
CustomApps/lyrics-plus/Utils.js:105
- The 'p1' element is not a valid HTML element. It should be 'p'.
return react.createElement("p1", null, reactChildren);
CustomApps/lyrics-plus/Utils.js:102
- The 'formatTime' function should ensure that the seconds are always padded to two decimal places.
let seconds = ((timestamp - minutes * 60000) / 1000).toFixed(2);
CustomApps/lyrics-plus/Utils.js:227
- Ensure that the new 'convertParsedToLRC' function is covered by tests to verify its correctness.
convertParsedToLRC(lyrics, isBelow) {
CustomApps/lyrics-plus/Utils.js:247
- Ensure that the new 'convertParsedToUnsynced' function is covered by tests to verify its correctness.
convertParsedToUnsynced(lyrics, isBelow) {
CustomApps/lyrics-plus/Pages.js:207
- [nitpick] The error message 'Failed to copy lyrics to clipboard' is not very descriptive. Consider providing more context, such as 'Failed to copy lyrics to clipboard. Please try again.'
Spicetify.showNotification("Failed to copy lyrics to clipboard");
CustomApps/lyrics-plus/Pages.js:223
- [nitpick] The error message 'Failed to copy translated lyrics to clipboard' is not very descriptive. Consider providing more context, such as 'Failed to copy translated lyrics to clipboard. Please try again.'
Spicetify.showNotification("Failed to copy translated lyrics to clipboard");
CustomApps/lyrics-plus/index.js:184
- [nitpick] The variable name 'reRenderLyricsPage' is ambiguous. It should be renamed to 'forceLyricsPageRerender'.
this.reRenderLyricsPage = false;
CustomApps/lyrics-plus/index.js:3
- The function 'getConfig' should handle potential invalid values from 'localStorage' more robustly. Consider using 'return value === "true" ? true : (value === "false" ? false : defaultVal);'.
return value ? value === "true" : defaultVal;
CustomApps/lyrics-plus/Settings.js:662
- The 'reloadLyrics' function is called without checking if it is defined. Ensure 'reloadLyrics' is defined before calling it.
reloadLyrics?.();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well copilot didn't find anything so am good with it too
okay, lmao how no one noticed this |
If the lyrics are in Below-mode, the original lyrics or the translated lyrics can now be copy depending on the cursor position.
Additionally, when changing the
musixmatch translation language
inlyrics plus config
, the page is now designed to re-load, allowing the translation feature to be used without switching to the next song.And minor bugs were fixed, and unnecessary code was revised
2025-02-11.19-37-21.mp4
2025-02-11.19-38-03.mp4