MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / __init__

Method __init__

python/translate.py:14–30  ·  view source on GitHub ↗
(self, pro_file)

Source from the content-addressed store, hash-verified

12
13class Translate:
14 def __init__(self, pro_file):
15 self._dir_path = os.path.dirname(os.path.realpath(pro_file))
16 self._translator = Translator()
17
18 with open(pro_file) as f:
19 splits = re.split(' |\n|=', f.read())
20
21 self._ts_files = []
22 for split in splits:
23 if len(split) > 3:
24 if ".ts" == split[-3:]:
25 ts_path = os.path.join(self._dir_path, split)
26 with open(ts_path) as f:
27 content = f.read()
28 todo = content.count('<translation type="unfinished"></translation>')
29 if todo > 0:
30 self._ts_files.append(ts_path)
31
32 async def runner(self):
33 tasks = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected