generate_language_files.cmd 869 B

1234567891011121314151617181920212223242526272829
  1. @echo off
  2. echo 'Generating language files'
  3. REM Store the current working directory
  4. set "original_dir=%CD%"
  5. REM Change the current working directory to the script's location
  6. cd /d "%~dp0"
  7. cd ..\..\..\appflowy_flutter
  8. REM copy the resources/translations folder to
  9. REM the appflowy_flutter/assets/translation directory
  10. echo Copying resources/translations to appflowy_flutter/assets/translations
  11. xcopy /E /Y /I ..\resources\translations assets\translations
  12. call flutter packages pub get
  13. echo Specifying source directory for AppFlowy Localizations.
  14. call dart run easy_localization:generate -S assets/translations/
  15. echo Generating language files for AppFlowy.
  16. call dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
  17. echo Done generating language files.
  18. REM Return to the original directory
  19. cd /d "%original_dir%"