More localization changes

This commit is contained in:
aandrew-me 2022-09-02 21:37:52 +06:00
parent d55fba8eb3
commit 54a9a25e07
10 changed files with 60 additions and 74 deletions

View File

@ -1,7 +1,7 @@
// Converts the csv translation file to json and puts in translations folder // Converts the csv translation file to json and puts in translations folder
// Language of output file // Language of output file
const language = "ru" const language = "ru";
const { readFileSync, writeFileSync } = require("fs"); const { readFileSync, writeFileSync } = require("fs");
@ -10,7 +10,7 @@ let result = "";
let count = 0; let count = 0;
let size = csvFile.length; let size = csvFile.length;
let index = 0 let index = 0;
result += "{"; result += "{";
for (let letter of csvFile) { for (let letter of csvFile) {
@ -23,13 +23,15 @@ for (let letter of csvFile) {
index++; index++;
if (index == size - 1) { if (index == size - 1) {
result += `${letter}`; result += `${letter}`;
} } else {
else{
result += `${letter},`; result += `${letter},`;
} }
count = 0; count = 0;
} }
} else if (letter == "," && count == 2) {
index++
result += ":"
} else { } else {
result += letter; result += letter;
index++; index++;
@ -37,6 +39,6 @@ for (let letter of csvFile) {
} }
result += "}"; result += "}";
writeFileSync(`translations/${language}.json`, result) writeFileSync(`translations/${language}.json`, result);
console.log(`Converted and saved to translations/${language}.json`) console.log(`Converted and saved to translations/${language}.json`);

View File

@ -54,7 +54,7 @@
<button id="pasteUrl" class="submitBtn">Click to paste video URL or ID [Ctrl + V]</button> <button id="pasteUrl" class="submitBtn">Click to paste video URL or ID [Ctrl + V]</button>
<div id="loadingWrapper"> <div id="loadingWrapper">
<span>Processing </span> <span id="processing">Processing </span>
<svg version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" <svg version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
<circle fill="rgb(84, 171, 222)" stroke="none" cx="6" cy="50" r="6"> <circle fill="rgb(84, 171, 222)" stroke="none" cx="6" cy="50" r="6">

View File

@ -30,7 +30,7 @@
<br><br> <br><br>
<label>Select Language</label> <label id="selectLn">Select Language</label>
<select id="select" onchange="changeLanguage()"> <select id="select" onchange="changeLanguage()">
<option value="en">English</option> <option value="en">English</option>
<option value="ru">Русский</option> <option value="ru">Русский</option>

View File

@ -1,24 +0,0 @@
"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":"Начало"
"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":"здесь"
Can't render this file because it contains an unexpected character in line 1 and column 43.

View File

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

View File

@ -19,3 +19,4 @@ getId("advancedToggle").textContent = i18n.__("More options")
getId("rangeText").textContent= i18n.__("Download particular time-range") getId("rangeText").textContent= i18n.__("Download particular time-range")
getId("startTime").title = i18n.__("If kept empty, it will start from the beginning") getId("startTime").title = i18n.__("If kept empty, it will start from the beginning")
getId("endTime").title = i18n.__("If kept empty, it will be downloaded to the end") getId("endTime").title = i18n.__("If kept empty, it will be downloaded to the end")
getId("processing").textContent = i18n.__("Processing ")

View File

@ -14,3 +14,4 @@ getId("clText").innerHTML = i18n.__("Current download location - ")
getId("selectLocation").textContent = i18n.__("Select Download Location") getId("selectLocation").textContent = i18n.__("Select Download Location")
getId("transparentText").textContent = i18n.__("Enable transparent dark mode(only Linux, needs restart)") getId("transparentText").textContent = i18n.__("Enable transparent dark mode(only Linux, needs restart)")
getId("preferences").textContent = i18n.__("Preferences") getId("preferences").textContent = i18n.__("Preferences")
getId("selectLn").textContent = i18n.__("Select Language")

View File

@ -1,25 +1,26 @@
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"

1 Click to paste video URL or ID [Ctrl + V]
2 Preferences
3 About
4 Download location
5 Current download location -
6 Enable transparent dark mode(only Linux, needs restart)
7 Please wait, yt-dlp is being downloaded
8 Video
9 Audio
10 Title
11 Select Format
12 Download
13 Select Download Location
14 More options
15 Start
16 Select Language
17 Download particular time-range
18 End
19 If kept empty, it will start from the beginning
20 If kept empty, it will be downloaded to the end
21 Homepage
22 ytDownloader lets you download videos (and sometimes audios) from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on
23 It's a Free and Open Source app built on top of Node.js and Electron. yt-dlp has been used for downloading
24 Source Code is available Source Code is available
25 here
26 Processing

View File

@ -13,13 +13,15 @@
"Select Download Location":"Выберите место загрузки", "Select Download Location":"Выберите место загрузки",
"More options":"Дополнительные опции", "More options":"Дополнительные опции",
"Start":"Начало", "Start":"Начало",
"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 позволяет вам загружать видео (и иногда аудио) с сотен таких сайтов, как Youtube, Facebook, Instagram, Tiktok, Twitter и т.д", "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 используется для загрузки", "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 ":"Исходный код доступен ", "Source Code is available ":"Исходный код доступен ",
"here":"здесь" "here":"здесь",
"Processing":"Обрабатывается"
} }

View File

@ -25,5 +25,6 @@
"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":""
} }