Skip to content

Commit 063022f

Browse files
committed
feat(view, viewmodel): display project demo
1 parent 0cabd45 commit 063022f

File tree

7 files changed

+351
-249
lines changed

7 files changed

+351
-249
lines changed

mobile-app/lib/l10n/app_localizations.dart

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,15 @@ import 'app_localizations_pt.dart';
6363
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
6464
/// property.
6565
abstract class AppLocalizations {
66-
AppLocalizations(String locale)
67-
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
66+
AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
6867

6968
final String localeName;
7069

7170
static AppLocalizations of(BuildContext context) {
7271
return Localizations.of<AppLocalizations>(context, AppLocalizations)!;
7372
}
7473

75-
static const LocalizationsDelegate<AppLocalizations> delegate =
76-
_AppLocalizationsDelegate();
74+
static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();
7775

7876
/// A list of this localizations delegate along with the default localizations
7977
/// delegates.
@@ -85,8 +83,7 @@ abstract class AppLocalizations {
8583
/// Additional delegates can be added by appending to this list in
8684
/// MaterialApp. This list does not have to be used at all if a custom list
8785
/// of delegates is preferred or required.
88-
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
89-
<LocalizationsDelegate<dynamic>>[
86+
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
9087
delegate,
9188
GlobalMaterialLocalizations.delegate,
9289
GlobalCupertinoLocalizations.delegate,
@@ -959,8 +956,7 @@ abstract class AppLocalizations {
959956
String get close;
960957
}
961958

962-
class _AppLocalizationsDelegate
963-
extends LocalizationsDelegate<AppLocalizations> {
959+
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
964960
const _AppLocalizationsDelegate();
965961

966962
@override
@@ -969,27 +965,26 @@ class _AppLocalizationsDelegate
969965
}
970966

971967
@override
972-
bool isSupported(Locale locale) =>
973-
<String>['en', 'es', 'pt'].contains(locale.languageCode);
968+
bool isSupported(Locale locale) => <String>['en', 'es', 'pt'].contains(locale.languageCode);
974969

975970
@override
976971
bool shouldReload(_AppLocalizationsDelegate old) => false;
977972
}
978973

979974
AppLocalizations lookupAppLocalizations(Locale locale) {
975+
976+
980977
// Lookup logic when only language code is specified.
981978
switch (locale.languageCode) {
982-
case 'en':
983-
return AppLocalizationsEn();
984-
case 'es':
985-
return AppLocalizationsEs();
986-
case 'pt':
987-
return AppLocalizationsPt();
979+
case 'en': return AppLocalizationsEn();
980+
case 'es': return AppLocalizationsEs();
981+
case 'pt': return AppLocalizationsPt();
988982
}
989983

990984
throw FlutterError(
991-
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
992-
'an issue with the localizations generation tool. Please file an issue '
993-
'on GitHub with a reproducible sample app and the gen-l10n configuration '
994-
'that was used.');
985+
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
986+
'an issue with the localizations generation tool. Please file an issue '
987+
'on GitHub with a reproducible sample app and the gen-l10n configuration '
988+
'that was used.'
989+
);
995990
}

mobile-app/lib/l10n/app_localizations_en.dart

Lines changed: 31 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ class AppLocalizationsEn extends AppLocalizations {
6363
String get email_submit_code => 'Submit and sign in to freeCodeCamp';
6464

6565
@override
66-
String get email_invalid_code =>
67-
'The code you entered is not valid. Please check the last OTP you received and try again.';
66+
String get email_invalid_code => 'The code you entered is not valid. Please check the last OTP you received and try again.';
6867

6968
@override
70-
String get login_data_message =>
71-
'freeCodeCamp is free and your account is private by default. We use your email address to connect you to your account.';
69+
String get login_data_message => 'freeCodeCamp is free and your account is private by default. We use your email address to connect you to your account.';
7270

7371
@override
7472
String get login_load_message => 'Signing in...';
@@ -77,8 +75,7 @@ class AppLocalizationsEn extends AppLocalizations {
7775
String get login_cancelled => 'Login canceled';
7876

7977
@override
80-
String get login_age_message =>
81-
'You must be at least 13 years old to create an account on freeCodeCamp.';
78+
String get login_age_message => 'You must be at least 13 years old to create an account on freeCodeCamp.';
8279

8380
@override
8481
String login_welcome_back(String username) {
@@ -212,8 +209,7 @@ class AppLocalizationsEn extends AppLocalizations {
212209
String get tutorial_search_no_results => 'No Tutorials Found';
213210

214211
@override
215-
String get tutorial_search_error =>
216-
'There was an error loading tutorials \n please try again';
212+
String get tutorial_search_error => 'There was an error loading tutorials \n please try again';
217213

218214
@override
219215
String get tutorial_search_placeholder => 'SEARCH TUTORIALS...';
@@ -268,8 +264,7 @@ class AppLocalizationsEn extends AppLocalizations {
268264
String get podcast_show_less => 'Show Less';
269265

270266
@override
271-
String get podcast_unable_to_load_podcasts =>
272-
'Unable to load podcasts \n please try again.';
267+
String get podcast_unable_to_load_podcasts => 'Unable to load podcasts \n please try again.';
273268

274269
@override
275270
String get settings_title => 'SETTINGS';
@@ -278,15 +273,13 @@ class AppLocalizationsEn extends AppLocalizations {
278273
String get settings_reset_cache => 'Reset Cache';
279274

280275
@override
281-
String get settings_reset_cache_message =>
282-
'Are you sure you want to clear the cache? - this resets all your progress and local data';
276+
String get settings_reset_cache_message => 'Are you sure you want to clear the cache? - this resets all your progress and local data';
283277

284278
@override
285279
String get settings_reset_cache_confirm => 'Clear';
286280

287281
@override
288-
String get settings_reset_cache_description =>
289-
'Clears all local data and progress';
282+
String get settings_reset_cache_description => 'Clears all local data and progress';
290283

291284
@override
292285
String get settings_privacy_policy => 'Privacy Policy';
@@ -298,24 +291,19 @@ class AppLocalizationsEn extends AppLocalizations {
298291
String get settings_language => 'Language';
299292

300293
@override
301-
String get delete_account_message_one =>
302-
'This will really delete all your data, including all your progress and account information.';
294+
String get delete_account_message_one => 'This will really delete all your data, including all your progress and account information.';
303295

304296
@override
305-
String get delete_account_message_two =>
306-
'We won\'t be able to recover any of it for you later, even if you change your mind.';
297+
String get delete_account_message_two => 'We won\'t be able to recover any of it for you later, even if you change your mind.';
307298

308299
@override
309-
String get delete_account_message_three =>
310-
'If there\'s something we could do better, send us an email instead and we\'ll do our best:';
300+
String get delete_account_message_three => 'If there\'s something we could do better, send us an email instead and we\'ll do our best:';
311301

312302
@override
313-
String get delete_account_message_four =>
314-
'I am 100% certain. Delete everything related to this account';
303+
String get delete_account_message_four => 'I am 100% certain. Delete everything related to this account';
315304

316305
@override
317-
String get delete_account_are_you_sure =>
318-
'Are you sure you want to delete your account? - this deletes everything related to your account';
306+
String get delete_account_are_you_sure => 'Are you sure you want to delete your account? - this deletes everything related to your account';
319307

320308
@override
321309
String get delete_account_deleting => 'Deleting account...';
@@ -324,19 +312,16 @@ class AppLocalizationsEn extends AppLocalizations {
324312
String get delete_success => 'Account deleted successfully';
325313

326314
@override
327-
String get delete_failed =>
328-
'Account deletion failed. Please try again later.';
315+
String get delete_failed => 'Account deletion failed. Please try again later.';
329316

330317
@override
331-
String get settings_delete_account_description =>
332-
'Delete your freeCodeCamp account';
318+
String get settings_delete_account_description => 'Delete your freeCodeCamp account';
333319

334320
@override
335321
String get settings_privacy_policy_description => 'Read our privacy policy';
336322

337323
@override
338-
String get coderadio_unable_to_load =>
339-
'Unable to load coderadio \n please try again.';
324+
String get coderadio_unable_to_load => 'Unable to load coderadio \n please try again.';
340325

341326
@override
342327
String get coderadio_next_song => 'Next Song';
@@ -376,6 +361,7 @@ class AppLocalizationsEn extends AppLocalizations {
376361
String profile_points_on_date(int point, String date) {
377362
final intl.NumberFormat pointNumberFormat = intl.NumberFormat.compact(
378363
locale: localeName,
364+
379365
);
380366
final String pointString = pointNumberFormat.format(point);
381367

@@ -412,8 +398,7 @@ class AppLocalizationsEn extends AppLocalizations {
412398
String get profile_no_userdata => 'No user data found';
413399

414400
@override
415-
String get profile_no_modern_certs =>
416-
'No certifications have been earned under the current curriculum';
401+
String get profile_no_modern_certs => 'No certifications have been earned under the current curriculum';
417402

418403
@override
419404
String get profile_legacy_certs => 'Legacy Certifications';
@@ -428,59 +413,46 @@ class AppLocalizationsEn extends AppLocalizations {
428413
String get quincy_email_part_one => 'Please slow down and read this.';
429414

430415
@override
431-
String get quincy_email_part_two =>
432-
'freeCodeCamp is a proven path to your first software developer job.';
416+
String get quincy_email_part_two => 'freeCodeCamp is a proven path to your first software developer job.';
433417

434418
@override
435-
String get quincy_email_part_three =>
436-
'More than 40,000 people have gotten developer jobs after completing this — including at big companies like Google and Microsoft.';
419+
String get quincy_email_part_three => 'More than 40,000 people have gotten developer jobs after completing this — including at big companies like Google and Microsoft.';
437420

438421
@override
439-
String get quincy_email_part_four =>
440-
'If you are new to programming, we recommend you start at the beginning and earn these certifications in order.';
422+
String get quincy_email_part_four => 'If you are new to programming, we recommend you start at the beginning and earn these certifications in order.';
441423

442424
@override
443-
String get quincy_email_part_five =>
444-
'To earn each certification, build its 5 required projects and get all their tests to pass.';
425+
String get quincy_email_part_five => 'To earn each certification, build its 5 required projects and get all their tests to pass.';
445426

446427
@override
447-
String get quincy_email_part_six =>
448-
'You can add these certifications to your résumé or LinkedIn. But more important than the certifications is the practice you get along the way.';
428+
String get quincy_email_part_six => 'You can add these certifications to your résumé or LinkedIn. But more important than the certifications is the practice you get along the way.';
449429

450430
@override
451-
String get quincy_email_part_seven =>
452-
'If you feel overwhelmed, that is normal. Programming is hard.';
431+
String get quincy_email_part_seven => 'If you feel overwhelmed, that is normal. Programming is hard.';
453432

454433
@override
455-
String get quincy_email_part_eight =>
456-
'Practice is the key. Practice, practice, practice.';
434+
String get quincy_email_part_eight => 'Practice is the key. Practice, practice, practice.';
457435

458436
@override
459-
String get quincy_email_part_nine =>
460-
'And this curriculum will give you thousands of hours of hands-on programming practice.';
437+
String get quincy_email_part_nine => 'And this curriculum will give you thousands of hours of hands-on programming practice.';
461438

462439
@override
463-
String get quincy_email_part_ten =>
464-
'And if you want to learn more math and computer science theory, we also have thousands of hours of video courses on freeCodeCamp\\\'s YouTube channel.';
440+
String get quincy_email_part_ten => 'And if you want to learn more math and computer science theory, we also have thousands of hours of video courses on freeCodeCamp\\\'s YouTube channel.';
465441

466442
@override
467-
String get quincy_email_part_eleven =>
468-
'If you want to get a developer job or freelance clients, programming skills will be just part of the puzzle. You also need to build your personal network and your reputation as a developer.';
443+
String get quincy_email_part_eleven => 'If you want to get a developer job or freelance clients, programming skills will be just part of the puzzle. You also need to build your personal network and your reputation as a developer.';
469444

470445
@override
471-
String get quincy_email_part_twelve =>
472-
'You can do this on LinkedIn and GitHub, and also on the freeCodeCamp forum.';
446+
String get quincy_email_part_twelve => 'You can do this on LinkedIn and GitHub, and also on the freeCodeCamp forum.';
473447

474448
@override
475449
String get quincy_email_part_thirteen => 'Happy coding!';
476450

477451
@override
478-
String get quincy_email_part_fourteen =>
479-
'- Quincy Larson, the teacher who founded freeCodeCamp.org';
452+
String get quincy_email_part_fourteen => '- Quincy Larson, the teacher who founded freeCodeCamp.org';
480453

481454
@override
482-
String get quincy_email_part_fifteen =>
483-
'By the way, each Friday I send an email with 5 links about programming and computer science. I send these to about 4 million people. Would you like me to send this to you, too?';
455+
String get quincy_email_part_fifteen => 'By the way, each Friday I send an email with 5 links about programming and computer science. I send these to about 4 million people. Would you like me to send this to you, too?';
484456

485457
@override
486458
String get quincy_email_confirm => 'Yes Please';
@@ -495,8 +467,7 @@ class AppLocalizationsEn extends AppLocalizations {
495467
String get error_two => 'Error';
496468

497469
@override
498-
String get error_three =>
499-
'Oops! Something went wrong. Please try again in a moment.';
470+
String get error_three => 'Oops! Something went wrong. Please try again in a moment.';
500471

501472
@override
502473
String get loading => 'Loading';

0 commit comments

Comments
 (0)