fix(localization): Localize remaining dashboard strings

This commit is contained in:
Jagandeep Brar
2021-04-25 16:10:46 -05:00
parent 3c51789ec9
commit 270899da1f
4 changed files with 17 additions and 11 deletions

View File

@@ -141,6 +141,7 @@
"dashboard.FutureDays": "Future Days",
"dashboard.FutureDaysDescription": "Set the number of days in the future to fetch calendar entries for.",
"dashboard.MinimumOfOneDay": "Minimum of 1 Day",
"dashboard.Modules": "Modules",
"dashboard.Monday": "Monday",
"dashboard.NoNewContent": "No New Content",
"dashboard.OneMonth": "One Month",

View File

@@ -10,11 +10,13 @@ class DashboardAppBarSwitchViewAction extends StatelessWidget {
builder: (context, view, _) => LunaIconButton(
icon: view.icon,
onPressed: () {
view == CalendarStartingType.CALENDAR
? context.read<DashboardState>().calendarStartingType =
CalendarStartingType.SCHEDULE
: context.read<DashboardState>().calendarStartingType =
CalendarStartingType.CALENDAR;
if (view == CalendarStartingType.CALENDAR) {
context.read<DashboardState>().calendarStartingType =
CalendarStartingType.SCHEDULE;
} else {
context.read<DashboardState>().calendarStartingType =
CalendarStartingType.CALENDAR;
}
},
),
);

View File

@@ -2,14 +2,16 @@ import 'package:flutter/material.dart';
import 'package:lunasea/core.dart';
class DashboardNavigationBar extends StatelessWidget {
static List<ScrollController> scrollControllers =
List.generate(icons.length, (_) => ScrollController());
static List<ScrollController> scrollControllers = List.generate(
icons.length,
(_) => ScrollController(),
);
final PageController pageController;
static const List<String> titles = [
'Modules',
'Calendar',
];
static List<String> get titles => [
'dashboard.Modules'.tr(),
'dashboard.Calendar'.tr(),
];
static const List<IconData> icons = [
LunaIcons.modules,

View File

@@ -4,6 +4,7 @@
"dashboard.FutureDays": "Future Days",
"dashboard.FutureDaysDescription": "Set the number of days in the future to fetch calendar entries for.",
"dashboard.MinimumOfOneDay": "Minimum of 1 Day",
"dashboard.Modules": "Modules",
"dashboard.Monday": "Monday",
"dashboard.NoNewContent": "No New Content",
"dashboard.OneMonth": "One Month",