Closed DaleLaw closed 6 months ago
Describe the bug When using a linked translation in conjunction with an enum linked translation, the former unexpectedly generates parentheses. This leads to a syntax error in the strings.g.dart file, preventing it from being compiled.
hello: "Hello" gender(context=Gender): { male: "male", female: "female" } hello_gender: "@:hello, @:gender"
strings.18n.yaml
String get hello => 'Hello'; String gender({required Gender context}) { switch (context) { case Gender.male: return 'male'; case Gender.female: return 'female'; } } String hello_gender({required Gender context}) => '${_root.hello()}, ${_root.gender(context: context)}';
strings.g.dart
Expected behavior It should generate _root.hello instead of _root.hello()
_root.hello
_root.hello()
Fixed in v3.28.0
v3.28.0
Describe the bug When using a linked translation in conjunction with an enum linked translation, the former unexpectedly generates parentheses. This leads to a syntax error in the strings.g.dart file, preventing it from being compiled.
strings.18n.yaml
strings.g.dart
Expected behavior It should generate
_root.hello
instead of_root.hello()