Convert a text file along with a translated document to a PO file (-l option can be provided multiple times)

po4a-gettextize

po4a-gettextize --format {{text}} --master {{path/to/master.txt}} --localized {{path/to/translated.txt}} --po {{path/to/result.po}}

click the source code to copy install po4a-gettextize on any operating system with command-not-found.com