Closed aliyazdi75 closed 4 years ago
hey @aliyazdi75 are you running the latest flutter master channel? I've run into similar problems before a flutter pub get
can sometimes fix this.
Hello @rami-a , Its' running under beta channel, because of flutter web. Should I change to master channel? and I used flutter pub get
before this command.
Yes, it's possible that beta channel does not have the latest version of the gen_l10n.dart script that we use. I suggest trying on master channel and seeing if it works. You can then go back to the beta channel if you'd like.
@rami-a Here's my flutter doctor on master channel:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.15.4-pre.84, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 3.5)
[✓] Connected device (3 available)
• No issues found!
and failed with same error, and i'm wondered that gallery has many errors on master channel!
Interesting, could you provide some more context around what you're trying to accomplish?
Additionally, I've found that running flutter pub get
from within the main flutter repo directory under packages/flutter
can help.
cc @shihaohong who worked on the gen_l10n tool
I want to use this command in my own project to convert .arb files to .xml files for translation consumption, but I have same issue. It's not necessary and I'll be waiting for @shihaohong 's response. Thank you.
@aliyazdi75 Hi, could you provide some more context with the issue you're facing? Are you running into this issue with just your own project, or with the gallery as well?
From the error message shared in the first comment, it seems like the flutter repo's dependencies are not available to you, so try running flutter update-packages
in the flutter/flutter
repo.
Hey @shihaohong , thanks for your response.
flutter update-packages
in ~/flutter/packages/flutter
fixed this problem.
I really appreciate that for this tool.
No problem! I'm glad you resolved the issue :)
Hello again @shihaohong
After upgrading flutter under master seems intl_en.arb
is must, cause of
flutter pub run grinder l10n
->
fatal: Arb file for a fallback, en, does not exist, even though
the following locale(s) exist: [en_AU, en_CA, en_GB, en_IE, en_IN, en_NZ, en_SG, en_US, en_ZA].
When locales specify a script code or country code, a
base locale (without the script code or country code) should
exist as the fallback. Please create a {fileName}_en.arb
file.
and have to implement all translation phrase for all supported languages.
Hi @aliyazdi75, this is a new requirement since we would like developers to support fallbacks for their languages. For example, if en_AU
was selected on your device, but you did not have a set of translations for en_AU
, your app would automatically default to en
.
Also, please file an issue through flutter/flutter in the future instead of revisiting this one, since this tool is being developed there and not as part of the flutter gallery. If there is an issue in the gallery, you might want to create a new issue as well since this is unrelated to the original issue.
I want to make sure we're keeping the issue tracking clean between the projects and make sure only the right people are notified of these issues :) Thank you!
Thanks for your response. @shihaohong
I did fix this, but a huge problem is for example if you did not implement fa
translation you can't compile program cause of LocalizationsFa extends Localizations
and must implement all translation under this class.
Is this right?
If this is right I will provide an issue under flutter/flutter.
Yes, that is correct, and is expected behavior unless I'm misunderstanding. Please file an issue under flutter/flutter if there is a problem!
Thanks for your time, I've created an issue in flutter repository in this link.
@aliyazdi75 Hi, could you provide some more context with the issue you're facing? Are you running into this issue with just your own project, or with the gallery as well?
From the error message shared in the first comment, it seems like the flutter repo's dependencies are not available to you, so try running
flutter update-packages
in theflutter/flutter
repo.
It helped me resovle the same error. thanks for the help
->
flutter pub run grinder l10n
Output;