Compare commits

...

26 Commits

Author SHA1 Message Date
ca04c4561b Bump version to 3.0.2 2023-12-03 03:30:08 +09:00
7d8fbf49a8 Translated using Weblate (Chinese (Traditional))
Currently translated at 23.6% (69 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/zh_Hant/
2023-12-02 19:29:34 +01:00
75e15b948d Translated using Weblate (Chinese (Traditional))
Currently translated at 23.6% (69 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/zh_Hant/
2023-12-02 19:29:28 +01:00
125b69fd75 Translated using Weblate (Chinese (Traditional))
Currently translated at 23.6% (69 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/zh_Hant/
2023-12-02 19:29:28 +01:00
a68d6b64dd Translated using Weblate (French)
Currently translated at 8.9% (26 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/fr/
2023-12-02 19:29:28 +01:00
a60d4264dc fix: pnpm install doesn't refresh lock file 2023-12-03 03:16:07 +09:00
9e2c6b1afa fix: update pnpm-lock.yaml 2023-12-03 03:07:11 +09:00
14965a93e9 fix: simple-youtube-age-restriction-bypass 2023-12-03 02:49:17 +09:00
f62664b6a5 fix(adblocker): fix In-Player adblocker
- resolves #1478
2023-12-03 02:06:49 +09:00
60cb7f32f1 fix(in-app-menu/i18n): fix hide-dom-window-controls 2023-12-03 01:00:33 +09:00
008b3ad710 Translated using Weblate (Chinese (Traditional))
Currently translated at 1.0% (3 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/zh_Hant/
2023-12-02 16:59:02 +01:00
8cae64f496 fix(menu): crash on linux
- resolves #1477
2023-12-03 00:54:36 +09:00
5cdc1bc762 Update translation files
Updated by "Remove blank strings" hook in Weblate.

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/
2023-12-02 16:29:40 +01:00
15c455105b Translated using Weblate (French)
Currently translated at 8.5% (25 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/fr/
2023-12-02 16:29:40 +01:00
14407a98c9 Translated using Weblate (English)
Currently translated at 100.0% (292 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/en/
2023-12-02 16:29:40 +01:00
0d004d5caf Added translation using Weblate (Chinese (Traditional)) 2023-12-02 16:29:40 +01:00
4b75a2405c Update changelog for v3.0.1 2023-12-02 14:32:40 +00:00
1f7e28b6fb Bump version to 3.0.1 (hotfix) 2023-12-02 23:23:26 +09:00
c41b2ce861 fix: if locale is not present, set to unspecified 2023-12-02 23:23:13 +09:00
7f02afc5a6 Translated using Weblate (French)
Currently translated at 3.4% (10 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/fr/
2023-12-02 14:14:53 +00:00
496b3ffc1b fix(adblocker): remove unused statement 2023-12-02 23:14:04 +09:00
e9a395f67a hotfix(adblocker): fix #1475 2023-12-02 23:13:21 +09:00
0660f0b7ce Translated using Weblate (German)
Currently translated at 100.0% (292 of 292 strings)

Translation: th-ch/youtube-music/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/de/
2023-12-02 14:41:50 +01:00
3ac09b9dc1 Added translation using Weblate (French) 2023-12-02 14:41:50 +01:00
fe4904a4af fix(index): i18n translate 2023-12-02 22:35:49 +09:00
d8c8bd17ec Update changelog for v3.0.0 2023-12-02 13:21:02 +00:00
15 changed files with 727 additions and 450 deletions

View File

@ -2,8 +2,51 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [v3.0.1](https://github.com/th-ch/youtube-music/compare/v3.0.0...v3.0.1)
- hotfix(adblocker): fix #1475 [`#1475`](https://github.com/th-ch/youtube-music/issues/1475)
- Translated using Weblate (French) [`7f02afc`](https://github.com/th-ch/youtube-music/commit/7f02afc5a6839adfe8437d4e2cc8dee13a93b311)
- Update changelog for v3.0.0 [`d8c8bd1`](https://github.com/th-ch/youtube-music/commit/d8c8bd17ecfbdf96ebd29eb4c5748c07876ee242)
- Translated using Weblate (German) [`0660f0b`](https://github.com/th-ch/youtube-music/commit/0660f0b7ce6895ef5800f48ade1da2d7f8e0c1f7)
### [v3.0.0](https://github.com/th-ch/youtube-music/compare/v2.2.0...v3.0.0)
> 2 December 2023
- Add text to Translation section [`#1470`](https://github.com/th-ch/youtube-music/pull/1470)
- fix(deps): update dependency youtubei.js to v8 [`#1473`](https://github.com/th-ch/youtube-music/pull/1473)
- chore(deps): update dependency electron to v27.1.3 [`#1471`](https://github.com/th-ch/youtube-music/pull/1471)
- fix(deps): update dependency @xhayper/discord-rpc to v1.1.1 [`#1472`](https://github.com/th-ch/youtube-music/pull/1472)
- feat: add support i18n [`#1468`](https://github.com/th-ch/youtube-music/pull/1468)
- chore(deps): update dependency electron to v27.1.2 [`#1441`](https://github.com/th-ch/youtube-music/pull/1441)
- Nicer Readme [`#1439`](https://github.com/th-ch/youtube-music/pull/1439)
- Windows Zoom, ScaleFactor [`#1402`](https://github.com/th-ch/youtube-music/pull/1402)
- chore(deps): bump axios from 1.5.1 to 1.6.1 [`#1400`](https://github.com/th-ch/youtube-music/pull/1400)
- Updated mac icon to better reflect the Mac styling [`#1395`](https://github.com/th-ch/youtube-music/pull/1395)
- feat: rename plugins to clarify context [`#1392`](https://github.com/th-ch/youtube-music/pull/1392)
- feat: refactor plugin utils [`#1391`](https://github.com/th-ch/youtube-music/pull/1391)
- feat: plugin auto-importer with `vite-plugin-resolve` [`#1385`](https://github.com/th-ch/youtube-music/pull/1385)
- feat: migrate from `rollup` to `electron-vite` [`#1364`](https://github.com/th-ch/youtube-music/pull/1364)
- feat: enable `context-isolation` [`#1361`](https://github.com/th-ch/youtube-music/pull/1361)
- fix: add workaround for `podcast` type video [`#1362`](https://github.com/th-ch/youtube-music/pull/1362)
- fix: fix broken menu-layout [`#1360`](https://github.com/th-ch/youtube-music/pull/1360)
- Add Homebrew cask install option for MacOS. [`#1357`](https://github.com/th-ch/youtube-music/pull/1357)
- feat: changed Zoom shortcuts to standard [`#1458`](https://github.com/th-ch/youtube-music/issues/1458)
- fix(in-app-menu): fix #1436 [`#1436`](https://github.com/th-ch/youtube-music/issues/1436)
- fix(discord): update application client-id [`#1431`](https://github.com/th-ch/youtube-music/issues/1431)
- chore(deps): update dependency electron to v27.0.4 [`#1324`](https://github.com/th-ch/youtube-music/issues/1324)
- fix(in-app-menu): panel should close with the window when it is closed [`#1389`](https://github.com/th-ch/youtube-music/issues/1389)
- fix: change titleBarOverlay height based on zoomFactor [`#1375`](https://github.com/th-ch/youtube-music/issues/1375)
- fix: fixed an issue if "Always on top" is enabled, the dialog is displayed below the window [`#1379`](https://github.com/th-ch/youtube-music/issues/1379)
- fix: fix winget version (fix #1363) [`#1363`](https://github.com/th-ch/youtube-music/issues/1363)
- feat: run prettier [`a3104fd`](https://github.com/th-ch/youtube-music/commit/a3104fda4b0d58b076d0c737111636a66e468acc)
- Translated using Weblate (Korean) [`b4b7ad8`](https://github.com/th-ch/youtube-music/commit/b4b7ad824b8c489ae483eba139b46e5b200231fc)
- Translated using Weblate (English) [`d2eabaa`](https://github.com/th-ch/youtube-music/commit/d2eabaa4bbccd89eae529eae52cec035e8e2620c)
#### [v2.2.0](https://github.com/th-ch/youtube-music/compare/v2.1.3...v2.2.0)
> 27 October 2023
- feat(ambient-mode): add config for `ambient-mode` plugin [`#1349`](https://github.com/th-ch/youtube-music/pull/1349)
- bump deps [`4248d20`](https://github.com/th-ch/youtube-music/commit/4248d20e8ef926ce7b1d07eb83743755a341d9f6)
- Update changelog for v2.1.3 [`dc73561`](https://github.com/th-ch/youtube-music/commit/dc73561c8a8acfc8ba91aff2dc78e4267869f2fd)

View File

@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "3.0.0",
"version": "3.0.2",
"description": "YouTube Music Desktop App - including custom plugins",
"main": "./dist/main/index.js",
"license": "MIT",
@ -162,7 +162,7 @@
"node-html-parser": "6.1.11",
"node-id3": "0.2.6",
"serve": "14.2.1",
"simple-youtube-age-restriction-bypass": "git+https://github.com/organization/Simple-YouTube-Age-Restriction-Bypass.git#v2.5.8",
"simple-youtube-age-restriction-bypass": "github:organization/Simple-YouTube-Age-Restriction-Bypass#v2.5.9",
"ts-morph": "20.0.0",
"vudio": "2.1.1",
"x11": "2.3.0",

809
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
export interface LanguageResources {
[lang: string]: {
translation: Record<string, unknown> & {
language: {
language?: {
name: string;
'local-name': string;
code: string;

View File

@ -59,7 +59,7 @@
},
"unresponsive": {
"buttons": {
"quit": "Beenden",
"quit": "Verlassen",
"relaunch": "Neustarten",
"wait": "Warten"
},
@ -296,7 +296,7 @@
"fade-in-duration": "Einblendezeit (Millisekunden)",
"fade-out-duration": "Ausblendezeit (Millisekunden)",
"fade-scaling": {
"label": "Fade-Skalierung",
"label": "Übergangsskalierung",
"linear": "Linear",
"logarithmic": "Logarithmisch"
},
@ -421,7 +421,7 @@
"menu": {
"romanized-lyrics": "Romanisierte Songtexte"
},
"name": "Liedtext von Genius",
"name": "Liedtexte von Genius",
"renderer": {
"fetched-lyrics": "Liedtexte für Genius abgerufen"
}
@ -500,7 +500,7 @@
"title": "Globale Lautstärketastenbelegungen"
},
"volume-steps": {
"label": "Wähle Schritte zur Erhöhung/Senkung der Lautstärke",
"label": "Wähle Schritte zur Lautstärkehebung/-senkung",
"title": "Lautstärkestufen"
}
}
@ -519,6 +519,7 @@
"name": "Videoqualitätsänderer"
},
"shortcuts": {
"description": "Ermöglicht das Festlegen globaler Hotkeys für die Wiedergabe (Abspielen/Pause/Nächstes/Vorheriges) + Deaktivieren des Medien-OSD durch Überschreiben der Medientasten + Aktivieren von Strg/CMD + F zum Suchen + Aktivieren der Linux mpris-Unterstützung für Medientasten + Angepasste Tastenkürzel für fortgeschrittene Benutzer",
"menu": {
"override-media-keys": "Medienschlüssel überschreiben",
"set-keybinds": "Globale Liedsteuerung setzen"
@ -571,9 +572,9 @@
"mode": {
"label": "Modus",
"submenu": {
"custom": "Angepasster Wechsler",
"custom": "Angepasster Schalter",
"disabled": "Deaktiviert",
"native": "Eingebauter Umschalter"
"native": "Eingebauter Schalter"
}
}
},

View File

@ -21,7 +21,7 @@
"main": {
"console": {
"did-finish-load": {
"dev-tools": "did finish load. dev tools opened"
"dev-tools": "Finished loading. DevTools opened"
},
"i18n": {
"loaded": "i18n loaded"

112
src/i18n/resources/fr.json Normal file
View File

@ -0,0 +1,112 @@
{
"language": {
"code": "fr",
"local-name": "Français",
"name": "French"
},
"main": {
"console": {
"theme": {
"css-file-not-found": "Le fichier de CSS \"{{cssFile}}\" n'existe pas, ignorer"
}
},
"dialog": {
"update-available": {
"buttons": {
"download": "Sauvegarder"
}
}
},
"menu": {
"options": {
"label": "Paramètres",
"submenu": {
"advanced-options": {
"submenu": {
"edit-config-json": "Modifier config.json",
"set-proxy": {
"prompt": {
"placeholder": "Exemple: socks5://127.0.0.1:9999"
}
}
}
},
"language": {
"label": "Langue"
},
"visual-tweaks": {
"submenu": {
"like-buttons": {
"hide": "Cacher"
}
}
}
}
}
}
},
"plugins": {
"ambient-mode": {
"menu": {
"buffer": {
"submenu": {
"buffer": "{{buffer}}"
}
},
"opacity": {
"submenu": {
"percent": "{{opacity}}%"
}
},
"size": {
"submenu": {
"percent": "{{size}}%"
}
}
}
},
"captions-selector": {
"prompt": {
"selector": {
"none": "Aucun"
}
}
},
"crossfade": {
"prompt": {
"options": {
"multi-input": {
"fade-scaling": {
"linear": "Linéaire",
"logarithmic": "Logarithmique"
}
}
}
}
},
"downloader": {
"backend": {
"dialog": {
"start-download-playlist": {
"detail": "({{playlistSize}} chansons)",
"title": "Téléchargement a commencé"
}
},
"feedback": {
"download-progress": "Télécharger: {{percent}}%",
"downloading": "Télécharge…",
"downloading-counter": "Télécharge {{current}}/{{total}}…",
"preparing-file": "Péparer des fichier…",
"saving": "Sauvegarde…"
}
},
"name": "Téléchargeur",
"templates": {
"button": "Télécharger"
}
},
"last-fm": {
"name": "Last.fm"
}
}
}

View File

@ -0,0 +1,145 @@
{
"common": {
"console": {
"plugins": {
"execute-failed": "插件 {{pluginName}} 無法被執行::{{contextName}}",
"executed-at-ms": "插件 {{pluginName}} ::{{contextName}} 用了 {{ms}} ms 來執行",
"initialize-failed": "初始化插件 \"{{pluginName}}\" 失敗",
"load-all": "載入所有插件",
"load-failed": "載入插件 \"{{pluginName}}\" 失敗",
"loaded": "插件 \"{{pluginName}}\" 已被載入",
"unload-failed": "解除安裝插件 \"{{pluginName}}\" 失敗",
"unloaded": "插件 \"{{pluginName}}\" 已被解除安裝"
}
}
},
"language": {
"code": "zh-TW",
"local-name": "正體字",
"name": "Traditional Chinese"
},
"main": {
"console": {
"did-finish-load": {
"dev-tools": "載入完成。開發者工具已開啟"
},
"i18n": {
"loaded": "i18n 已載入"
},
"second-instance": {
"receive-command": "使用協定來接收指令: \"{{command}}\""
},
"theme": {
"css-file-not-found": "CSS 檔案 \"{{cssFile}}\" 不存在,已忽略"
},
"unresponsive": {
"details": "無回應錯誤!\n{{error}}"
},
"when-ready": {
"clearing-cache-after-20s": "清理程式的快取資料"
},
"window": {
"tried-to-render-offscreen": "視窗正嘗試在螢幕外渲染,視窗大小 = {{windowSize}},螢幕大小 = {{displaySize}},位置 = {{position}}"
}
},
"dialog": {
"hide-menu-enabled": {
"detail": "選單已隱藏,使用 'Alt' 鍵來重新顯示(或是使用空白鍵來使用程式內選單)",
"message": "隱藏選單已經啟用",
"title": "隱藏選單已啟用"
},
"need-to-restart": {
"buttons": {
"later": "稍後",
"restart-now": "立即重啟"
},
"detail": "插件 \"{{pluginName}}\" 需要程式重新啟動之後才會生效",
"message": "\"{{pluginName}}\" 需要重新啟動",
"title": "需要重新啟動"
},
"unresponsive": {
"buttons": {
"quit": "離開",
"relaunch": "重新啟動",
"wait": "等一下"
},
"detail": "造成不便我們深表歉意!請選擇動作:",
"message": "應用程式無回應",
"title": "視窗無回應"
},
"update-available": {
"buttons": {
"disable": "關閉更新",
"download": "下載",
"ok": "OK"
},
"detail": "新的版本已經推出,你可以到 {{downloadLink}} 下載",
"message": "有新版本可用",
"title": "有可用的更新"
}
},
"menu": {
"about": "關於",
"navigation": {
"label": "導覽列",
"submenu": {
"copy-current-url": "複製目前的網址",
"go-back": "回到上一頁",
"go-forward": "回到下一頁",
"quit": "退出",
"restart": "重啟程式"
}
},
"options": {
"label": "選項",
"submenu": {
"advanced-options": {
"label": "進階選項",
"submenu": {
"auto-reset-app-cache": "當程式啟動時重置應用程式快取",
"disable-hardware-acceleration": "關閉硬體加速",
"edit-config-json": "編輯 config.json",
"override-user-agent": "複寫用戶代理",
"restart-on-config-changes": "重新啟動來更改配置",
"set-proxy": {
"label": "設定代理伺服器",
"prompt": {
"label": "輸入代理伺服器位置:(留空以停用本設定)",
"placeholder": "示例: socks5://127.0.0.1:9999",
"title": "設定代理伺服器"
}
},
"toggle-dev-tools": "切換開發者工具"
}
},
"always-on-top": "永遠顯示在最上層",
"auto-update": "自動更新",
"hide-menu": {
"label": "隱藏選單"
},
"language": {
"dialog": {
"message": "語言會在下一次重啟應用時變更",
"title": "語言已變更"
},
"label": "語言",
"submenu": {
"to-help-translate": "想要協助翻譯?點擊這裡"
}
},
"resume-on-start": "繼續上次關閉應用前的音樂",
"start-at-login": "開機時啟動",
"starting-page": {
"label": "啟動頁面",
"unset": "未設置"
},
"tray": {
"submenu": {
"disabled": "已停用"
}
}
}
}
}
}
}

View File

@ -404,7 +404,7 @@ async function createMainWindow() {
removeContentSecurityPolicy();
win.webContents.on('dom-ready', async () => {
if (useInlineMenu) {
if (useInlineMenu && !is.linux()) {
win.setTitleBarOverlay({
...defaultTitleBarOverlayOptions,
height: Math.floor(
@ -556,11 +556,14 @@ app.on('activate', async () => {
});
const getDefaultLocale = (locale: string) =>
Object.keys(languageResources).includes(locale) ? locale : 'en';
Object.keys(languageResources).includes(locale) ? locale : null;
app.whenReady().then(async () => {
if (!config.get('options.language')) {
config.set('options.language', getDefaultLocale(app.getLocale()));
const locale = getDefaultLocale(app.getLocale());
if (locale) {
config.set('options.language', locale);
}
}
await loadI18n().then(async () => {
@ -683,7 +686,7 @@ app.whenReady().then(async () => {
type: 'info',
buttons: [
t('main.dialog.update-available.buttons.download'),
t('main.dialog.update-available.buttons.later'),
t('main.dialog.update-available.buttons.ok'),
t('main.dialog.update-available.buttons.disable'),
],
title: t('main.dialog.update-available.title'),

View File

@ -377,9 +377,9 @@ export const mainMenuTemplate = async (
availableLanguages
.map(
(lang): Electron.MenuItemConstructorOptions => ({
label: `${languageResources[lang].translation.language.name} (${languageResources[lang].translation.language['local-name']})`,
label: `${languageResources[lang].translation.language?.name ?? 'Unknown'} (${languageResources[lang].translation.language?.['local-name'] ?? 'Unknown'})`,
type: 'checkbox',
checked: config.get('options.language') === lang,
checked: (config.get('options.language') ?? 'en') === lang,
click() {
config.setMenuOption('options.language', lang);
refreshMenu(win);

View File

@ -113,18 +113,25 @@ export default createPlugin({
if (config.blocker === blockers.WithBlocklists) {
// Preload adblocker to inject scripts/styles
await injectCliqzPreload();
} else if (config.blocker === blockers.InPlayer) {
inject();
}
},
async onConfigChange(newConfig) {
if (newConfig.blocker === blockers.WithBlocklists) {
await injectCliqzPreload();
} else if (newConfig.blocker === blockers.InPlayer) {
if (!isInjected()) {
inject();
}
}
},
},
renderer: {
async start({ getConfig }) {
const config = await getConfig();
if (config.blocker === blockers.InPlayer && !isInjected()) {
inject();
}
},
onConfigChange(newConfig) {
if (newConfig.blocker === blockers.InPlayer && !isInjected()) {
inject();
}
},
}
});

View File

@ -10,7 +10,7 @@
let injected = false;
export const isInjected = () => isInjected;
export const isInjected = () => injected;
export const inject = () => {
injected = true;

View File

@ -1,3 +1,5 @@
import { inject } from 'simple-youtube-age-restriction-bypass';
import { createPlugin } from '@/utils';
import { t } from '@/i18n';
@ -6,6 +8,6 @@ export default createPlugin({
description: () => t('plugins.bypass-age-restrictions.description'),
restartNeeded: true,
// See https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass#userscript
renderer: () => import('simple-youtube-age-restriction-bypass'),
// See https://github.com/organization/Simple-YouTube-Age-Restriction-Bypass#userscript
renderer: () => inject(),
});

View File

@ -1,4 +1,3 @@
declare module 'simple-youtube-age-restriction-bypass' {
const nothing: never;
export default nothing;
export const inject: () => void;
}

View File

@ -15,7 +15,7 @@ export const onMenu = async ({
if (is.linux()) {
return [
{
label: t('plugins.in-app-menu.hide-dom-window-controls'),
label: t('plugins.in-app-menu.menu.hide-dom-window-controls'),
type: 'checkbox',
checked: config.hideDOMWindowControls,
click(item) {