You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add tasks/commands for generation of the l10n from the .arb files #3949
Is your feature request related to a problem? Please describe.
We always have to manually generate/regenerate the .arb files with a command in the terminal whenever we edit them, or we clone/pull a project.
Describe the solution you'd like
Like the task in pubspec.yaml that auto runs the command flutter pub get when we save it, I'd like to auto run the command flutter gen-l10n every time I save my .arb files. And probably also an icon at the top right of .arb files that does the same, again like the pubspec.yaml. Also, running this command whenever we clone/pull a project (like it does with flutter pub get) would be nice.
Describe alternatives you've considered
Using the command flutter gen-l10n in the terminal everytime we edit .arb files, or clone/pull a project.
I've added a new Task and Command (Flutter: Generate Localizations) for this. It'll also show up in the context menu for .arb files (in both explorer and the editor) and in the menu bar when editing a .arb file.
I haven't yet added support to run it on-save, I've split that into #3993.
changed the title [-]Automatic task for generation of the l10n from the .arb files[/-][+]Add taskd/commands for generation of the l10n from the .arb files[/+]on May 26, 2022
changed the title [-]Add taskd/commands for generation of the l10n from the .arb files[/-][+]Add tasks/commands for generation of the l10n from the .arb files[/+]on May 26, 2022
In the next release, #3993 adds a new setting that works similar to hot-reload-on-save that will trigger the built-in Flutter: Generate Localizations command:
Activity
DanTup commentedon May 26, 2022
I've added a new Task and Command (Flutter: Generate Localizations) for this. It'll also show up in the context menu for
.arbfiles (in both explorer and the editor) and in the menu bar when editing a.arbfile.I haven't yet added support to run it on-save, I've split that into #3993.
[-]Automatic task for generation of the l10n from the .arb files[/-][+]Add taskd/commands for generation of the l10n from the .arb files[/+][-]Add taskd/commands for generation of the l10n from the .arb files[/-][+]Add tasks/commands for generation of the l10n from the .arb files[/+]hyungtaecf commentedon May 30, 2022
I added the Run On Save plugin on VS Code, and then added the following settings to VS Code's settings.json:
It works perfectly. 👍
DanTup commentedon Jun 22, 2022
In the next release, #3993 adds a new setting that works similar to hot-reload-on-save that will trigger the built-in Flutter: Generate Localizations command:
Add a new task/command to generate localizations