.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MSGUNTYPOT 1p" .TH MSGUNTYPOT 1p "2020-08-19" "Po4a Tools" "Po4a Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" msguntypot \- update PO files when a typo is fixed in POT file .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmsguntypot\fR \fB\-o\fR \fIold_pot\fR \fB\-n\fR \fInew_pot\fR \fIpofiles\fR ... .SH "DESCRIPTION" .IX Header "DESCRIPTION" When you fix a trivial error which surely doesn't affect translations (e.g. a typo) in a \s-1POT\s0 file, you should unfuzzy the corresponding msgstr in the translated \s-1PO\s0 files to avoid so extra work to the translators. .PP This task is difficult and error prone when done manually, and this tool is there to help doing so correctly. You just need to provide the two versions of the \s-1POT\s0 file: before the edition and after as marked in the above synopsis, and it all becomes automatic. .SH "HOW TO USE IT" .IX Header "HOW TO USE IT" In short, when you discover a typo in one of your [english] message, do the following: .IP "\- Regenerate your \s-1POT\s0 and \s-1PO\s0 files." 4 .IX Item "- Regenerate your POT and PO files." .Vb 3 \& make \-C po/ update\-po # for message program translations \& debconf\-updatepo # for debconf translations \& po4a po4a.conf # for po4a based documentation translations .Ve .Sp or something else, depending on your project's building settings. You know how to make sure your \s-1POT\s0 and \s-1PO\s0 files are uptodate, don't you?? .IP "\- Make a copy of your \s-1POT\s0 file." 4 .IX Item "- Make a copy of your POT file." .Vb 1 \& cp myfile.pot myfile.pot.orig .Ve .IP "\- Make a copy of all your \s-1PO\s0 files." 4 .IX Item "- Make a copy of all your PO files." .Vb 1 \& mkdir po_fridge; cp *.po po_fridge .Ve .IP "\- Fix your typo." 4 .IX Item "- Fix your typo." \&\f(CW$EDITOR\fR the_file_in_which_there_is_a_typo .IP "\- Regenerate your \s-1POT\s0 and \s-1PO\s0 files." 4 .IX Item "- Regenerate your POT and PO files." See above. .PP At this point, the typo fix fuzzied all the translations, and this unfortunate change is the only one between the \s-1PO\s0 files of your main directory and the one from the fridge. Here is how to solve this. .IP "\- Discard fuzzy translation, restore the ones from the fridge." 4 .IX Item "- Discard fuzzy translation, restore the ones from the fridge." .Vb 1 \& cp po_fridge/*.po . .Ve .IP "\- Manually merge the \s-1PO\s0 files with the new \s-1POT\s0 file, but taking the useless fuzzy into account." 4 .IX Item "- Manually merge the PO files with the new POT file, but taking the useless fuzzy into account." .Vb 1 \& msguntypot \-o myfile.pot.orig \-n myfile.pot *.po .Ve .IP "\- Cleanups." 4 .IX Item "- Cleanups." .Vb 1 \& rm \-rf myfile.pot.orig po_fridge .Ve .PP You're done. The typo was eradicated from msgstr of both your \s-1POT\s0 and \s-1PO\s0 files, and the \s-1PO\s0 files were not fuzzyied in the process. Your translators love you already. .SH "SEE ALSO" .IX Header "SEE ALSO" Despite its name, this tool is not part of the gettext tool suite. It is instead part of po4a. More precisely, it's a random Perl script using the fine po4a modules. For more information about po4a, please see: .PP \&\fBpo4a\fR\|(7) .SH "AUTHORS" .IX Header "AUTHORS" .Vb 1 \& Martin Quinson (mquinson#debian,org) .Ve .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2005 by \s-1SPI,\s0 inc. .PP This program is free software; you may redistribute it and/or modify it under the terms of \s-1GPL\s0 (see the \s-1COPYING\s0 file).