Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: xsoulspace/last_answer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.5.0+7
Choose a base ref
...
head repository: xsoulspace/last_answer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.6.0+8
Choose a head ref

Commits on Oct 23, 2021

  1. Merge branch 'develop'

    Arenukvern committed Oct 23, 2021
    Copy the full SHA
    d8ed4a0 View commit details

Commits on Oct 25, 2021

  1. Merge branch 'develop'

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    d1d7ce9 View commit details
  2. Copy the full SHA
    233ff37 View commit details
  3. Copy the full SHA
    6e9604a View commit details
  4. Copy the full SHA
    bd3a747 View commit details
  5. Copy the full SHA
    d1cf31a View commit details
  6. Copy the full SHA
    454b27d View commit details
  7. Copy the full SHA
    9c3ef72 View commit details
  8. wip: localization

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    011407a View commit details
  9. Copy the full SHA
    4a8aa7b View commit details
  10. docs: screenshot notice

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    59fa631 View commit details
  11. feat: loading statuses localization

    feat: questions italian localization
    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    30ef5f2 View commit details
  12. wip: localization migation

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    b732df4 View commit details
  13. Copy the full SHA
    4b1cd55 View commit details
  14. fix: scrolbars color

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    ab33429 View commit details
  15. Copy the full SHA
    6596ae2 View commit details
  16. Copy the full SHA
    361ff7c View commit details
  17. feat: en and ru localized

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    30fb918 View commit details
  18. feat: italian localization

    feat: localization switcher
    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    a82c81f View commit details
  19. feat: emoji search

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    31f08af View commit details
  20. feat: last used emoji

    Arenukvern committed Oct 25, 2021
    Copy the full SHA
    eafbbbd View commit details
  21. Merge pull request #47 from xsoulspace/localization

    Localization
    Arenukvern authored Oct 25, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ba250cc View commit details
Showing with 1,266 additions and 620 deletions.
  1. +1 −1 README.md
  2. BIN google_fonts/NotoColorEmoji.ttf
  3. BIN google_fonts/NotoSans-Bold.ttf
  4. BIN google_fonts/NotoSans-BoldItalic.ttf
  5. BIN google_fonts/NotoSans-Italic.ttf
  6. BIN google_fonts/NotoSans-Regular.ttf
  7. +4 −0 lib/abstract/abstract.dart
  8. +12 −2 lib/abstract/abstract.g.dart
  9. +59 −0 lib/abstract/greetings.dart
  10. +48 −0 lib/abstract/loading_statuses.dart
  11. +18 −1 lib/abstract/localization/language.dart
  12. +23 −3 lib/abstract/localization/localized_text.dart
  13. +5 −0 lib/gen/assets.gen.dart
  14. +13 −0 lib/gen/fonts.gen.dart
  15. +26 −11 lib/generated/intl/messages_en.dart
  16. +32 −15 lib/generated/intl/messages_it.dart
  17. +27 −12 lib/generated/intl/messages_ru.dart
  18. +200 −90 lib/generated/l10n.dart
  19. +111 −95 lib/l10n/intl_en.arb
  20. +109 −93 lib/l10n/intl_it.arb
  21. +99 −90 lib/l10n/intl_ru.arb
  22. +32 −2 lib/library/theme/app_text_styles.dart
  23. +14 −0 lib/library/theme/material_theme.dart
  24. +58 −13 lib/library/widgets/emoji_grid.dart
  25. +3 −0 lib/library/widgets/widgets.dart
  26. +17 −1 lib/providers/emoji_provider.dart
  27. +41 −17 lib/providers/projects.dart
  28. +1 −0 lib/providers/providers.dart
  29. +8 −0 lib/screens/app/app.dart
  30. +28 −30 lib/screens/app/app_store_initializer.dart
  31. +35 −7 lib/screens/app/idea_questions_initializer.dart
  32. +1 −0 lib/screens/home/home.dart
  33. +10 −4 lib/screens/home/remove_project_dialog.dart
  34. +50 −47 lib/screens/home/small_home_screen.dart
  35. +1 −2 lib/screens/idea_project/screens/idea_answer_screen.dart
  36. +1 −1 lib/screens/idea_project/widgets/answer_creator.dart
  37. +10 −21 lib/screens/info/app_info.dart
  38. +1 −0 lib/screens/note_project/note_project.dart
  39. +1 −1 lib/screens/note_project/note_project_screen.dart
  40. +5 −2 lib/screens/settings/settings.dart
  41. +25 −10 lib/screens/settings/settings_controller.dart
  42. +56 −21 lib/screens/settings/settings_screen.dart
  43. +9 −0 lib/screens/settings/settings_service.dart
  44. +7 −0 lib/utils/abstract_util.dart
  45. +27 −2 lib/utils/emoji_util.dart
  46. +2 −0 lib/utils/shared_preferences_keys.dart
  47. +1 −0 lib/utils/utils.dart
  48. +7 −0 pubspec.lock
  49. +21 −20 pubspec.yaml
  50. +7 −6 snap/snapcraft.yaml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -55,4 +55,4 @@ Thank you for your support!

---

## Contribution
## Contributors:
Binary file added google_fonts/NotoColorEmoji.ttf
Binary file not shown.
Binary file added google_fonts/NotoSans-Bold.ttf
Binary file not shown.
Binary file added google_fonts/NotoSans-BoldItalic.ttf
Binary file not shown.
Binary file added google_fonts/NotoSans-Italic.ttf
Binary file not shown.
Binary file added google_fonts/NotoSans-Regular.ttf
Binary file not shown.
4 changes: 4 additions & 0 deletions lib/abstract/abstract.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
library abstract;

import 'dart:math';

import 'package:equatable/equatable.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -17,10 +19,12 @@ part 'deprecated/answer.dart';
part 'deprecated/project.dart';
part 'deprecated/question.dart';
part 'emoji.dart';
part 'greetings.dart';
part 'hive_boxes_ids.dart';
part 'idea_project/idea_project.dart';
part 'idea_project/idea_project_answer.dart';
part 'idea_project/idea_project_question.dart';
part 'loading_statuses.dart';
part 'localization/language.dart';
part 'localization/localized_text.dart';
part 'localization/named_locale.dart';
14 changes: 12 additions & 2 deletions lib/abstract/abstract.g.dart

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

59 changes: 59 additions & 0 deletions lib/abstract/greetings.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
part of abstract;

class Greeting {
Greeting() : _random = Random();
final Random _random;
int get _randomMax => morning.values.length - 1;
int get _randomMin => 0;
int _nextRandom() => _randomMin + _random.nextInt(_randomMax - _randomMin);

static LocalizedText? _previousLocalizedGreeting;
static String _previousStrGreeting = '';
String get current {
final _now = DateTime.now();

final int randomNumber = _nextRandom();
LocalizedText text;
if (_now.hour < 7) {
text = night;
} else if (_now.hour < 12 && _now.hour >= 7) {
text = morning;
} else if (_now.hour > 18) {
text = evening;
} else {
text = day;
}
final newGreeting = text.values.values.toList()[randomNumber] ?? '';
if (_previousLocalizedGreeting != text) {
_previousLocalizedGreeting = text;
return _previousStrGreeting = newGreeting;
} else {
return _previousStrGreeting;
}
}

static const morning = LocalizedText(
en: 'Good morning',
ru: 'Доброе утро',
it: 'Buon giorno',
ga: 'Maidin mhaith',
);
static const day = LocalizedText(
en: 'Good afternoon',
ru: 'Добрый день',
it: 'Buona giornata',
ga: 'Lá maith',
);
static const evening = LocalizedText(
en: 'Good evening',
ru: 'Добрый вечер',
it: 'Buona serata',
ga: 'Tráthnóna maith',
);
static const night = LocalizedText(
en: 'Good night',
ru: 'Доброй ночи',
it: 'Buona notte',
ga: 'Oíche mhaith',
);
}
48 changes: 48 additions & 0 deletions lib/abstract/loading_statuses.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
part of abstract;

enum AppStateLoadingStatuses {
settings,
emoji,
ideas,
questionsForAnswers,
answersForIdeas,
notes,
migratingOldData,
}
const appLoadingStatusesTitles = <AppStateLoadingStatuses, LocalizedText>{
AppStateLoadingStatuses.answersForIdeas: LocalizedText(
en: 'Loading answers for ideas ✨',
ru: 'Ответы идей загружаются ✨',
it: 'Caricamento risposte per idee',
),
AppStateLoadingStatuses.emoji: LocalizedText(
en: 'Loading emojis ✨',
ru: 'Загружаются смайлики ✨',
it: 'Caricamento emoji',
),
AppStateLoadingStatuses.ideas: LocalizedText(
en: 'Loading ideas ✨',
ru: 'Загружаются идеи ✨',
it: 'Caricamento idee',
),
AppStateLoadingStatuses.migratingOldData: LocalizedText(
en: 'Migrating old data ✨',
ru: 'Обновляем старые данные ✨',
it: 'Migrazione di vecchi dati',
),
AppStateLoadingStatuses.notes: LocalizedText(
en: 'Loading notes ✨',
ru: 'Заметки загружаются ✨',
it: '',
),
AppStateLoadingStatuses.questionsForAnswers: LocalizedText(
en: 'Loading questions for answers ✨',
ru: 'Загружаются вопросы для ответов ✨',
it: 'Caricamento note',
),
AppStateLoadingStatuses.settings: LocalizedText(
en: 'Loading settings ✨',
ru: 'Загружаются настройки ✨',
it: 'Caricamento impostazioni',
),
};
19 changes: 18 additions & 1 deletion lib/abstract/localization/language.dart
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ class Locales {
static const en = Locale(Languages.en, 'EN');
static const ru = Locale(Languages.ru, 'RU');
static const it = Locale(Languages.it, 'IT');
static const ga = Locale(Languages.ga, 'GA');
static const values = <Locale>[en, ru, it];
}

@@ -15,5 +16,21 @@ class Languages {
static const ru = 'ru';
static const en = 'en';
static const it = 'it';
static const values = <LanguageName>[ru, en, it];
static const ga = 'ga';
static const values = <LanguageName>[ru, en, it, ga];
}

final Map<String, NamedLocale> namedLocalesMap = {
Languages.en: const NamedLocale(
name: 'English',
locale: Locales.en,
),
Languages.ru: const NamedLocale(
name: 'Русский',
locale: Locales.ru,
),
Languages.it: const NamedLocale(
name: 'Italian',
locale: Locales.it,
),
};
26 changes: 23 additions & 3 deletions lib/abstract/localization/localized_text.dart
Original file line number Diff line number Diff line change
@@ -4,22 +4,42 @@ part of abstract;
/// should use this class to keep values
@JsonSerializable()
@HiveType(typeId: HiveBoxesIds.localizedText)
class LocalizedText {
class LocalizedText with EquatableMixin {
const LocalizedText({
required final this.en,
required final this.ru,
final this.it,
final this.ga,
});
factory LocalizedText.fromJson(final Map<String, dynamic> json) =>
_$LocalizedTextFromJson(json);
Map<String, dynamic> toJson() => _$LocalizedTextToJson(this);

/// Russian
@HiveField(0)
final String ru;

/// English
@HiveField(1)
final String en;

/// Italian
@HiveField(2)
final String? it;

/// Irish
@HiveField(3)
final String? ga;

/// If any new [Languages] added, add this to [values]
Map<LanguageName, String?> get values =>
{Locales.ru.toString(): ru, Locales.en.toString(): en};
Map<LanguageName, String?> get values => {
Locales.ru.toString(): ru,
Locales.en.toString(): en,
Locales.it.toString(): it,
Locales.ga.toString(): ga
};
String getByLanguage(final LanguageName language) => values[language] ?? en;

@override
List<Object?> get props => [ru, en, it, ga];
}
5 changes: 5 additions & 0 deletions lib/gen/assets.gen.dart

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

13 changes: 13 additions & 0 deletions lib/gen/fonts.gen.dart

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

37 changes: 26 additions & 11 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
@@ -19,7 +19,10 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';

static String m0(projectTitle) => "${projectTitle} will be lost forever";
static String m0(version, buildNumber) =>
"App version: ${version}, build: ${buildNumber}";

static String m1(title) => "${title} will be lost forever";

final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@@ -28,28 +31,29 @@ class MessageLookup extends MessageLookupByLibrary {
"You can use Inspiration section to get inspiration of how this app can be used and which techniques can be applied."),
"aboutAbstractIdeasImprovementsBugs":
MessageLookupByLibrary.simpleMessage("Ideas Improvements Bugs?"),
"aboutAbstractIdeasImprovementsBugsDescription":
MessageLookupByLibrary.simpleMessage(
"Please leave a review in anywhere you like or send a message to idea@xsoulspace.dev . Thank you for using this app and have a nice day, full of ideas and inspiration!:)"),
"aboutAbstractWhatFor":
MessageLookupByLibrary.simpleMessage("What for?"),
"aboutAbstractWhatForDescription": MessageLookupByLibrary.simpleMessage(
"This app is designed to solve ideas expression when it needed most; to solve complexity and thoughts understanding during project management and just to make easier each other ideas sharing & understanding."),
"answer": MessageLookupByLibrary.simpleMessage("Answer"),
"answerWillBeLost":
MessageLookupByLibrary.simpleMessage("will be lost forever"),
"appInfo": MessageLookupByLibrary.simpleMessage("Last Answer"),
"appVersion": m0,
"areYouSure": MessageLookupByLibrary.simpleMessage("Are you sure?"),
"cancel": MessageLookupByLibrary.simpleMessage("CANCEL"),
"close": MessageLookupByLibrary.simpleMessage("CLOSE"),
"createIdeaHelperText":
MessageLookupByLibrary.simpleMessage("Create tutorial"),
"darkMode": MessageLookupByLibrary.simpleMessage("Dark mode"),
"delete": MessageLookupByLibrary.simpleMessage("DELETE"),
"feedbackTextWithEmail": MessageLookupByLibrary.simpleMessage(
"or send a message to idea@xsoulspace.dev"),
"idea": MessageLookupByLibrary.simpleMessage("Idea"),
"joinDiscord": MessageLookupByLibrary.simpleMessage("Join Discord"),
"language": MessageLookupByLibrary.simpleMessage("Language"),
"languageWillBeChanged": MessageLookupByLibrary.simpleMessage(
"will be set as a new language. The app will be reloaded, continue?"),
"lastAnswer": MessageLookupByLibrary.simpleMessage("Last Answer"),
"madeWithLoveAndFlutter": MessageLookupByLibrary.simpleMessage(
"Made with Flutter ❤ and Open Source Libraries"),
"niceDayWish": MessageLookupByLibrary.simpleMessage(
"Thank you for using this app and have a nice day, full of ideas and inspiration!:)"),
"noProjectsYet":
MessageLookupByLibrary.simpleMessage("No projects yet."),
"note": MessageLookupByLibrary.simpleMessage("Note"),
@@ -69,10 +73,21 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("What else?"),
"philosophyInspirationTitle":
MessageLookupByLibrary.simpleMessage("Inspiration"),
"projectWillBeLost": m0,
"titleWith": MessageLookupByLibrary.simpleMessage("с"),
"pleaseNotice": MessageLookupByLibrary.simpleMessage("Please notice"),
"search": MessageLookupByLibrary.simpleMessage("Search"),
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
"theme": MessageLookupByLibrary.simpleMessage("Theme"),
"themeDark": MessageLookupByLibrary.simpleMessage("Dark"),
"themeLight": MessageLookupByLibrary.simpleMessage("Theme"),
"themeSystem": MessageLookupByLibrary.simpleMessage("System"),
"versionLimitations": MessageLookupByLibrary.simpleMessage(
"This version may not have all features of previous version, such as languages and help and etc, but they will return in the next updates - stay tuned:)"),
"whatsYourIdea":
MessageLookupByLibrary.simpleMessage("What\'s your idea?"),
"willBeLost": m1,
"writeANote": MessageLookupByLibrary.simpleMessage("Write a note"),
"writeAnAnswer":
MessageLookupByLibrary.simpleMessage("Write an answer"),
"yes": MessageLookupByLibrary.simpleMessage("YES")
};
}
Loading