From 67f3deeb591dae0d07ce2835aaed604b900b0585 Mon Sep 17 00:00:00 2001 From: stonegate Date: Thu, 1 Oct 2020 16:51:45 +0800 Subject: [PATCH] Update language. --- lib/generated/intl/messages_en.dart | 1 + lib/generated/intl/messages_es.dart | 1 + lib/generated/intl/messages_fr.dart | 1 + lib/generated/intl/messages_it.dart | 1 + lib/generated/intl/messages_pt.dart | 1 + lib/generated/intl/messages_zh-Hans.dart | 1 + lib/generated/l10n.dart | 10 +++ lib/home/pocast_discovery.dart | 92 ++++++++++++++---------- lib/home/search_podcast.dart | 28 ++++---- lib/l10n/intl_en.arb | 2 + lib/l10n/intl_es.arb | 2 + lib/l10n/intl_fr.arb | 2 + lib/l10n/intl_it.arb | 2 + lib/l10n/intl_pt.arb | 2 + lib/l10n/intl_zh_Hans.arb | 2 + 15 files changed, 95 insertions(+), 53 deletions(-) diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 623d247..3fad975 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("Schedule"), "search" : MessageLookupByLibrary.simpleMessage("Search"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("Search episode"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("Type the podcast name, keywords or enter a feed url."), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("Invalid RSS link"), "searchPodcast" : MessageLookupByLibrary.simpleMessage("Search for podcasts"), "secCount" : m24, diff --git a/lib/generated/intl/messages_es.dart b/lib/generated/intl/messages_es.dart index dcd4320..466cf28 100644 --- a/lib/generated/intl/messages_es.dart +++ b/lib/generated/intl/messages_es.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("Horario"), "search" : MessageLookupByLibrary.simpleMessage("Buscar"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("Buscar episodio"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("Type the podcast name, keywords or enter a feed url."), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("Enlace RSS invalido "), "searchPodcast" : MessageLookupByLibrary.simpleMessage("Buscar podcast"), "secCount" : m24, diff --git a/lib/generated/intl/messages_fr.dart b/lib/generated/intl/messages_fr.dart index 6cf07e9..3b10128 100644 --- a/lib/generated/intl/messages_fr.dart +++ b/lib/generated/intl/messages_fr.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("Programmation"), "search" : MessageLookupByLibrary.simpleMessage("Rechercher"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("Rechercher un épisode"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("Type the podcast name, keywords or enter a feed url."), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("Lien RSS invalide"), "searchPodcast" : MessageLookupByLibrary.simpleMessage("Chercher un podcast"), "secCount" : m24, diff --git a/lib/generated/intl/messages_it.dart b/lib/generated/intl/messages_it.dart index 5e712a5..7c097c9 100644 --- a/lib/generated/intl/messages_it.dart +++ b/lib/generated/intl/messages_it.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("Programmazione"), "search" : MessageLookupByLibrary.simpleMessage("Cerca"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("Cerca episodio"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("Type the podcast name, keywords or enter a feed url."), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("Link RSS invalido"), "searchPodcast" : MessageLookupByLibrary.simpleMessage("Cerca un podcast"), "secCount" : m24, diff --git a/lib/generated/intl/messages_pt.dart b/lib/generated/intl/messages_pt.dart index 31a9a5c..21b304f 100644 --- a/lib/generated/intl/messages_pt.dart +++ b/lib/generated/intl/messages_pt.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("Horário"), "search" : MessageLookupByLibrary.simpleMessage("Procurar"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("Procurar episódio"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("Type the podcast name, keywords or enter a feed url."), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("Ligação RSS inválida"), "searchPodcast" : MessageLookupByLibrary.simpleMessage("Procurar podcasts"), "secCount" : m24, diff --git a/lib/generated/intl/messages_zh-Hans.dart b/lib/generated/intl/messages_zh-Hans.dart index 430dbcc..4285278 100644 --- a/lib/generated/intl/messages_zh-Hans.dart +++ b/lib/generated/intl/messages_zh-Hans.dart @@ -251,6 +251,7 @@ class MessageLookup extends MessageLookupByLibrary { "schedule" : MessageLookupByLibrary.simpleMessage("定时"), "search" : MessageLookupByLibrary.simpleMessage("搜索"), "searchEpisode" : MessageLookupByLibrary.simpleMessage("搜索节目"), + "searchHelper" : MessageLookupByLibrary.simpleMessage("请输入播客名,关键字或者RSS链接。"), "searchInvalidRss" : MessageLookupByLibrary.simpleMessage("RSS 链接错误"), "searchPodcast" : MessageLookupByLibrary.simpleMessage("搜索播客"), "secCount" : m24, diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 192a8c4..5f80e78 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1746,6 +1746,16 @@ class S { ); } + /// `Type the podcast name, keywords or enter a feed url.` + String get searchHelper { + return Intl.message( + 'Type the podcast name, keywords or enter a feed url.', + name: 'searchHelper', + desc: '', + args: [], + ); + } + /// `Invalid RSS link` String get searchInvalidRss { return Intl.message( diff --git a/lib/home/pocast_discovery.dart b/lib/home/pocast_discovery.dart index ca39b96..dfabc80 100644 --- a/lib/home/pocast_discovery.dart +++ b/lib/home/pocast_discovery.dart @@ -172,48 +172,62 @@ class DiscoveryPageState extends State { future: _getHideDiscovery(), initialData: true, builder: (context, snapshot) => snapshot.data - ? SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _historyList(), - SizedBox(height: 100), - SizedBox( - height: 150, - child: Center( - child: Icon( - Icons.search, - size: 80, - color: Colors.grey[400], + ? ScrollConfiguration( + behavior: NoGrowBehavior(), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _historyList(), + SizedBox(height: 50), + SizedBox( + height: 150, + child: Center( + child: Icon( + Icons.search, + size: 80, + color: Colors.grey[400], + ), ), ), - ), - SizedBox( - height: 50, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - LineIcons.microphone_solid, - size: 30, - color: Colors.redAccent, - ), - SizedBox(width: 50), - Icon( - LineIcons.broadcast_tower_solid, - size: 30, - color: Colors.deepPurple, - ), - SizedBox(width: 50), - Icon( - LineIcons.rss_square_solid, - size: 30, - color: Colors.blueGrey, - ), - ], + SizedBox( + height: 50, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + LineIcons.microphone_solid, + size: 30, + color: Colors.lightBlue, + ), + SizedBox(width: 50), + Icon( + LineIcons.broadcast_tower_solid, + size: 30, + color: Colors.deepPurple, + ), + SizedBox(width: 50), + Icon( + LineIcons.rss_square_solid, + size: 30, + color: Colors.blueGrey, + ), + ], + ), ), - ), - ], + Padding( + padding: EdgeInsets.fromLTRB(50, 20, 50, 20), + child: Center( + child: Text( + context.s.searchHelper, + textAlign: TextAlign.center, + style: context.textTheme.headline6 + .copyWith(color: Colors.grey[400]), + ), + ), + ), + ], + ), ), ) : PodcastSlideup( diff --git a/lib/home/search_podcast.dart b/lib/home/search_podcast.dart index f9d4637..1627588 100644 --- a/lib/home/search_podcast.dart +++ b/lib/home/search_podcast.dart @@ -146,20 +146,6 @@ class MyHomePageDelegate extends SearchDelegate { } }, itemBuilder: (context) => [ - PopupMenuItem( - value: SearchEngine.listenNotes, - child: Container( - padding: EdgeInsets.only(left: 10), - child: Row( - children: [ - Text('ListenNotes'), - Spacer(), - if (_searchEngine == SearchEngine.listenNotes) - DotIndicator() - ], - ), - ), - ), PopupMenuItem( value: SearchEngine.podcastIndex, child: Container( @@ -174,6 +160,20 @@ class MyHomePageDelegate extends SearchDelegate { ), ), ), + PopupMenuItem( + value: SearchEngine.listenNotes, + child: Container( + padding: EdgeInsets.only(left: 10), + child: Row( + children: [ + Text('ListenNotes'), + Spacer(), + if (_searchEngine == SearchEngine.listenNotes) + DotIndicator() + ], + ), + ), + ), ], ), ), diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 99429e8..8f29557 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "Search episode", "@searchEpisode": {}, + "searchHelper": "Type the podcast name, keywords or enter a feed url.", + "@searchHelper": {}, "searchInvalidRss": "Invalid RSS link", "@searchInvalidRss": {}, "searchPodcast": "Search for podcasts", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index e499a48..eba676c 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "Buscar episodio", "@searchEpisode": {}, + "searchHelper": "Type the podcast name, keywords or enter a feed url.", + "@searchHelper": {}, "searchInvalidRss": "Enlace RSS invalido ", "@searchInvalidRss": {}, "searchPodcast": "Buscar podcast", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index eb48c9e..491a8f8 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "Rechercher un épisode", "@searchEpisode": {}, + "searchHelper": "Type the podcast name, keywords or enter a feed url.", + "@searchHelper": {}, "searchInvalidRss": "Lien RSS invalide", "@searchInvalidRss": {}, "searchPodcast": "Chercher un podcast", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index 8d11f0a..8b444e5 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "Cerca episodio", "@searchEpisode": {}, + "searchHelper": "Type the podcast name, keywords or enter a feed url.", + "@searchHelper": {}, "searchInvalidRss": "Link RSS invalido", "@searchInvalidRss": {}, "searchPodcast": "Cerca un podcast", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 11fa441..6ad1341 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "Procurar episódio", "@searchEpisode": {}, + "searchHelper": "Type the podcast name, keywords or enter a feed url.", + "@searchHelper": {}, "searchInvalidRss": "Ligação RSS inválida", "@searchInvalidRss": {}, "searchPodcast": "Procurar podcasts", diff --git a/lib/l10n/intl_zh_Hans.arb b/lib/l10n/intl_zh_Hans.arb index 1cb4943..61d11ed 100644 --- a/lib/l10n/intl_zh_Hans.arb +++ b/lib/l10n/intl_zh_Hans.arb @@ -433,6 +433,8 @@ "@search": {}, "searchEpisode": "搜索节目", "@searchEpisode": {}, + "searchHelper": "请输入播客名,关键字或者RSS链接。", + "@searchHelper": {}, "searchInvalidRss": "RSS 链接错误", "@searchInvalidRss": {}, "searchPodcast": "搜索播客",