New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intl_translation:generate_from_arb with wildcard argument doesn't work on Windows #496
Comments
I think the issue is just that on Windows you should use Windows path separators. e.g. the command should use lib*.dart and lib\i18n\stocks_*.arb |
I afraid not. Using backslash results in the same error message:
The command works when no wildcard is used, even with forward slash:
One problem is that passing individual files would not generate a "stock_messages_all.dart" with all discovered locales. This has been tested in PowerShell and ordinary command prompt. |
OK, it appears that the Windows shell is not expanding the wildcard, so we get a literal "*.dart" as the argument passed in to generate_from_arb. What is it that doesn't work if you pass the individual files? I don't have easy access to a Windows machine, but passing in all the files explicitly on a Mac generates the files I'd expect. |
I think I got you now. I tried to execute the command one by one, passing a single file each time. This way, only the locale found in the last executed command would be kept in main import file Just discovered that I can indeed pass a list of files to the command line. I can confirm this works for me:
Thank you very much! |
run the Command in “Git Bash” could solve the problem |
This should be in the docs https://flutter.dev/docs/development/accessibility-and-localization/internationalization#appendix-using-the-dart-intl-tools |
I agree, this should be in the docs. I ran into this issue while moving through the standard introductory documentation. Having a buggy experience getting essential Flutter functionality running for an app was a big turn off as I was experimenting with the framework. |
instead of passing a list of files you can call the wildcard by passing this argument instead.
this worked for me pretty well. |
I also got the same issue.
I wish the input files could ignore (all the files in |
I tried to add glob path parser support for this lib. see dart-archive/intl_translation#92. |
The problem occurs when I am trying to regenerate the i18n files in Flutter's stock example app.
Following the README I run the following command:
On Linux I got:
I suppose this is the expected output.
But on Windows I got:
The text was updated successfully, but these errors were encountered: