.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 1" .TH MSGUNTYPOT.1P 1 2024-06-26 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH 名稱 .IX Header "名稱" msguntypot \- 更新 PO檔案時, 拼寫錯誤修復在 POT 檔案 .SH 簡介 .IX Header "簡介" \&\fBmsguntypot\fR \fB\-o\fR \fIold_pot\fR \fB\-n\fR \fInew_pot\fR \fIpofiles\fR ... .SH 描述 .IX Header "描述" 當您修復一個無關緊要的錯誤,這肯定不會影響翻譯(例如, 一個拼寫錯誤)在一個 POT 檔案中,你應該解開翻譯的 PO 檔案中對應的 msgstr,以避免如此額外的工作給翻譯。 .PP 此任務在手動完成時很難,容易出錯,並且此工具可以幫助正確完成。你只需要提供兩個版本的 POT 檔案:版本之前和之後,如上述概要中標記,這一切都成為自動的。 .SH 如何使用它 .IX Header "如何使用它" 簡而言之,當您在一條 [english] 訊息中發現拼寫錯誤時,請執行以下操作: .IP "\- 重新生成您的 POT 和 PO 檔案。" 4 .IX Item "- 重新生成您的 POT 和 PO 檔案。" .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 或其他內容,具體取決於專案的構建設定。你知道如何確保你的 POT 和 PO 檔案是最新的,不是嗎? .IP "\- 製作一份 POT 檔案。" 4 .IX Item "- 製作一份 POT 檔案。" .Vb 1 \& cp myfile.pot myfile.pot.orig .Ve .IP "\- 製作所有 PO 檔案的副本。" 4 .IX Item "- 製作所有 PO 檔案的副本。" .Vb 1 \& mkdir po_fridge; cp *.po po_fridge .Ve .IP "\- 修復您的拼寫錯誤。" 4 .IX Item "- 修復您的拼寫錯誤。" \&\f(CW$EDITOR\fR the_file_in_which_there_is_a_typo .IP "\- 重新生成您的 POT 和 PO 檔案。" 4 .IX Item "- 重新生成您的 POT 和 PO 檔案。" 見上文。 .PP 此時,拼寫錯誤修復了所有翻譯的模糊,這個不幸的更改是主目錄的 PO 檔案和冰箱中的唯一一個。下面是解決此問題的方法。 .IP "\- 放棄模糊翻譯,從冰箱恢復。" 4 .IX Item "- 放棄模糊翻譯,從冰箱恢復。" .Vb 1 \& cp po_fridge/*.po . .Ve .IP "\- 手動將 PO 檔案與新的 POT 檔案合併,但將無用的模糊考慮在內。" 4 .IX Item "- 手動將 PO 檔案與新的 POT 檔案合併,但將無用的模糊考慮在內。" .Vb 1 \& msguntypot \-o myfile.pot.orig \-n myfile.pot *.po .Ve .IP "\- 清理。" 4 .IX Item "- 清理。" .Vb 1 \& rm \-rf myfile.pot.orig po_fridge .Ve .PP 你做完了該錯別字從您的 POT 和 PO 檔案的 msgstr 中根除了,並且 PO 檔案在這個過程中沒有模糊化。你的翻譯已經愛你了。 .SH 另請參見 .IX Header "另請參見" 儘管它的名稱,此工具不是 gettext 工具套件的一部分。而是 po4a 的一部分。更確切地說,它是使用精細 po4a 模組的隨機 Perl 指令碼。有關 po4a 的資訊,請參閱: .PP \&\fBpo4a\fR\|(7) .SH 作者 .IX Header "作者" .Vb 1 \& Martin Quinson (mquinson#debian,org) .Ve .SH 版權和許可 .IX Header "版權和許可" 版權所有 2005 by SPI, inc. .PP 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).