-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)t: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
I think this might be happening because globals.buildSystem
doesn't notice new files? Anyways, this seems good to track. I'll try to fix in the next few days.
Steps to Reproduce
- Create new Flutter project
flutter create hot_reload_bug
. - Create empty
l10n.yaml
orcd hot_reload_bug && touch l10n.yaml
. - Add the following to
pubspec.yaml
:
dependencies:
flutter:
sdk: flutter
flutter_localizations: # Add this line
sdk: flutter # Add this line
intl: ^0.17.0 # Add this line
...
flutter:
generate: true # Add this line
- Add a file
lib/l10n/app_en.arb
with
{
"@@locale": "en",
"helloWorld": "Hello World!",
"@helloWorld": {
"description": "The conventional newborn programmer greeting"
}
}
- Run the app with
flutter run
. This will generate.flutter_tool/flutter_gen/gen_l10n/app_localizations
. - Add a new file
app_es.arb
with
{
"@@locale": "es",
"helloWorld": "¡Hola Mundo!"
}
7. Hot reload. This will not generate a new file for Spanish.
Expected Behavior
Creating a new .arb
file and hot reloading should cause localizations to be regenerated.
pakivika
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)t: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team