generate_language_files.sh 582 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. echo "Generating language files"
  3. # Store the current working directory
  4. original_dir=$(pwd)
  5. cd "$(dirname "$0")"
  6. # Navigate to the project root
  7. cd ../../../appflowy_flutter
  8. flutter packages pub get
  9. echo "Specifying source directory for AppFlowy Localizations."
  10. dart run easy_localization:generate -S assets/translations/
  11. echo "Generating language files for AppFlowy."
  12. dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
  13. echo "Done generating language files."
  14. # Return to the original directory
  15. cd "$original_dir"