Skip to content

Conversation

@romavicdosanjos
Copy link

Screencast.From.2025-06-23.10-04-16.mp4

Summary

Introduces full internationalization (i18n) support to the app using the easy_localization package, enabling dynamic language switching and localized UI content.

Key Changes

  • Added and configured the easy_localization package
  • Initialized EasyLocalization in main.dart with support for:
    • English (en-US)
    • Portuguese (pt-PT)
  • Created translation files in assets/translations/
  • Extracted all hardcoded strings from:
    • TimerPage
    • TimerControls
    • CurrentSpeaker
    • ComicScreen
    • PeopleSection
    • NavigationControls
    • AddPersonWidget
    • CelebrationScreen
    • SessionInfo
  • Introduced meaningful placeholders (e.g., {count}, {entity}) in translation strings
  • Added language switcher dropdown in PeopleSection

Example Usage

'added_participants_timer_page'.tr(namedArgs: {
  'count': '3',
  'entity': 'participants'
});

romavicdosanjos and others added 4 commits June 23, 2025 08:44
This commit integrates the `easy_localization` package to support internationalization.

Key changes:
- Added `easy_localization` dependency to `pubspec.yaml`.
- Initialized `EasyLocalization` in `main.dart` with support for English (US) and Portuguese (PT).
- Configured `MaterialApp` to use localization delegates, supported locales, and the current locale from `EasyLocalization`.
- Added empty translation files for `en-US.json` and `pt-PT.json` in `assets/translations/`.

This setup lays the groundwork for localizing the application's UI elements.
This commit introduces internationalization (i18n) to the application using the `easy_localization` package.

Key changes include:
- Added English (en-US) and Portuguese (pt-PT) translation files.
- Integrated `EasyLocalization` into the main application setup, setting Portuguese as the default start locale.
- Updated various widgets to use translated strings for UI elements such as button labels, section headers, messages, and tooltips.
- Specifically, translated text in `TimerControls`, `TimerPage`, `CurrentSpeaker`, `ComicScreen`, `PeopleSection`, `NavigationControls`, `AddPersonWidget`, `CelebrationScreen`, and `SessionInfo` widgets.
- Added a language selection dropdown to `PeopleSection` allowing users to switch between English and Portuguese.
- Ensured that dynamic text, such as participant counts and error messages, is correctly formatted with localized strings.
The error message on the comic screen has been updated to be more user-friendly and informative. It now guides users to check their internet connection or try again later if an error occurs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant