3 # \author Jan Boon (Kaetemi)
5 # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
6 # Copyright (C) 2014 by authors
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Affero General Public License as
10 # published by the Free Software Foundation, either version 3 of the
11 # License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
18 # You should have received a copy of the GNU Affero General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 import time
, sys
, os
, shutil
, subprocess
, distutils
.dir_util
23 sys
.path
.append("../configuration")
25 from buildsite
import *
27 os
.chdir(TranslationDirectory
)
28 if os
.path
.isfile("log.log"):
30 log
= open("log.log", "w")
33 printLog(log
, "-------")
34 printLog(log
, "--- Make and merge all translations")
35 printLog(log
, "-------")
36 printLog(log
, time
.strftime("%Y-%m-%d %H:%MGMT", time
.gmtime(time
.time())))
40 TranslationTools
= findTool(log
, ToolDirectories
, TranslationToolsTool
, ToolSuffix
)
42 subprocess
.call([ TranslationTools
, "make_phrase_diff" ])
43 subprocess
.call([ TranslationTools
, "merge_phrase_diff" ])
44 subprocess
.call([ TranslationTools
, "make_clause_diff" ])
45 subprocess
.call([ TranslationTools
, "merge_clause_diff" ])
46 subprocess
.call([ TranslationTools
, "make_words_diff" ])
47 subprocess
.call([ TranslationTools
, "merge_words_diff" ])
48 subprocess
.call([ TranslationTools
, "make_string_diff" ])
49 subprocess
.call([ TranslationTools
, "merge_string_diff" ])
50 subprocess
.call([ TranslationTools
, "clean_string_diff" ])
51 subprocess
.call([ TranslationTools
, "make_r2_string_diff" ])
52 subprocess
.call([ TranslationTools
, "merge_r2_string_diff" ])
53 subprocess
.call([ TranslationTools
, "clean_r2_string_diff" ])
54 subprocess
.call([ TranslationTools
, "clean_words_diff" ])
55 subprocess
.call([ TranslationTools
, "clean_clause_diff" ])
56 subprocess
.call([ TranslationTools
, "clean_phrase_diff" ])
57 subprocess
.call([ TranslationTools
, "make_worksheet_diff", "bot_names.txt" ])
58 subprocess
.call([ TranslationTools
, "merge_worksheet_diff", "bot_names.txt" ])
60 printLog(log
, "<" + processName
+ "> " + str(e
))
65 if os
.path
.isfile("make_merge_all.log"):
66 os
.remove("make_merge_all.log")
67 shutil
.copy("log.log", "make_merge_all_" + time
.strftime("%Y-%m-%d-%H-%M-GMT", time
.gmtime(time
.time())) + ".log")
68 shutil
.move("log.log", "make_merge_all.log")
70 raw_input("PRESS ANY KEY TO EXIT")