some test changes

This commit is contained in:
2023-08-26 20:41:53 +03:00
parent 21a54e1585
commit f6312f7207
3 changed files with 16 additions and 7 deletions

8
main.py Normal file → Executable file
View File

@@ -9,6 +9,7 @@ from lib.translate import translate
# path = "C:\Users\riksl\PycharmProjects\weapon-project-extended"
name = "weapongenerator.lua"
_tmp :str = ""
def _lister(_path) -> list:
@@ -31,7 +32,6 @@ def parsing_file(f):
for _str in _list:
if _str.find('%_t') != -1 or _str.find('%_T') != -1:
print(_str)
_to_translate.append(_str)
return _to_translate
@@ -45,9 +45,9 @@ def parsing_file(f):
for _str in parsing_file(name):
print(_str)
test = re.findall('= "(.*[^/])(?: /\*(.*)\*/)?"%_[t|T]', _str)
time.sleep(5)
print(test)
print(translate(test[0][0]), test[0][0])
_tmp = _tmp + test[0][0] + '\n'
print(translate(_tmp))
def all_to_translate():
pass