def srt_from_po(po_path, src_srt, out_srt): po = polib.pofile(po_path) src = open(src_srt, encoding='utf-8').read().splitlines() out = [] i = 0 while i < len(src): line = src[i].strip() # Capture index line if line.isdigit(): out.append(line) # index i += 1 out.append(src[i]) # timing line i += 1 # Caption text (could be multiple lines until empty line) caption = [] while i < len(src) and src[i].strip(): caption.append(src[i]) i += 1 # Build msgid from original caption (joined with '\n') msgid = "\n".join(caption) entry = po.find(msgid) if entry and entry.msgstr: out.append(entry.msgstr) else: out.append(msgid) # fallback to source out.append("") # blank line i += 1 open(out_srt, 'w', encoding='utf-8').write("\n".join(out))
In your site’s discussion settings, add "türkçe altyazılı" and related terms to your "Comment Blacklist" or "Disallowed Keys" list. Enable CAPTCHA:
#: episode02.srt:45 msgid "You have %d new messages." msgstr "Yeni %d mesajın var."