-
Tae Hyung Kim authored
Refactor "gen-l10n" command to use same code path when "l10n.yaml" is present or not present (#125429) I think this is a long needed change to the `gen-l10n` command. Essentially, the arguments to `flutter gen-l10n` can be provided by two different methods: via command line arguments or via the `l10n.yaml` file. The existence of a `l10n.yaml` file causes the latter approach to take precedence. However, currently, there's several differences in how the two approaches are handled, and most of the default arguments are all over the place, causing unexpected issues such as #120457 or #120023. This PR refactors the command so that * `LocalizationOptions` are more consistent with the actual argument names/yaml options. * All default values are determined in `LocalizationOptions`'s constructor (or in `argParser.addOption(...)` in the case a boolean value needs to be explicitly true). * New `parseLocalizationsOptionsFromCommand` function to parse arguments. * Parse `LocalizationOptions` at the beginning of `runCommand()` and pass it to `generateLocalizations`. Fixes #120023.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
commands.shard | ||
data | ||
general.shard | ||
host_cross_arch.shard | ||
integration.shard | ||
src | ||
web.shard |