diff --git a/assets/translations/bs.json b/assets/translations/bs.json index fb958ac..5ad8407 100644 --- a/assets/translations/bs.json +++ b/assets/translations/bs.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "Želite li ukloniti aplikaciju?", "other": "Želite li ukloniti aplikacije?" diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 4f0c527..401e072 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -322,6 +322,8 @@ "name": "Název", "smartname": "Název (Smart)", "sortMethod": "Metoda třídění", + "welcome": "Vítejte na", + "documentationLinksNote": "Níže odkazovaná stránka Obtainium GitHub obsahuje odkazy na videa, články, diskuse a další zdroje, které vám pomohou pochopit, jak aplikaci používat.", "removeAppQuestion": { "one": "Odstranit Apku?", "other": "Odstranit Apky?" diff --git a/assets/translations/da.json b/assets/translations/da.json index ca82fa6..2f07383 100644 --- a/assets/translations/da.json +++ b/assets/translations/da.json @@ -322,6 +322,8 @@ "name": "Navn", "smartname": "Navn (Smart)", "sortMethod": "Sorteringsmetode", + "welcome": "Velkommen", + "documentationLinksNote": "Obtainiums GitHub-side, som der linkes til nedenfor, indeholder links til videoer, artikler, diskussioner og andre ressourcer, som kan hjælpe dig med at forstå, hvordan du bruger appen.", "removeAppQuestion": { "one": "Fjern app?", "other": "Fjern apps?" diff --git a/assets/translations/de.json b/assets/translations/de.json index 62a8ac8..6e4225c 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sortierverfahren", + "welcome": "Willkommen", + "documentationLinksNote": "Die unten verlinkte GitHub-Seite von Obtainium enthält Links zu Videos, Artikeln, Diskussionen und anderen Ressourcen, die Ihnen helfen werden, die Verwendung der App zu verstehen.", "removeAppQuestion": { "one": "App entfernen?", "other": "Apps entfernen?" diff --git a/assets/translations/en-EO.json b/assets/translations/en-EO.json index 26b3b67..b1b9a10 100644 --- a/assets/translations/en-EO.json +++ b/assets/translations/en-EO.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "Forigi la aplikaĵon?", "other": "Forigi la aplikaĵojn?" diff --git a/assets/translations/en.json b/assets/translations/en.json index e745dfd..f943310 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "Remove App?", "other": "Remove Apps?" diff --git a/assets/translations/es.json b/assets/translations/es.json index 4fec5d3..2a66967 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -322,6 +322,8 @@ "name": "Nombre", "smartname": "Nombre (Smart)", "sortMethod": "Método de clasificación", + "welcome": "Bienvenido", + "documentationLinksNote": "La página GitHub de Obtainium enlazada a continuación contiene enlaces a vídeos, artículos, debates y otros recursos que te ayudarán a entender cómo utilizar la aplicación.", "removeAppQuestion": { "one": "¿Eliminar aplicación?", "other": "¿Eliminar aplicaciones?" diff --git a/assets/translations/fa.json b/assets/translations/fa.json index 50fa808..88f1cef 100644 --- a/assets/translations/fa.json +++ b/assets/translations/fa.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "برنامه حذف شود؟", "other": "برنامه ها حذف شوند؟" diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 26ee458..3c4cd04 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -322,6 +322,8 @@ "name": "Nom", "smartname": "Nom (Smart)", "sortMethod": "Méthode de tri", + "welcome": "Bienvenue", + "documentationLinksNote": "La page GitHub d'Obtainium, dont le lien figure ci-dessous, contient des liens vers des vidéos, des articles, des discussions et d'autres ressources qui vous aideront à comprendre comment utiliser l'application.", "removeAppQuestion": { "one": "Supprimer l'application ?", "other": "Supprimer les applications ?" diff --git a/assets/translations/hu.json b/assets/translations/hu.json index 1c15451..78736b3 100644 --- a/assets/translations/hu.json +++ b/assets/translations/hu.json @@ -322,6 +322,8 @@ "name": "Név", "smartname": "Név (Okos)", "sortMethod": "Rendezési eljárás", + "welcome": "Üdvözöljük", + "documentationLinksNote": "Az alább linkelt Obtainium GitHub oldal videókra, cikkekre, beszélgetésekre és egyéb forrásokra mutató linkeket tartalmaz, amelyek segítenek megérteni az alkalmazás használatát.", "removeAppQuestion": { "one": "Eltávolítja az alkalmazást?", "other": "Eltávolítja az alkalmazásokat?" diff --git a/assets/translations/id.json b/assets/translations/id.json index 0686b17..369adb3 100644 --- a/assets/translations/id.json +++ b/assets/translations/id.json @@ -322,6 +322,8 @@ "name": "Nama", "smartname": "Nama (Cerdas)", "sortMethod": "Metode Penyortiran", + "welcome": "Selamat datang.", + "documentationLinksNote": "Halaman GitHub Obtainium yang ditautkan di bawah ini berisi tautan ke video, artikel, diskusi, dan sumber daya lain yang akan membantu Anda memahami cara menggunakan aplikasi.", "removeAppQuestion": { "one": "Hapus aplikasi?", "other": "Hapus aplikasi?" diff --git a/assets/translations/it.json b/assets/translations/it.json index c41ac63..a5a30cd 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -322,6 +322,8 @@ "name": "Nome", "smartname": "Nome (intelligente)", "sortMethod": "Metodo di ordinamento", + "welcome": "Benvenuti", + "documentationLinksNote": "La pagina GitHub di Obtainium collegata qui sotto contiene collegamenti a video, articoli, discussioni e altre risorse che vi aiuteranno a capire come utilizzare l'applicazione.", "removeAppQuestion": { "one": "Rimuovere l'app?", "other": "Rimuovere le app?" diff --git a/assets/translations/ja.json b/assets/translations/ja.json index 3fef6a7..b46de8c 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "名前(スマート)", "sortMethod": "ソート方法", + "welcome": "ようこそ", + "documentationLinksNote": "以下のリンクにあるObtainium GitHubページには、ビデオ、記事、ディスカッション、その他のリソースへのリンクがあり、アプリの使い方を理解するのに役立ちます。", "removeAppQuestion": { "one": "アプリを削除しますか?", "other": "アプリを削除しますか?" diff --git a/assets/translations/ko.json b/assets/translations/ko.json index 11dd4a8..081e320 100644 --- a/assets/translations/ko.json +++ b/assets/translations/ko.json @@ -322,6 +322,8 @@ "name": "이름", "smartname": "이름(스마트)", "sortMethod": "정렬 방법", + "welcome": "환영", + "documentationLinksNote": "아래에 링크된 Obtainium 깃허브 페이지에는 앱 사용 방법을 이해하는 데 도움이 되는 동영상, 기사, 토론 및 기타 리소스에 대한 링크가 포함되어 있습니다.", "removeAppQuestion": { "one": "앱을 제거하시겠습니까?", "other": "앱을 제거하시겠습니까?" diff --git a/assets/translations/nl.json b/assets/translations/nl.json index 3393987..c74da0b 100644 --- a/assets/translations/nl.json +++ b/assets/translations/nl.json @@ -322,6 +322,8 @@ "name": "Naam", "smartname": "Naam (Slim)", "sortMethod": "Sorteermethode", + "welcome": "Welkom", + "documentationLinksNote": "De GitHub pagina van Obtainium waarnaar hieronder wordt gelinkt bevat links naar video's, artikelen, discussies en andere bronnen die je zullen helpen begrijpen hoe je de app kunt gebruiken.", "removeAppQuestion": { "one": "App verwijderen?", "other": "Apps verwijderen?" diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 54be7b3..813372f 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -322,6 +322,8 @@ "name": "Nazwa", "smartname": "Nazwa (Smart)", "sortMethod": "Metoda sortowania", + "welcome": "Witamy", + "documentationLinksNote": "Strona Obtainium GitHub, do której link znajduje się poniżej, zawiera linki do filmów, artykułów, dyskusji i innych zasobów, które pomogą ci zrozumieć, jak korzystać z aplikacji.", "removeAppQuestion": { "one": "Usunąć aplikację?", "few": "Usunąć aplikacje?", diff --git a/assets/translations/pt.json b/assets/translations/pt.json index d2e07bd..d23c272 100644 --- a/assets/translations/pt.json +++ b/assets/translations/pt.json @@ -322,6 +322,8 @@ "name": "Nome", "smartname": "Nome (Smart)", "sortMethod": "Método de ordenação", + "welcome": "Bem-vindo", + "documentationLinksNote": "A página do Obtainium no GitHub com a ligação abaixo contém ligações para vídeos, artigos, discussões e outros recursos que o ajudarão a compreender como utilizar a aplicação.", "removeAppQuestion": { "one": "Remover aplicativo?", "other": "Remover aplicativos?" diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 4f3d70b..cde371f 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -322,6 +322,8 @@ "name": "Имя", "smartname": "Имя (умное)", "sortMethod": "Метод сортировки", + "welcome": "Добро пожаловать", + "documentationLinksNote": "На странице Obtainium GitHub, ссылка на которую приведена ниже, содержатся ссылки на видео, статьи, обсуждения и другие ресурсы, которые помогут вам понять, как пользоваться приложением.", "removeAppQuestion": { "one": "Удалить приложение?", "other": "Удалить приложения?" diff --git a/assets/translations/standardize.js b/assets/translations/standardize.js index 53c7a6f..df104cc 100644 --- a/assets/translations/standardize.js +++ b/assets/translations/standardize.js @@ -16,6 +16,7 @@ const neverAutoTranslate = { placeholder: ['pl'], importExport: ['fr'], url: ['fr'], + name: ['ja'], tencentAppStore: ['*'] } @@ -89,7 +90,7 @@ const main = async () => { await new Promise((resolve, reject) => { setTimeout(() => { resolve() - }, Math.random() * 1000); // Try to avoid rate limit + }, Math.random() * 10000); // Try to avoid rate limit }) const response = await translateText(str, lang, deeplAPIKey) if (response.translations) { diff --git a/assets/translations/sv.json b/assets/translations/sv.json index 08a3ecd..635e5fd 100644 --- a/assets/translations/sv.json +++ b/assets/translations/sv.json @@ -322,6 +322,8 @@ "name": "Namn", "smartname": "Namn (Smart)", "sortMethod": "Sorteringsmetod", + "welcome": "Välkommen", + "documentationLinksNote": "Obtainium GitHub-sidan som länkas nedan innehåller länkar till videor, artiklar, diskussioner och andra resurser som hjälper dig att förstå hur du använder appen.", "removeAppQuestion": { "one": "Ta Bort App?", "other": "Ta Bort Appar?" diff --git a/assets/translations/tr.json b/assets/translations/tr.json index 9873950..f40c151 100644 --- a/assets/translations/tr.json +++ b/assets/translations/tr.json @@ -322,6 +322,8 @@ "name": "İsim", "smartname": "İsim (Akıllı)", "sortMethod": "Sıralama Yöntemi", + "welcome": "Hoş geldiniz", + "documentationLinksNote": "Aşağıda bağlantısı verilen Obtainium GitHub sayfası, uygulamayı nasıl kullanacağınızı anlamanıza yardımcı olacak videolara, makalelere, tartışmalara ve diğer kaynaklara bağlantılar içerir.", "removeAppQuestion": { "one": "Uygulamayı Kaldır?", "other": "Uygulamaları Kaldır?" diff --git a/assets/translations/uk.json b/assets/translations/uk.json index de5843e..e2be68d 100644 --- a/assets/translations/uk.json +++ b/assets/translations/uk.json @@ -322,6 +322,8 @@ "name": "Ім'я", "smartname": "Ім'я (Smart)", "sortMethod": "Метод сортування", + "welcome": "Ласкаво просимо.", + "documentationLinksNote": "Сторінка Obtainium на GitHub, посилання на яку наведено нижче, містить посилання на відео, статті, дискусії та інші ресурси, які допоможуть вам зрозуміти, як користуватися додатком.", "removeAppQuestion": { "one": "Видалити застосунок?", "other": "Видалити застосунки?" diff --git a/assets/translations/vi.json b/assets/translations/vi.json index c871e17..8cc3d0b 100644 --- a/assets/translations/vi.json +++ b/assets/translations/vi.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "Gỡ ứng dụng?", "other": "Gỡ ứng dụng?" diff --git a/assets/translations/zh-Hant-TW.json b/assets/translations/zh-Hant-TW.json index 1b635c5..835317c 100644 --- a/assets/translations/zh-Hant-TW.json +++ b/assets/translations/zh-Hant-TW.json @@ -322,6 +322,8 @@ "name": "Name", "smartname": "Name (Smart)", "sortMethod": "Sort Method", + "welcome": "Welcome", + "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", "removeAppQuestion": { "one": "移除應用程式?", "other": "移除應用程式?" diff --git a/assets/translations/zh.json b/assets/translations/zh.json index 40884ff..f5d0261 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -322,6 +322,8 @@ "name": "名称", "smartname": "姓名(智能)", "sortMethod": "排序方法", + "welcome": "欢迎光临", + "documentationLinksNote": "下面链接的 Obtainium GitHub 页面包含视频、文章、讨论和其他资源的链接,可帮助您了解如何使用该应用程序。", "removeAppQuestion": { "one": "是否删除应用?", "other": "是否删除应用?" diff --git a/lib/pages/home.dart b/lib/pages/home.dart index 337c703..41c22e1 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -15,6 +15,7 @@ import 'package:obtainium/providers/apps_provider.dart'; import 'package:obtainium/providers/settings_provider.dart'; import 'package:obtainium/providers/source_provider.dart'; import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class HomePage extends StatefulWidget { const HomePage({super.key}); @@ -54,6 +55,45 @@ class _HomePageState extends State { void initState() { super.initState(); initDeepLinks(); + WidgetsBinding.instance.addPostFrameCallback((_) async { + var sp = context.read(); + if (!sp.welcomeShown) { + await showDialog( + context: context, + builder: (BuildContext ctx) { + return AlertDialog( + title: Text(tr('welcome')), + content: Column( + mainAxisSize: MainAxisSize.min, + spacing: 20, + children: [ + Text(tr('documentationLinksNote')), + GestureDetector( + onTap: () { + launchUrlString( + 'https://github.com/ImranR98/Obtainium/blob/main/README.md', + mode: LaunchMode.externalApplication); + }, + child: Text( + 'https://github.com/ImranR98/Obtainium/blob/main/README.md', + style: const TextStyle( + decoration: TextDecoration.underline, + fontWeight: FontWeight.bold), + )), + ], + ), + actions: [ + TextButton( + onPressed: () { + sp.welcomeShown = true; + Navigator.of(context).pop(null); + }, + child: Text(tr('ok'))), + ], + ); + }); + } + }); } Future initDeepLinks() async { diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index 7af479b..a73c218 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -150,6 +150,15 @@ class SettingsProvider with ChangeNotifier { return result; } + bool get welcomeShown { + return prefs?.getBool('welcomeShown') ?? false; + } + + set welcomeShown(bool welcomeShown) { + prefs?.setBool('welcomeShown', welcomeShown); + notifyListeners(); + } + bool checkJustStarted() { if (justStarted) { justStarted = false;