Translate English

This commit is contained in:
MasterAcnolo
2025-11-19 16:48:07 +01:00
parent 69bbcee885
commit ef784dd19c
11 changed files with 64 additions and 44 deletions

View File

@@ -8,14 +8,21 @@ function getUserBrowser() {
// Liste des navigateurs supportés par yt-dlp
const browsers = [
{ name: "firefox", path: path.join(userProfile, "AppData", "Roaming", "Mozilla", "Firefox", "Profiles")},
{ name: "chrome", path: path.join(userProfile, "AppData", "Local", "Google", "Chrome", "User Data") },
{ name: "edge", path: path.join(userProfile, "AppData", "Local", "Microsoft", "Edge", "User Data") },
{ name: "firefox", path: path.join(userProfile, "AppData", "Roaming", "Mozilla", "Firefox", "Profiles") },
// { name: "chrome", path: path.join(userProfile, "AppData", "Local", "Google", "Chrome", "User Data", "Default") },
// { name: "brave", path: path.join(userProfile, "AppData", "Local", "BraveSoftware", "Brave-Browser", "User Data", "Default") },
// { name: "edge", path: path.join(userProfile, "AppData", "Local", "Microsoft", "Edge", "User Data", "Default") },
// { name: "opera", path: path.join(userProfile, "AppData", "Roaming", "Opera Software", "Opera Stable") },
// { name: "vivaldi", path: path.join(userProfile, "AppData", "Local", "Vivaldi", "User Data", "Default") },
// { name: "safari", path: path.join(userProfile, "AppData", "Local", "Apple Computer", "Safari") },
// { name: "whale", path: path.join(userProfile, "AppData", "Local", "Naver", "Naver Whale", "User Data", "Default") }
];
for (const browser of browsers) {
if (fs.existsSync(browser.path)) {
return browser.name;
} else{
notify.notifyFirefoxBrowserMissing();
}
}
notify.notifyCookiesBrowserError()

View File

@@ -5,7 +5,7 @@ function notifyDownloadFinished(folder) {
const iconPath = path.join(process.resourcesPath, "confirm-icon.png");
const notif = new Notification({
title: "Freedom Loader",
body: "Ton téléchargement est terminé, clique ici pour l'ouvrir.",
body: "Your download is complete, click here to open it.",
icon: iconPath,
});
@@ -17,7 +17,7 @@ function notifyCookiesBrowserError(){
const iconPath = path.join(process.resourcesPath, "error.png");
const notif = new Notification({
title: "Cookies Error",
body: "Impossible de récupérer les cookies. Connectez-vous sur votre navigateur et cliquez ici pour voir le tuto.",
body: "Unable to retrieve cookies. Please log in to your browser and click here to view the tutorial.",
icon: iconPath,
});
@@ -25,7 +25,20 @@ function notifyCookiesBrowserError(){
notif.show();
}
function notifyFirefoxBrowserMissing(){
const iconPath = path.join(process.ressourcesPath, "error.png");
const notif = new Notification({
title: "Firefox Missing",
body: "Firefox was not found on your system. Click here to follow the installation guide",
icon: iconPath,
});
notif.on("click", () => shell.openExternal("https://youtube.com/shorts/cN9f4s1Mf88?si=519QCVd_-fzJqRf1"))
notif.show();
}
module.exports = {
notifyDownloadFinished,
notifyCookiesBrowserError
notifyCookiesBrowserError,
notifyFirefoxBrowserMissing
};