Debian Codegraph @

tools/check_translation.py

raw symbols SCIP
1
2 from __future__scip-python python python-stdlib 3.11 __future__/__init__: import print_functionscip-python python python-stdlib 3.11 __future__/print_function.print_function.
3
4 import osscip-python python python-stdlib 3.11 os/__init__:
5
6 locale_dirscip-python python bkchem 0.14.0rc4 `tools.check_translation`/locale_dir. = "../locale"
7
8 for langscip-python python bkchem 0.14.0rc4 `tools.check_translation`/lang. in osscip-python python python-stdlib 3.11 os/__init__:.listdirscip-python python python-stdlib 3.11 os/listdir().( locale_dirscip-python python bkchem 0.14.0rc4 `tools.check_translation`/locale_dir.):
9 printscip-python python python-stdlib 3.11 builtins/print().("-- language:", langscip-python python bkchem 0.14.0rc4 `tools.check_translation`/lang.)
10 filenamescip-python python bkchem 0.14.0rc4 `tools.check_translation`/filename. = osscip-python python python-stdlib 3.11 os/__init__:.pathscip-python python python-stdlib 3.11 os/path..joinscip-python python python-stdlib 3.11 posixpath/abspath().( locale_dirscip-python python bkchem 0.14.0rc4 `tools.check_translation`/locale_dir., langscip-python python bkchem 0.14.0rc4 `tools.check_translation`/lang., 'BKChem.po')
11 try:
12 fscip-python python bkchem 0.14.0rc4 `tools.check_translation`/f. = openscip-python python python-stdlib 3.11 builtins/open().(filenamescip-python python bkchem 0.14.0rc4 `tools.check_translation`/filename., 'r')
13 except IOErrorscip-python python python-stdlib 3.11 builtins/IOError#:
14 printscip-python python python-stdlib 3.11 builtins/print().("Could not open the file %s" % filenamescip-python python bkchem 0.14.0rc4 `tools.check_translation`/filename.)
15 continue
16 msgidscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgid. = ""
17 msgstrscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgstr. = ""
18 iscip-python python bkchem 0.14.0rc4 `tools.check_translation`/i. = 0
19 with fscip-python python bkchem 0.14.0rc4 `tools.check_translation`/f.:
20 for linescip-python python bkchem 0.14.0rc4 `tools.check_translation`/line. in fscip-python python bkchem 0.14.0rc4 `tools.check_translation`/f.:
21 if linescip-python python bkchem 0.14.0rc4 `tools.check_translation`/line..startswithscip-python python python-stdlib 3.11 builtins/str#startswith().( "msgid"):
22 msgidscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgid. = linescip-python python bkchem 0.14.0rc4 `tools.check_translation`/line.
23 elif linescip-python python bkchem 0.14.0rc4 `tools.check_translation`/line..startswithscip-python python python-stdlib 3.11 builtins/str#startswith().( "msgstr"):
24 msgstrscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgstr. = linescip-python python bkchem 0.14.0rc4 `tools.check_translation`/line.
25 if msgstrscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgstr. != 'msgstr ""\n' and msgidscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgid..countscip-python python python-stdlib 3.11 builtins/str#count().("%") != msgstrscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgstr..countscip-python python python-stdlib 3.11 builtins/str#count().("%"):
26 # if msgstr == 'msgstr ""\n', it is not translated
27 printscip-python python python-stdlib 3.11 builtins/print().("!! line %d: %s vs. %s" % (iscip-python python bkchem 0.14.0rc4 `tools.check_translation`/i., msgidscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgid., msgstrscip-python python bkchem 0.14.0rc4 `tools.check_translation`/msgstr.))
28 iscip-python python bkchem 0.14.0rc4 `tools.check_translation`/i. += 1
29