flutter / flutter/flutter-intellij
Native i18n support
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
It would be really nice to have support for the new internationalization process [documented there](https://docs.google.com/document/d/10e0saTfAv32OZLRmONy866vnaw0I2jwL8zukykpgWBc/edit#).
I tried to use the [Flutter Intl plugin for IntelliJ](https://plugins.jetbrains.com/plugin/13666-flutter-intl) but it creates ARB files in a completely different location and it simply ignores the configuration in `l10n.yaml`. The most useful part of this plugin that I would love to see replicated in the native Flutter plugin is an intention action that lets me add an entry to my ARB files from a dart file, similar to what "Internationalize" does in Java for example.
It would:
- open a dialog that lets me specify a description for my messsage, as well as a key
- detect if there are any placeholders in the string I want to internationalize and let me select their type and specify an example
- if type is DateTime, int or double, let me choose a format and specify potential parameters
- replace the raw string in my dart file with `AppLocalizations.of(context).key(args)`, taking the configuration in `l10n.yaml `into account
- add the `app_localizations.dart` import if it's missing
Additionally, if it contained an ARB editor that lets me see translations in a table instead of having to open all my ARB files side by side, that would be perfect (similar to the translation editor for Android native projects).
Contributor guide
Research direction
Start by reading the linked internationalization process and the Flutter Intl plugin behavior described in the issue, then inspect how the IntelliJ plugin handles Dart files, l10n.yaml, ARB files, and imports. The intended result includes an intention action that updates the Dart string and ARB files, plus an optional table-based ARB editor; the issue does not name existing source files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, java
- Domain
- internationalization, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100