Skip to content

Commit

Permalink
chore(rss): added translation file
Browse files Browse the repository at this point in the history
  • Loading branch information
lightglitch committed Feb 10, 2023
1 parent e9247ea commit ed9f1b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ConfigurationRssAddFeedRoute extends StatefulWidget {
State<ConfigurationRssAddFeedRoute> createState() => _State();
}

class _State extends State<ConfigurationRssAddFeedRoute> with LunaScrollControllerMixin {
class _State extends State<ConfigurationRssAddFeedRoute>
with LunaScrollControllerMixin {
final _scaffoldKey = GlobalKey<ScaffoldState>();
final _feed = LunaRss();

Expand Down Expand Up @@ -40,8 +41,7 @@ class _State extends State<ConfigurationRssAddFeedRoute> with LunaScrollControll
text: 'Add Feed',
icon: Icons.add_rounded,
onTap: () async {
if (_feed.displayName.isEmpty ||
_feed.url.isEmpty) {
if (_feed.displayName.isEmpty || _feed.url.isEmpty) {
showLunaErrorSnackBar(
title: 'Failed to Add Feed',
message: 'All fields are required',
Expand Down Expand Up @@ -129,7 +129,7 @@ class _State extends State<ConfigurationRssAddFeedRoute> with LunaScrollControll
body: [
TextSpan(
text: _key.isEmpty
? "${'rss.FilterNotSet'.tr()} ${"rss.IncludeFilterHelp".tr()}"
? "${'rss.FilterNotSet'.tr()} - ${'rss.IncludeFilterHelp'.tr()}"
: _key)
],
trailing: const LunaIconButton.arrow(),
Expand All @@ -153,7 +153,7 @@ class _State extends State<ConfigurationRssAddFeedRoute> with LunaScrollControll
body: [
TextSpan(
text: _key.isEmpty
? "${'rss.FilterNotSet'.tr()} ${"rss.ExcludeFilterHelp".tr()}"
? "${'rss.FilterNotSet'.tr()} - ${'rss.ExcludeFilterHelp'.tr()}"
: _key)
],
trailing: const LunaIconButton.arrow(),
Expand Down
15 changes: 15 additions & 0 deletions localization/rss/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"rss.AddFeed": "Add Feed",
"rss.DisplayName": "Display Name",
"rss.ErrorFetching": "Error fetching feed",
"rss.ExcludeFilter": "Exclude Filter",
"rss.ExcludeFilterHelp": "Only show items whose name matches these |-separated words",
"rss.FeedUrl": "Feed Url",
"rss.FilterNotSet": "Not set",
"rss.IncludeFilter": "Include Filter",
"rss.IncludeFilterHelp": "Don't show items whose name matches these |-separated words",
"rss.NoDescriptionAvailable": "Empty description",
"rss.NoItemsFound": "No items Found",
"rss.NoPublishDate": "Not available",
"rss.OpenLink": "Open Link"
}

0 comments on commit ed9f1b4

Please sign in to comment.