- 18 Jul, 2023 1 commit
-
-
Tae Hyung Kim authored
To preserve backward compatibility with the old parser which would ignore syntax errors, this PR introduces a way to treat the special characters `{` and `}` in the following way: 1. If we encounter a `{` which searching for a string token and this `{` is not followed by a valid placeholder, then we treat the `{` as a string and continue lexing for strings. 2. If we encounter a `}` while not within some expression (i.e. placeholders, arguments, plurals, or selects), then we treat the `}` as a string and continue lexing for strings. This makes it so that ``` "helloWorld": "{ } { placeholder }", "@@helloWorld": { "placeholders": { "placeholder" {} } } ``` treats the `{ }` as a string while `{ placeholder } ` is treated as a placeholder. Fixes https://github.com/flutter/flutter/issues/122404.
-
- 26 Apr, 2023 1 commit
-
-
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.
-
- 25 Apr, 2023 1 commit
-
-
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.
-
- 22 Mar, 2023 2 commits
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-
Christopher Fujino authored
[flutter_tools] toolexit on malformed yaml during gen-l10n
-
- 23 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes * fix after merge conflicts * review
-
- 11 Dec, 2022 1 commit
-
-
Ian Hickson authored
-
- 30 Nov, 2022 1 commit
-
-
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 :(
-
- 29 Nov, 2022 1 commit
-
-
Tae Hyung Kim authored
* init * make more descriptive * fix lint
-
- 05 Nov, 2022 1 commit
-
-
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
-
- 19 Aug, 2022 1 commit
-
-
Tae Hyung Kim authored
* init * fix * fix 2 * fix 3 * tests * fix tests * clarify help text * fix all tests * fix formatting? * add second test * unused import * remove print * trailing spaces * artifacts is never null * fix
-
- 24 Apr, 2022 1 commit
-
-
Alex Li authored
-
- 02 Feb, 2022 1 commit
-
-
Lau Ching Jun authored
-
- 08 Oct, 2021 3 commits
-
-
Ian Hickson authored
-
Zachary Anderson authored
This reverts commit 5fd259be.
-
Ian Hickson authored
-
- 30 Jun, 2021 1 commit
-
- 28 Jun, 2021 1 commit
-
- 27 Jun, 2021 1 commit
-
-
Dan Field authored
-
- 01 Jun, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 30 Mar, 2021 1 commit
-
-
Shi-Hao Hong authored
-
- 24 Mar, 2021 1 commit
-
-
Jenn Magder authored
-
- 27 Jan, 2021 1 commit
-
-
Jonah Williams authored
* opt out the flutter tool * oops EOF * fix import * Update tool_backend.dart * Update daemon_client.dart * fix more
-
- 05 Jan, 2021 1 commit
-
-
Shi-Hao Hong authored
* Reorganize files * Use l10n.yaml instead of command line args
-
- 31 Oct, 2020 1 commit
-
-
Shi-Hao Hong authored
* Fix failing tests from introducing raw string generation in gen_l10n tool
-
- 26 Oct, 2020 1 commit
-
-
Alexandre Ardhuin authored
-
- 21 Oct, 2020 2 commits
-
-
Zachary Anderson authored
This reverts commit ae06c19a.
-
Alexandre Ardhuin authored
-
- 12 Oct, 2020 1 commit
-
-
Jonah Williams authored
HACKTOBERFEST
-
- 03 Sep, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 08 Apr, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 06 Apr, 2020 1 commit
-
-
Alexandre Ardhuin authored
-
- 01 Apr, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 26 Mar, 2020 1 commit
-
-
gaaclarke authored
-
- 17 Mar, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 05 Feb, 2020 1 commit
-
-
Hans Muller authored
-
- 31 Jan, 2020 2 commits
-
-
Alexandre Ardhuin authored
-
Alexandre Ardhuin authored
-
- 28 Jan, 2020 1 commit
-
-
Dan Field authored
-
- 24 Jan, 2020 1 commit
-
-
Alexandre Ardhuin authored
-