Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redesign: Academic Path - Schedule #1445

Draft
wants to merge 14 commits into
base: ui/redesign
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions packages/uni_app/lib/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';
Expand All @@ -20,8 +21,8 @@ import 'messages_pt_PT.dart' as messages_pt_pt;

typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
'pt_PT': () => new Future.value(null),
'en': () => new SynchronousFuture(null),
'pt_PT': () => new SynchronousFuture(null),
};

MessageLookupByLibrary? _findExact(String localeName) {
Expand All @@ -36,18 +37,18 @@ MessageLookupByLibrary? _findExact(String localeName) {
}

/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
return new SynchronousFuture(false);
}
var lib = _deferredLibraries[availableLocale];
await (lib == null ? new Future.value(false) : lib());
lib == null ? new SynchronousFuture(false) : lib();
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return new Future.value(true);
return new SynchronousFuture(true);
}

bool _messagesExistFor(String locale) {
Expand Down
13 changes: 7 additions & 6 deletions packages/uni_app/lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names
// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
Expand All @@ -19,12 +20,12 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';

static m0(time) => "last refresh at ${time}";
static String m0(time) => "last refresh at ${time}";

static m1(time) =>
static String m1(time) =>
"${Intl.plural(time, zero: 'Refreshed ${time} minutes ago', one: 'Refreshed ${time} minute ago', other: 'Refreshed ${time} minutes ago')}";

static m2(title) => "${Intl.select(title, {
static String m2(title) => "${Intl.select(title, {
'horario': 'Schedule',
'exames': 'Exams',
'area': 'Personal Area',
Expand All @@ -41,7 +42,7 @@ class MessageLookup extends MessageLookupByLibrary {
})}";

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("About us"),
"academic_services":
MessageLookupByLibrary.simpleMessage("Academic services"),
Expand Down Expand Up @@ -161,7 +162,6 @@ class MessageLookup extends MessageLookupByLibrary {
"language": MessageLookupByLibrary.simpleMessage("Language"),
"last_refresh_time": m0,
"last_timestamp": m1,
"lectures": MessageLookupByLibrary.simpleMessage("Lectures"),
"library_occupation":
MessageLookupByLibrary.simpleMessage("Library Occupation"),
"load_error": MessageLookupByLibrary.simpleMessage(
Expand Down Expand Up @@ -270,6 +270,7 @@ class MessageLookup extends MessageLookupByLibrary {
"restaurant_main_page": MessageLookupByLibrary.simpleMessage(
"Do you want to see your favorite restaurants in the main page?"),
"room": MessageLookupByLibrary.simpleMessage("Room"),
"schedule": MessageLookupByLibrary.simpleMessage("Schedule"),
"school_calendar":
MessageLookupByLibrary.simpleMessage("School Calendar"),
"search": MessageLookupByLibrary.simpleMessage("Search"),
Expand Down
13 changes: 7 additions & 6 deletions packages/uni_app/lib/generated/intl/messages_pt_PT.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names
// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes
// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
Expand All @@ -19,12 +20,12 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'pt_PT';

static m0(time) => "última atualização às ${time}";
static String m0(time) => "última atualização às ${time}";

static m1(time) =>
static String m1(time) =>
"${Intl.plural(time, zero: 'Atualizado há ${time} minutos', one: 'Atualizado há ${time} minuto', other: 'Atualizado há ${time} minutos')}";

static m2(title) => "${Intl.select(title, {
static String m2(title) => "${Intl.select(title, {
'horario': 'Horário',
'exames': 'Exames',
'area': 'Área Pessoal',
Expand All @@ -41,7 +42,7 @@ class MessageLookup extends MessageLookupByLibrary {
})}";

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("Sobre nós"),
"academic_services":
MessageLookupByLibrary.simpleMessage("Serviços académicos"),
Expand Down Expand Up @@ -160,7 +161,6 @@ class MessageLookup extends MessageLookupByLibrary {
"language": MessageLookupByLibrary.simpleMessage("Idioma"),
"last_refresh_time": m0,
"last_timestamp": m1,
"lectures": MessageLookupByLibrary.simpleMessage("Aulas"),
"library_occupation":
MessageLookupByLibrary.simpleMessage("Ocupação da Biblioteca"),
"load_error": MessageLookupByLibrary.simpleMessage(
Expand Down Expand Up @@ -271,6 +271,7 @@ class MessageLookup extends MessageLookupByLibrary {
"restaurant_main_page": MessageLookupByLibrary.simpleMessage(
"Queres ver os teus restaurantes favoritos na página principal?"),
"room": MessageLookupByLibrary.simpleMessage("Sala"),
"schedule": MessageLookupByLibrary.simpleMessage("Aulas"),
"school_calendar":
MessageLookupByLibrary.simpleMessage("Calendário Escolar"),
"search": MessageLookupByLibrary.simpleMessage("Pesquisar"),
Expand Down
10 changes: 5 additions & 5 deletions packages/uni_app/lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/uni_app/lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@
"@wrong_credentials_exception": {},
"internet_status_exception": "Check your internet connection",
"@internet_status_exception": {},
"lectures": "Lectures",
"@lectures": {},
"schedule": "Schedule",
"@schedule": {},
"exams": "Exams",
"@exams": {},
"courses": "Courses",
Expand Down
4 changes: 2 additions & 2 deletions packages/uni_app/lib/l10n/intl_pt_PT.arb
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@
"@wrong_credentials_exception": {},
"internet_status_exception": "Verifique sua conexão com a internet",
"@internet_status_exception": {},
"lectures": "Aulas",
"@lectures": {},
"schedule": "Aulas",
"@schedule": {},
"exams": "Exames",
"@exams": {},
"courses": "Cursos",
Expand Down
13 changes: 6 additions & 7 deletions packages/uni_app/lib/view/academic_path/academic_path.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:uni/generated/l10n.dart';
import 'package:uni/utils/navigation_items.dart';
import 'package:uni/view/academic_path/exam_page.dart';
import 'package:uni/view/academic_path/schedule_page.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/general.dart';
import 'package:uni_ui/icons.dart';
import 'package:uni_ui/tabs/tab_icon.dart';
Expand Down Expand Up @@ -41,7 +42,7 @@ class AcademicPathPageViewState extends GeneralPageViewState
tabs: [
TabIcon(
icon: UniIcons.lecture,
text: S.of(context).lectures,
text: S.of(context).schedule,
),
TabIcon(icon: UniIcons.exam, text: S.of(context).exams),
TabIcon(icon: UniIcons.course, text: S.of(context).courses),
Expand All @@ -53,12 +54,10 @@ class AcademicPathPageViewState extends GeneralPageViewState
Widget getBody(BuildContext context) {
return TabBarView(
controller: tabController,
children: const [
Center(
child: Text('To be implemented'),
),
ExamsPage(),
Center(
children: [
SchedulePage(),
const ExamsPage(),
const Center(
child: Text('To be implemented'),
),
],
Expand Down
Loading
Loading