GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MSGUNTYPOT.1P(1) User Contributed Perl Documentation MSGUNTYPOT.1P(1)

名稱

msguntypot - 更新 PO檔案時, 拼寫錯誤修復在 POT 檔案

簡介

msguntypot -o old_pot -n new_pot pofiles ...

描述

當您修復一個無關緊要的錯誤,這肯定不會影響翻譯(例如, 一個拼寫錯誤)在一個 POT 檔案中,你應該解開翻譯的 PO 檔案中對應的 msgstr,以避免如此額外的工作給翻譯。

此任務在手動完成時很難,容易出錯,並且此工具可以幫助正確完成。你只需要提供兩個版本的 POT 檔案:版本之前和之後,如上述概要中標記,這一切都成為自動的。

如何使用它

簡而言之,當您在一條 [english] 訊息中發現拼寫錯誤時,請執行以下操作:

- 重新生成您的 POT 和 PO 檔案。
  make -C po/ update-po # for message program translations
  debconf-updatepo      # for debconf translations
  po4a po4a.conf        # for po4a based documentation translations
    

或其他內容,具體取決於專案的構建設定。你知道如何確保你的 POT 和 PO 檔案是最新的,不是嗎?

- 製作一份 POT 檔案。
  cp myfile.pot myfile.pot.orig
    
- 製作所有 PO 檔案的副本。
  mkdir po_fridge; cp *.po po_fridge
    
- 修復您的拼寫錯誤。
$EDITOR the_file_in_which_there_is_a_typo
- 重新生成您的 POT 和 PO 檔案。
見上文。

此時,拼寫錯誤修復了所有翻譯的模糊,這個不幸的更改是主目錄的 PO 檔案和冰箱中的唯一一個。下面是解決此問題的方法。

- 放棄模糊翻譯,從冰箱恢復。
  cp po_fridge/*.po .
    
- 手動將 PO 檔案與新的 POT 檔案合併,但將無用的模糊考慮在內。
  msguntypot -o myfile.pot.orig -n myfile.pot *.po
    
- 清理。
  rm -rf myfile.pot.orig po_fridge
    

你做完了該錯別字從您的 POT 和 PO 檔案的 msgstr 中根除了,並且 PO 檔案在這個過程中沒有模糊化。你的翻譯已經愛你了。

參見

儘管它的名稱,此工具不是 gettext 工具套件的一部分。而是 po4a 的一部分。更確切地說,它是使用精細 po4a 模組的隨機 Perl 指令碼。有關 po4a 的資訊,請參閱:

po4a(7)

作者

 Martin Quinson (mquinson#debian,org)

版權和許可

版權所有 2005 by SPI, inc.

此程式是自由軟體;您可以根據 GPL 條款重新分發和/或修改它(請參閱複製檔案)。

2025-07-17 perl v5.40.2

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.