Warning: include(../../header.php.zh_Hant.zh_Hant): Failed to open stream: No such file or directory in /var/www/html/man/man1/msguntypot.1.php.zh_Hant on line 4

Warning: include(): Failed opening '../../header.php.zh_Hant.zh_Hant' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/man/man1/msguntypot.1.php.zh_Hant on line 4

MSGUNTYPOT.1P

Section: User Contributed Perl Documentation (1)
Updated: 2025-05-04
Index Return to Main Contents
 

名稱

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.

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).


 

Index

名稱
簡介
描述
如何使用它
另請參見
作者
版權和許可

This document was created by using the manual pages.
Time: 17:05:10 GMT, May 04, 2025

Warning: include(footer_msguntypot.1.php): Failed to open stream: No such file or directory in /var/www/html/man/man1/msguntypot.1.php.zh_Hant on line 181

Warning: include(): Failed opening 'footer_msguntypot.1.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/man/man1/msguntypot.1.php.zh_Hant on line 181