Skip to content

Feature Request: Move hardcoded UI strings to a proper internationalization (i18n) system #30

@skrashevich

Description

@skrashevich

Feature request: Internationalization support and moving hardcoded strings

I apologize for the issue text written with the LLM: English isn't my native language, and in this form it'll be easier to understand my point :)

Current status:
All UI strings are currently hardcoded in English directly in Dart code inside widgets. Examples:

  • 'Followers', 'Routes', 'Detection Sensor Log', and more.

Problem:
This makes it impossible to quickly translate the interface into other languages (for example, German, Ukrainian, Russian). The standard Flutter solution is to move all strings to a formal internationalization system that allows easy translations.

What needs to be done:

  1. Set up the standard Flutter localization infrastructure (flutter_localizations, .arb files, flutter_gen, etc.).
  2. Extract all UI strings (labels, hints, messages, titles, etc.) from code into a separate file (e.g., app_en.arb).
  3. Replace string literals with calls to the translation system, e.g., AppLocalizations.of(context)!.followers.
  4. Add ARB files for other languages (e.g., app_ru.arb for Russian) as needed to streamline translation.
  5. Set up automatic generation of translations and connect the support in MaterialApp/CupertinoApp.

Benefits:

  • Enables translating the UI to other languages without touching business logic or UI code.
  • Makes it easier to maintain and expand the app for non-English users.
  • Improves architecture and frontend scalability.

Example tasks:

  • Create an l10n.yaml config file.
  • Extract all strings from the <lib/features/> directory into app_en.arb.
  • Replace Text('Followers') with Text(AppLocalizations.of(context)!.followers) and similar.
  • Set up the build system for automatic translation generation.

Bonus:
Once set up, adding new languages is easy: just create a new .arb file with translations without touching UI code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions