Skip to content

Commit

Permalink
Merge pull request #1878 from ImranR98/dev
Browse files Browse the repository at this point in the history
Add "title as version" option for GitHub (#1875)
  • Loading branch information
ImranR98 authored Oct 2, 2024
2 parents 46ccf84 + b0b6ddb commit 4017253
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 7 deletions.
1 change: 1 addition & 0 deletions assets/translations/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Deinstaliraj s uređaja",
"onlyWorksWithNonVersionDetectApps": "Radi samo za aplikacije s onemogućenom detekcijom verzije.",
"releaseDateAsVersion": "Koristi datum izdanja kao verziju",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "Ova opcija bi se trebala koristiti samo za aplikacije gdje detekcija verzije ne radi ispravno, ali je datum izdavanja dostupan.",
"changes": "Promjene",
"releaseDate": "Datum izdavanja",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Odinstalovat ze zařízení",
"onlyWorksWithNonVersionDetectApps": "Funguje pouze pro aplikace s vypnutou detekcí verze.",
"releaseDateAsVersion": "Použít datum vydání jako verzi",
"releaseTitleAsVersion": "Použít název verze jako řetězec verze",
"releaseDateAsVersionExplanation": "Tato možnost by měla být použita pouze u aplikace, kde detekce verzí nefunguje správně, ale je k dispozici datum vydání.",
"changes": "Změny",
"releaseDate": "Datum vydání",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Afinstaller fra enhed",
"onlyWorksWithNonVersionDetectApps": "Virker kun for apps med versionsregistrering deaktiveret.",
"releaseDateAsVersion": "Brug udgivelsesdato som versionsstreng",
"releaseTitleAsVersion": "Brug udgivelsestitel som versionsstreng",
"releaseDateAsVersionExplanation": "Denne indstilling bør kun bruges til apps, hvor versionsregistrering ikke virker korrekt, men hvor en udgivelsesdato er tilgængelig.",
"changes": "Ændringer",
"releaseDate": "Udgivelsesdato",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Vom Gerät deinstallieren",
"onlyWorksWithNonVersionDetectApps": "Funktioniert nur bei Apps mit deaktivierter Versionserkennung.",
"releaseDateAsVersion": "Veröffentlichungsdatum als Version verwenden",
"releaseTitleAsVersion": "Versionstitel als Versionsstring verwenden",
"releaseDateAsVersionExplanation": "Diese Option sollte nur für Apps verwendet werden, bei denen die Versionserkennung nicht korrekt funktioniert, aber ein Veröffentlichungsdatum verfügbar ist.",
"changes": "Änderungen",
"releaseDate": "Veröffentlichungsdatum",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/en-EO.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Malinstali el la disponaĵo",
"onlyWorksWithNonVersionDetectApps": "Funkcias nur por apoj kun malaktiva versiodetekto.",
"releaseDateAsVersion": "Uzi eldondato kiel versioĉeno",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "Tiu opcio devas esti uzata nur por apoj, por kiu la versiodetekto ne funkcias ĝuste, sed eldondato estas havebla.",
"changes": "Modifoj",
"releaseDate": "Eldondato",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Uninstall from Device",
"onlyWorksWithNonVersionDetectApps": "Only works for Apps with version detection disabled.",
"releaseDateAsVersion": "Use release date as version string",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "This option should only be used for Apps where version detection does not work correctly, but a release date is available.",
"changes": "Changes",
"releaseDate": "Release Date",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Desinstalar del dispositivo",
"onlyWorksWithNonVersionDetectApps": "Solo funciona para aplicaciones con la detección de versiones desactivada.",
"releaseDateAsVersion": "Por fecha de publicación",
"releaseTitleAsVersion": "Utilizar el título de la versión como cadena de versión",
"releaseDateAsVersionExplanation": "Esta opción solo se debería usar con aplicaciones en las que la detección de versiones no funciona pero hay disponible una fecha de publicación.",
"changes": "Cambios",
"releaseDate": "Fecha de publicación",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "حذف نصب از دستگاه",
"onlyWorksWithNonVersionDetectApps": "فقط برای برنامه‌هایی کار می‌کند که تشخیص نسخه غیرفعال است.",
"releaseDateAsVersion": "از تاریخ انتشار به عنوان نسخه استفاده کنید",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "این گزینه فقط باید برای برنامه هایی استفاده شود که تشخیص نسخه به درستی کار نمی کند، اما تاریخ انتشار در دسترس است.",
"changes": "تغییرات",
"releaseDate": "تاریخ انتشار",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Désinstaller de l'appareil",
"onlyWorksWithNonVersionDetectApps": "Ne fonctionne que pour les applications dont la détection de la version est désactivée.",
"releaseDateAsVersion": "Utiliser la date de sortie comme version",
"releaseTitleAsVersion": "Utiliser le titre de la version comme chaîne de caractères de la version",
"releaseDateAsVersionExplanation": "Cette option ne doit être utilisée que pour les applications pour lesquelles la détection de la version ne fonctionne pas correctement, mais dont une date de sortie est disponible.",
"changes": "Modifications",
"releaseDate": "Date de sortie",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Eltávolítás az eszközről",
"onlyWorksWithNonVersionDetectApps": "Csak azoknál az alkalmazásoknál működik, amelyeknél a verzióérzékelés le van tiltva.",
"releaseDateAsVersion": "Használja a kiadás dátumát verzióként",
"releaseTitleAsVersion": "A kiadás címét verziószálként használja",
"releaseDateAsVersionExplanation": "Ezt a beállítást csak olyan alkalmazásoknál szabad használni, ahol a verzióérzékelés nem működik megfelelően, de elérhető a kiadás dátuma.",
"changes": "Változások",
"releaseDate": "Kiadás dátuma",
Expand Down
13 changes: 7 additions & 6 deletions assets/translations/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"errorCheckingUpdates": "Kesalahan dalam memeriksa pembaruan",
"errorCheckingUpdatesNotifDescription": "Notifikasi yang ditampilkan saat pemeriksaan pembaruan latar belakang gagal",
"appsRemoved": "Aplikasi dihapus",
"appsRemovedNotifDescription": "Memberi tahu pengguna bahwa aplikasi aplikasi dihapus karena kesalahan saat memuatnya",
"appsRemovedNotifDescription": "Memberi tahu pengguna bahwa aplikasi dihapus karena kesalahan saat memuatnya",
"xWasRemovedDueToErrorY": "{} dihapus karena kesalahan berikut: {}",
"completeAppInstallation": "Selesaikan pemasangan aplikasi",
"obtainiumMustBeOpenToInstallApps": "Obtainium harus terbuka untuk memasang aplikasi",
Expand Down Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Copot pemasangan dari perangkat",
"onlyWorksWithNonVersionDetectApps": "Hanya bekerja untuk aplikasi dengan pendeteksi versi yang nonaktif.",
"releaseDateAsVersion": "Gunakan tanggal rilis sebagai versi string",
"releaseTitleAsVersion": "Gunakan judul rilis sebagai string versi",
"releaseDateAsVersionExplanation": "Opsi ini hanya boleh digunakan untuk aplikasi dengan pendeteksi versi yang tidak berfungsi dengan benar, tetapi tanggal rilisnya tersedia.",
"changes": "Perubahan",
"releaseDate": "Tanggal rilis",
Expand All @@ -231,8 +232,8 @@
"about": "Tentang",
"requiresCredentialsInSettings": "{} memerlukan kredensial tambahan (dalam pengaturan)",
"checkOnStart": "Periksa pembaruan saat proses memulai",
"tryInferAppIdFromCode": "Coba simpulkan ID aplikasi dari kode sumber",
"removeOnExternalUninstall": "Secara otomatis menghapus aplikasi yang dicopot pemasangannya dari luar",
"tryInferAppIdFromCode": "Coba untuk menebak ID aplikasi dari kode sumber",
"removeOnExternalUninstall": "Hapus otomatis aplikasi yang dicopot pemasangannya dari luar",
"pickHighestVersionCode": "Pilih otomatis APK dengan versi kode tertinggi",
"checkUpdateOnDetailPage": "Periksa pembaruan saat membuka halaman detail aplikasi",
"disablePageTransitions": "Nonaktifkan animasi transisi halaman",
Expand All @@ -257,7 +258,7 @@
"intermediateLink": "Tautan perantara",
"exemptFromBackgroundUpdates": "Dikecualikan dari pembaruan latar belakang (jika diaktifkan)",
"bgUpdatesOnWiFiOnly": "Nonaktifkan pembaruan latar belakang saat tidak menggunakan WiFi",
"autoSelectHighestVersionCode": "Secara otomatis pilih APK dengan versi kode tertinggi",
"autoSelectHighestVersionCode": "Pilih otomatis APK dengan versi kode tertinggi",
"versionExtractionRegEx": "Reguler ekspresi terkait ekstraksi versi string",
"trimVersionString": "Potong versi string dengan reguler ekspresi",
"matchGroupToUseForX": "Cocokkan grup yang akan digunakan untuk \"{}\"",
Expand Down Expand Up @@ -357,8 +358,8 @@
"other": "Menghapus {n} catatan (sebelum = {before}, setelah = {after})"
},
"xAndNMoreUpdatesAvailable": {
"one": "{} dan 1 aplikasi lainnya mendapat pembaruan.",
"other": "{} dan {} aplikasi lainnya mendapat pembaruan."
"one": "{} dan 1 aplikasi lainnya memiliki pembaruan.",
"other": "{} dan {} aplikasi lainnya memiliki pembaruan."
},
"xAndNMoreUpdatesInstalled": {
"one": "{} dan 1 aplikasi lainnya telah diperbarui.",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Disinstalla dal dispositivo",
"onlyWorksWithNonVersionDetectApps": "Funziona solo per le app con il rilevamento della versione disattivato.",
"releaseDateAsVersion": "Usa data di rilascio come versione",
"releaseTitleAsVersion": "Usa il titolo della versione come stringa di versione",
"releaseDateAsVersionExplanation": "Questa opzione dovrebbe essere usata solo per le app in cui il rilevamento della versione non funziona correttamente, ma è disponibile una data di rilascio.",
"changes": "Novità",
"releaseDate": "Data di rilascio",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "デバイスからアンインストールする",
"onlyWorksWithNonVersionDetectApps": "バージョン検出を無効にしているアプリにのみ動作します。",
"releaseDateAsVersion": "リリース日をバージョンとして使用する",
"releaseTitleAsVersion": "リリースタイトルをバージョン文字列として使用",
"releaseDateAsVersionExplanation": "このオプションは、バージョン検出が正しく機能しないアプリで、リリース日が利用可能な場合にのみ使用する必要があります。",
"changes": "変更点",
"releaseDate": "リリース日",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Van apparaat verwijderen",
"onlyWorksWithNonVersionDetectApps": "Werkt alleen voor apps waarbij versieherkenning is uitgeschakeld.",
"releaseDateAsVersion": "Releasedatum als versie gebruiken",
"releaseTitleAsVersion": "Gebruik releasetitel als versiestring",
"releaseDateAsVersionExplanation": "Deze optie moet alleen worden gebruikt voor apps waar versieherkenning niet correct werkt, maar waar wel een releasedatum beschikbaar is.",
"changes": "Aanpassingen",
"releaseDate": "Releasedatum",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Odinstaluj z urządzenia",
"onlyWorksWithNonVersionDetectApps": "Działa tylko w przypadku aplikacji z wyłączonym wykrywaniem wersji.",
"releaseDateAsVersion": "Użyj daty wydania jako wersji",
"releaseTitleAsVersion": "Użyj tytułu wydania jako ciągu znaków wersji",
"releaseDateAsVersionExplanation": "Opcja ta powinna być używana tylko w przypadku aplikacji, w których wykrywanie wersji nie działa poprawnie, ale dostępna jest data wydania.",
"changes": "Zmiany",
"releaseDate": "Data wydania",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Desinstalar do dispositivo",
"onlyWorksWithNonVersionDetectApps": "Apenas funciona para aplicativos com detecção de versão desativada.",
"releaseDateAsVersion": "Usar data de lançamento como versão",
"releaseTitleAsVersion": "Utilizar o título da versão como cadeia de versões",
"releaseDateAsVersionExplanation": "Esta opção só deve ser usada para aplicativos onde a detecção de versão não funciona corretamente, mas há uma data de lançamento disponível.",
"changes": "Alterações",
"releaseDate": "Data de lançamento",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Удалить с устройства",
"onlyWorksWithNonVersionDetectApps": "Работает только для приложений с отключенным определением версии",
"releaseDateAsVersion": "Дата выпуска вместо версии",
"releaseTitleAsVersion": "Используйте название релиза в качестве строки версии",
"releaseDateAsVersionExplanation": "Этот параметр следует использовать только для приложений, в которых определение версии не работает правильно, но имеется дата выпуска",
"changes": "Изменения",
"releaseDate": "Дата выпуска",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Avinstallera från Enheten",
"onlyWorksWithNonVersionDetectApps": "Fungerar bara för Appar med versionsdetektering inaktiverat..",
"releaseDateAsVersion": "Använd releasedatum som version",
"releaseTitleAsVersion": "Använd release-titel som versionssträng",
"releaseDateAsVersionExplanation": "Det här alternativet bör endast användas för appar där versionsidentifiering inte fungerar korrekt, men ett releasedatum är tillgängligt.",
"changes": "Ändringar",
"releaseDate": "Releasedatum",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Cihazdan Kaldır",
"onlyWorksWithNonVersionDetectApps": "Yalnızca Sürüm Algılaması Devre Dışı Uygulamalar İçin Çalışır.",
"releaseDateAsVersion": "Sürüm Olarak Yayın Tarihi Kullan",
"releaseTitleAsVersion": "Sürüm dizesi olarak sürüm başlığını kullan",
"releaseDateAsVersionExplanation": "Bu seçenek, sürüm algılamanın doğru çalışmadığı ancak bir sürüm tarihinin mevcut olduğu uygulamalar için kullanılmalıdır.",
"changes": "Değişiklikler",
"releaseDate": "Yayın Tarihi",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Видалити з пристрою",
"onlyWorksWithNonVersionDetectApps": "Працює лише з застосунками з вимкненим визначенням версії.",
"releaseDateAsVersion": "Використовувати дату випуску як рядок версії",
"releaseTitleAsVersion": "Використовувати назву випуску як рядок версії",
"releaseDateAsVersionExplanation": "Цю опцію слід використовувати лише для застосунків, де визначення версії працює неправильно, але є дата випуску.",
"changes": "Зміни",
"releaseDate": "Дата випуску",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "Gỡ cài đặt khỏi thiết bị",
"onlyWorksWithNonVersionDetectApps": "Chỉ hoạt động với Ứng dụng đã tắt tính năng phát hiện phiên bản.",
"releaseDateAsVersion": "Sử dụng ngày phát hành làm phiên bản",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "Chỉ nên sử dụng tùy chọn này cho Ứng dụng trong đó tính năng phát hiện phiên bản không hoạt động chính xác nhưng đã có ngày phát hành.",
"changes": "Thay đổi",
"releaseDate": "Ngày phát hành",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/zh-Hant-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "從裝置解除安裝",
"onlyWorksWithNonVersionDetectApps": "僅適用於停用版本偵測的應用程式。",
"releaseDateAsVersion": "使用發佈日期作為版本字串",
"releaseTitleAsVersion": "Use release title as version string",
"releaseDateAsVersionExplanation": "此選項僅應用於版本偵測無法正確工作但有發佈日期的應用程式。",
"changes": "變更",
"releaseDate": "發佈日期",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"uninstallFromDevice": "从设备中卸载",
"onlyWorksWithNonVersionDetectApps": "仅适用于禁用版本检测的应用。",
"releaseDateAsVersion": "将发行日期作为版本号",
"releaseTitleAsVersion": "使用版本标题作为版本字符串",
"releaseDateAsVersionExplanation": "此选项应该仅用于无法进行版本检测但能够获取发行日期的应用。",
"changes": "更新日志",
"releaseDate": "发行日期",
Expand Down
8 changes: 7 additions & 1 deletion lib/app_sources/github.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ class GitHub extends AppSource {
[
GeneratedFormSwitch('useLatestAssetDateAsReleaseDate',
label: tr('useLatestAssetDateAsReleaseDate'), defaultValue: false)
],
[
GeneratedFormSwitch('releaseTitleAsVersion',
label: tr('releaseTitleAsVersion'), defaultValue: false)
]
];

Expand Down Expand Up @@ -396,7 +400,9 @@ class GitHub extends AppSource {
targetRelease = releases[i];
targetRelease['apkUrls'] = apkUrls;
targetRelease['version'] =
targetRelease['tag_name'] ?? targetRelease['name'];
additionalSettings['releaseTitleAsVersion'] == true
? nameToFilter
: targetRelease['tag_name'] ?? targetRelease['name'];
if (targetRelease['tarball_url'] != null) {
allAssetUrls.add(MapEntry(
(targetRelease['version'] ?? 'source') + '.tar.gz',
Expand Down

0 comments on commit 4017253

Please sign in to comment.