Skip to content

Commit

Permalink
병합 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
Lseoksee committed Jul 26, 2024
1 parent 3a6843f commit e4729cc
Show file tree
Hide file tree
Showing 25 changed files with 285 additions and 293 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Build

on:
pull_request:
branches:
- main
- "*/main/**"
push:
branches:
- main
- "*/main/**"
release:
types: [published]
on: [pull_request, push]

jobs:
build:
Expand Down Expand Up @@ -45,7 +35,7 @@ jobs:
os: ["linux", "darwin", "windows"]
arch: ["amd64", "arm64", "386"]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v2')
if: startsWith(github.ref, 'refs/tags/')
needs: build

steps:
Expand Down Expand Up @@ -87,25 +77,25 @@ jobs:
if: env.IS_UNIX == 'true'
uses: edgarrc/action-7z@v1
with:
args: 7z a -bb0 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar" "./spicetify" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json"
args: 7z a -bb0 "spicetify-korean-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar" "./spicetify" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json"

- name: 7z - .tar.gz
if: env.IS_UNIX == 'true'
uses: edgarrc/action-7z@v1
with:
args: 7z a -bb0 -sdel -mx9 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar"
args: 7z a -bb0 -sdel -mx9 "spicetify-korean-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" "spicetify-korean-${{ env.TAG }}-${{ matrix.os }}-${{ matrix.arch }}.tar"

- name: 7z - .zip
if: env.IS_WIN == 'true'
uses: edgarrc/action-7z@v1
with:
args: 7z a -bb0 -mx9 "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.arch == 'amd64' && 'x64') || (matrix.arch == 'arm64' && 'arm64') || 'x32' }}.zip" "./spicetify.exe" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json"
args: 7z a -bb0 -mx9 "spicetify-korean-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.arch == 'amd64' && 'x64') || (matrix.arch == 'arm64' && 'arm64') || 'x32' }}.zip" "./spicetify.exe" "./CustomApps" "./Extensions" "./Themes" "./jsHelper" "globals.d.ts" "css-map.json" "빠른설치.bat"

- name: Release
if: env.IS_UNIX == 'true' || env.IS_WIN == 'true'
uses: softprops/action-gh-release@v2
with:
files: "spicetify-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.os == 'windows' && matrix.arch == 'amd64' && 'x64') || (matrix.os == 'windows' && matrix.arch == '386' && 'x32') || matrix.arch }}.${{ matrix.os == 'windows' && 'zip' || 'tar.gz' }}"
files: "spicetify-korean-${{ env.TAG }}-${{ matrix.os }}-${{ (matrix.os == 'windows' && matrix.arch == 'amd64' && 'x64') || (matrix.os == 'windows' && matrix.arch == '386' && 'x32') || matrix.arch }}.${{ matrix.os == 'windows' && 'zip' || 'tar.gz' }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
name: Code quality

on:
pull_request:
branches:
- main
- "*/main/**"
push:
branches:
- main
- "*/main/**"
on: [push, pull_request]

jobs:
linter:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lintpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Lint Pull Request

on:
pull_request_target:
types: [opened, edited, synchronize]
types:
- opened
- edited
- synchronize

jobs:
lintpr:
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 150,
"tabWidth": 2,
"useTabs": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
58 changes: 29 additions & 29 deletions CustomApps/lyrics-plus/OptionsMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,84 +89,84 @@ const OptionsMenu = react.memo(({ options, onSelect, selected, defaultValue, bol
const TranslationMenu = react.memo(({ friendlyLanguage, hasTranslation }) => {
const items = useMemo(() => {
let sourceOptions = {
none: "None"
none: "없음"
};

const languageOptions = {
off: "Off",
"zh-hans": "Chinese (Simplified)",
"zh-hant": "Chinese (Traditional)",
ja: "Japanese",
ko: "Korean"
off: "기본값",
"zh-hans": "중국어 (간체)",
"zh-hant": "중국어 (번체)",
ja: "일본어",
ko: "한국어"
};

let modeOptions = {};

if (hasTranslation.musixmatch) {
sourceOptions = {
...sourceOptions,
musixmatchTranslation: "English (Musixmatch)"
musixmatchTranslation: "영어 (Musixmatch)"
};
}

if (hasTranslation.netease) {
sourceOptions = {
...sourceOptions,
neteaseTranslation: "Chinese (Netease)"
neteaseTranslation: "중국어 (Netease)"
};
}

switch (friendlyLanguage) {
case "japanese": {
modeOptions = {
furigana: "Furigana",
romaji: "Romaji",
hiragana: "Hiragana",
katakana: "Katakana"
furigana: "후리가나",
romaji: "로마자",
hiragana: "히라가나",
katakana: "가타카나"
};
break;
}
case "korean": {
modeOptions = {
hangul: "Hangul",
romaja: "Romaja"
hangul: "한글",
romaja: "로마자"
};
break;
}
case "chinese": {
modeOptions = {
cn: "Simplified Chinese",
hk: "Traditional Chinese (Hong Kong)",
tw: "Traditional Chinese (Taiwan)"
cn: "중국어",
hk: "중국어 (홍콩)",
tw: "중국어 (대만)"
};
break;
}
}

return [
{
desc: "Translation Provider",
desc: "번역 제공자",
key: "translate:translated-lyrics-source",
type: ConfigSelection,
options: sourceOptions,
renderInline: true
},
{
desc: "Language Override",
desc: "언어 바꾸기",
key: "translate:detect-language-override",
type: ConfigSelection,
options: languageOptions,
renderInline: true
},
{
desc: "Display Mode",
desc: "모드",
key: `translation-mode:${friendlyLanguage}`,
type: ConfigSelection,
options: modeOptions,
renderInline: true
},
{
desc: "Convert",
desc: "변환하기",
key: "translate",
type: ConfigSlider,
trigger: "click",
Expand All @@ -191,7 +191,7 @@ const TranslationMenu = react.memo(({ friendlyLanguage, hasTranslation }) => {
return react.createElement(
Spicetify.ReactComponent.TooltipWrapper,
{
label: "Conversion"
label: "가사 변환하기"
},
react.createElement(
"div",
Expand All @@ -204,7 +204,7 @@ const TranslationMenu = react.memo(({ friendlyLanguage, hasTranslation }) => {
menu: react.createElement(
Spicetify.ReactComponent.Menu,
{},
react.createElement("h3", null, " Conversions"),
react.createElement("h3", null, " 가사 변환하기"),
react.createElement(OptionList, {
type: "translation-menu",
items,
Expand Down Expand Up @@ -244,7 +244,7 @@ const AdjustmentsMenu = react.memo(({ mode }) => {
return react.createElement(
Spicetify.ReactComponent.TooltipWrapper,
{
label: "Adjustments"
label: "조정"
},
react.createElement(
"div",
Expand All @@ -257,19 +257,19 @@ const AdjustmentsMenu = react.memo(({ mode }) => {
menu: react.createElement(
Spicetify.ReactComponent.Menu,
{},
react.createElement("h3", null, " Adjustments"),
react.createElement("h3", null, " 조정"),
react.createElement(OptionList, {
items: [
{
desc: "Font size",
desc: "폰트 크기",
key: "font-size",
type: ConfigAdjust,
min: fontSizeLimit.min,
max: fontSizeLimit.max,
step: fontSizeLimit.step
},
{
desc: "Track delay",
desc: "가사 싱크",
key: "delay",
type: ConfigAdjust,
min: Number.NEGATIVE_INFINITY,
Expand All @@ -278,13 +278,13 @@ const AdjustmentsMenu = react.memo(({ mode }) => {
when: () => mode === SYNCED || mode === KARAOKE
},
{
desc: "Compact",
desc: "단순하게 보기",
key: "synced-compact",
type: ConfigSlider,
when: () => mode === SYNCED || mode === KARAOKE
},
{
desc: "Dual panel",
desc: "두 개씩 보기",
key: "dual-genius",
type: ConfigSlider,
when: () => mode === GENIUS
Expand Down
16 changes: 8 additions & 8 deletions CustomApps/lyrics-plus/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ const SyncedLyricsPage = react.memo(({ lyrics = [], provider, copyright, isKara
onContextMenu: event => {
event.preventDefault();
Spicetify.Platform.ClipboardAPI.copy(rawLyrics)
.then(() => Spicetify.showNotification("Lyrics copied to clipboard"))
.catch(() => Spicetify.showNotification("Failed to copy lyrics to clipboard"));
.then(() => Spicetify.showNotification("가사를 복사했습니다"))
.catch(() => Spicetify.showNotification("가사 복사 오류"));
}
},
!isKara ? text : react.createElement(KaraokeLine, { text, startTime, position, isActive })
Expand Down Expand Up @@ -437,8 +437,8 @@ const SyncedExpandedLyricsPage = react.memo(({ lyrics, provider, copyright, isKa
onContextMenu: event => {
event.preventDefault();
Spicetify.Platform.ClipboardAPI.copy(rawLyrics)
.then(() => Spicetify.showNotification("Lyrics copied to clipboard"))
.catch(() => Spicetify.showNotification("Failed to copy lyrics to clipboard"));
.then(() => Spicetify.showNotification("가사를 복사했습니다"))
.catch(() => Spicetify.showNotification("가사 복사 오류"));
}
},
!isKara ? text : react.createElement(KaraokeLine, { text, startTime, position, isActive })
Expand Down Expand Up @@ -475,8 +475,8 @@ const UnsyncedLyricsPage = react.memo(({ lyrics, provider, copyright }) => {
onContextMenu: event => {
event.preventDefault();
Spicetify.Platform.ClipboardAPI.copy(rawLyrics)
.then(() => Spicetify.showNotification("Lyrics copied to clipboard"))
.catch(() => Spicetify.showNotification("Failed to copy lyrics to clipboard"));
.then(() => Spicetify.showNotification("가사를 복사했습니다"))
.catch(() => Spicetify.showNotification("가사 복사 오류"));
}
},
text
Expand Down Expand Up @@ -578,8 +578,8 @@ const GeniusPage = react.memo(
event.preventDefault();
const copylyrics = lyrics.replace(/<br>/g, "\n").replace(/<[^>]*>/g, "");
Spicetify.Platform.ClipboardAPI.copy(copylyrics)
.then(() => Spicetify.showNotification("Lyrics copied to clipboard"))
.catch(() => Spicetify.showNotification("Failed to copy lyrics to clipboard"));
.then(() => Spicetify.showNotification("가사를 복사했습니다"))
.catch(() => Spicetify.showNotification("가사 복사 오류"));
}
})
);
Expand Down
6 changes: 3 additions & 3 deletions CustomApps/lyrics-plus/ProviderMusixmatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ProviderMusixmatch = (() => {
}
if (body["track.lyrics.get"]?.message?.body?.lyrics?.restricted) {
return {
error: "Unfortunately we're not authorized to show these lyrics.",
error: "이 가사를 표시할 권한이 없습니다.",
uri: info.uri
};
}
Expand Down Expand Up @@ -117,7 +117,7 @@ const ProviderMusixmatch = (() => {
const isInstrumental = meta?.track?.instrumental;

if (isInstrumental) {
return [{ text: "♪ Instrumental ♪", startTime: "0000" }];
return [{ text: "♪ 전주곡 ♪", startTime: "0000" }];
}
if (hasSynced) {
const subtitle = body["track.subtitles.get"]?.message?.body?.subtitle_list?.[0]?.subtitle;
Expand Down Expand Up @@ -145,7 +145,7 @@ const ProviderMusixmatch = (() => {
const isInstrumental = meta?.track?.instrumental;

if (isInstrumental) {
return [{ text: "♪ Instrumental ♪" }];
return [{ text: "♪ 전주곡 ♪" }];
}
if (hasUnSynced) {
const lyrics = body["track.lyrics.get"]?.message?.body?.lyrics?.lyrics_body;
Expand Down
Loading

0 comments on commit e4729cc

Please sign in to comment.