From eb7f85bcf2887d086b4999eb9e424a368092acb5 Mon Sep 17 00:00:00 2001 From: Gnuey56 Date: Fri, 10 May 2024 19:54:19 +0900 Subject: [PATCH 01/29] Update Japanese translation --- po/ja.po | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 8 deletions(-) diff --git a/po/ja.po b/po/ja.po index 3001832..ec02944 100644 --- a/po/ja.po +++ b/po/ja.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-03-04 22:21+0900\n" +"PO-Revision-Date: 2024-05-10 19:51+0900\n" "Last-Translator: Gnuey56 \n" "Language-Team: \n" "Language: ja\n" @@ -27,7 +27,7 @@ msgstr "Varia" #. Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. #: data/io.github.giantpinkrobots.varia.desktop.in:11 msgid "varia;aria;download;manager;" -msgstr "varia;aria;download;manager;" +msgstr "varia;aria;download;manager;ダウンロード;マネージャー;" #: data/io.github.giantpinkrobots.varia.metainfo.xml.in:4 msgid "Download manager based on aria2" @@ -77,7 +77,7 @@ msgstr "ダウンロードフォルダを開く" #: src/variamain.py:196 msgid "Speed Limit" -msgstr "スピード制限" +msgstr "速度制限" #: src/variamain.py:203 src/variamain.py:423 msgid "Pause All" @@ -85,11 +85,11 @@ msgstr "すべてを一時停止" #: src/variamain.py:212 msgid "Speed" -msgstr "スピード" +msgstr "速度" #: src/variamain.py:215 msgid "Set Speed Limit" -msgstr "スピード制限を設定" +msgstr "速度制限を設定" #: src/variamain.py:216 msgid "Cancel All" @@ -109,7 +109,7 @@ msgstr "ダウンロードが完了しました。" #: src/variamain.py:276 msgid "Download speed is limited." -msgstr "ダウンロードスピードが制限されています。" +msgstr "ダウンロード速度が制限されています。" #: src/variamain.py:277 msgid "An error occurred:" @@ -178,7 +178,7 @@ msgstr "変更" #: src/variamain.py:463 msgid "Speed limited" -msgstr "スピードが制限されています" +msgstr "速度が制限されています" #: src/variamain.py:519 msgid "Authentication" @@ -216,7 +216,7 @@ msgid "Remote Download Location" msgstr "リモートのダウンロード場所" msgid "Exiting Varia..." -msgstr "Varia を終了しています..." +msgstr "Varia を終了中..." msgid "Background Mode" msgstr "バックグラウンドモード" @@ -227,6 +227,102 @@ msgstr "バックグラウンドでダウンロードを続けます。" msgid "Browser Extension" msgstr "ブラウザ拡張機能" +msgid "Shutdown on Completion" +msgstr "完了時にシャットダウンする" + +msgid "Varia is about to shut down your computer." +msgstr "Varia はこのコンピューターをシャットダウンしようとしています。" + +msgid "Press Cancel to cancel and disable." +msgstr "キャンセルを押して取り消しできます。" + +msgid "Cancel" +msgstr "キャンセル" + +msgid "Warning" +msgstr "警告" + +msgid "Monday" +msgstr "月曜日" + +msgid "Tuesday" +msgstr "火曜日" + +msgid "Wednesday" +msgstr "水曜日" + +msgid "Thursday" +msgstr "木曜日" + +msgid "Friday" +msgstr "金曜日" + +msgid "Saturday" +msgstr "土曜日" + +msgid "Sunday" +msgstr "日曜日" + +msgid "Start (h/m):" +msgstr "開始 (時/分):" + +msgid "End (h/m):" +msgstr "終了 (時/分):" + +msgid "Scheduler enabled" +msgstr "スケジューラーが有効になっています" + +msgid "Scheduler" +msgstr "スケジューラー" + +msgid "Enabled" +msgstr "有効" + +msgid "Start downloading in these times" +msgstr "これらの時間にダウンロードを開始する" + +msgid "Stop downloading in these times" +msgstr "これらの時間にダウンロードを終了する" + +msgid "Add Timespan" +msgstr "タイムスパンを追加" + +msgid "Seeding" +msgstr "シード中" + +msgid "Failed" +msgstr "失敗" + +msgid "Completion Options" +msgstr "ダウンロード完了時のオプション" + +msgid "Exit on Completion" +msgstr "完了時に終了する" + +msgid "Varia is about to quit." +msgstr "Varia は終了しようとしています。" + +msgid "Preferences" +msgstr "設定" + +msgid "Other" +msgstr "その他" + +msgid "Basic Settings" +msgstr "基本設定" + +msgid "Advanced Settings" +msgstr "詳細設定" + +msgid "Use cookies.txt" +msgstr "cookies.txt を使用" + +msgid "Import cookies.txt" +msgstr "cookies.txt をインポート" + +msgid "Remove cookies.txt" +msgstr "cookies.txt を削除" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From bee59dc998239759191657992ec86404eb6bc8fb Mon Sep 17 00:00:00 2001 From: haggen88 <68134588+haggen88@users.noreply.github.com> Date: Fri, 10 May 2024 15:42:13 -0400 Subject: [PATCH 02/29] update es.po --- po/es.po | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/po/es.po b/po/es.po index bef7bbb..423856f 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-03-29 16:50-0300\n" +"PO-Revision-Date: 2024-05-10 15:41-0400\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -241,6 +241,87 @@ msgstr "Cancelar" msgid "Warning" msgstr "Advertencia" +msgid "Monday" +msgstr "Lunes" + +msgid "Tuesday" +msgstr "Martes" + +msgid "Wednesday" +msgstr "Miércoles" + +msgid "Thursday" +msgstr "Jueves" + +msgid "Friday" +msgstr "Viernes" + +msgid "Saturday" +msgstr "Sábado" + +msgid "Sunday" +msgstr "Domingo" + +msgid "Start (h/m):" +msgstr "Inicio (h/m):" + +msgid "End (h/m):" +msgstr "Fin (h/m):" + +msgid "Scheduler enabled" +msgstr "Planificador activado" + +msgid "Scheduler" +msgstr "Planificador" + +msgid "Enabled" +msgstr "Activado" + +msgid "Start downloading in these times" +msgstr "Empezar a descargar en estos tiempos" + +msgid "Stop downloading in these times" +msgstr "Dejar de descargar en estos tiempos" + +msgid "Add Timespan" +msgstr "Añadir intervalo de tiempo" + +msgid "Seeding" +msgstr "Compartiendo" + +msgid "Failed" +msgstr "Fallido" + +msgid "Completion Options" +msgstr "Opciones de finalización" + +msgid "Exit on Completion" +msgstr "Salir al finalizar" + +msgid "Varia is about to quit." +msgstr "Varia está a punto de salir." + +msgid "Preferences" +msgstr "Preferencias" + +msgid "Other" +msgstr "Otras" + +msgid "Basic Settings" +msgstr "Configuración básica" + +msgid "Advanced Settings" +msgstr "Configuración avanzada" + +msgid "Use cookies.txt" +msgstr "Utilizar cookies.txt" + +msgid "Import cookies.txt" +msgstr "Importar cookies.txt" + +msgid "Remove cookies.txt" +msgstr "Eliminar cookies.txt" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From 1a11443fd545861b2c716d1ce5c2ee5ed4c567a4 Mon Sep 17 00:00:00 2001 From: Alexmelman88 <99257010+Alexmelman88@users.noreply.github.com> Date: Sun, 12 May 2024 01:17:23 +0300 Subject: [PATCH 03/29] Update ru.po --- po/ru.po | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/po/ru.po b/po/ru.po index 0a52950..aa65550 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Varia\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-04-25 1:50+0300\n" +"PO-Revision-Date: 2024-05-12 01:15+0300\n" "Last-Translator: Aleksandr Melman \n" "Language-Team: \n" "Language: ru\n" @@ -144,6 +144,9 @@ msgstr " Байт/с" msgid "Simultaneous Download Amount" msgstr "Количество одновременных загрузок" +msgid "Start in Background Mode" +msgstr "Запуск в фоновом режиме" + #: src/variamain.py:410 msgid "Resume All" msgstr "Возобновить все" @@ -302,6 +305,27 @@ msgstr "Выйти после завершения" msgid "Varia is about to quit." msgstr "Приложение завершает работу." +msgid "Preferences" +msgstr "Настройки" + +msgid "Other" +msgstr "Другое" + +msgid "Basic Settings" +msgstr "Базовые настройки" + +msgid "Advanced Settings" +msgstr "Дополнительные настройки" + +msgid "Use cookies.txt" +msgstr "Использовать cookies.txt" + +msgid "Import cookies.txt" +msgstr "Импортировать cookies.txt" + +msgid "Remove cookies.txt" +msgstr "Удалить cookies.txt" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From 90310b537a45ebc44e7851f9f5abb82f0f29c5bd Mon Sep 17 00:00:00 2001 From: N0tACyb0rg Date: Mon, 13 May 2024 18:39:10 -0700 Subject: [PATCH 04/29] Add fix for #94 and #107. --- src/variamain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/variamain.py b/src/variamain.py index 5496a29..cbb83fb 100644 --- a/src/variamain.py +++ b/src/variamain.py @@ -380,8 +380,8 @@ def main(version, aria2cexec): download_directory = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOWNLOAD) else: download_directory = GLib.get_user_special_dir(GLib.USER_DIRECTORY_HOME) - except: - download_directory = GLib.get_user_special_dir(GLib.USER_DIRECTORY_HOME) + except AttributeError: + download_directory = os.path.expanduser("~") appconf = { 'download_speed_limit_enabled': '0', From 1989d1e702c68dc30b14783a34612211a256c37c Mon Sep 17 00:00:00 2001 From: twlvnn Date: Sat, 6 Jul 2024 13:08:01 +0200 Subject: [PATCH 05/29] Added Bulgarian translation --- po/LINGUAS | 1 + po/bg.po | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 po/bg.po diff --git a/po/LINGUAS b/po/LINGUAS index 3f98100..9bb6a61 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,3 +1,4 @@ +bg de hi it diff --git a/po/bg.po b/po/bg.po new file mode 100644 index 0000000..fa07b2d --- /dev/null +++ b/po/bg.po @@ -0,0 +1,339 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# twlvnn kraftwerk , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: varia\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-30 03:17+0300\n" +"PO-Revision-Date: 2024-07-06 13:05+0200\n" +"Last-Translator: twlvnn kraftwerk \n" +"Language-Team: Bulgarian \n" +"Language: bg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Generator: Gtranslator 46.1\n" + +#. Translators: Do NOT translate or localize the application name. +#: data/io.github.giantpinkrobots.varia.desktop.in:4 +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:3 +msgid "Varia" +msgstr "Varia" + +#. Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. +#: data/io.github.giantpinkrobots.varia.desktop.in:11 +msgid "varia;aria;download;manager;" +msgstr "мениджър за изтегляне;изтегляне;мениджър;" + +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:4 +msgid "Download manager based on aria2" +msgstr "Мениджър за изтегляне основан на aria2" + +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:16 +msgid "" +"Varia is a download manager based on aria2 that utilizes GTK4 and Libadwaita " +"to provide a easy to use interface that integrates well with the GNOME " +"desktop." +msgstr "" +"„Varia“ е мениджър за изтегляне основан на aria2, който използва GTK4 и " +"Libadwaita, за да осигури лесен за използване потребителски интерфейс, който " +"се интегрира добре с GNOME работната среда." + +#: src/variamain.py:45 +msgid "This is not a valid URL." +msgstr "Това не е правилен адрес." + +#: src/variamain.py:125 +msgid "All" +msgstr "Всички" + +#: src/variamain.py:137 +msgid "In Progress" +msgstr "Изпълнява се" + +#: src/variamain.py:148 +msgid "Completed" +msgstr "Завършено" + +#: src/variamain.py:171 +msgid "About Varia" +msgstr "Относно „Varia“" + +#: src/variamain.py:177 +msgid "URL" +msgstr "URL адрес, или само адрес" + +#: src/variamain.py:178 +msgid "Download" +msgstr "Изтегляне" + +#: src/variamain.py:184 +msgid "Open Download Folder" +msgstr "Отваряне на изтеглянията" + +#: src/variamain.py:196 +msgid "Speed Limit" +msgstr "Ограничение на скоростта" + +#: src/variamain.py:203 src/variamain.py:423 +msgid "Pause All" +msgstr "Пауза на всички" + +#: src/variamain.py:212 +msgid "Speed" +msgstr "Скорост" + +#: src/variamain.py:215 +msgid "Set Speed Limit" +msgstr "Задаване на ограничение на скоростта" + +#: src/variamain.py:216 +msgid "Cancel All" +msgstr "Отменяне на всички" + +#: src/variamain.py:235 +msgid "/s" +msgstr "/с" + +#: src/variamain.py:238 +msgid "No limit" +msgstr "Без ограничение" + +#: src/variamain.py:274 +msgid "Download complete." +msgstr "Изтеглянето завърши." + +#: src/variamain.py:276 +msgid "Download speed is limited." +msgstr "Скоростта на изтегляне е ограничена." + +#: src/variamain.py:277 +msgid "An error occurred:" +msgstr "Възникна грешка:" + +#: src/variamain.py:292 +msgid "MB/s" +msgstr "МБ/с" + +#: src/variamain.py:294 +msgid "KB/s" +msgstr "КБ/с" + +#: src/variamain.py:298 +msgid "0 B/s" +msgstr "0 Б/с" + +#: src/variamain.py:300 +msgid " MB/s" +msgstr "МБ/с" + +#: src/variamain.py:302 +msgid " KB/s" +msgstr "КБ/с" + +#: src/variamain.py:304 +msgid " B/s" +msgstr "Б/с" + +#: src/variamain.py:404 +msgid "Simultaneous Download Amount" +msgstr "Количество едновременни изтегляния" + +#: src/variamain.py:410 +msgid "Resume All" +msgstr "Пускане на всички" + +#: src/variamain.py:443 +msgid "aria2 based download manager utilizing GTK4 and Libadwaita." +msgstr "Мениджър за изтегляне основан на aria2, използващ GTK4 и Libadwaita." + +#: src/variamain.py:777 +msgid "This application relies on the following pieces of software:" +msgstr "Това приложение разчита на следния софтуер:" + +#: src/variamain.py:777 +msgid "" +"The licenses of all of these pieces of software can be found in the " +"dependencies_information directory in this application's app directory." +msgstr "" +"Лицензите на целия този софтуер можете да намерите в папката " +"„dependencies_information“ в папката „app“ на това приложение." + +#: src/variamain.py:449 +msgid "translator-credits" +msgstr "twlvnn kraftwerk " + +#: src/variamain.py:457 +msgid "Download Directory" +msgstr "Папка за изтегляне" + +#: src/variamain.py:460 +msgid "Change" +msgstr "Променяне" + +#: src/variamain.py:463 +msgid "Speed limited" +msgstr "Скоростта е ограничена" + +#: src/variamain.py:519 +msgid "Authentication" +msgstr "Удостоверяване" + +#: src/variamain.py:532 +msgid "Username" +msgstr "Потребителско име" + +#: src/variamain.py:534 +msgid "Password" +msgstr "Парола" + +#: src/variamain.py:554 +msgid "Authorization failed." +msgstr "Упълномощяването е неуспешно." + +#: src/variamain.py:806 +msgid "Failed to open directory." +msgstr "Папката не може да бъде отворена." + +msgid "Remote Mode" +msgstr "Режим „Дистанционно“" + +msgid "Remote aria2 IP" +msgstr "Отдалечено aria2 IP" + +msgid "Remote aria2 Port" +msgstr "Отдалечен aria2 порт" + +msgid "Remote aria2 RPC Secret" +msgstr "Отдалечен aria2 RPC Secret" + +msgid "Remote Download Location" +msgstr "Отдалечено място за изтегляне" + +msgid "Exiting Varia..." +msgstr "Спиране на „Varia“…" + +msgid "Background Mode" +msgstr "Фонов режим" + +msgid "Continuing the downloads in the background." +msgstr "Продължаване на изтеглянето във фонов режим." + +msgid "Browser Extension" +msgstr "Браузър разширение" + +msgid "Shutdown on Completion" +msgstr "Изключване при завършване" + +msgid "Varia is about to shut down your computer." +msgstr "„Varia“ ще изключи компютъра ви." + +msgid "Press Cancel to cancel and disable." +msgstr "Натиснете „Отказване“, за да откажете и изключите." + +msgid "Cancel" +msgstr "Отказване" + +msgid "Warning" +msgstr "Предупреждение" + +msgid "Monday" +msgstr "Понеделник" + +msgid "Tuesday" +msgstr "Вторник" + +msgid "Wednesday" +msgstr "Сряда" + +msgid "Thursday" +msgstr "Четвъртък" + +msgid "Friday" +msgstr "Петък" + +msgid "Saturday" +msgstr "Събота" + +msgid "Sunday" +msgstr "Неделя" + +msgid "Start (h/m):" +msgstr "Начало (ч/м):" + +msgid "End (h/m):" +msgstr "Край (ч/м):" + +msgid "Scheduler enabled" +msgstr "Scheduler е активиран" + +msgid "Scheduler" +msgstr "Scheduler" + +msgid "Enabled" +msgstr "Активирано" + +msgid "Start downloading in these times" +msgstr "Стартиране на изтеглянето по това време" + +msgid "Stop downloading in these times" +msgstr "Спиране на изтеглянето по това време" + +msgid "Add Timespan" +msgstr "Добавяне на времеви интервал" + +msgid "Seeding" +msgstr "Разпръскване" + +msgid "Failed" +msgstr "Неуспешен" + +msgid "Completion Options" +msgstr "Настройки за завършване" + +msgid "Exit on Completion" +msgstr "Спиране на програмата при завършване" + +msgid "Varia is about to quit." +msgstr "„Varia“ ще спре." + +msgid "Preferences" +msgstr "Настройки" + +msgid "Other" +msgstr "Друго" + +msgid "Basic Settings" +msgstr "Основни настройки" + +msgid "Advanced Settings" +msgstr "Допълнителни настройки" + +msgid "Use cookies.txt" +msgstr "Използване на бисквитки.txt" + +msgid "Import cookies.txt" +msgstr "Внасяне на бисквитки.txt" + +msgid "Remove cookies.txt" +msgstr "Премахване на бисквитки.txt" + +#: src/gtk/help-overlay.ui:11 +msgctxt "shortcut window" +msgid "General" +msgstr "Общи" + +#: src/gtk/help-overlay.ui:14 +msgctxt "shortcut window" +msgid "Show Shortcuts" +msgstr "Показване на клавишните комбинации" + +#: src/gtk/help-overlay.ui:20 +msgctxt "shortcut window" +msgid "Quit" +msgstr "Спиране на програмата" From 1a1494690694ec4b26703281ae618c1144e10321 Mon Sep 17 00:00:00 2001 From: Nokse22 <44558032+Nokse22@users.noreply.github.com> Date: Tue, 6 Aug 2024 15:08:03 +0200 Subject: [PATCH 06/29] Added mimetype and icon for .aria2 file --- data/io.github.giantpinkrobots.varia.mime.svg | 313 ++++++++++++++++++ data/io.github.giantpinkrobots.varia.mime.xml | 9 + data/meson.build | 8 + 3 files changed, 330 insertions(+) create mode 100644 data/io.github.giantpinkrobots.varia.mime.svg create mode 100644 data/io.github.giantpinkrobots.varia.mime.xml diff --git a/data/io.github.giantpinkrobots.varia.mime.svg b/data/io.github.giantpinkrobots.varia.mime.svg new file mode 100644 index 0000000..0ef8679 --- /dev/null +++ b/data/io.github.giantpinkrobots.varia.mime.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/io.github.giantpinkrobots.varia.mime.xml b/data/io.github.giantpinkrobots.varia.mime.xml new file mode 100644 index 0000000..1640bb9 --- /dev/null +++ b/data/io.github.giantpinkrobots.varia.mime.xml @@ -0,0 +1,9 @@ + + + + Varia Download Progress + + + + + diff --git a/data/meson.build b/data/meson.build index 19be115..d32ca05 100644 --- a/data/meson.build +++ b/data/meson.build @@ -28,6 +28,14 @@ install_data('io.github.giantpinkrobots.varia.gschema.xml', install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' ) +install_data('io.github.giantpinkrobots.varia.mime.xml', + install_dir: join_paths(get_option('datadir'), 'mime', 'packages') +) + +install_data('io.github.giantpinkrobots.varia.mime.svg', + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'mimetypes') +) + compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) test('Validate schema file', compile_schemas, From f9aab9a61f22647d64d2fb5b0b5f7d3073478e76 Mon Sep 17 00:00:00 2001 From: Nekothegamer <112352776+Nekothegamer@users.noreply.github.com> Date: Sat, 24 Aug 2024 18:04:56 +0200 Subject: [PATCH 07/29] Add translation file --- po/it.po | 189 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 167 insertions(+), 22 deletions(-) diff --git a/po/it.po b/po/it.po index 717e4f1..3647d3a 100644 --- a/po/it.po +++ b/po/it.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-01-26 17:31+0100\n" -"Last-Translator: Albano Battistella \n" +"PO-Revision-Date: 2024-08-24 17:20+0100\n" +"Last-Translator: Neko the gamer \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" @@ -25,11 +25,11 @@ msgstr "Varia" #. Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. #: data/io.github.giantpinkrobots.varia.desktop.in:11 msgid "varia;aria;download;manager;" -msgstr "" +msgstr "varia;aria;download;gestore;" #: data/io.github.giantpinkrobots.varia.metainfo.xml.in:4 msgid "Download manager based on aria2" -msgstr "Gestore di download basato su aria2" +msgstr "Gestore download basato su aria2" #: data/io.github.giantpinkrobots.varia.metainfo.xml.in:16 msgid "" @@ -45,6 +45,18 @@ msgstr "" msgid "This is not a valid URL." msgstr "Questo non è un URL valido." +#: src/variamain.py:125 +msgid "All" +msgstr "Tutti" + +#: src/variamain.py:137 +msgid "In Progress" +msgstr "In corso" + +#: src/variamain.py:148 +msgid "Completed" +msgstr "Completati" + #: src/variamain.py:171 msgid "About Varia" msgstr "Informazioni su Varia" @@ -55,23 +67,23 @@ msgstr "URL" #: src/variamain.py:178 msgid "Download" -msgstr "Download" +msgstr "Scarica" #: src/variamain.py:184 msgid "Open Download Folder" -msgstr "Apri la cartella di download" +msgstr "Apri cartella download" #: src/variamain.py:196 msgid "Speed Limit" -msgstr "Limite di velocità" +msgstr "Limite velocità" #: src/variamain.py:203 src/variamain.py:423 msgid "Pause All" -msgstr "Metti tutto in pausa" +msgstr "Metti in pausa tutti" #: src/variamain.py:212 msgid "Speed" -msgstr "vELOCITÀ" +msgstr "Velocità" #: src/variamain.py:215 msgid "Set Speed Limit" @@ -79,7 +91,7 @@ msgstr "Imposta limite di velocità" #: src/variamain.py:216 msgid "Cancel All" -msgstr "Annulla tutto" +msgstr "Cancella tutti" #: src/variamain.py:235 msgid "/s" @@ -91,11 +103,11 @@ msgstr "Nessun limite" #: src/variamain.py:274 msgid "Download complete." -msgstr "Download completo." +msgstr "Download completato." #: src/variamain.py:276 msgid "Download speed is limited." -msgstr "La velocità di download è limitata." +msgstr "La velocità del download è limitata" #: src/variamain.py:277 msgid "An error occurred:" @@ -125,33 +137,39 @@ msgstr " KB/s" msgid " B/s" msgstr " B/s" +#: src/variamain.py:404 +msgid "Simultaneous Download Amount" +msgstr "Quantità di download simultanei" + #: src/variamain.py:410 msgid "Resume All" -msgstr "Riprendi tutto" +msgstr "Riprendi tutti" #: src/variamain.py:443 msgid "aria2 based download manager utilizing GTK4 and Libadwaita." -msgstr "Gestore di download basato su aria2 che utilizza GTK4 e Libadwaita." +msgstr "Gestore di download basato su aria2 e utilizza GTK4 con Libadwaita" #: src/variamain.py:777 msgid "This application relies on the following pieces of software:" -msgstr "Questa applicazione si basa sui seguenti software:" +msgstr "Questa applicazione dipende dai seguenti software:" #: src/variamain.py:777 msgid "The licenses of all of these pieces of software can be found in the dependencies_information directory in this application's app directory." -msgstr "Le licenze di tutti questi software si trovano nella directory dependencies_information nella directory dell'app di questa applicazione." +msgstr "Le licenze di tutti questi software si trovano nella cartella dependencies_information nella cartella dell'app di questa applicazione." #: src/variamain.py:449 msgid "translator-credits" -msgstr "Albano Battistella " +msgstr "" +"Albano Battistella \n" +"Neko the gamer " #: src/variamain.py:457 msgid "Download Directory" -msgstr "Directory di download" +msgstr "Cartella download" #: src/variamain.py:460 msgid "Change" -msgstr "Modifica" +msgstr "Cambia" #: src/variamain.py:463 msgid "Speed limited" @@ -163,20 +181,147 @@ msgstr "Autenticazione" #: src/variamain.py:532 msgid "Username" -msgstr "Nome Utente" +msgstr "Nome utente" #: src/variamain.py:534 msgid "Password" -msgstr "Passwrd" +msgstr "Password" #: src/variamain.py:554 msgid "Authorization failed." msgstr "Autorizzazione fallita." +#: src/variamain.py:806 +msgid "Failed to open directory." +msgstr "Impossibile aprire la cartella" + +msgid "Remote Mode" +msgstr "Nodo remoto" + +msgid "Remote aria2 IP" +msgstr "IP remoto aria2" + +msgid "Remote aria2 Port" +msgstr "Porta remota aria2" + +msgid "Remote aria2 RPC Secret" +msgstr "Segreto RPC remoto aria2" + +msgid "Remote Download Location" +msgstr "Posizione download remota" + +msgid "Exiting Varia..." +msgstr "Uscendo da Varia..." + +msgid "Background Mode" +msgstr "Modalità in background" + +msgid "Continuing the downloads in the background." +msgstr "Continua i download in background." + +msgid "Browser Extension" +msgstr "Estensione browser" + +msgid "Shutdown on Completion" +msgstr "Spegni a download completato" + +msgid "Varia is about to shut down your computer." +msgstr "Varia sta per spegnere il tuo computer." + +msgid "Press Cancel to cancel and disable." +msgstr "Premi annulla per annullare e disattivare." + +msgid "Cancel" +msgstr "Annulla" + +msgid "Warning" +msgstr "Attenzione" + +msgid "Monday" +msgstr "Lunedì" + +msgid "Tuesday" +msgstr "Martedì" + +msgid "Wednesday" +msgstr "Mercoledì" + +msgid "Thursday" +msgstr "Giovedì" + +msgid "Friday" +msgstr "Venerdì" + +msgid "Saturday" +msgstr "Sabato" + +msgid "Sunday" +msgstr "Domenica" + +msgid "Start (h/m):" +msgstr "Inizio (h/m):" + +msgid "End (h/m):" +msgstr "Fine (h/m):" + +msgid "Scheduler enabled" +msgstr "Scheduler attivato" + +msgid "Scheduler" +msgstr "Scheduler" + +msgid "Enabled" +msgstr "Attivato" + +msgid "Start downloading in these times" +msgstr "Inizia a scaricare in questo periodo" + +msgid "Stop downloading in these times" +msgstr "Smetti di scaricare in questo periodo" + +msgid "Add Timespan" +msgstr "Aggiungi tempo" + +msgid "Seeding" +msgstr "In seeding" + +msgid "Failed" +msgstr "Falliti" + +msgid "Completion Options" +msgstr "Opzioni completamento" + +msgid "Exit on Completion" +msgstr "Esci al completamento" + +msgid "Varia is about to quit." +msgstr "Varia sta per uscire." + +msgid "Preferences" +msgstr "Preferenze" + +msgid "Other" +msgstr "Altro" + +msgid "Basic Settings" +msgstr "Impostazioni base" + +msgid "Advanced Settings" +msgstr "Impostazioni avanzate" + +msgid "Use cookies.txt" +msgstr "Usa cookies.txt" + +msgid "Import cookies.txt" +msgstr "Importa cookies.txt" + +msgid "Remove cookies.txt" +msgstr "Rimuovi cookies.txt" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" -msgstr "Generale" +msgstr "Generali" #: src/gtk/help-overlay.ui:14 msgctxt "shortcut window" From 4548f229310bfad7656908890090a19b398874c5 Mon Sep 17 00:00:00 2001 From: lumingzh Date: Tue, 3 Sep 2024 19:50:01 +0800 Subject: [PATCH 08/29] Update LINGUAS --- po/LINGUAS | 1 + 1 file changed, 1 insertion(+) diff --git a/po/LINGUAS b/po/LINGUAS index 3f98100..788af1a 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -13,3 +13,4 @@ nb ja es fa +zh_CN From bd84d04c044bb5c7287ed85969af475b0f0d5664 Mon Sep 17 00:00:00 2001 From: lumingzh Date: Tue, 3 Sep 2024 19:51:42 +0800 Subject: [PATCH 09/29] Add Chinese translation --- po/zh_CN.po | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 337 insertions(+) create mode 100644 po/zh_CN.po diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000..db18573 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,337 @@ +# Chinese translation for Varia. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# lumingzh , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: varia main\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-30 03:17+0300\n" +"PO-Revision-Date: 2024-09-03 19:46+0800\n" +"Last-Translator: lumingzh \n" +"Language-Team: Chinese (China) \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Gtranslator 46.1\n" + +#. Translators: Do NOT translate or localize the application name. +#: data/io.github.giantpinkrobots.varia.desktop.in:4 +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:3 +msgid "Varia" +msgstr "Varia" + +#. Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. +#: data/io.github.giantpinkrobots.varia.desktop.in:11 +msgid "varia;aria;download;manager;" +msgstr "varia;aria;download;manager;下载;管理器;bt;bittorrent;" + +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:4 +msgid "Download manager based on aria2" +msgstr "基于 aria2 的下载管理器" + +#: data/io.github.giantpinkrobots.varia.metainfo.xml.in:16 +msgid "" +"Varia is a download manager based on aria2 that utilizes GTK4 and Libadwaita " +"to provide a easy to use interface that integrates well with the GNOME " +"desktop." +msgstr "" +"Varia 是一个基于 aria2 的下载管理器,利用 GTK4 和 Libadwaita 提供了与 GNOME " +"桌面良好集成的易用界面。" + +#: src/variamain.py:45 +msgid "This is not a valid URL." +msgstr "这不是有效的 URL。" + +#: src/variamain.py:125 +msgid "All" +msgstr "全部" + +#: src/variamain.py:137 +msgid "In Progress" +msgstr "进行中" + +#: src/variamain.py:148 +msgid "Completed" +msgstr "已完成" + +#: src/variamain.py:171 +msgid "About Varia" +msgstr "关于 Varia" + +#: src/variamain.py:177 +msgid "URL" +msgstr "URL" + +#: src/variamain.py:178 +msgid "Download" +msgstr "下载" + +#: src/variamain.py:184 +msgid "Open Download Folder" +msgstr "打开下载文件夹" + +#: src/variamain.py:196 +msgid "Speed Limit" +msgstr "速度限制" + +#: src/variamain.py:203 src/variamain.py:423 +msgid "Pause All" +msgstr "全部暂停" + +#: src/variamain.py:212 +msgid "Speed" +msgstr "速度" + +#: src/variamain.py:215 +msgid "Set Speed Limit" +msgstr "设定速度限制" + +#: src/variamain.py:216 +msgid "Cancel All" +msgstr "全部取消" + +#: src/variamain.py:235 +msgid "/s" +msgstr "/s" + +#: src/variamain.py:238 +msgid "No limit" +msgstr "无限制" + +#: src/variamain.py:274 +msgid "Download complete." +msgstr "下载完成。" + +#: src/variamain.py:276 +msgid "Download speed is limited." +msgstr "已限制下载速度。" + +#: src/variamain.py:277 +msgid "An error occurred:" +msgstr "发生了错误:" + +#: src/variamain.py:292 +msgid "MB/s" +msgstr "MB/s" + +#: src/variamain.py:294 +msgid "KB/s" +msgstr "KB/s" + +#: src/variamain.py:298 +msgid "0 B/s" +msgstr "0 B/s" + +#: src/variamain.py:300 +msgid " MB/s" +msgstr " MB/s" + +#: src/variamain.py:302 +msgid " KB/s" +msgstr " KB/s" + +#: src/variamain.py:304 +msgid " B/s" +msgstr " B/s" + +#: src/variamain.py:404 +msgid "Simultaneous Download Amount" +msgstr "同时下载数量" + +#: src/variamain.py:410 +msgid "Resume All" +msgstr "全部恢复" + +#: src/variamain.py:443 +msgid "aria2 based download manager utilizing GTK4 and Libadwaita." +msgstr "基于 aria2 使用 GTK4 和 Libadwaita 的下载管理器。" + +#: src/variamain.py:777 +msgid "This application relies on the following pieces of software:" +msgstr "该应用程序依赖于下列软件:" + +#: src/variamain.py:777 +msgid "" +"The licenses of all of these pieces of software can be found in the " +"dependencies_information directory in this application's app directory." +msgstr "" +"所有这些软件的许可证可以在该应用程序应用目录里的 dependencies_information 目" +"录找到。" + +#: src/variamain.py:449 +msgid "translator-credits" +msgstr "lumingzh , 2024" + +#: src/variamain.py:457 +msgid "Download Directory" +msgstr "下载目录" + +#: src/variamain.py:460 +msgid "Change" +msgstr "更改" + +#: src/variamain.py:463 +msgid "Speed limited" +msgstr "已限制速度" + +#: src/variamain.py:519 +msgid "Authentication" +msgstr "认证" + +#: src/variamain.py:532 +msgid "Username" +msgstr "用户名" + +#: src/variamain.py:534 +msgid "Password" +msgstr "密码" + +#: src/variamain.py:554 +msgid "Authorization failed." +msgstr "认证失败。" + +#: src/variamain.py:806 +msgid "Failed to open directory." +msgstr "打开目录失败。" + +msgid "Remote Mode" +msgstr "远程模式" + +msgid "Remote aria2 IP" +msgstr "远程 aria2 IP" + +msgid "Remote aria2 Port" +msgstr "远程 aria2 端口" + +msgid "Remote aria2 RPC Secret" +msgstr "远程 aria2 RPC 安全" + +msgid "Remote Download Location" +msgstr "远程下载位置" + +msgid "Exiting Varia..." +msgstr "正在退出 Varia…" + +msgid "Background Mode" +msgstr "后台模式" + +msgid "Continuing the downloads in the background." +msgstr "在后台继续下载。" + +msgid "Browser Extension" +msgstr "浏览器扩展" + +msgid "Shutdown on Completion" +msgstr "完成时关机" + +msgid "Varia is about to shut down your computer." +msgstr "Varia 即将关闭您的计算机。" + +msgid "Press Cancel to cancel and disable." +msgstr "按“取消”以取消和禁用。" + +msgid "Cancel" +msgstr "取消" + +msgid "Warning" +msgstr "警告" + +msgid "Monday" +msgstr "星期一" + +msgid "Tuesday" +msgstr "星期二" + +msgid "Wednesday" +msgstr "星期三" + +msgid "Thursday" +msgstr "星期四" + +msgid "Friday" +msgstr "星期五" + +msgid "Saturday" +msgstr "星期六" + +msgid "Sunday" +msgstr "星期日" + +msgid "Start (h/m):" +msgstr "开始(h/m):" + +msgid "End (h/m):" +msgstr "结束(h/m):" + +msgid "Scheduler enabled" +msgstr "调度程序已启用" + +msgid "Scheduler" +msgstr "调度程序" + +msgid "Enabled" +msgstr "已启用" + +msgid "Start downloading in these times" +msgstr "在这些时间开始下载" + +msgid "Stop downloading in these times" +msgstr "在这些时间停止下载" + +msgid "Add Timespan" +msgstr "添加时间间隔" + +msgid "Seeding" +msgstr "正在做种" + +msgid "Failed" +msgstr "已失败" + +msgid "Completion Options" +msgstr "完成选项" + +msgid "Exit on Completion" +msgstr "完成时退出" + +msgid "Varia is about to quit." +msgstr "Varia 即将退出。" + +msgid "Preferences" +msgstr "首选项" + +msgid "Other" +msgstr "其它" + +msgid "Basic Settings" +msgstr "基础设置" + +msgid "Advanced Settings" +msgstr "高级设置" + +msgid "Use cookies.txt" +msgstr "使用 cookies.txt" + +msgid "Import cookies.txt" +msgstr "导入 cookies.txt" + +msgid "Remove cookies.txt" +msgstr "移除 cookies.txt" + +#: src/gtk/help-overlay.ui:11 +msgctxt "shortcut window" +msgid "General" +msgstr "常规" + +#: src/gtk/help-overlay.ui:14 +msgctxt "shortcut window" +msgid "Show Shortcuts" +msgstr "显示快捷键" + +#: src/gtk/help-overlay.ui:20 +msgctxt "shortcut window" +msgid "Quit" +msgstr "退出" From b578573d8b173dcc0d1844224b242a19ae0409d8 Mon Sep 17 00:00:00 2001 From: N0tACyb0rg Date: Wed, 11 Sep 2024 10:20:21 -0700 Subject: [PATCH 10/29] Add time remaining for downloads. --- src/download/thread.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/download/thread.py b/src/download/thread.py index bcc9e4c..5ff9420 100644 --- a/src/download/thread.py +++ b/src/download/thread.py @@ -9,6 +9,7 @@ import time import os import json +import datetime import http.cookiejar from gettext import gettext as _ from download.actionrow import on_pause_clicked @@ -46,6 +47,7 @@ def run(self): if (self.download == None): if (self.url == "sus"): try: + # Lol nice - Caleb (N0tACyb0rg) GLib.idle_add(self.show_message("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠉⠉⠉⠉⠉⠉⠉⠙⠻⢶⣄⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣷⡀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠀⣠⣶⠛⠛⠛⠛⠛⠛⠳⣦⡀⠀⠘⣿⡄⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠁⠀⢹⣿⣦⣀⣀⣀⣀⣀⣠⣼⡇⠀⠀⠸⣷⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡏⠀⠀⠀⠉⠛⠿⠿⠿⠿⠛⠋⠁⠀⠀⠀⠀⣿⡄⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣧⠀\n⠀⠀⠀⠀⠀⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⠀\n⠀⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀\n⠀⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀\n⠀⠀⠀⠀⠀⠀⢰⣿⠀⠀⠀⠀⣠⡶⠶⠿⠿⠿⠿⢷⣦⠀⠀⠀⠀⠀⠀⠀⣿⠀\n⠀⠀⣀⣀⣀⠀⣸⡇⠀⠀⠀⠀⣿⡀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⣿⠀\n⣠⡿⠛⠛⠛⠛⠻⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⠀⣿⠀\n⢻⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⡟⠀⠀⢀⣤⣤⣴⣿⠀⠀⠀⠀⠀⠀⠀⣿⠀\n⠈⠙⢷⣶⣦⣤⣤⣤⣴⣶⣾⠿⠛⠁⢀⣶⡟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡟⠀\n⠀⠀⠀⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠈⣿⣆⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⡾⠃⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠻⢿⣿⣾⣿⡿⠿⠟⠋⠁⠀⠀⠀")) except: pass @@ -138,14 +140,26 @@ def update_labels_and_things(self): return download_speed_mb = (self.download.download_speed / 1024 / 1024) + + download_delta = self.download.eta + + download_seconds = download_delta.total_seconds() + download_seconds = abs(int(download_seconds)) + download_hours, download_seconds = divmod(download_seconds, 3600) + download_minutes, download_seconds = divmod(download_seconds, 60) + + download_hours = str(download_hours).zfill(2) + download_minutes = str(download_minutes).zfill(2) + download_seconds = str(download_seconds).zfill(2) + if int(str(download_speed_mb)[0]) == 0: download_speed_kb = (self.download.download_speed / 1024) if int(str(download_speed_kb)[0]) == 0: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} B/s") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} B/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} KB/s") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} KB/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} MB/s") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} MB/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") def pause(self): if self.download: @@ -227,4 +241,3 @@ def load_state(cls, app, filename, url, progress_bar, speed_label, pause_button, os.remove(os.path.join(app.appconf["download_directory"], filename)) instance = cls(app, state['url'], progress_bar, speed_label, pause_button, actionrow, filename_label, None, downloadname) return instance - From 34e2dd7ed8f28be72a00aa122f60226af21b4ebc Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Tue, 17 Sep 2024 00:22:27 +0300 Subject: [PATCH 11/29] Localization support "remaining" is now a translatable string. --- po/Varia.pot | 3 +++ src/download/thread.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/po/Varia.pot b/po/Varia.pot index 4dc502f..4c85b30 100644 --- a/po/Varia.pot +++ b/po/Varia.pot @@ -314,6 +314,9 @@ msgstr "" msgid "Remove cookies.txt" msgstr "" +msgid "remaining" +msgstr "" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" diff --git a/src/download/thread.py b/src/download/thread.py index 5ff9420..711f6df 100644 --- a/src/download/thread.py +++ b/src/download/thread.py @@ -155,11 +155,11 @@ def update_labels_and_things(self): if int(str(download_speed_mb)[0]) == 0: download_speed_kb = (self.download.download_speed / 1024) if int(str(download_speed_kb)[0]) == 0: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} B/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} {_(' B/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} KB/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} {_(' KB/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} MB/s | {download_hours}:{download_minutes}:{download_seconds} Remaining") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} {_(' MB/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") def pause(self): if self.download: From 751c858ac45aa608f49c927c6557ef650402c0d1 Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Fri, 20 Sep 2024 20:08:42 +0300 Subject: [PATCH 12/29] Adjustments - 20 Sept 24 - Switch to some newer Libadwaita widgets - "Exiting Varia" dialog is now shown on top of the main window - Remote aria2 setting re-added - Missing translations added - Homepage screenshots fixed --- .gitignore | 3 + docs/index.html | 4 +- io.github.giantpinkrobots.varia.json | 120 +++++++++++++-------------- po/Varia.pot | 6 ++ po/tr.po | 9 ++ src/initiate.py | 18 ++-- src/variamain.py | 58 +++++++------ src/window/preferences.py | 1 + 8 files changed, 121 insertions(+), 98 deletions(-) diff --git a/.gitignore b/.gitignore index 8286515..0ec358f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ .vscode _build .flatpak-builder +src/__pycache__/ +src/download/__pycache__/ +src/window/__pycache__/ \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 1e95887..8e5bbc9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -87,8 +87,8 @@

Quick and efficient download manager

- - Varia screenshot + + Varia screenshot
diff --git a/io.github.giantpinkrobots.varia.json b/io.github.giantpinkrobots.varia.json index fa388b6..65e6fc6 100644 --- a/io.github.giantpinkrobots.varia.json +++ b/io.github.giantpinkrobots.varia.json @@ -1,62 +1,62 @@ { - "app-id" : "io.github.giantpinkrobots.varia", - "runtime" : "org.gnome.Platform", - "runtime-version" : "46", - "sdk" : "org.gnome.Sdk", - "command" : "varia", - "//": "Justifications for the permissions: This program utilizes aria2c, and aria2c requires the networking permission and the xdg-download directory in order to download files. It also has a 'shut down once all downloads are completed' feature that requires access to org.freedesktop.login1.", - "finish-args" : [ - "--share=network", - "--share=ipc", - "--socket=fallback-x11", - "--device=dri", - "--socket=wayland", - "--filesystem=xdg-download", - "--system-talk-name=org.freedesktop.login1" - ], - "cleanup" : [ - "/include", - "/lib/pkgconfig", - "/man", - "/share/doc", - "/share/gtk-doc", - "/share/man", - "/share/pkgconfig", - "*.la", - "*.a" - ], - "modules" : [ - "./python3-aria2p.json", - { - "name" : "aria2", - "buildsystem" : "autotools", - "config-opts": [ - "--without-libxml2", - "--without-sqlite3", - "--without-appletls", - "--without-gnutls", - "--without-libgmp", - "--without-libnettle", - "--without-libgcrypt", - "--without-libssh2", - "--without-cppunit", - "--without-libz", - "--without-libcunit", - "--without-libcares", - "--without-libaria2", - "--disable-nls", - "--with-openssl", - "--disable-ftp" - ], - "sources" : [ - { - "type" : "archive", - "url" : "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz", - "sha256" : "60a420ad7085eb616cb6e2bdf0a7206d68ff3d37fb5a956dc44242eb2f79b66b" - } - ] - }, - { + "id" : "io.github.giantpinkrobots.varia", + "runtime" : "org.gnome.Platform", + "runtime-version" : "47", + "sdk" : "org.gnome.Sdk", + "command" : "varia", + "//" : "Justifications for the permissions: This program utilizes aria2c, and aria2c requires the networking permission and the xdg-download directory in order to download files. It also has a 'shut down once all downloads are completed' feature that requires access to org.freedesktop.login1.", + "finish-args" : [ + "--share=network", + "--share=ipc", + "--socket=fallback-x11", + "--device=dri", + "--socket=wayland", + "--filesystem=xdg-download", + "--system-talk-name=org.freedesktop.login1" + ], + "cleanup" : [ + "/include", + "/lib/pkgconfig", + "/man", + "/share/doc", + "/share/gtk-doc", + "/share/man", + "/share/pkgconfig", + "*.la", + "*.a" + ], + "modules" : [ + "./python3-aria2p.json", + { + "name" : "aria2", + "buildsystem" : "autotools", + "config-opts" : [ + "--without-libxml2", + "--without-sqlite3", + "--without-appletls", + "--without-gnutls", + "--without-libgmp", + "--without-libnettle", + "--without-libgcrypt", + "--without-libssh2", + "--without-cppunit", + "--without-libz", + "--without-libcunit", + "--without-libcares", + "--without-libaria2", + "--disable-nls", + "--with-openssl", + "--disable-ftp" + ], + "sources" : [ + { + "type" : "archive", + "url" : "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.xz", + "sha256" : "60a420ad7085eb616cb6e2bdf0a7206d68ff3d37fb5a956dc44242eb2f79b66b" + } + ] + }, + { "name" : "varia", "builddir" : true, "buildsystem" : "meson", @@ -67,5 +67,5 @@ } ] } - ] -} \ No newline at end of file + ] +} diff --git a/po/Varia.pot b/po/Varia.pot index 4c85b30..7ec2059 100644 --- a/po/Varia.pot +++ b/po/Varia.pot @@ -317,6 +317,12 @@ msgstr "" msgid "remaining" msgstr "" +msgid "Start in Background Mode" +msgstr "" + +msgid "Remote Timestamp" +msgstr "" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" diff --git a/po/tr.po b/po/tr.po index 096f8cc..369dae2 100644 --- a/po/tr.po +++ b/po/tr.po @@ -318,6 +318,15 @@ msgstr "cookies.txt İçe Aktar" msgid "Remove cookies.txt" msgstr "cookies.txt'i Sil" +msgid "remaining" +msgstr "kaldı" + +msgid "Start in Background Mode" +msgstr "Arkaplan Modunda Başlat" + +msgid "Remote Timestamp" +msgstr "Uzak Zaman Damgası" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" diff --git a/src/initiate.py b/src/initiate.py index 74c3f27..c72e691 100644 --- a/src/initiate.py +++ b/src/initiate.py @@ -14,8 +14,6 @@ def initiate(self, variaVersion): self.applied_filter = "show_all" - remote_successful = False - if (self.appconf['remote'] == '1'): self.aria2cLocation = self.appconf['remote_protocol'] + self.appconf['remote_ip'] + ':' + self.appconf['remote_port'] token = "token:" + self.appconf['remote_secret'] @@ -29,7 +27,7 @@ def initiate(self, variaVersion): response = requests.post(self.aria2cLocation + '/jsonrpc', headers={'Content-Type': 'application/json'}, data=json.dumps(json_request)) print(response) if (response.status_code == 200): - remote_successful = True + self.remote_successful = True self.api = aria2p.API( aria2p.Client( host=self.appconf['remote_protocol'] + self.appconf['remote_ip'], @@ -41,16 +39,16 @@ def initiate(self, variaVersion): pass if (self.appconf['remote'] == '1'): - if (remote_successful == False): + if (self.remote_successful == False): self.appconf["remote"] = "0" self.save_appconf() - dialog = Adw.MessageDialog() + dialog = Adw.AlertDialog() dialog.set_body(_("Couldn't connect to remote aria2c instance. Disabling remote mode. Please restart Varia.")) dialog.add_response("ok", _("OK")) dialog.set_default_response("ok") dialog.set_close_response("ok") - dialog.connect("response", on_dialog_dismiss) - dialog.show() + dialog.connect("response", on_dialog_dismiss, self) + dialog.present() return -1 else: self.api = aria2p.API( @@ -88,6 +86,6 @@ def initiate(self, variaVersion): self.exit_mode = False self.exit_dialog_raised = False -def on_dialog_dismiss(dialog, response_id): - dialog.destroy() - +def on_dialog_dismiss(dialog, response_id, self): + dialog.force_close() + self.destroy() diff --git a/src/variamain.py b/src/variamain.py index cbb83fb..f6f2f41 100644 --- a/src/variamain.py +++ b/src/variamain.py @@ -1,4 +1,4 @@ -variaVersion = "v2024.5.7" +variaVersion = "dev" import gi import sys @@ -26,7 +26,6 @@ class MainWindow(Adw.ApplicationWindow): def __init__(self, variaapp, appdir, appconf, aria2c_subprocess, aria2cexec, *args, **kwargs): super().__init__(*args, **kwargs) - self.set_hide_on_close(True) self.connect('close-request', self.exitProgram, variaapp, False) self.scheduler_currently_downloading = False @@ -34,6 +33,7 @@ def __init__(self, variaapp, appdir, appconf, aria2c_subprocess, aria2cexec, *ar self.appconf = appconf self.aria2c_subprocess = aria2c_subprocess self.bindir = aria2cexec[:-6] + self.remote_successful = False # Set up variables and all: aria2_connection_successful = initiate(self, variaVersion) @@ -291,40 +291,41 @@ def exitProgram(self, app, variaapp, background): notification.set_title(_("Background Mode")), variaapp.send_notification(None, notification) print('Background mode') + else: self.terminating = True - - self.set_sensitive(False) self.all_paused = False - if (self.appconf['remote'] == '0'): + if (self.remote_successful == False): self.pause_all("no") self.api.client.shutdown() - if (self.is_visible() == True): - self.hide() - exiting_dialog = Adw.MessageDialog() - exiting_dialog_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=25) - exiting_dialog.set_child(exiting_dialog_box) - exiting_dialog_box.set_margin_top(30) - exiting_dialog_box.set_margin_bottom(30) - exiting_dialog_spinner = Gtk.Spinner() - exiting_dialog_spinner.set_size_request(30, 30) - exiting_dialog_spinner.start() - exiting_dialog_box.append(exiting_dialog_spinner) - exiting_dialog_label = Gtk.Label(label=_("Exiting Varia...")) - exiting_dialog_label.get_style_context().add_class("title-1") - exiting_dialog_box.append(exiting_dialog_label) - exiting_dialog.set_transient_for(self) - GLib.idle_add(exiting_dialog.show) - else: - exiting_dialog = None + if (self.is_visible() == False): + self.show() + + exiting_dialog = Adw.AlertDialog() + exiting_dialog_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=25) + exiting_dialog.set_child(exiting_dialog_box) + exiting_dialog_box.set_margin_top(30) + exiting_dialog_box.set_margin_bottom(30) + exiting_dialog_box.set_margin_start(60) + exiting_dialog_box.set_margin_end(60) + exiting_dialog_spinner = Adw.Spinner() + exiting_dialog_spinner.set_size_request(30, 30) + exiting_dialog_box.append(exiting_dialog_spinner) + exiting_dialog_label = Gtk.Label(label=_("Exiting Varia...")) + exiting_dialog_label.get_style_context().add_class("title-1") + exiting_dialog_box.append(exiting_dialog_label) + exiting_dialog.set_can_close(False) + GLib.idle_add(exiting_dialog.present, self) GLib.timeout_add(3000, self.aria2c_exiting_check, app, 0, variaapp, exiting_dialog) else: self.destroy() variaapp.quit() + + return True def aria2c_exiting_check(self, app, counter, variaapp, exiting_dialog): print(counter) @@ -335,7 +336,7 @@ def aria2c_exiting_check(self, app, counter, variaapp, exiting_dialog): self.aria2c_subprocess.terminate() self.aria2c_subprocess.wait() if (exiting_dialog is not None): - exiting_dialog.destroy() + exiting_dialog.force_close() self.destroy() variaapp.quit() for thread in threading.enumerate(): @@ -358,8 +359,13 @@ def __init__(self, appdir, appconf, aria2c_subprocess, aria2cexec, **kwargs): def on_activate(self, app, appdir, appconf, aria2c_subprocess, aria2cexec): if not hasattr(self, 'win'): self.win = MainWindow(application=app, variaapp=self, appdir=appdir, appconf=appconf, aria2c_subprocess=aria2c_subprocess, aria2cexec=aria2cexec) - if ((self.win.terminating == False) and ((appconf["default_mode"] == "visible") or (self.initiated == True))): - self.win.present() + + try: + if ((self.win.terminating == False) and ((appconf["default_mode"] == "visible") or (self.initiated == True))): + self.win.present() + except: + return -1 + self.initiated = True def quit_action(self, action, parameter): diff --git a/src/window/preferences.py b/src/window/preferences.py index 00b6d85..591e6f2 100644 --- a/src/window/preferences.py +++ b/src/window/preferences.py @@ -336,6 +336,7 @@ def show_preferences(button, self, app): group_2.add(remote_time) group_2.add(cookies_txt_action) group_2.add(cookies_txt_action) + group_2.add(remote_aria2_expander_box) preferences.present(self) From cdb46075b7966c8d9236570991ceb81eac2f4c85 Mon Sep 17 00:00:00 2001 From: lumingzh Date: Sun, 22 Sep 2024 17:59:21 +0800 Subject: [PATCH 13/29] update Chinese translation --- po/zh_CN.po | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index db18573..2b24a6d 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: varia main\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-09-03 19:46+0800\n" +"PO-Revision-Date: 2024-09-22 17:57+0800\n" "Last-Translator: lumingzh \n" "Language-Team: Chinese (China) \n" "Language: zh_CN\n" @@ -321,6 +321,15 @@ msgstr "导入 cookies.txt" msgid "Remove cookies.txt" msgstr "移除 cookies.txt" +msgid "remaining" +msgstr "剩余时间" + +msgid "Start in Background Mode" +msgstr "以后台模式启动" + +msgid "Remote Timestamp" +msgstr "远程时间戳" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From ba976df31a973197783435fcf0271cfd12fbf296 Mon Sep 17 00:00:00 2001 From: twlvnn Date: Sun, 22 Sep 2024 12:30:32 +0200 Subject: [PATCH 14/29] Updated Bulgarian translation --- po/bg.po | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/po/bg.po b/po/bg.po index fa07b2d..2d223f6 100644 --- a/po/bg.po +++ b/po/bg.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: varia\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-07-06 13:05+0200\n" +"PO-Revision-Date: 2024-09-22 12:29+0200\n" "Last-Translator: twlvnn kraftwerk \n" "Language-Team: Bulgarian \n" "Language: bg\n" @@ -323,6 +323,15 @@ msgstr "Внасяне на бисквитки.txt" msgid "Remove cookies.txt" msgstr "Премахване на бисквитки.txt" +msgid "remaining" +msgstr "остава" + +msgid "Start in Background Mode" +msgstr "Стартиране във фонов режим" + +msgid "Remote Timestamp" +msgstr "Дата на отдалеченото място" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From 2900eac03553da0110a28fa90997f74a54a6dfab Mon Sep 17 00:00:00 2001 From: Alexmelman88 <99257010+Alexmelman88@users.noreply.github.com> Date: Sun, 22 Sep 2024 13:47:57 +0300 Subject: [PATCH 15/29] Update ru.po --- po/ru.po | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/po/ru.po b/po/ru.po index aa65550..194f2b0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Varia\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-05-12 01:15+0300\n" +"PO-Revision-Date: 2024-09-22 13:45+0300\n" "Last-Translator: Aleksandr Melman \n" "Language-Team: \n" "Language: ru\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.4.4\n" #. Translators: Do NOT translate or localize the application name. #: data/io.github.giantpinkrobots.varia.desktop.in:4 @@ -326,6 +326,15 @@ msgstr "Импортировать cookies.txt" msgid "Remove cookies.txt" msgstr "Удалить cookies.txt" +msgid "remaining" +msgstr "осталось" + +msgid "Start in Background Mode" +msgstr "Запуск в фоновом режиме" + +msgid "Remote Timestamp" +msgstr "Удаленная временная метка" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From 8bd9f04a16cf3148dee823c74d82cb2192263de9 Mon Sep 17 00:00:00 2001 From: Gnuey56 Date: Mon, 23 Sep 2024 11:56:46 +0900 Subject: [PATCH 16/29] Update Japanese translation --- po/ja.po | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/po/ja.po b/po/ja.po index ec02944..cb8cfaa 100644 --- a/po/ja.po +++ b/po/ja.po @@ -1,7 +1,7 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# The Japanese translation of Varia. +# Copyright (C) YEAR THE Varia'S COPYRIGHT HOLDER +# This file is distributed under the same license as the Varia package. +# Gnuey56 , 2024. # #, fuzzy msgid "" @@ -9,14 +9,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-05-10 19:51+0900\n" +"PO-Revision-Date: 2024-09-23 11:46+0900\n" "Last-Translator: Gnuey56 \n" "Language-Team: \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #. Translators: Do NOT translate or localize the application name. #: data/io.github.giantpinkrobots.varia.desktop.in:4 @@ -323,6 +323,15 @@ msgstr "cookies.txt をインポート" msgid "Remove cookies.txt" msgstr "cookies.txt を削除" +msgid "remaining" +msgstr "残り" + +msgid "Start in Background Mode" +msgstr "バックグラウンドモードで開始" + +msgid "Remote Timestamp" +msgstr "リモートのタイムスタンプ" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From ba7aac1184f868a7feae88e89b5ba883df35a0f5 Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Mon, 23 Sep 2024 13:38:14 +0300 Subject: [PATCH 17/29] Fix Russian language Remove a missed duplicate string that was preventing Varia from building --- po/ru.po | 3 --- 1 file changed, 3 deletions(-) diff --git a/po/ru.po b/po/ru.po index 194f2b0..61126b9 100644 --- a/po/ru.po +++ b/po/ru.po @@ -144,9 +144,6 @@ msgstr " Байт/с" msgid "Simultaneous Download Amount" msgstr "Количество одновременных загрузок" -msgid "Start in Background Mode" -msgstr "Запуск в фоновом режиме" - #: src/variamain.py:410 msgid "Resume All" msgstr "Возобновить все" From 5c80416e6a0c45cc66a4ade1b353dd58383a438e Mon Sep 17 00:00:00 2001 From: Nokse22 <44558032+Nokse22@users.noreply.github.com> Date: Tue, 6 Aug 2024 15:08:03 +0200 Subject: [PATCH 18/29] Added mimetype and icon for .aria2 file --- data/io.github.giantpinkrobots.varia.mime.svg | 313 ++++++++++++++++++ data/io.github.giantpinkrobots.varia.mime.xml | 9 + data/meson.build | 8 + 3 files changed, 330 insertions(+) create mode 100644 data/io.github.giantpinkrobots.varia.mime.svg create mode 100644 data/io.github.giantpinkrobots.varia.mime.xml diff --git a/data/io.github.giantpinkrobots.varia.mime.svg b/data/io.github.giantpinkrobots.varia.mime.svg new file mode 100644 index 0000000..0ef8679 --- /dev/null +++ b/data/io.github.giantpinkrobots.varia.mime.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/io.github.giantpinkrobots.varia.mime.xml b/data/io.github.giantpinkrobots.varia.mime.xml new file mode 100644 index 0000000..1640bb9 --- /dev/null +++ b/data/io.github.giantpinkrobots.varia.mime.xml @@ -0,0 +1,9 @@ + + + + Varia Download Progress + + + + + diff --git a/data/meson.build b/data/meson.build index 19be115..d32ca05 100644 --- a/data/meson.build +++ b/data/meson.build @@ -28,6 +28,14 @@ install_data('io.github.giantpinkrobots.varia.gschema.xml', install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' ) +install_data('io.github.giantpinkrobots.varia.mime.xml', + install_dir: join_paths(get_option('datadir'), 'mime', 'packages') +) + +install_data('io.github.giantpinkrobots.varia.mime.svg', + install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'mimetypes') +) + compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) test('Validate schema file', compile_schemas, From 1f0b3f47da8e8e37e834c16db019cb47973eaa7a Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Mon, 23 Sep 2024 14:08:28 +0300 Subject: [PATCH 19/29] File extension change Varia now uses the ".varia" file extension instead of ".varia.json". The mimeinfo now registers ".varia" files as "Varia Download Progress" and ".aria2" files as "Aria2 Download Progress". --- .gitignore | 6 +++--- data/io.github.giantpinkrobots.varia.mime.xml | 7 ++++++- src/download/thread.py | 10 +++++----- src/variamain.py | 13 +++++++++---- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 0ec358f..04d4041 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ .vscode _build .flatpak-builder -src/__pycache__/ -src/download/__pycache__/ -src/window/__pycache__/ \ No newline at end of file +/src/__pycache__ +/src/download/__pycache__ +/src/window/__pycache__ diff --git a/data/io.github.giantpinkrobots.varia.mime.xml b/data/io.github.giantpinkrobots.varia.mime.xml index 1640bb9..c073195 100644 --- a/data/io.github.giantpinkrobots.varia.mime.xml +++ b/data/io.github.giantpinkrobots.varia.mime.xml @@ -2,8 +2,13 @@ Varia Download Progress - + + + Aria2 Download Progress + + + diff --git a/src/download/thread.py b/src/download/thread.py index 711f6df..0fb2d4c 100644 --- a/src/download/thread.py +++ b/src/download/thread.py @@ -103,8 +103,8 @@ def run(self): GLib.idle_add(self.update_labels_and_things) if ((self.download.is_complete) and (self.download.is_metadata == False)): print('Download complete: ' + self.download.gid) - if os.path.exists(os.path.join(self.downloaddir,(self.download.gid + ".varia.json"))): - os.remove(os.path.join(self.downloaddir,(self.download.gid + ".varia.json"))) + if os.path.exists(os.path.join(self.downloaddir,(self.download.gid + ".varia"))): + os.remove(os.path.join(self.downloaddir,(self.download.gid + ".varia"))) break elif ((self.download.is_torrent) and (self.download.seeder)): print('Torrent complete, seeding: ' + self.download.gid) @@ -200,8 +200,8 @@ def stop(self, deletefiles): self.download.remove(force=True) if not self.download.is_complete: if (deletefiles == True): - if os.path.exists(os.path.join(self.downloaddir,(downloadgid + ".varia.json"))): - os.remove(os.path.join(self.downloaddir,(downloadgid + ".varia.json"))) + if os.path.exists(os.path.join(self.downloaddir,(downloadgid + ".varia"))): + os.remove(os.path.join(self.downloaddir,(downloadgid + ".varia"))) if os.path.exists(os.path.join(self.downloaddir, downloadname)): os.remove(os.path.join(self.downloaddir, downloadname)) print ("Download stopped.") @@ -220,7 +220,7 @@ def save_state(self): 'url': self.url, 'filename': self.download.name } - with open(os.path.join(self.downloaddir, f'{self.download.gid}.varia.json'), 'w') as f: + with open(os.path.join(self.downloaddir, f'{self.download.gid}.varia'), 'w') as f: json.dump(state, f) print ("State saved for download.") diff --git a/src/variamain.py b/src/variamain.py index f6f2f41..a1d11df 100644 --- a/src/variamain.py +++ b/src/variamain.py @@ -91,14 +91,19 @@ def __init__(self, variaapp, appdir, appconf, aria2c_subprocess, aria2cexec, *ar default_state = {"url": None, "filename": None} for filename in os.listdir(self.appconf["download_directory"]): - if filename.endswith('.varia.json'): - - with open(os.path.join(self.appconf["download_directory"], filename), 'r') as f: + if (filename.endswith('.varia.json')) or (filename.endswith('.varia')): + if (filename.endswith(".varia.json")): + current_filename = filename.replace(".json", "") + os.rename(os.path.join(self.appconf["download_directory"], filename), os.path.join(self.appconf["download_directory"], current_filename)) + else: + current_filename = filename + + with open(os.path.join(self.appconf["download_directory"], current_filename), 'r') as f: loaded_state = json.load(f) state = {**default_state, **loaded_state} objectlist = create_actionrow(self, state['url']) - download_thread = DownloadThread.load_state(self, filename, state['url'], objectlist[0], objectlist[1], objectlist[2], objectlist[3], objectlist[4], None, state['filename']) + download_thread = DownloadThread.load_state(self, current_filename, state['url'], objectlist[0], objectlist[1], objectlist[2], objectlist[3], objectlist[4], None, state['filename']) self.downloads.append(download_thread) download_thread.start() From edf59724b4417de9eceb5f94d49f3cb286935445 Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Mon, 23 Sep 2024 14:21:56 +0300 Subject: [PATCH 20/29] Squashed commit of the following: commit 8232d886f8f2ca0fba02bf3c4c7e67c8bfa8a9de Merge: dac8859 51a5b51 Author: Giant Pink Robots! Date: Mon Sep 23 13:08:51 2024 +0300 Merge pull request #120 from Vovkiv/main Update Ukrainian translation commit 51a5b51bec3846280143d20d5625e1695cc55513 Author: Vovkiv <54743395+Vovkiv@users.noreply.github.com> Date: Sun Sep 22 11:35:00 2024 +0000 Update Ukrainian translation With new strings commit 232dc9fdb65466ff7a8da4a66f403e91a7d541fc Author: volkov Date: Sat Aug 10 01:15:43 2024 +0300 Update Ukrainian translation. commit dac885965157bcb1ba28d497fffd72342d5386fa Merge: 4c0f72e 71dac18 Author: Giant Pink Robots! Date: Sun Jul 28 22:15:05 2024 +0300 Merge pull request #111 from N0tACyb0rg/browserfix Check if Downloads are Older than the Browser Session commit 71dac18d470d3edbbd0628c59f5a17d1f9a6dba6 Author: N0tACyb0rg Date: Wed May 29 12:00:46 2024 -0700 Fix #110. --- browser-extension/background.js | 7 ++ po/uk.po | 177 ++++++++++++++++++++++++++++++-- 2 files changed, 175 insertions(+), 9 deletions(-) diff --git a/browser-extension/background.js b/browser-extension/background.js index fe996d5..6103a46 100644 --- a/browser-extension/background.js +++ b/browser-extension/background.js @@ -1,3 +1,5 @@ +let startTime = Date.now(); + chrome.runtime.onInstalled.addListener(function(details) { if (details.reason === 'install') { chrome.storage.sync.set({enabled: true}); @@ -5,6 +7,11 @@ chrome.runtime.onInstalled.addListener(function(details) { }); chrome.downloads.onCreated.addListener(function(downloadItem) { + var downloadTime = new Date(downloadItem.startTime).getTime(); + if (downloadTime < startTime) { + return; + } + chrome.storage.sync.get('enabled', function(data) { if (data.enabled) { sendToAria2(downloadItem); diff --git a/po/uk.po b/po/uk.po index b9f5f34..0551ea1 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,21 +1,21 @@ # Ukrainian translation for Varia. -# Copyright (C) 2023 THE Varia's COPYRIGHT HOLDER +# Copyright (C) 2024 THE Varia's COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# volkov , 2023. +# volkov , 2024. # msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: Varia\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2023-12-08 15:49+0200\n" +"PO-Revision-Date: 2024-09-22 14:32+0300\n" "Last-Translator: volkov \n" -"Language-Team: \n" +"Language-Team: volkov \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.4.4\n" #. Translators: Do NOT translate or localize the application name. #: data/io.github.giantpinkrobots.varia.desktop.in:4 @@ -26,7 +26,9 @@ msgstr "" #. Translators: These are search terms to find this application. Do NOT translate or localize the semicolons. The list MUST also end with a semicolon. #: data/io.github.giantpinkrobots.varia.desktop.in:11 msgid "varia;aria;download;manager;" -msgstr "varia;aria;download;manager;завантажувач;скачати;зберегти;варія;арія;" +msgstr "" +"varia;aria;download;manager;torrent;завантажувач;скачати;зберегти;варія;арія;" +"закачати;торрент;" #: data/io.github.giantpinkrobots.varia.metainfo.xml.in:4 msgid "Download manager based on aria2" @@ -46,6 +48,18 @@ msgstr "" msgid "This is not a valid URL." msgstr "Це не правильна URL-адреса." +#: src/variamain.py:125 +msgid "All" +msgstr "Усі" + +#: src/variamain.py:137 +msgid "In Progress" +msgstr "В процесі" + +#: src/variamain.py:148 +msgid "Completed" +msgstr "Завершено" + #: src/variamain.py:171 msgid "About Varia" msgstr "Про Varia" @@ -126,6 +140,10 @@ msgstr " КБ/с" msgid " B/s" msgstr " Б/с" +#: src/variamain.py:404 +msgid "Simultaneous Download Amount" +msgstr "Кількість одночасних завантажень" + #: src/variamain.py:410 msgid "Resume All" msgstr "Відновити всі" @@ -141,8 +159,12 @@ msgid "This application relies on the following pieces of software:" msgstr "Цей додаток покладається на наступне програмне забезпечення:" #: src/variamain.py:777 -msgid "The licenses of all of these pieces of software can be found in the dependencies_information directory in this application's app directory." -msgstr "Знайти ліцензії усього перерахованого програмного забезпечення можна у теці 'dependencies_information' цього додатку." +msgid "" +"The licenses of all of these pieces of software can be found in the " +"dependencies_information directory in this application's app directory." +msgstr "" +"Знайти ліцензії усього перерахованого програмного забезпечення можна у теці " +"'dependencies_information' цього додатку." #: src/variamain.py:449 msgid "translator-credits" @@ -176,6 +198,143 @@ msgstr "Пароль" msgid "Authorization failed." msgstr "Не вдалося авторизуватися." +#: src/variamain.py:806 +msgid "Failed to open directory." +msgstr "Не вдалося відкрити теку." + +msgid "Remote Mode" +msgstr "Віддалений режим" + +msgid "Remote aria2 IP" +msgstr "Віддалений aria2 IP-адреса" + +msgid "Remote aria2 Port" +msgstr "Віддалений aria2 Порт" + +# https://uk.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%BB%D0%B8%D0%BA_%D0%B2%D1%96%D0%B4%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%B8%D1%85_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80 +msgid "Remote aria2 RPC Secret" +msgstr "Віддалений aria2 RPC секрет" + +msgid "Remote Download Location" +msgstr "Розташування віддалених завантажень" + +msgid "Exiting Varia..." +msgstr "Виходимо з Varia..." + +msgid "Background Mode" +msgstr "Режим заднього фону" + +msgid "Continuing the downloads in the background." +msgstr "Продовжувати завантаження у фоні." + +msgid "Browser Extension" +msgstr "Розширення для браузеру" + +msgid "Shutdown on Completion" +msgstr "Вимкнути комп'ютер при завершенні" + +msgid "Varia is about to shut down your computer." +msgstr "Varia збирається вимкнути ваш комп'ютер." + +msgid "Press Cancel to cancel and disable." +msgstr "Натисніть 'Скасувати', щоб скасувати." + +msgid "Cancel" +msgstr "Скасувати" + +msgid "Warning" +msgstr "Увага" + +msgid "Monday" +msgstr "Понеділок" + +msgid "Tuesday" +msgstr "Вівторок" + +msgid "Wednesday" +msgstr "Середа" + +msgid "Thursday" +msgstr "Четвер" + +msgid "Friday" +msgstr "П'ятниця" + +msgid "Saturday" +msgstr "Субота" + +msgid "Sunday" +msgstr "Неділя" + +msgid "Start (h/m):" +msgstr "Початок (год./хв.)" + +msgid "End (h/m):" +msgstr "Кінець (год./хв.)" + +msgid "Scheduler enabled" +msgstr "Планувальник увімкнено" + +msgid "Scheduler" +msgstr "Планувальник" + +msgid "Enabled" +msgstr "Увімкнено" + +msgid "Start downloading in these times" +msgstr "Розпочати завантаження у ці часи" + +msgid "Stop downloading in these times" +msgstr "Зупинити завантаження у ці часи" + +msgid "Add Timespan" +msgstr "Додати проміжок часу" + +msgid "Seeding" +msgstr "Роздається" + +msgid "Failed" +msgstr "Не вдалося" + +msgid "Completion Options" +msgstr "Налаштування завершення" + +msgid "Exit on Completion" +msgstr "Закрити додаток при завершенні" + +msgid "Varia is about to quit." +msgstr "Varia завершує роботу." + +msgid "Preferences" +msgstr "Налаштування" + +msgid "Other" +msgstr "Інше" + +msgid "Basic Settings" +msgstr "Базові налаштування" + +msgid "Advanced Settings" +msgstr "Налаштування для досвідчених" + +msgid "Use cookies.txt" +msgstr "Використовувати cookies.txt" + +msgid "Import cookies.txt" +msgstr "Імпортувати cookies.txt" + +msgid "Remove cookies.txt" +msgstr "Видалити cookies.txt" + +msgid "remaining" +msgstr "залишилося" + +msgid "Start in Background Mode" +msgstr "Запускати у задньому фоні" + +msgid "Remote Timestamp" +msgstr "Віддалені позначки часу" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From aab31a87b84d2b2f1501cd63b44e127fff28678e Mon Sep 17 00:00:00 2001 From: haggen88 <68134588+haggen88@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:36:56 -0300 Subject: [PATCH 21/29] Update es.po --- po/es.po | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/po/es.po b/po/es.po index 423856f..22d674d 100644 --- a/po/es.po +++ b/po/es.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-05-10 15:41-0400\n" +"PO-Revision-Date: 2024-09-23 11:35-0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.4.4\n" #. Translators: Do NOT translate or localize the application name. #: data/io.github.giantpinkrobots.varia.desktop.in:4 @@ -322,6 +322,15 @@ msgstr "Importar cookies.txt" msgid "Remove cookies.txt" msgstr "Eliminar cookies.txt" +msgid "remaining" +msgstr "restante" + +msgid "Start in Background Mode" +msgstr "Iniciar en segundo plano" + +msgid "Remote Timestamp" +msgstr "Marca de tiempo remota" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From ed3e40d66dbbb45c4577a7ad25af00f013d6ce28 Mon Sep 17 00:00:00 2001 From: haggen88 <68134588+haggen88@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:38:15 -0300 Subject: [PATCH 22/29] update spanish From d63739d6dbc914f6177806a26c732f4f112cc5e9 Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Fri, 27 Sep 2024 23:28:22 +0300 Subject: [PATCH 23/29] Add torrent file button & Adjustments 27 Sept 24 - Sidebar layout adjusted and redesigned, new torrent button added. Download button is no longer clickable when there is no URL set. - ETA string now shows infinity symbol when download speed is zero. - Search enabled in the Preferences screen. - Aria2 now uses "--file-allocation=falloc" when the OS supports it and allows for file overwrites. --- po/Varia.pot | 3 ++ po/tr.po | 3 ++ src/download/thread.py | 11 +++++-- src/variamain.py | 8 +++-- src/window/preferences.py | 1 + src/window/sidebar.py | 69 +++++++++++++++++++++++++++++++-------- 6 files changed, 76 insertions(+), 19 deletions(-) diff --git a/po/Varia.pot b/po/Varia.pot index 7ec2059..862555c 100644 --- a/po/Varia.pot +++ b/po/Varia.pot @@ -323,6 +323,9 @@ msgstr "" msgid "Remote Timestamp" msgstr "" +msgid "Torrent" +msgstr "" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" diff --git a/po/tr.po b/po/tr.po index 369dae2..e52de56 100644 --- a/po/tr.po +++ b/po/tr.po @@ -327,6 +327,9 @@ msgstr "Arkaplan Modunda Başlat" msgid "Remote Timestamp" msgstr "Uzak Zaman Damgası" +msgid "Torrent" +msgstr "Torrent" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" diff --git a/src/download/thread.py b/src/download/thread.py index 0fb2d4c..2fdddd5 100644 --- a/src/download/thread.py +++ b/src/download/thread.py @@ -152,14 +152,19 @@ def update_labels_and_things(self): download_minutes = str(download_minutes).zfill(2) download_seconds = str(download_seconds).zfill(2) + if self.download.download_speed == 0: + download_remaining_string = "∞" + else: + download_remaining_string = f"{download_hours}:{download_minutes}:{download_seconds}" + if int(str(download_speed_mb)[0]) == 0: download_speed_kb = (self.download.download_speed / 1024) if int(str(download_speed_kb)[0]) == 0: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} {_(' B/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed, 2)} {_(' B/s')} | {download_remaining_string} {_('remaining')}") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} {_(' KB/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024, 2)} {_(' KB/s')} | {download_remaining_string} {_('remaining')}") else: - self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} {_(' MB/s')} | {download_hours}:{download_minutes}:{download_seconds} {_('remaining')}") + self.speed_label.set_text(f"{round(self.download.progress)}% | {round(self.download.download_speed / 1024 / 1024, 2)} {_(' MB/s')} | {download_remaining_string} {_('remaining')}") def pause(self): if self.download: diff --git a/src/variamain.py b/src/variamain.py index a1d11df..b0607aa 100644 --- a/src/variamain.py +++ b/src/variamain.py @@ -425,9 +425,13 @@ def main(version, aria2cexec): aria2c_subprocess = None if (appconf['remote'] == '0'): if (os.name == 'nt'): - aria2c_subprocess = subprocess.Popen([aria2cexec, "--enable-rpc", "--rpc-listen-port=6801", "--follow-torrent=mem"], shell=True) + aria2c_subprocess = subprocess.Popen([aria2cexec, "--enable-rpc", "--rpc-listen-port=6801", "--follow-torrent=mem", "--allow-overwrite=true"], shell=True) else: - aria2c_subprocess = subprocess.Popen([aria2cexec, "--enable-rpc", "--rpc-listen-port=6801", "--follow-torrent=mem"]) + if hasattr(os, 'posix_fallocate'): + print("fallocate enabled.") + aria2c_subprocess = subprocess.Popen([aria2cexec, "--enable-rpc", "--rpc-listen-port=6801", "--follow-torrent=mem", "--allow-overwrite=true", "--file-allocation=falloc"]) + else: + aria2c_subprocess = subprocess.Popen([aria2cexec, "--enable-rpc", "--rpc-listen-port=6801", "--follow-torrent=mem", "--allow-overwrite=true"]) arguments = sys.argv if (len(arguments) > 1): diff --git a/src/window/preferences.py b/src/window/preferences.py index 591e6f2..3cccccd 100644 --- a/src/window/preferences.py +++ b/src/window/preferences.py @@ -10,6 +10,7 @@ def show_preferences(button, self, app): preferences = Adw.PreferencesDialog() + preferences.set_search_enabled(True) page = Adw.PreferencesPage(title=_("Preferences")) preferences.add(page) diff --git a/src/window/sidebar.py b/src/window/sidebar.py index 5edc51c..5b09d3f 100644 --- a/src/window/sidebar.py +++ b/src/window/sidebar.py @@ -12,7 +12,7 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion): sidebar_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) - sidebar_content_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) + sidebar_content_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) header_bar = Adw.HeaderBar() header_bar.get_style_context().add_class('flat') @@ -80,14 +80,45 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion): header_bar.pack_start(preferences_button) header_bar.pack_end(hamburger_button) + box_add_download = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) + box_add_download.set_margin_start(8) + box_add_download.set_margin_end(8) + box_add_download.set_margin_top(8) + box_add_download.set_margin_bottom(8) + download_entry = Gtk.Entry() download_entry.set_placeholder_text(_("URL")) - self.download_button = Gtk.Button(label=_("Download")) - self.download_button.get_style_context().add_class("pill") + download_button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) + download_button_box.append(Gtk.Image.new_from_icon_name("folder-download-symbolic")) + download_button_box.append(Gtk.Label(label=_("Download"))) + + self.download_button = Gtk.Button() + self.download_button.set_child(download_button_box) self.download_button.get_style_context().add_class("suggested-action") + self.download_button.set_sensitive(False) self.download_button.connect("clicked", on_download_clicked, self, download_entry, DownloadThread) + download_entry.connect('changed', on_download_entry_changed, self.download_button) + + torrent_button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) + torrent_button_box.append(Gtk.Image.new_from_icon_name("document-open-symbolic")) + torrent_button_box.append(Gtk.Label(label=_("Torrent"))) + + add_torrent_button = Gtk.Button() + add_torrent_button.get_style_context().add_class("suggested-action") + add_torrent_button.set_child(torrent_button_box) + add_torrent_button.connect("clicked", on_add_torrent_clicked, self) + + box_add_download.append(download_entry) + box_add_download.append(self.download_button) + box_add_download.append(Gtk.Separator(margin_top=8, margin_bottom=8)) + box_add_download.append(add_torrent_button) + + frame_add_download = Gtk.Frame() + frame_add_download.set_margin_bottom(24) + frame_add_download.set_child(box_add_download) + self.filter_button_show_all = Gtk.ToggleButton() self.filter_button_show_all.get_style_context().add_class('flat') filter_button_show_all_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=10) @@ -149,13 +180,6 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion): self.filter_button_show_failed.set_child(filter_button_show_failed_box) self.filter_button_show_failed.connect("clicked", self.filter_download_list, "show_failed") - sidebar_separator = Gtk.Separator() - sidebar_separator.set_margin_top(8) - sidebar_separator.set_margin_bottom(8) - - sidebar_expanding_box = Gtk.Box() - Gtk.Widget.set_vexpand(sidebar_expanding_box, True) - self.sidebar_shutdown_mode_label = Gtk.Label() self.sidebar_remote_mode_label = Gtk.Label() if (self.appconf['remote'] == '1'): @@ -175,11 +199,9 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion): sidebar_filter_buttons_box.append(self.filter_button_show_seeding) sidebar_filter_buttons_box.append(self.filter_button_show_failed) - sidebar_content_box.append(download_entry) - sidebar_content_box.append(self.download_button) - sidebar_content_box.append(sidebar_separator) + sidebar_content_box.append(frame_add_download) sidebar_content_box.append(sidebar_filter_buttons_box) - sidebar_content_box.append(sidebar_expanding_box) + sidebar_content_box.append(Gtk.Box(vexpand=True)) sidebar_content_box.append(self.sidebar_shutdown_mode_label) sidebar_content_box.append(self.sidebar_remote_mode_label) sidebar_content_box.append(self.sidebar_speed_limited_label) @@ -188,6 +210,25 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion): self.overlay_split_view.set_sidebar(sidebar_box) +def on_download_entry_changed(entry, download_button): + if entry.get_text() != "": + download_button.set_sensitive(True) + else: + download_button.set_sensitive(False) + +def on_add_torrent_clicked(self, variaapp): + file_filter = Gtk.FileFilter() + file_filter.add_pattern("*.torrent") + dialog = Gtk.FileDialog(default_filter=file_filter) + dialog.open(variaapp, None, on_add_torrent, variaapp) + +def on_add_torrent(file_dialog, result, self): + try: + file = file_dialog.open_finish(result).get_path() + except: + return + self.api.add_torrent(file) + def background_mode(app, variaapp1, self, variaapp): self.exitProgram(app=app, variaapp=variaapp, background=True) From baf332e4e570383038c0f44664e903443ce46652 Mon Sep 17 00:00:00 2001 From: Alexmelman88 <99257010+Alexmelman88@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:46:46 +0300 Subject: [PATCH 24/29] Update Russian translation --- po/ru.po | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/po/ru.po b/po/ru.po index 61126b9..dea4682 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Varia\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-30 03:17+0300\n" -"PO-Revision-Date: 2024-09-22 13:45+0300\n" +"PO-Revision-Date: 2024-10-10 18:43+0300\n" "Last-Translator: Aleksandr Melman \n" "Language-Team: \n" "Language: ru\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Poedit 3.4.4\n" +"X-Generator: Poedit 3.5\n" #. Translators: Do NOT translate or localize the application name. #: data/io.github.giantpinkrobots.varia.desktop.in:4 @@ -332,6 +332,9 @@ msgstr "Запуск в фоновом режиме" msgid "Remote Timestamp" msgstr "Удаленная временная метка" +msgid "Torrent" +msgstr "Торрент" + #: src/gtk/help-overlay.ui:11 msgctxt "shortcut window" msgid "General" From 87274a68c10bb2583d4fffb1f05aa45811b43a0f Mon Sep 17 00:00:00 2001 From: Giant Pink Robots! Date: Sat, 26 Oct 2024 17:34:14 +0300 Subject: [PATCH 25/29] Windows version improvements & more - New updater function for Windows, allowing for automatic updates for the installer directly through Github. - Windows version now supports localization and all icons are properly displayed. - New build script for Windows that handles all dependencies (except for aria2), compiling localizations and building with PyInstaller. - Edits to README to document the new build instructions for Windows. - Adherence to the newest GTK 4 standard deprecating widget.show() and hide(). - Landing page improvements with better css and fixes. - Bug fixes regarding threading with GTK and reloading unfinished downloads upon startup. - Better handling of total download speed that actually makes sense. - Removal of unnecessary imports from files. - Up to date screenshots. --- README.md | 32 +-- build-for-windows.sh | 60 ++++++ ...thub.giantpinkrobots.varia.metainfo.xml.in | 27 ++- docs/downloadIcon.png | Bin 1540 -> 0 bytes docs/index.html | 44 +++-- docs/packageIcon.png | Bin 0 -> 2258 bytes docs/style.css | 13 +- po/Varia.pot | 34 ++++ po/tr.po | 33 ++++ screenshots/Screenshot-Varia-1.png | Bin 26452 -> 28106 bytes screenshots/Screenshot-Varia-2.png | Bin 45906 -> 59345 bytes screenshots/Screenshot-Varia-3.png | Bin 59621 -> 69148 bytes screenshots/Screenshot-Varia-4.png | Bin 62656 -> 70633 bytes screenshots/Screenshot-Varia-5.png | Bin 44374 -> 57939 bytes src/download/actionrow.py | 1 + src/download/listen.py | 10 +- src/download/scheduler.py | 4 - src/download/thread.py | 32 ++- src/initiate.py | 33 +++- src/meson.build | 1 + src/variamain.py | 152 ++++++++------- src/window/content.py | 30 ++- src/window/preferences.py | 62 ++++-- src/window/scheduler.py | 11 +- src/window/sidebar.py | 10 +- src/window/updater.py | 182 ++++++++++++++++++ 26 files changed, 575 insertions(+), 196 deletions(-) create mode 100644 build-for-windows.sh delete mode 100644 docs/downloadIcon.png create mode 100644 docs/packageIcon.png create mode 100644 src/window/updater.py diff --git a/README.md b/README.md index 3a97467..d3ecd66 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ This requires you to have Flatpak and the Flathub Flatpak repository installed o ### AUR (Arch Linux) You can get Varia via the [AUR](https://aur.archlinux.org/packages/varia) as well, but it is not distributed by me. -### Windows (experimental) -You can find a *highly experimental* build of Varia in the releases section. But keep in mind, it will have bugs. +### Windows +You can find amd64 builds of Varia in the Releases section in both installer and portable forms. The installer version is recommended and it includes an auto updater function. ## Browser Extension Download it for [Firefox](https://addons.mozilla.org/firefox/addon/varia-integrator/) or [Chrome](https://chrome.google.com/webstore/detail/dacakhfljjhgdfdlgjpabkkjhbpcmiff). @@ -88,32 +88,16 @@ sudo meson install ### for Windows -Windows support is experimental. Translations don't work yet. - - [Get MSYS2.](https://www.msys2.org/) -- Install dependencies on an MSYS2 shell: -``` -pacman -S mingw-w64-x86_64-python -pacman -S mingw-w64-x86_64-gtk4 -pacman -S mingw-w64-x86_64-libadwaita -pacman -S mingw-w64-x86_64-python-gobject -pacman -S mingw-w64-x86_64-python-pip -pip install aria2p -pip install pyinstaller -``` -- To have the icon applied properly you also need python-pillow, otherwise pyinstaller gives an error: -``` -pacman -S mingw-w64-x86_64-python-pillow -``` -- Copy the contents of the /src folder to the home directory of your MSYS2 install. -- Copy varia.spec and icon.ico from the /windows directory to the home directory of your MSYS2 install. -- Run the pyinstaller command: +- Open the mingw64 shell in MSYS2 and update everything before continuing: ``` -pyinstaller varia.spec +pacman -Syyu ``` -- [You need to get a copy of aria2c.exe](https://github.com/aria2/aria2/releases) and paste it into the /dist/variamain folder that was created by pyinstaller. +- Either clone Varia inside the shell or copy the folder to your MSYS2 home folder. +- [You need to get a copy of aria2c.exe](https://github.com/aria2/aria2/releases) and paste it into the root of the folder. +- Running 'build-for-windows.sh' will take care of the dependencies and everything else and build Varia WITHOUT the updater function. To enable the updater function you need to run the script with the '-u' argument. (or just create an empty file called 'updater-function-enabled' next to variamain.exe after completion) -Running variamain.exe will start Varia. +Varia will be built into src/dist/variamain. Main executable is variamain.exe. ## Contributing diff --git a/build-for-windows.sh b/build-for-windows.sh new file mode 100644 index 0000000..c8bec46 --- /dev/null +++ b/build-for-windows.sh @@ -0,0 +1,60 @@ +updater=0 + +while getopts "hu" flag; do + case $flag in + h) + echo "No flags - Build without the updater function" + echo "-u - Enable the updater function" + exit + ;; + u) + updater=1 + ;; + esac +done + +if [ ! -f ./aria2c.exe ]; then + echo "aria2c.exe does not exist. You need to copy it here before you can run this." + exit +fi + +echo "Installing dependencies..." + +pacman -S --noconfirm --needed mingw-w64-x86_64-python +pacman -S --noconfirm --needed mingw-w64-x86_64-gtk4 +pacman -S --noconfirm --needed mingw-w64-x86_64-libadwaita +pacman -S --noconfirm --needed mingw-w64-x86_64-python-pillow +pacman -S --noconfirm --needed mingw-w64-x86_64-python-gobject +pacman -S --noconfirm --needed mingw-w64-x86_64-python-pip +pip install aria2p +pip install pyinstaller + +echo "Generating locales..." + +rm -rf locale +mkdir locale +for po in po/*.po; do + lang=$(basename "$po" .po) + mkdir locale/$lang + mkdir locale/$lang/LC_MESSAGES + msgfmt -o "locale/$lang/LC_MESSAGES/varia.mo" "$po" +done + +echo "Building PyInstaller distributable..." + +cp -r windows/* src/ +cd src +pyinstaller varia.spec +cd .. +cp -r locale src/dist/variamain/ +cp data/icons/hicolor/symbolic/apps/io.github.giantpinkrobots.varia-symbolic.svg src/dist/variamain/ +cp data/icons/hicolor/scalable/apps/io.github.giantpinkrobots.varia.svg src/dist/variamain/ +cp -r dependencies_information src/dist/variamain/ +cp ./aria2c.exe src/dist/variamain/ + +if [ $updater -eq 1 ]; then + touch src/dist/variamain/updater-function-enabled +fi + +echo "Build complete." +echo "src/dist/variamain/variamain.exe" \ No newline at end of file diff --git a/data/io.github.giantpinkrobots.varia.metainfo.xml.in b/data/io.github.giantpinkrobots.varia.metainfo.xml.in index f48654c..b357770 100644 --- a/data/io.github.giantpinkrobots.varia.metainfo.xml.in +++ b/data/io.github.giantpinkrobots.varia.metainfo.xml.in @@ -10,9 +10,9 @@ Giant Pink Robots! -https://github.com/giantpinkrobots/varia +https://giantpinkrobots.github.io/varia https://github.com/giantpinkrobots/varia -https://github.com/giantpinkrobots/varia/tree/main/po +https://github.com/giantpinkrobots/varia/tree/next/po en_US @@ -34,16 +34,33 @@ -#E9F0F9 -#454545 +#DBE8F5 +#010E1D

Varia is a download manager for all your download needs. It can download regular files and torrents, and do it very quickly.

+
    +
  • +Download files and torrents quickly - potentially faster than your browser, continue incomplete downloads even after reboots +
  • +
  • +Integrate with Firefox and Chrome (or any Chromium based browser) to redirect downloads +
  • +
  • +Schedule downloads with a powerful scheduler allowing for custom timespans for each day of the week +
  • +
  • +Download from protected areas with basic auth and cookies.txt import support +
  • +
  • +Control a remote aria2 instance running on any server +
  • +

-Using Varia is very easy and straightforward, and with its aria2 backend it can potentially increase the speed of your downloads. It can integrate with Firefox or Chrome/ium through a browser extension, configured to your liking, and even support a remote aria2 instance on another computer. +Varia uses GTK4 and Libadwaita for the user interface and utilizes Aria2 for the downloads underneath. It is free software licensed under the Mozilla Public License 2.0. A list of dependencies can be viewed through the Legal section in the About Varia page.

diff --git a/docs/downloadIcon.png b/docs/downloadIcon.png deleted file mode 100644 index 417bee3083b82873235ef6204b8df21c574d8f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1540 zcma)+dpOez7{`BR)?Bwq8B%^jnJ3ESP!7W=+f<86E(y6Umkzm&A!9NjOXxBjcexL> zQzR?ombN-bIqacmo!mNDVRZC7=Q+>$^ZfCBzt8)9-uL_GC;j9J2Sqt`IRF3@i3EG+ zE%*B&IBaW%P34{5GTAVKTLb{eEB}zx>+wVh0LXBO_O_>~Qgfb;wY$zBi-JvYc(^i% zj`Gb!x3DNkh7Hr4*}*#wzodg}epSepz(IYt)Y&dCE&S#1X$&H_SVymwnVs60MKPs+ z{z~KvKHZtGiKrxxfBM|;X>e7Soz zP(WfP8dR4WJoSz%lRxB9(-xPZq9JlBZ~IMKH*{I8Kp~ISrb(d1@AA3ed6h)iPolrI zCuofpoyK&fI2UKbWuap?Net>qxn&ec_og|gBM~Gz4x@t%A?u^2Y_S3d1~hq&sEfDM zlUZZ3Y&cfc_RMV+HhWOYaPGc5_?Kc8kv1OkR9vnM?#_iI{EzYy+AR)yF+6k5UnDJX z6!1Alahg4;sG(j(QCi8ik}I~>wpqf-hmWArRx<61^#kgL(UsR#62xy(?iVcZnQhyf zM%2H!E>#b?%Fks>X$C7aC$7pE<`C#t78o3uUhu`6zVeEfN#W?pX|9vY9I?EZ+{n-> zIszMbTwpwNPI!;K_WMyfpO;v~LnpSgYYQZ4xVjR@I-|&ysIgM`YPXZqA*`$)C!UYq z)j1oTj`>hFZ@hQpptEwHH+{nB7_5b}4=stl7qy2zU~jR2UA+5wck*Tt?Rh!6fFquh zmk&GPgBGL+GEO$Ka?=8)@ia3~G+<$9+y2_Ur|unW7zT|4Wx|``)qiDVt_knr2z{Wv z-;f)nfbU4s2Qg)~yt;u{0&y#Rf$yj=xTSJnE0p=xFmudVspMDP13X*vMZ?9h5WsNd z)91V0uvxFe@y`v}Ute(*BWpE#%X5rj5ff#-6zxE10!l5^FLO+qh*I+v)N2!n8x7c~ zw-~iauN9B?=P9(OcbWwzof{dK0m=b%{Eq(j=7I?7D&N-##KJeRxf)7qtOKYIdVg*{ z$o393y5^e-?I{@)R!yyZ;g+riIb45|-^lW>Ipjj%sIDO*^ErhkmG`uI9%pxf11e2P zFH`eAW`Vb=>kXJKh2qj=-5G=qRkpwVT(xrZu`@>ov+~kdRxn8ZxM<$wY?|tE>1%8q44TqveFbdL7O!6cC$7T0+{V;9)y(kLfMs+^v&nRnRFVe7ZWI z-|0|{6?Q{uJ%eu2d8VzW&&19$9G{@?T;%ZDI#4HI>?xS@v`HZcxl@VP(c`1KY^P_9 zaEg6W+dLUbRc>8x|Ah)z##D6-$NZ6%X+Emfe4{w;g#n&a%0_uG{E}RnGvL_tOGiUc zIa2O@hM01lR<))h1Qu?W3i7)ebo^A8!xHqw|-bK)DGQ^ zPc%;6#iRKxb!VV_7iZ*B0<-9nkWo*D#2Xq56>q=FH@+?8Y3(tC#dUJV0uFW{f@EXd zAIo~S-g#zZN5+puvw5aBs`htzYD^>NEg)7GWl{j1c%`60h3nH6 z6T;gJs@KW(?4$*w8nDf$id2a@WHoL&K2-=x$VnYnaYmYW110D;n#cMdnoH;1D&zxy@Mao9fybg z6svkWK`<9xH5`R_)G|O}R5hHrUr3+7_%3q88X}zHZ^xSWW_s)dXBC{eQ#^#-zLFw` z3lBr%CVQkCFo8BlNAz=!6Exjfogaf=-t8%lpKV99Dm+_QO=L_Yod;y!8M fKj37`)4v0eX1&)Myy~*HunrK9oUm`ednf-5;R>`c diff --git a/docs/index.html b/docs/index.html index 8e5bbc9..b90aca8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,6 +2,7 @@ + @@ -29,6 +30,8 @@

Varia

Quick and efficient download manager

+ +