You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
869 B

  1. @echo off
  2. REM Author: Sotiris Papadopoulos
  3. REM Last-Edited: 25/02/2015
  4. REM Script to auto-create a locale file.
  5. REM Usage: build_locale.bat <locale> <locale_file>
  6. REM Example: build_locale.bat gr_GR gr.po
  7. REM To create a new locale file copy youtube_dl_gui.po
  8. REM to a new locale file (e.g. gr.po) edit it with your
  9. REM favorite editor and then run this script.
  10. REM You also need to install gettext for Windows
  11. set FILENAME=youtube_dl_gui
  12. set /a args=0
  13. for %%A in (%*) do set /a args+=1
  14. if not %args% == 2 (
  15. echo Usage: %~n0.bat "locale" "locale_file"
  16. echo Example: %~n0.bat gr_GR gr.po
  17. ) else (
  18. mkdir ..\%FILENAME%\locale\%1\LC_MESSAGES
  19. msgfmt.exe --output-file %FILENAME%.mo %2
  20. move %2 ..\%FILENAME%\locale\%1\LC_MESSAGES\%FILENAME%.po 1>NUL
  21. move %FILENAME%.mo ..\%FILENAME%\locale\%1\LC_MESSAGES\ 1>NUL
  22. tree /F ..\%FILENAME%\locale\%1
  23. echo Done
  24. )