Tags within translated strings are removed in message_en.dart
Closed this issue · 4 comments
I have the following string in intl_en.arb "By continuing, you agree to our\n<l>Terms of Service</l> and <l>Privacy Policy</l>."
After I run flutter pub run intl_utils:generate, the string in message_en.dart becomes MessageLookupByLibrary.simpleMessage("By continuing, you agree to our\n").
I can manually modify the string in simpleMessage by adding the rest of the line to get it to work. However, this wouldn't be a feasible long term work around. It used to generate fine.
Any idea what happened?
Something I noticed just now is if the entire string was wrapped with a tag i.e. "<t>By continuing, you agree to our\n<l>Terms of Service</l> and <l>Privacy Policy</l>.</t>". Then the resulting simpleMessage is generated fine.
Hi @calvin-verticalscope,
Thanks for reporting this!
It seems that this issue appeared within the intl_utils 2.2.0
(probably related to the last parser changes). We will try to release the fix for it in one of the upcoming releases.
In the meantime, you can use the intl_utils 2.1.0
as an alternative.
Hi @calvin-verticalscope,
The issue is fixed with the latest version of the intl_utils
package (2.4.0
).
I am closing this issue now.
In case of any new problems, please open a new issue.