Closed subzero911 closed 3 years ago
Hi @subzero911,
Thanks for reporting this!
I've tried to reproduce this issue with VS Code 1.50.1 and Flutter Intl 1.13.0, but everything works well. 😕
Could you check Output View for Flutter Intl, maybe there is something useful? Also, could you give us more info:
arb_dir
config property)?Output
[project_name] flutter pub get Running "flutter pub get" in project_name... 7,8s exit code 0
VS Code 1.50.1 Flutter Intl 1.13.0 Windows 10 I use lib/l10n folder for arb files No, single project
Hi @subzero911,
I've tried to reproduce this issue again with the same configuration you are using, but without success. On my machine, everything works fine.
Regarding the output you posted above, I'm not sure that is from the Output View for the "Flutter Intl". 😕
Also, could you confirm that the Flutter Intl extension is enabled for your project (check pubspec.yaml
file)?
# pubspec.yaml file with enabled Flutter Intl extension
flutter_intl:
enabled: true
I confirm
I noticed when there is the error, when I click on the l10n.dart
file and open it, error disappears (maybe it rebuilds when I open it).
Interesting 😕
Regarding the Output View for the "Flutter Intl" I mentioned earlier, it contains info that can help us to detect where the problem is. Could you check it again please, as the output you've posted above does not belong to the "Flutter Intl"? 😕
Note that the Flutter Intl extension relies on intl_utils
package for generating localization code.
In case there is nothing in the Output View for the "Flutter Intl", could you check if manual running of intl_utils
generates necessary code?
flutter pub global run intl_utils:generate
@lzoran Output helps me it was because of comma at last input {"":"",}
same problem here but flutter pub global run intl_utils:generate
does not complain, any hint?
Hi @Miamoto-Musashi,
Thanks for reporting this!
Could you give us more details regarding this issue so we can reproduce it (any info is welcome)?
Hi @lzoran turned out is not true that is not generated, the dart file is generated but VScode does not update the references; as a workaround, I keep the l10n.dart
file open and works fine.
Hi @Miamoto-Musashi,
Sorry for the late response.
I've checked the issue you reported, but it seems that everything works well on my machine again. :/ Not sure where the problem might be.
As this issue probably occurs in some specific circumstances, I suggest leaving it open. Maybe we will collect more info about the cause that way.
Also, if someone could provide a minimal reproducible sample, that would help a lot.
@lzoran I have a similar issue, I ran into a problem that for some reason flutter intl stopped generating locales for me. I still use flutter 1.22.6 with dart SDK 2.10.5.
I am using flutter intl for about a year and till this week I had no problems with this.
when I run flutter pub global run intl_utils:generate
I receive many outputs like below.
Failed to precompile intl_utils:generate:
../../../.pub-cache/hosted/pub.dartlang.org/path-1.8.0/lib/path.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.10.
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
^
Hi @bohdan1krokhmaliuk,
I'll check that.
In the meantime, could you check if re-activating intl_utils
solves the problem?
flutter pub global deactivate intl_utils
@lzoran thanks, that helped me
I was recently having this same problem in both VSCode and Android Studio after updating lots of things.
Turns out, closing the IDE, deleting the lib/generated
folder and opening the IDE again fixed the problem temporarily.
It still stops working sometimes and I have to do the same again.
EDIT: OK. now it's not working no matter what I do. I don't know what is going on. Probably something related to the latest updates.
Everything was okay before. But something went wrong after the latest update, and now when I change *.arb files, it doesn't rebuild l10n until I restart the VS Code.