generate_language_files.sh 597 B

1234567891011121314151617181920212223242526
  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 clean
  9. flutter packages pub get
  10. echo "Specifying source directory for AppFlowy Localizations."
  11. dart run easy_localization:generate -S assets/translations/
  12. echo "Generating language files for AppFlowy."
  13. dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
  14. echo "Done generating language files."
  15. # Return to the original directory
  16. cd "$original_dir"