Translation changes

This commit is contained in:
aandrew-me 2022-09-03 16:13:22 +06:00
parent 54a9a25e07
commit 006f0d2b23
6 changed files with 85 additions and 31 deletions

View File

@ -1,11 +1,11 @@
// Converts the csv translation file to json and puts in translations folder
// Language of output file
const language = "ru";
const language = "en";
const { readFileSync, writeFileSync } = require("fs");
let csvFile = readFileSync("input.csv", { encoding: "utf-8" });
let csvFile = readFileSync("translate.csv", { encoding: "utf-8" });
let result = "";
let count = 0;

View File

@ -5,7 +5,7 @@ let inputFile = JSON.parse(fs.readFileSync('translations/translate.json', 'utf8'
fs.writeFileSync("translate.csv", "")
for (const [key, value] of Object.entries(inputFile)){
fs.appendFileSync("translate.csv", `"${key}"` + "\n")
fs.appendFileSync("translate.csv", `"${key}":"${key}"` + "\n")
}
console.log("Saved to translate.csv");

View File

@ -1,26 +1,26 @@
"Click to paste video URL or ID [Ctrl + V]"
"Preferences"
"About"
"Download location"
"Current download location - "
"Enable transparent dark mode(only Linux, needs restart)"
"Please wait, yt-dlp is being downloaded"
"Video"
"Audio"
"Title "
"Select Format "
"Download"
"Select Download Location"
"More options"
"Start"
"Select Language"
"Download particular time-range"
"End"
"If kept empty, it will start from the beginning"
"If kept empty, it will be downloaded to the end"
"Homepage"
"ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on"
"It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading"
"Source Code is available "
"here"
"Processing"
"Click to paste video URL or ID [Ctrl + V]":"Click to paste video URL or ID [Ctrl + V]"
"Preferences":"Preferences"
"About":"About"
"Download location":"Download location"
"Current download location - ":"Current download location - "
"Enable transparent dark mode(only Linux, needs restart)":"Enable transparent dark mode(only Linux, needs restart)"
"Please wait, yt-dlp is being downloaded":"Please wait, yt-dlp is being downloaded"
"Video":"Video"
"Audio":"Audio"
"Title ":"Title "
"Select Format ":"Select Format "
"Download":"Download"
"Select Download Location":"Select Download Location"
"More options":"More options"
"Start":"Start"
"Select Language":"Select Language"
"Download particular time-range":"Download particular time-range"
"End":"End"
"If kept empty, it will start from the beginning":"If kept empty, it will start from the beginning"
"If kept empty, it will be downloaded to the end":"If kept empty, it will be downloaded to the end"
"Homepage":"Homepage"
"ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on":"ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on"
"It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading":"It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading"
"Source Code is available ":"Source Code is available "
"here":"here"
"Processing":"Processing"

Can't render this file because it contains an unexpected character in line 1 and column 43.

28
translations/en.json Normal file
View File

@ -0,0 +1,28 @@
{
"Click to paste video URL or ID [Ctrl + V]": "Click to paste video URL or ID [Ctrl + V]",
"Preferences": "Preferences",
"About": "About",
"Download location": "Download location",
"Current download location - ": "Current download location - ",
"Enable transparent dark mode(only Linux, needs restart)": "Enable transparent dark mode(only Linux, needs restart)",
"Please wait, yt-dlp is being downloaded": "Please wait, yt-dlp is being downloaded",
"Video": "Video",
"Audio": "Audio",
"Title ": "Title ",
"Select Format ": "Select Format ",
"Download": "Download",
"Select Download Location": "Select Download Location",
"More options": "More options",
"Start": "Start",
"Select Language": "Select Language",
"Download particular time-range": "Download particular time-range",
"End": "End",
"If kept empty, it will start from the beginning": "If kept empty, it will start from the beginning",
"If kept empty, it will be downloaded to the end": "If kept empty, it will be downloaded to the end",
"Homepage": "Homepage",
"ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on": "ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on",
"It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading": "It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading",
"Source Code is available ": "Source Code is available ",
"here": "here",
"Processing": "Processing"
}

View File

@ -25,7 +25,7 @@ function i18n() {
);
} else {
loadedLanguage = JSON.parse(
fs.readFileSync(path.join(__dirname, "main.json"), "utf8")
fs.readFileSync(path.join(__dirname, "en.json"), "utf8")
);
}
}

View File

@ -1 +1,27 @@
{}
{"Click to paste video URL or ID [Ctrl + V]":"Нажмите, чтобы вставить URL-адрес или идентификатор видео [Ctrl + V]",
"Preferences":"Настройки",
"About":"О программе",
"Download location":"Папка загрузки",
"Current download location - ":"Текущее место загрузки - ",
"Enable transparent dark mode(only Linux, needs restart)":"Включить прозрачный темный режим (только для Linux, требуется перезагрузка)",
"Please wait, yt-dlp is being downloaded":"Пожалуйста, подождите, yt-dlp загружается",
"Video":"Видео",
"Audio":"Аудио",
"Title ":"Название ",
"Select Format ":"Выберите формат ",
"Download":"Скачать",
"Select Download Location":"Выберите место загрузки",
"More options":"Дополнительные опции",
"Start":"Начало",
"Select Language":"Выберите язык",
"Download particular time-range":"Скачать определенную часть",
"End":"Конец",
"If kept empty, it will start from the beginning":"Если оставить пустым, оно начнется с начала",
"If kept empty, it will be downloaded to the end":"Если оставить пустым, оно будет скачено до конца",
"Homepage":"Главная страница",
"ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on":"ytDownloader позволяет скачать видео (а иногда и аудио) с сотен сайтов, таких как Youtube, Facebook, Instagram, Tiktok, Twitter и так далее",
"It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading":"Это бесплатное приложение с открытым исходным кодом, созданное поверх Node.js и Electron. yt-dlp используется для загрузки",
"Source Code is available ":"Исходный код доступен ",
"here":"здесь",
"Processing":"Обрабатывается"
}