1. 26 Apr, 2023 1 commit
    • Tae Hyung Kim's avatar
      Refactor "gen-l10n" command to use same code path when "l10n.yaml" is present... · 5c44b1df
      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.
      5c44b1df
  2. 25 Apr, 2023 1 commit
    • Tae Hyung Kim's avatar
      Handle dollar signs properly when generating localizations (#125514) · 8be335f2
      Tae Hyung Kim authored
      Currently, the code doesn't properly handle strings which contain dollar signs. The return expression for the generated localization function is computed by `generateReturnExpr` which concatenates several strings, which are either interpolated placeholders, interpolated function calls, or normal strings, but we didn't properly escape dollar signs before sending normal strings to `generateReturnExpr`.
      
      Fixes #125461.
      8be335f2
  3. 22 Mar, 2023 2 commits
  4. 23 Jan, 2023 1 commit
  5. 11 Dec, 2022 1 commit
  6. 30 Nov, 2022 1 commit
    • Tae Hyung Kim's avatar
      [gen_l10n] Improvements to `gen_l10n` (#116202) · 7802c7ac
      Tae Hyung Kim authored
      * init
      
      * fix tests
      
      * fix lint
      
      * extra changes
      
      * oops missed some merge conflicts
      
      * fix lexer add tests
      
      * consistent warnings and errors
      
      * throw error at the end
      
      * improve efficiency, improve code generation
      
      * fix
      
      * nit
      
      * fix test
      
      * remove helper method class
      
      * two d's
      
      * oops
      
      * empty commit as google testing won't pass :(
      7802c7ac
  7. 29 Nov, 2022 1 commit
  8. 05 Nov, 2022 1 commit
    • Tae Hyung Kim's avatar
      ICU Message Syntax Parser (#112390) · cef4c2aa
      Tae Hyung Kim authored
      * init
      
      * code generation
      
      * improve syntax error, add tests
      
      * add tests and fix bugs
      
      * code generation fix
      
      * fix all tests :)
      
      * fix bug
      
      * init
      
      * fix all code gen issues
      
      * FIXED ALL TESTS :D
      
      * add license
      
      * remove trailing spaces
      
      * remove print
      
      * tests fix
      
      * specify type annotation
      
      * fix test
      
      * lint
      
      * fix todos
      
      * fix subclass issues
      
      * final fix; flutter gallery runs
      
      * escaping for later pr
      
      * fix comment
      
      * address PR comments
      
      * more
      
      * more descriptive errors
      
      * last fixes
      cef4c2aa
  9. 19 Aug, 2022 1 commit
  10. 24 Apr, 2022 1 commit
  11. 02 Feb, 2022 1 commit
  12. 08 Oct, 2021 3 commits
  13. 30 Jun, 2021 1 commit
  14. 28 Jun, 2021 1 commit
  15. 27 Jun, 2021 1 commit
  16. 01 Jun, 2021 1 commit
  17. 30 Mar, 2021 1 commit
  18. 24 Mar, 2021 1 commit
  19. 27 Jan, 2021 1 commit
  20. 05 Jan, 2021 1 commit
  21. 31 Oct, 2020 1 commit
  22. 26 Oct, 2020 1 commit
  23. 21 Oct, 2020 2 commits
  24. 12 Oct, 2020 1 commit
  25. 03 Sep, 2020 1 commit
  26. 08 Apr, 2020 1 commit
  27. 06 Apr, 2020 1 commit
  28. 01 Apr, 2020 1 commit
  29. 26 Mar, 2020 1 commit
  30. 17 Mar, 2020 1 commit
  31. 05 Feb, 2020 1 commit
  32. 31 Jan, 2020 2 commits
  33. 28 Jan, 2020 1 commit
  34. 24 Jan, 2020 1 commit
  35. 07 Jan, 2020 1 commit