LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

po4a-gettextize

Extract translatable strings to PO files

TLDR

TLDR

Convert a text file to PO format
$ po4a-gettextize --format [text] --master [path/to/master.txt] --po [path/to/result.po]
copy
List all available formats
$ po4a-gettextize --help-format
copy
Convert a text file along with a translated document to a PO file
$ po4a-gettextize --format [text] --master [path/to/master.txt] --localized [path/to/translated.txt] --po [path/to/result.po]
copy

SYNOPSIS

po4a-gettextize [options] -f format -m master -p po

DESCRIPTION

po4a-gettextize extracts translatable strings from a documentation file and creates a PO (Portable Object) file suitable for translation. It is part of the po4a (PO for anything) suite that enables using gettext methodology for documentation translation.If an existing translation is provided with the -l option, the tool attempts to match translated strings with the original and pre-populate the PO file with existing translations.

PARAMETERS

-f, --format _format_

Format of the master document (text, pod, man, sgml, xml, etc.)
-m, --master _file_
Path to the original (master) document
-p, --po _file_
Output path for the generated PO file
-l, --localized _file_
Existing translation (can be specified multiple times)
--help-format
List available document formats
-M, --master-charset _charset_
Character set of the master document
-L, --localized-charset _charset_
Character set of the localized document

INSTALL

sudo dnf install po4a
copy
sudo pacman -S po4a
copy
sudo apk add po4a
copy
sudo zypper install po4a
copy
brew install po4a
copy
nix profile install nixpkgs#po4a
copy

CAVEATS

The output PO file should be reviewed by translators as automatic matching may not be perfect. When providing an existing translation, both documents must have the same structure for proper alignment.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid