PO4A-UPDATEPO.1P(1)
π NAME π
po4a-updatepo β bestie, this is the lil script that updates your translation files (in PO format) so they match the docs you're translating β¨
πΈ SYNOPSIS πΈ
po4a-updatepo -f fmt (-m master.doc)+ (-p XX.po)+
okay so real talk about the direction of traffic here: XX.po are the outputs, literally every other thing is an input. iykyk π«Ά
π¦ DESCRIPTION π¦
So the whole po4a (that's "PO for anything") project exists to make translations β and honestly more importantly, the maintenance of translations β way easier by using gettext tools on stuff nobody ever expected them to touch. Like documentation. Iconic behavior tbh π
po4a-updatepo is the main character that keeps your PO files caught up with whatever chaos happened to the original documentation file. The way it does this: it converts the doc file into a POT file, then calls msgmerge(1) on that shiny new POT plus the PO files you handed it. Slay.
And yes, you can absolutely feed it more than one PO file (if you want to update several languages at once, go off), and also several documentation files (if you want the translations of several docs living together in the same PO file β one big happy family π).
Oh and important: if the master document has non-ASCII characters, this script will convert the PO files to UTF-8 (if they weren't already), so non-standard characters get handled transparently. no cap, it just works π§
β¨ OPTIONS β¨
-f,--formatβ the format of the documentation you want to handle. Not sure what's available? Use the--help-formatoption to see all the formats on the menu π-m,--masterβ the file(s) containing the master document you want translated.-M,--master-charsetβ the charset of the files containing the doc to translate. heads up: all files must have the same charset, no mixing π-p,--poβ the PO file(s) to update. And if they don't exist yet? Cute,po4a-updatepojust creates them for you π-o,--optionβ extra option(s) to pass to the format plugin. Each plugin's docs have the full tea on valid options and what they mean. For example, you could pass-o tablecellsto the AsciiDoc parser, while the text parser would accept-o tabs=split.--no-previousβ this one removes--previousfrom the options passed tomsgmerge. It's the vibe for supporting old gettext versions (before v0.16).--previousβ this adds--previousto the options passed tomsgmerge. It requires gettext 0.16 or later, and it's activated by default β--msgmerge-optoptions β extra options formsgmerge(1).-h,--helpβ show a short help message.--help-formatβ list all the documentation formats po4a understands π-V,--versionβ display the version of the script and dip.-v,--verboseβ crank up the verbosity, if you want the program to talk more.-d,--debugβ output some debugging info, for when you gotta inspect the vibes π--porefstype[,wrap|nowrap] β specify the reference format. The type argument can be one of:neverto not produce any reference at all,fileto only specify the file without the line number,counterto replace the line number with an increasing counter, andfullto include complete references (default:full).
The argument can also be followed by a comma and either the wrap or nowrap keyword. References are written on a single line by default. The wrap option wraps references onto several lines, to mimic gettext tools (xgettext and msgmerge). This option will become the default in a future release, because it is more sensible. The nowrap option exists so that users who want to keep the old behavior can do so π«Ά
--wrap-pono|newlines|number (default: 76) β specify how the po file should be wrapped. This is the eternal choice between files that are nicely wrapped but could lead to git conflicts, or files that are easier to handle automatically but harder for humans to read π
Historically, the gettext suite has reformatted the po files at the 77th column for cosmetics. This option specifies po4a's behavior. If set to a numerical value, po4a will wrap the po file after this column and after newlines in the content. If set to newlines, po4a will only split the msgid and msgstr after newlines in the content. If set to no, po4a will not wrap the po file at all. The wrapping of the reference comments is controlled by the --porefs option.
ngl, note that this option has no impact on how the msgid and msgstr are wrapped, i.e. on how newlines are added to the content of these strings. Don't come for me, it's literally in the spec π
--msgid-bugs-addressemail@address β set the report address for msgid bugs. By default, the created POT files have noReport-Msgid-Bugs-Tofields.--copyright-holderstring β set the copyright holder in the POT header. The default value is"Free Software Foundation, Inc."--package-namestring β set the package name for the POT header. The default is"PACKAGE".--package-versionstring β set the package version for the POT header. The default is"VERSION".
π₯ SEE ALSO π₯
po4a-gettextize(1), po4a-normalize(1), po4a-translate(1), po4a(7)
go read them, bestie, they're all part of the same little family π
π AUTHORS π
- Denis Barbier
<barbier@linuxfr.org> - Nicolas FranΓ§ois
<nicolas.francois@centraliens.net> - Martin Quinson (mquinson#debian.org)
legends, honestly π«‘
π COPYRIGHT AND LICENSE π
Copyright 2002-2023 by SPI, inc.
This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).
okay that's the whole page!! this was brought to you by the perl v5.42.0 girlies and dated 2025-07-13, live from the PO4A-UPDATEPO.1P(1) section of the manual β mwah, go update those PO files, you're gonna ate π
π
π¦ where this page comes from
- alpine 3.23: po4a-doc 0.74-r0 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms