mirror of
https://github.com/WeblateOrg/weblate.git
synced 2026-07-31 08:54:54 +08:00
16 lines
366 B
Python
Executable file
Vendored
16 lines
366 B
Python
Executable file
Vendored
#!/usr/bin/env python3
|
|
# Remove wrapping from the po files
|
|
# Depends on latest translate-toolit
|
|
|
|
import sys
|
|
|
|
from translate.storage.pypo import pofile
|
|
|
|
storage = pofile.parsefile(sys.argv[1])
|
|
storage.wrapper.width = -1
|
|
for unit in storage.units:
|
|
if not unit.istranslatable():
|
|
continue
|
|
if unit.target:
|
|
unit.target = unit.target
|
|
storage.save()
|