update_all.py 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import os
  2. import sys
  3. import subprocess
  4. languages = ["ca", "cs", "de", "en", "es", "fr", "hu", "it", "ja", "ko", "ko_KR", "nl", "pl", "pt_BR", "ru", "tr", "uk", "zh_CN", "zh_TW_copy"];
  5. print(sys.getrecursionlimit())
  6. for lang in languages:
  7. # if 'y' != input("translating "+lang+"? (y/n): "):
  8. # continue
  9. # create .po
  10. #os.system("msgunfmt "+lang+"/Slic3r.mo -o "+lang+"/SuperSlicer.po > nul");
  11. #os.system("copy ..\\loc\\"+lang+"\\*.po "+lang+"\\PrusaSlicer.po");
  12. # file_out_stream = open(lang+"/settings.ini", mode="w", encoding="utf-8");
  13. # file_out_stream.write("data = ./PrusaSlicer.po\n");
  14. # file_out_stream.write("ui_dir = ../../ui_layout\n");
  15. # file_out_stream.write("ignore_case = true\n");
  16. # file_out_stream.write("input = ../Slic3r.pot\n");
  17. # file_out_stream.write("todo = ./todo.po\n");
  18. # file_out_stream.write("output = ./Slic3r.po\n");
  19. # # flush
  20. # file_out_stream.close();
  21. p = subprocess.Popen(["python","../pom_merger.py"], cwd=lang);
  22. p.wait();
  23. # for file in os.listdir(lang):
  24. # if not file.endswith("Slic3r.po"):
  25. # os.remove(lang + "/" + file);
  26. # #create .mo
  27. # os.system("msgfmt "+lang+"/SuperSlicer.po -o "+lang+"/SuperSlicer.mo");
  28. # #msgfmt Slic3r.po -o Slic3r.mo