for o, a in myopts: if o == '-i':
ifile = a
elif o == '-o':
ofile = a
with open(ofile, "a") as output:
input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, "-o", "-"], encoding="UTF-8")
po = polib.pofile(input) if len(po) != 0:
print("", file=output) for entry in po: # skip 'stock' entries like "cancel", "help", "ok", etc # l10ntools/source/localize.cxx will insert one entry for each stock per .po if entry.msgctxt == "stock": continue try:
keyid = entry.msgctxt + '|' + entry.msgid
except Exception:
print(f"There is a problem with the translatable string labeled \"{entry.msgid}\". Likely no context attribute has been specified.")
sys.exit(2)
print('#. ' + polib.genKeyId(keyid), file=output) for i, occurrence in enumerate(entry.occurrences):
entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1]
print(entry, file=output)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.