Skip to content
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

Why are these files being created in the Android APK? #540

Open
tim-eucalyptus opened this issue Dec 9, 2022 · 3 comments
Open

Why are these files being created in the Android APK? #540

tim-eucalyptus opened this issue Dec 9, 2022 · 3 comments

Comments

@tim-eucalyptus
Copy link

Our real localization files are in assets/locale and we have 8 of them. However there are 4 other json files that are not in our source folder ANYWHERE. How can they be getting in the final APK? Any ideas? Is it coming from some 3rd party library perhaps?

From APK explorer:

Screen Shot 2022-12-09 at 4 23 21 PM

  • en.json
  • en-US.json
  • ar.json
  • ar-DZ.json
{
  "test": "test",
  "day": {
    "zero": "{} days",
    "one": "{} day",
    "two": "{} days",
    "few": "{} few days",
    "many": "{} many days",
    "other": "{} other days"
  },
  "hat": {
    "zero": "no hats",
    "one": "one hat",
    "two": "two hats",
    "few": "few hats",
    "many": "many hats",
    "other": "other hats"
  },
  "hat_other": {
    "other": "other hats"
  }
}
@dJani97
Copy link

dJani97 commented Jan 26, 2023

They are part of easy_localization's code for some reason:

https://github.com/aissat/easy_localization/tree/develop/i18n

@tim-eucalyptus
Copy link
Author

Good find! and referenced here: https://github.com/aissat/easy_localization/blob/develop/pubspec.yaml

and that's why they get packaged. I propose removing this from that file:

flutter:
  assets:
    - i18n/

Why would that be needed?

@tim-eucalyptus
Copy link
Author

tim-eucalyptus commented Jan 29, 2023

I did an experiment and the files are needed for easy_localization_widget_test.dart apparently. Too bad they are packaged in the final distributed build.

bw-flagship pushed a commit that referenced this issue Jun 4, 2023
* Fixed: i18n files appear on build: #497  #540

* Changed tests

Test will now work even if the folder i18n is not specified in pubspec.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants