From acf6ada44b84b75a061fa41b71eefcbb29a43013 Mon Sep 17 00:00:00 2001 From: stonegate Date: Sun, 27 Sep 2020 14:11:53 +0800 Subject: [PATCH] Minor change. --- lib/generated/intl/messages_en.dart | 6 +++ lib/generated/intl/messages_es.dart | 6 +++ lib/generated/intl/messages_fr.dart | 6 +++ lib/generated/intl/messages_pt.dart | 6 +++ lib/generated/intl/messages_zh-Hans.dart | 6 +++ lib/generated/l10n.dart | 60 +++++++++++++++++++++ lib/home/home.dart | 2 +- lib/l10n/intl_en.arb | 24 +++++++++ lib/l10n/intl_es.arb | 24 +++++++++ lib/l10n/intl_fr.arb | 24 +++++++++ lib/l10n/intl_pt.arb | 24 +++++++++ lib/l10n/intl_zh_Hans.arb | 24 +++++++++ lib/local_storage/sqflite_localpodcast.dart | 4 +- lib/podcasts/podcast_settings.dart | 2 +- lib/settings/data_backup.dart | 15 +++--- lib/util/episodegrid.dart | 4 ++ pubspec.yaml | 2 +- 17 files changed, 228 insertions(+), 11 deletions(-) diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index dc21f0b..e14a391 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "done" : MessageLookupByLibrary.simpleMessage("Done"), "download" : MessageLookupByLibrary.simpleMessage("Download"), "downloadRemovedToast" : MessageLookupByLibrary.simpleMessage("Download removed"), + "downloadStart" : MessageLookupByLibrary.simpleMessage("Downloading"), "downloaded" : MessageLookupByLibrary.simpleMessage("Downloaded"), "editGroupName" : MessageLookupByLibrary.simpleMessage("Edit group name"), "endOfEpisode" : MessageLookupByLibrary.simpleMessage("End of Episode"), @@ -193,6 +194,7 @@ class MessageLookup extends MessageLookupByLibrary { "minsAgo" : m12, "minsCount" : m13, "network" : MessageLookupByLibrary.simpleMessage("Network"), + "neverAutoUpdate" : MessageLookupByLibrary.simpleMessage("Never auto update"), "newGroup" : MessageLookupByLibrary.simpleMessage("Create new group"), "newestFirst" : MessageLookupByLibrary.simpleMessage("Newest first"), "next" : MessageLookupByLibrary.simpleMessage("Next"), @@ -236,6 +238,7 @@ class MessageLookup extends MessageLookupByLibrary { "publishedYearly" : MessageLookupByLibrary.simpleMessage("Published yearly"), "recoverSubscribe" : MessageLookupByLibrary.simpleMessage("Recover subscribe"), "refreshArtwork" : MessageLookupByLibrary.simpleMessage("Update artwork"), + "refreshStarted" : MessageLookupByLibrary.simpleMessage("Refreshing"), "remove" : MessageLookupByLibrary.simpleMessage("Remove"), "removeConfirm" : MessageLookupByLibrary.simpleMessage("Removal confirmation"), "removePodcastDes" : MessageLookupByLibrary.simpleMessage("Are you sure you want to unsubscribe?"), @@ -328,6 +331,9 @@ class MessageLookup extends MessageLookupByLibrary { "skipToNext" : MessageLookupByLibrary.simpleMessage("Skip to next"), "sleepTimer" : MessageLookupByLibrary.simpleMessage("Sleep timer"), "status" : MessageLookupByLibrary.simpleMessage("Status"), + "statusAuthError" : MessageLookupByLibrary.simpleMessage("Authentication error"), + "statusFail" : MessageLookupByLibrary.simpleMessage("Failed"), + "statusSuccess" : MessageLookupByLibrary.simpleMessage("Successful"), "stop" : MessageLookupByLibrary.simpleMessage("Stop"), "subscribe" : MessageLookupByLibrary.simpleMessage("Subscribe"), "subscribeExportDes" : MessageLookupByLibrary.simpleMessage("Export OPML file of all podcasts"), diff --git a/lib/generated/intl/messages_es.dart b/lib/generated/intl/messages_es.dart index 5dd7840..78835de 100644 --- a/lib/generated/intl/messages_es.dart +++ b/lib/generated/intl/messages_es.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "done" : MessageLookupByLibrary.simpleMessage("Hecho"), "download" : MessageLookupByLibrary.simpleMessage("Descargar"), "downloadRemovedToast" : MessageLookupByLibrary.simpleMessage("Download removed"), + "downloadStart" : MessageLookupByLibrary.simpleMessage("Downloading"), "downloaded" : MessageLookupByLibrary.simpleMessage("Descargados"), "editGroupName" : MessageLookupByLibrary.simpleMessage("Editar nombre del grupo"), "endOfEpisode" : MessageLookupByLibrary.simpleMessage("Fin del episodio"), @@ -193,6 +194,7 @@ class MessageLookup extends MessageLookupByLibrary { "minsAgo" : m12, "minsCount" : m13, "network" : MessageLookupByLibrary.simpleMessage("Red"), + "neverAutoUpdate" : MessageLookupByLibrary.simpleMessage("Never auto update"), "newGroup" : MessageLookupByLibrary.simpleMessage("Crear grupo nuevo"), "newestFirst" : MessageLookupByLibrary.simpleMessage("Mas recientes primero"), "next" : MessageLookupByLibrary.simpleMessage("Siguiente"), @@ -236,6 +238,7 @@ class MessageLookup extends MessageLookupByLibrary { "publishedYearly" : MessageLookupByLibrary.simpleMessage("Publicado anualmente"), "recoverSubscribe" : MessageLookupByLibrary.simpleMessage("Recuperar suscripcion"), "refreshArtwork" : MessageLookupByLibrary.simpleMessage("Actualizar portada"), + "refreshStarted" : MessageLookupByLibrary.simpleMessage("Regreshing"), "remove" : MessageLookupByLibrary.simpleMessage("Remover"), "removeConfirm" : MessageLookupByLibrary.simpleMessage("Confirma la remoción "), "removePodcastDes" : MessageLookupByLibrary.simpleMessage("¿Estas seguro de que deseas desuscribirte?"), @@ -328,6 +331,9 @@ class MessageLookup extends MessageLookupByLibrary { "skipToNext" : MessageLookupByLibrary.simpleMessage("Skip to next"), "sleepTimer" : MessageLookupByLibrary.simpleMessage("Temporizador de sueño"), "status" : MessageLookupByLibrary.simpleMessage("Status"), + "statusAuthError" : MessageLookupByLibrary.simpleMessage("Authentication error"), + "statusFail" : MessageLookupByLibrary.simpleMessage("Failed"), + "statusSuccess" : MessageLookupByLibrary.simpleMessage("Successful"), "stop" : MessageLookupByLibrary.simpleMessage("Stop"), "subscribe" : MessageLookupByLibrary.simpleMessage("Suscribir"), "subscribeExportDes" : MessageLookupByLibrary.simpleMessage("Exportar OPML de todos los podcasts"), diff --git a/lib/generated/intl/messages_fr.dart b/lib/generated/intl/messages_fr.dart index 4c63b90..7bbc94a 100644 --- a/lib/generated/intl/messages_fr.dart +++ b/lib/generated/intl/messages_fr.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "done" : MessageLookupByLibrary.simpleMessage("Fait"), "download" : MessageLookupByLibrary.simpleMessage("Téléchargés"), "downloadRemovedToast" : MessageLookupByLibrary.simpleMessage("Download removed"), + "downloadStart" : MessageLookupByLibrary.simpleMessage("Downloading"), "downloaded" : MessageLookupByLibrary.simpleMessage("Téléchargés"), "editGroupName" : MessageLookupByLibrary.simpleMessage("Modifier le nom du groupe"), "endOfEpisode" : MessageLookupByLibrary.simpleMessage("Fin de l\'épisode"), @@ -193,6 +194,7 @@ class MessageLookup extends MessageLookupByLibrary { "minsAgo" : m12, "minsCount" : m13, "network" : MessageLookupByLibrary.simpleMessage("Réseau"), + "neverAutoUpdate" : MessageLookupByLibrary.simpleMessage("Never auto update"), "newGroup" : MessageLookupByLibrary.simpleMessage("Créer un nouveau groupe"), "newestFirst" : MessageLookupByLibrary.simpleMessage("Le plus récent en premier"), "next" : MessageLookupByLibrary.simpleMessage("Suivant"), @@ -236,6 +238,7 @@ class MessageLookup extends MessageLookupByLibrary { "publishedYearly" : MessageLookupByLibrary.simpleMessage("Annuel"), "recoverSubscribe" : MessageLookupByLibrary.simpleMessage("Restaurer l\'abonnement"), "refreshArtwork" : MessageLookupByLibrary.simpleMessage("Mettre à jour la vignette"), + "refreshStarted" : MessageLookupByLibrary.simpleMessage("Refreshing"), "remove" : MessageLookupByLibrary.simpleMessage("Supprimer"), "removeConfirm" : MessageLookupByLibrary.simpleMessage("Confirmer la suppression"), "removePodcastDes" : MessageLookupByLibrary.simpleMessage("Êtes-vous sûr de vouloir vous désabonner ?"), @@ -328,6 +331,9 @@ class MessageLookup extends MessageLookupByLibrary { "skipToNext" : MessageLookupByLibrary.simpleMessage("Skip to next"), "sleepTimer" : MessageLookupByLibrary.simpleMessage("Minuterie"), "status" : MessageLookupByLibrary.simpleMessage("Status"), + "statusAuthError" : MessageLookupByLibrary.simpleMessage("Authentication error"), + "statusFail" : MessageLookupByLibrary.simpleMessage("Failed"), + "statusSuccess" : MessageLookupByLibrary.simpleMessage("Successful"), "stop" : MessageLookupByLibrary.simpleMessage("Stop"), "subscribe" : MessageLookupByLibrary.simpleMessage("S\'abonner"), "subscribeExportDes" : MessageLookupByLibrary.simpleMessage("Exporter le fichier OPML de tous les podcasts."), diff --git a/lib/generated/intl/messages_pt.dart b/lib/generated/intl/messages_pt.dart index 052f4d2..ad7da70 100644 --- a/lib/generated/intl/messages_pt.dart +++ b/lib/generated/intl/messages_pt.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "done" : MessageLookupByLibrary.simpleMessage("Feito"), "download" : MessageLookupByLibrary.simpleMessage("Download"), "downloadRemovedToast" : MessageLookupByLibrary.simpleMessage("Download removido"), + "downloadStart" : MessageLookupByLibrary.simpleMessage("Downloading"), "downloaded" : MessageLookupByLibrary.simpleMessage("Descarregado"), "editGroupName" : MessageLookupByLibrary.simpleMessage("Editar nome do grupo"), "endOfEpisode" : MessageLookupByLibrary.simpleMessage("Fim do episódio"), @@ -193,6 +194,7 @@ class MessageLookup extends MessageLookupByLibrary { "minsAgo" : m12, "minsCount" : m13, "network" : MessageLookupByLibrary.simpleMessage("Rede"), + "neverAutoUpdate" : MessageLookupByLibrary.simpleMessage("Never auto update"), "newGroup" : MessageLookupByLibrary.simpleMessage("Criar um novo grupo"), "newestFirst" : MessageLookupByLibrary.simpleMessage("Mais recentes primeiro"), "next" : MessageLookupByLibrary.simpleMessage("Seguinte"), @@ -236,6 +238,7 @@ class MessageLookup extends MessageLookupByLibrary { "publishedYearly" : MessageLookupByLibrary.simpleMessage("Publicado anualmente"), "recoverSubscribe" : MessageLookupByLibrary.simpleMessage("Recuperar subscrição"), "refreshArtwork" : MessageLookupByLibrary.simpleMessage("Atualizar capa"), + "refreshStarted" : MessageLookupByLibrary.simpleMessage("Refreshing"), "remove" : MessageLookupByLibrary.simpleMessage("Remover"), "removeConfirm" : MessageLookupByLibrary.simpleMessage("Confirmação de remoção"), "removePodcastDes" : MessageLookupByLibrary.simpleMessage("Tens a certeza que pretendes cancelar a subscrição?"), @@ -328,6 +331,9 @@ class MessageLookup extends MessageLookupByLibrary { "skipToNext" : MessageLookupByLibrary.simpleMessage("Saltar para o próximo"), "sleepTimer" : MessageLookupByLibrary.simpleMessage("Temporizador"), "status" : MessageLookupByLibrary.simpleMessage("Status"), + "statusAuthError" : MessageLookupByLibrary.simpleMessage("Authentication error"), + "statusFail" : MessageLookupByLibrary.simpleMessage("Failed"), + "statusSuccess" : MessageLookupByLibrary.simpleMessage("Successful"), "stop" : MessageLookupByLibrary.simpleMessage("Parar"), "subscribe" : MessageLookupByLibrary.simpleMessage("Subscrever"), "subscribeExportDes" : MessageLookupByLibrary.simpleMessage("Exportar ficheiro OPML de todos os podcasts"), diff --git a/lib/generated/intl/messages_zh-Hans.dart b/lib/generated/intl/messages_zh-Hans.dart index 54cb7df..020038d 100644 --- a/lib/generated/intl/messages_zh-Hans.dart +++ b/lib/generated/intl/messages_zh-Hans.dart @@ -111,6 +111,7 @@ class MessageLookup extends MessageLookupByLibrary { "done" : MessageLookupByLibrary.simpleMessage("完成"), "download" : MessageLookupByLibrary.simpleMessage("下载"), "downloadRemovedToast" : MessageLookupByLibrary.simpleMessage("下载已删除"), + "downloadStart" : MessageLookupByLibrary.simpleMessage("下载中"), "downloaded" : MessageLookupByLibrary.simpleMessage("已下载"), "editGroupName" : MessageLookupByLibrary.simpleMessage("修改组名"), "endOfEpisode" : MessageLookupByLibrary.simpleMessage("节目结束"), @@ -193,6 +194,7 @@ class MessageLookup extends MessageLookupByLibrary { "minsAgo" : m12, "minsCount" : m13, "network" : MessageLookupByLibrary.simpleMessage("网络"), + "neverAutoUpdate" : MessageLookupByLibrary.simpleMessage("无需自动更新"), "newGroup" : MessageLookupByLibrary.simpleMessage("创建分组"), "newestFirst" : MessageLookupByLibrary.simpleMessage("由新到旧"), "next" : MessageLookupByLibrary.simpleMessage("下一步"), @@ -236,6 +238,7 @@ class MessageLookup extends MessageLookupByLibrary { "publishedYearly" : MessageLookupByLibrary.simpleMessage("每年更新"), "recoverSubscribe" : MessageLookupByLibrary.simpleMessage("恢复订阅"), "refreshArtwork" : MessageLookupByLibrary.simpleMessage("更新头像"), + "refreshStarted" : MessageLookupByLibrary.simpleMessage("刷新中"), "remove" : MessageLookupByLibrary.simpleMessage("移除"), "removeConfirm" : MessageLookupByLibrary.simpleMessage("取消订阅"), "removePodcastDes" : MessageLookupByLibrary.simpleMessage("您确认要取消订阅吗?"), @@ -328,6 +331,9 @@ class MessageLookup extends MessageLookupByLibrary { "skipToNext" : MessageLookupByLibrary.simpleMessage("下一首"), "sleepTimer" : MessageLookupByLibrary.simpleMessage("睡眠模式"), "status" : MessageLookupByLibrary.simpleMessage("状态"), + "statusAuthError" : MessageLookupByLibrary.simpleMessage("验证错误"), + "statusFail" : MessageLookupByLibrary.simpleMessage("失败"), + "statusSuccess" : MessageLookupByLibrary.simpleMessage("成功"), "stop" : MessageLookupByLibrary.simpleMessage("停止"), "subscribe" : MessageLookupByLibrary.simpleMessage("订阅"), "subscribeExportDes" : MessageLookupByLibrary.simpleMessage("导出 OPML 文件"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 0f445ed..01ce3e7 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -335,6 +335,16 @@ class S { ); } + /// `Downloading` + String get downloadStart { + return Intl.message( + 'Downloading', + name: 'downloadStart', + desc: 'Toast of downloading', + args: [], + ); + } + /// `Edit group name` String get editGroupName { return Intl.message( @@ -1163,6 +1173,16 @@ class S { ); } + /// `Never auto update` + String get neverAutoUpdate { + return Intl.message( + 'Never auto update', + name: 'neverAutoUpdate', + desc: 'Never auto update in podcast settings.', + args: [], + ); + } + /// `Newest first` String get newestFirst { return Intl.message( @@ -1596,6 +1616,16 @@ class S { ); } + /// `Refreshing` + String get refreshStarted { + return Intl.message( + 'Refreshing', + name: 'refreshStarted', + desc: 'Toast for refresh', + args: [], + ); + } + /// `Remove` String get remove { return Intl.message( @@ -2522,6 +2552,36 @@ class S { ); } + /// `Authentication error` + String get statusAuthError { + return Intl.message( + 'Authentication error', + name: 'statusAuthError', + desc: 'Sync error', + args: [], + ); + } + + /// `Failed` + String get statusFail { + return Intl.message( + 'Failed', + name: 'statusFail', + desc: 'Sync fail', + args: [], + ); + } + + /// `Successful` + String get statusSuccess { + return Intl.message( + 'Successful', + name: 'statusSuccess', + desc: 'Sync status', + args: [], + ); + } + /// `Stop` String get stop { return Intl.message( diff --git a/lib/home/home.dart b/lib/home/home.dart index 174286f..b771fc9 100644 --- a/lib/home/home.dart +++ b/lib/home/home.dart @@ -717,7 +717,7 @@ class _RecentUpdateState extends State<_RecentUpdate> refreshWorker.start(_group); await Future.delayed(Duration(seconds: 1)); Fluttertoast.showToast( - msg: 'Refresh started', + msg: context.s.refreshStarted, gravity: ToastGravity.BOTTOM, ); } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index ddb62af..9bc0eb6 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -70,6 +70,10 @@ "@downloaded": {}, "downloadRemovedToast": "Download removed", "@downloadRemovedToast": {}, + "downloadStart": "Downloading", + "@downloadStart": { + "description": "Toast of downloading" + }, "editGroupName": "Edit group name", "@editGroupName": {}, "endOfEpisode": "End of Episode", @@ -264,6 +268,10 @@ "@minsCount": {}, "network": "Network", "@network": {}, + "neverAutoUpdate": "Never auto update", + "@neverAutoUpdate": { + "description": "Never auto update in podcast settings." + }, "newestFirst": "Newest first", "@newestFirst": {}, "newGroup": "Create new group", @@ -384,6 +392,10 @@ }, "refreshArtwork": "Update artwork", "@refreshArtwork": {}, + "refreshStarted": "Refreshing", + "@refreshStarted": { + "description": "Toast for refresh" + }, "remove": "Remove", "@remove": { "description": "Remove not \"removed\". \nRemove a podcast or a group." @@ -587,6 +599,18 @@ "@status": { "description": "gpodder.net status" }, + "statusAuthError": "Authentication error", + "@statusAuthError": { + "description": "Sync error" + }, + "statusFail": "Failed", + "@statusFail": { + "description": "Sync fail" + }, + "statusSuccess": "Successful", + "@statusSuccess": { + "description": "Sync status" + }, "stop": "Stop", "@stop": {}, "subscribe": "Subscribe", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 2cc1d8e..f22cf33 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -70,6 +70,10 @@ "@downloaded": {}, "downloadRemovedToast": "Download removed", "@downloadRemovedToast": {}, + "downloadStart": "Downloading", + "@downloadStart": { + "description": "Toast of downloading" + }, "editGroupName": "Editar nombre del grupo", "@editGroupName": {}, "endOfEpisode": "Fin del episodio", @@ -264,6 +268,10 @@ "@minsCount": {}, "network": "Red", "@network": {}, + "neverAutoUpdate": "Never auto update", + "@neverAutoUpdate": { + "description": "Never auto update in podcast settings." + }, "newestFirst": "Mas recientes primero", "@newestFirst": {}, "newGroup": "Crear grupo nuevo", @@ -384,6 +392,10 @@ }, "refreshArtwork": "Actualizar portada", "@refreshArtwork": {}, + "refreshStarted": "Regreshing", + "@refreshStarted": { + "description": "Toast for refresh" + }, "remove": "Remover", "@remove": { "description": "Remove not \"removed\". \nRemove a podcast or a group." @@ -587,6 +599,18 @@ "@status": { "description": "gpodder.net status" }, + "statusAuthError": "Authentication error", + "@statusAuthError": { + "description": "Sync error" + }, + "statusFail": "Failed", + "@statusFail": { + "description": "Sync fail" + }, + "statusSuccess": "Successful", + "@statusSuccess": { + "description": "Sync status" + }, "stop": "Stop", "@stop": {}, "subscribe": "Suscribir", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 81fc839..06cd370 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -70,6 +70,10 @@ "@downloaded": {}, "downloadRemovedToast": "Download removed", "@downloadRemovedToast": {}, + "downloadStart": "Downloading", + "@downloadStart": { + "description": "Toast of downloading" + }, "editGroupName": "Modifier le nom du groupe", "@editGroupName": {}, "endOfEpisode": "Fin de l'épisode", @@ -264,6 +268,10 @@ "@minsCount": {}, "network": "Réseau", "@network": {}, + "neverAutoUpdate": "Never auto update", + "@neverAutoUpdate": { + "description": "Never auto update in podcast settings." + }, "newestFirst": "Le plus récent en premier", "@newestFirst": {}, "newGroup": "Créer un nouveau groupe", @@ -384,6 +392,10 @@ }, "refreshArtwork": "Mettre à jour la vignette", "@refreshArtwork": {}, + "refreshStarted": "Refreshing", + "@refreshStarted": { + "description": "Toast for refresh" + }, "remove": "Supprimer", "@remove": { "description": "Remove not \"removed\". \nRemove a podcast or a group." @@ -587,6 +599,18 @@ "@status": { "description": "gpodder.net status" }, + "statusAuthError": "Authentication error", + "@statusAuthError": { + "description": "Sync error" + }, + "statusFail": "Failed", + "@statusFail": { + "description": "Sync fail" + }, + "statusSuccess": "Successful", + "@statusSuccess": { + "description": "Sync status" + }, "stop": "Stop", "@stop": {}, "subscribe": "S'abonner", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index f58aab4..9bbe470 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -70,6 +70,10 @@ "@downloaded": {}, "downloadRemovedToast": "Download removido", "@downloadRemovedToast": {}, + "downloadStart": "Downloading", + "@downloadStart": { + "description": "Toast of downloading" + }, "editGroupName": "Editar nome do grupo", "@editGroupName": {}, "endOfEpisode": "Fim do episódio", @@ -264,6 +268,10 @@ "@minsCount": {}, "network": "Rede", "@network": {}, + "neverAutoUpdate": "Never auto update", + "@neverAutoUpdate": { + "description": "Never auto update in podcast settings." + }, "newestFirst": "Mais recentes primeiro", "@newestFirst": {}, "newGroup": "Criar um novo grupo", @@ -384,6 +392,10 @@ }, "refreshArtwork": "Atualizar capa", "@refreshArtwork": {}, + "refreshStarted": "Refreshing", + "@refreshStarted": { + "description": "Toast for refresh" + }, "remove": "Remover", "@remove": { "description": "Remove not \"removed\". \nRemove a podcast or a group." @@ -587,6 +599,18 @@ "@status": { "description": "gpodder.net status" }, + "statusAuthError": "Authentication error", + "@statusAuthError": { + "description": "Sync error" + }, + "statusFail": "Failed", + "@statusFail": { + "description": "Sync fail" + }, + "statusSuccess": "Successful", + "@statusSuccess": { + "description": "Sync status" + }, "stop": "Parar", "@stop": {}, "subscribe": "Subscrever", diff --git a/lib/l10n/intl_zh_Hans.arb b/lib/l10n/intl_zh_Hans.arb index 448d5b7..0d29aee 100644 --- a/lib/l10n/intl_zh_Hans.arb +++ b/lib/l10n/intl_zh_Hans.arb @@ -70,6 +70,10 @@ "@downloaded": {}, "downloadRemovedToast": "下载已删除", "@downloadRemovedToast": {}, + "downloadStart": "下载中", + "@downloadStart": { + "description": "Toast of downloading" + }, "editGroupName": "修改组名", "@editGroupName": {}, "endOfEpisode": "节目结束", @@ -264,6 +268,10 @@ "@minsCount": {}, "network": "网络", "@network": {}, + "neverAutoUpdate": "无需自动更新", + "@neverAutoUpdate": { + "description": "Never auto update in podcast settings." + }, "newestFirst": "由新到旧", "@newestFirst": {}, "newGroup": "创建分组", @@ -384,6 +392,10 @@ }, "refreshArtwork": "更新头像", "@refreshArtwork": {}, + "refreshStarted": "刷新中", + "@refreshStarted": { + "description": "Toast for refresh" + }, "remove": "移除", "@remove": { "description": "Remove not \"removed\". \nRemove a podcast or a group." @@ -587,6 +599,18 @@ "@status": { "description": "gpodder.net status" }, + "statusAuthError": "验证错误", + "@statusAuthError": { + "description": "Sync error" + }, + "statusFail": "失败", + "@statusFail": { + "description": "Sync fail" + }, + "statusSuccess": "成功", + "@statusSuccess": { + "description": "Sync status" + }, "stop": "停止", "@stop": {}, "subscribe": "订阅", diff --git a/lib/local_storage/sqflite_localpodcast.dart b/lib/local_storage/sqflite_localpodcast.dart index 5812687..0211eff 100644 --- a/lib/local_storage/sqflite_localpodcast.dart +++ b/lib/local_storage/sqflite_localpodcast.dart @@ -306,7 +306,7 @@ class DBHelper { var dbClient = await database; final milliseconds = DateTime.now().millisecondsSinceEpoch; var recent = await getPlayHistory(1); - if (recent.isNotEmpty && recent.first.url == history.url) { + if (recent.isNotEmpty) { await dbClient.rawDelete("DELETE FROM PlayHistory WHERE add_date = ?", [recent.first.playdate.millisecondsSinceEpoch]); } @@ -362,7 +362,7 @@ class DBHelper { List list = await dbClient.rawQuery( "SELECT SUM(listen_time) FROM PlayHistory WHERE enclosure_url = ?", [url]); - if (list.isEmpty) { + if (list.isNotEmpty) { i = list.first['SUM(listen_time)']; return i ?? 0; } diff --git a/lib/podcasts/podcast_settings.dart b/lib/podcasts/podcast_settings.dart index 84ae8bb..862d042 100644 --- a/lib/podcasts/podcast_settings.dart +++ b/lib/podcasts/podcast_settings.dart @@ -233,7 +233,7 @@ class _PodcastSettingState extends State { return ListTile( onTap: () => _setNeverUpdate(!snapshot.data), leading: Icon(Icons.lock), - title: Text('Never update'), + title: Text(s.neverAutoUpdate), trailing: Transform.scale( scale: 0.9, child: diff --git a/lib/settings/data_backup.dart b/lib/settings/data_backup.dart index cd60062..b22e427 100644 --- a/lib/settings/data_backup.dart +++ b/lib/settings/data_backup.dart @@ -984,6 +984,7 @@ class _GpodderInfo extends StatefulWidget { class __GpodderInfoState extends State<_GpodderInfo> { final _gpodder = Gpodder(); var _syncing = false; + final _gpodderUrl = "https://gpodder.net"; Future> _getLoginInfo() async { final storage = KeyValueStorage(gpodderApiKey); @@ -1075,7 +1076,7 @@ class __GpodderInfoState extends State<_GpodderInfo> { ), Padding( padding: const EdgeInsets.all(8.0), - child: Text(s.intergateWith('gpodder.net'), + child: Text('gpodder.net', style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold)), @@ -1097,22 +1098,24 @@ class __GpodderInfoState extends State<_GpodderInfo> { return Column( children: [ ListTile( - title: Text('Divice id'), + title: Text('Device id'), subtitle: Text(deviceId), ), ListTile( - title: Text('Divice name'), + title: Text('Device name'), subtitle: Text(deviceName), ), ], ); }), + ListTile( + onTap: () => _gpodderUrl.launchUrl, + title: Text('Visit gpodder.net'), + subtitle: Text('Manage subscriptions online')), ListTile( onTap: _fullSync, - // contentPadding: - // const EdgeInsets.only(left: 70.0, right: 20), title: Text('Full sync'), - subtitle: Text('If sync have error')), + subtitle: Text('If error happened when syncing')), ]), ), ], diff --git a/lib/util/episodegrid.dart b/lib/util/episodegrid.dart index 2ffe383..69c889f 100644 --- a/lib/util/episodegrid.dart +++ b/lib/util/episodegrid.dart @@ -132,6 +132,10 @@ class EpisodeGrid extends StatelessWidget { } if (dataConfirm) { context.read().startTask(episode); + Fluttertoast.showToast( + msg: context.s.downloadStart, + gravity: ToastGravity.BOTTOM, + ); } } } diff --git a/pubspec.yaml b/pubspec.yaml index 3b6ca70..37a0aa2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,7 +45,7 @@ dependencies: permission_handler: ^5.0.1 provider: ^4.3.2 rxdart: ^0.24.1 - sqflite: ^1.3.1 + sqflite: ^1.3.1+1 shared_preferences: ^0.5.12 tuple: ^1.0.3 url_launcher: ^5.7.1