Add translation tool scripts
This commit is contained in:
parent
62a4bec18c
commit
762a3b2655
8 changed files with 432 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Make phrase diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "make_phrase_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("a1_make_phrase_diff.log"):
|
||||
os.remove("a1_make_phrase_diff.log")
|
||||
shutil.copy("log.log", "a1_make_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "a1_make_phrase_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Merge phrase diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "merge_phrase_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("a2_merge_phrase_diff.log"):
|
||||
os.remove("a2_merge_phrase_diff.log")
|
||||
shutil.copy("log.log", "a2_merge_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "a2_merge_phrase_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Make words diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "make_words_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("b1_make_words_diff.log"):
|
||||
os.remove("b1_make_words_diff.log")
|
||||
shutil.copy("log.log", "b1_make_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "b1_make_words_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Merge words diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "merge_words_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("b2_merge_words_diff.log"):
|
||||
os.remove("b2_merge_words_diff.log")
|
||||
shutil.copy("log.log", "b2_merge_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "b2_merge_words_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Make string diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "make_string_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("c1_make_string_diff.log"):
|
||||
os.remove("c1_make_string_diff.log")
|
||||
shutil.copy("log.log", "c1_make_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "c1_make_string_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Merge string diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "merge_string_diff" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("c2_merge_string_diff.log"):
|
||||
os.remove("c2_merge_string_diff.log")
|
||||
shutil.copy("log.log", "c2_merge_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "c2_merge_string_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Make botnames diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("d1_make_botnames_diff.log"):
|
||||
os.remove("d1_make_botnames_diff.log")
|
||||
shutil.copy("log.log", "d1_make_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "d1_make_botnames_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# \author Jan Boon (Kaetemi)
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2014 by authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import time, sys, os, shutil, subprocess, distutils.dir_util
|
||||
sys.path.append("../configuration")
|
||||
from scripts import *
|
||||
from buildsite import *
|
||||
from tools import *
|
||||
os.chdir(TranslationDirectory)
|
||||
if os.path.isfile("log.log"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Merge botnames diff")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix)
|
||||
try:
|
||||
subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
printLog(log, "")
|
||||
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("d2_merge_botnames_diff.log"):
|
||||
os.remove("d2_merge_botnames_diff.log")
|
||||
shutil.copy("log.log", "d2_merge_botnames_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log")
|
||||
shutil.move("log.log", "d2_merge_botnames_diff.log")
|
||||
|
||||
raw_input("PRESS ANY KEY TO EXIT")
|
Loading…
Reference in a new issue