Content-Length: 285761 | pFad | https://github.com/flutter/flutter/issues/110714

6C [flutter_tools] Adding new localization file (.arb) does not generate localizations on hot reload · Issue #110714 · flutter/flutter · GitHub
Skip to content

[flutter_tools] Adding new localization file (.arb) does not generate localizations on hot reload #110714

@thkim1011

Description

@thkim1011

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

  1. Create new Flutter project flutter create hot_reload_bug.
  2. Create empty l10n.yaml or cd hot_reload_bug && touch l10n.yaml.
  3. 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
  1. Add a file lib/l10n/app_en.arb with
{
    "@@locale": "en",
    "helloWorld": "Hello World!",
    "@helloWorld": {
      "description": "The conventional newborn programmer greeting"
    }
}
  1. Run the app with flutter run. This will generate .flutter_tool/flutter_gen/gen_l10n/app_localizations.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: internationalizationSupporting other languages or locales. (aka i18n)t: hot reloadReloading code during "flutter run"team-toolOwned by Flutter Tool teamtoolAffects 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.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/flutter/flutter/issues/110714

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy