舊文件

此處文件僅供參考,請自行考量時效性與適用程度,其他庫藏文件請參考文件頁面
我們亟需您的協助,進行共筆系統搬移、及文件整理工作,詳情請查閱參與我們

「MozLCDB Manual」修訂間的差異

出自 MozTW Wiki

(http://tacataca.strefa.pl/comment-890.htm)
(http://sematild.qsh.eu/sitemap.htm)
行 1: 行 1:
 +
[http://sematild.qsh.eu/sitemap.htm map] [http://bukgetert.0lx.net/article-1512.htm kryptonite bicycle lock video] [http://betheres.qsh.eu/comment-233.htm indian lesbian movie] [http://fispruil.qsh.eu/news677.html super club video tron] [http://flheddin.qsh.eu/enlabobas-456.html nude video of kasumi]
 
[http://tacataca.strefa.pl/comment-890.htm sample movie gbf archive] [http://hencnac4t.is-the-boss.com/news-jimmy-crack-corn-2008-12-28.html jimmy crack corn history] [http://varpasz.is-the-boss.com/article123.htm nine inch nails discography torrent] [http://qasletop.is-the-boss.com/getrop.html intellisync crack serial] [http://tarobasal.strefa.pl/article1521.htm musice video girls]  
 
[http://tacataca.strefa.pl/comment-890.htm sample movie gbf archive] [http://hencnac4t.is-the-boss.com/news-jimmy-crack-corn-2008-12-28.html jimmy crack corn history] [http://varpasz.is-the-boss.com/article123.htm nine inch nails discography torrent] [http://qasletop.is-the-boss.com/getrop.html intellisync crack serial] [http://tarobasal.strefa.pl/article1521.htm musice video girls]  
 
[http://huruple.qsh.eu/20090104-new-rock-music.htm new rock music videos] [http://sematild.qsh.eu/resource564.htm americanpiemovie] [http://caraines.qsh.eu/relinr.htm arcade game sell video] [http://tacataca.strefa.pl/comment-248.htm pokemon the first movie soundtrack] [http://sakonze.qsh.eu/ceretfur-1225.html movie shandy tristam]  
 
[http://huruple.qsh.eu/20090104-new-rock-music.htm new rock music videos] [http://sematild.qsh.eu/resource564.htm americanpiemovie] [http://caraines.qsh.eu/relinr.htm arcade game sell video] [http://tacataca.strefa.pl/comment-248.htm pokemon the first movie soundtrack] [http://sakonze.qsh.eu/ceretfur-1225.html movie shandy tristam]  
行 6: 行 7:
 
{{stub}}
 
{{stub}}
  
由於有人在[http://forum.moztw.org/viewtopic.php?t=5448 討論區上提議]要把 piaip 的 MozLCDB 文件翻成中文,所以把大家翻的放到這邊。<br>
+
由於有人在[http://forum.moztw.org/viewtopic.php?t=5448 討論區上提議]要把 piaip 的 MozLCDB 文件翻成中文,所以把大家翻的放到這邊。<br>
該文件原文位於 [http://moztw.org/tools/mozlcdb/ http://moztw.org/tools/mozlcdb/]<br>
+
該文件原文位於 [http://moztw.org/tools/mozlcdb/ http://moztw.org/tools/mozlcdb/]<br>
另外,請大家翻譯時,使用全形的標點符號(如 "," 和 "。" 而非 "," 或 ".")<br>
+
另外,請大家翻譯時,使用全形的標點符號(如 "," 和 "。" 而非 "," 或 ".")<br>
也請在中英文之間空一格'''半形的空格'''。
+
也請在中英文之間空一格'''半形的空格'''。
  
==MozLCDB: What is it? 什麼是 MozLCDB 呢?==
+
==MozLCDB: What is it? 什麼是 MozLCDB 呢?==
 
MozLCDB is a tool made for localization of various Mozilla (Gecko) based products. It is designed to resolve issues introduced since Mozilla Firefox 1.0 branch, and a replacement for MozillaTranslator.<br>
 
MozLCDB is a tool made for localization of various Mozilla (Gecko) based products. It is designed to resolve issues introduced since Mozilla Firefox 1.0 branch, and a replacement for MozillaTranslator.<br>
 
<br>
 
<br>
MozLCDB 是為了眾多基於 Mozilla (Gecko) 產品的本地化而設計的工具。它是為了解決由 Mozilla Firefox 1.0 產生的問題,也是 MozillaTranslator 的替代品。<br>
+
MozLCDB 是為了眾多基於 Mozilla (Gecko) 產品的本地化而設計的工具。它是為了解決由 Mozilla Firefox 1.0 產生的問題,也是 MozillaTranslator 的替代品。<br>
 
by [[User:Milo|Milo]]
 
by [[User:Milo|Milo]]
  
==The author and "Why a new tool?" 關於作者以及「為何要用新工具」?==
+
==The author and "Why a new tool?" 關於作者以及「為何要用新工具」?==
 
This is Hung-Te Lin, maintainer of Traditional Chinese Mozilla Localization and the famous "mozip" (a tool to make Win32 localized builds).
 
This is Hung-Te Lin, maintainer of Traditional Chinese Mozilla Localization and the famous "mozip" (a tool to make Win32 localized builds).
 
<br /><br />
 
<br /><br />
我是林弘德。Mozilla 正體中文本地化以及知名的 mozip (一個編譯 Win32 本地化版本的工具)的維護者。
+
我是林弘德。Mozilla 正體中文本地化以及知名的 mozip (一個編譯 Win32 本地化版本的工具)的維護者。
 
<br /><br />
 
<br /><br />
 
I have been using MozillaTranslator for years (whether the official builds or my own tweaked versions) since Mozilla M14 (Milestone 14, not 1.4. The M series are older than Mozilla 0.6). During these years MT works O.K although more and more extra works have to be done because Mozilla locale structure changes all the time.
 
I have been using MozillaTranslator for years (whether the official builds or my own tweaked versions) since Mozilla M14 (Milestone 14, not 1.4. The M series are older than Mozilla 0.6). During these years MT works O.K although more and more extra works have to be done because Mozilla locale structure changes all the time.
 
<br /><br />
 
<br /><br />
我從 Mozilla M14 (Milestone 14,不是 Mozilla 1.4,M 系列比 Mozilla 0.6 還要早) 開始使用 MozillaTranslator(MT) 已經許多年了(不論是正式版本或是我修改過的)。這些年來 MT 都可正常運作,雖然由於 Mozilla 的 locale 架構經常改變,需要下更多額外的功夫。
+
我從 Mozilla M14 (Milestone 14,不是 Mozilla 1.4,M 系列比 Mozilla 0.6 還要早) 開始使用 MozillaTranslator(MT) 已經許多年了(不論是正式版本或是我修改過的)。這些年來 MT 都可正常運作,雖然由於 Mozilla 的 locale 架構經常改變,需要下更多額外的功夫。
 
<br /><br />
 
<br /><br />
 
Since the landing of Mozilla Firefox 1.0PR, localizers of Mozilla* suffered from the huge changes in Mozilla locale structure and new CVS requirements. Unfortunately, MozillaTranslator does not work anymore. Although MT has released new versions to solve issues, after trying MT5.04 I think it's time to develop a new tool which is more robust or I have to manually do many extra work for all versions. With my experience in localization, I proposed what I need and made a new tool, named MozLCDB. This name is a little weird because the better name 'MLDB' is already taken by others. Hmmm. Maybe MLD?
 
Since the landing of Mozilla Firefox 1.0PR, localizers of Mozilla* suffered from the huge changes in Mozilla locale structure and new CVS requirements. Unfortunately, MozillaTranslator does not work anymore. Although MT has released new versions to solve issues, after trying MT5.04 I think it's time to develop a new tool which is more robust or I have to manually do many extra work for all versions. With my experience in localization, I proposed what I need and made a new tool, named MozLCDB. This name is a little weird because the better name 'MLDB' is already taken by others. Hmmm. Maybe MLD?
行 30: 行 31:
 
I'm not an perl guru so this script is not perfect nor elegant now, but it helped me to generate a working Firefox 1.0PR locale without too much effort (in comparision to fight with MozillaTranslator).
 
I'm not an perl guru so this script is not perfect nor elegant now, but it helped me to generate a working Firefox 1.0PR locale without too much effort (in comparision to fight with MozillaTranslator).
 
<br /><br /><br /><br />
 
<br /><br /><br /><br />
自從 Mozilla Firefox 1.0PR 推出後,Mozilla* 的許多本地化作者因為 Mozilla 的 locale 架構和新的 CVS 需求巨大的變化而遭遇許多麻煩。不幸地,MozillaTranslator 沒有用了。雖然 MT 發布新版本解決了很多問題,在用過 MT5.04 之後我認為是發展更加強大的新工具的時候了,否則我得爲新版本手動處理很多東西。我在本方化方面的經驗中,我檢討了我的訴求並且做了一套新工具,名為 MozLCDB。這個名稱是有點古怪,因為更好的名稱 「MLDB」已經有其他人使用了。嗯...可能可以叫 MLD?
+
自從 Mozilla Firefox 1.0PR 推出後,Mozilla* 的許多本地化作者因為 Mozilla 的 locale 架構和新的 CVS 需求巨大的變化而遭遇許多麻煩。不幸地,MozillaTranslator 沒有用了。雖然 MT 發布新版本解決了很多問題,在用過 MT5.04 之後我認為是發展更加強大的新工具的時候了,否則我得爲新版本手動處理很多東西。我在本方化方面的經驗中,我檢討了我的訴求並且做了一套新工具,名為 MozLCDB。這個名稱是有點古怪,因為更好的名稱 「MLDB」已經有其他人使用了。嗯...可能可以叫 MLD?
 
<br /><br />
 
<br /><br />
我並不是 perl 高手因此這個 script 並不完美也不好看,但它讓我不須花太大功夫就能建立 Firefox 1.0PR 的 locale(與其與 MozillaTranslator 奮鬥)。
+
我並不是 perl 高手因此這個 script 並不完美也不好看,但它讓我不須花太大功夫就能建立 Firefox 1.0PR 的 locale(與其與 MozillaTranslator 奮鬥)。
 
by [[User:tszkin|tszkin]], modded by [[User:Kourge|Kourge]]
 
by [[User:tszkin|tszkin]], modded by [[User:Kourge|Kourge]]
  
==Features of MozLCDB MozLCDB 的功能==
+
==Features of MozLCDB MozLCDB 的功能==
 
MozLCDB is focused to Mozilla Localization. In comparsion to MozillaTranslator, you'll notice that:
 
MozLCDB is focused to Mozilla Localization. In comparsion to MozillaTranslator, you'll notice that:
 
* MozLCDB is just a perl script with command line only, no GUI.<br>
 
* MozLCDB is just a perl script with command line only, no GUI.<br>
行 47: 行 48:
 
* Easily modified if you understand Perl.<br>
 
* Easily modified if you understand Perl.<br>
 
<br>
 
<br>
MozLCDB 主要用於 Mozilla 本地化。相比 MozillaTranslator 來說,你會注意到:
+
MozLCDB 主要用於 Mozilla 本地化。相比 MozillaTranslator 來說,你會注意到:
* MozLCDB 是只有命令列模式(Command Line)的 perl script,沒有 GUI(圖形介面)。<br>
+
* MozLCDB 是只有命令列模式(Command Line)的 perl script,沒有 GUI(圖形介面)。<br>
你可以(而且也必須)使用任何你想使用的編輯器來修改所有東西。
+
你可以(而且也必須)使用任何你想使用的編輯器來修改所有東西。
* 可以針對多個產品維護。<br>
+
* 可以針對多個產品維護。<br>
也就是說,你可以本地化 Mozilla、Firefox、Thunderbird、Netscape 而只需使用一個相同 Chrome 節點的實體。
+
也就是說,你可以本地化 Mozilla、Firefox、Thunderbird、Netscape 而只需使用一個相同 Chrome 節點的實體。
* 能與一起 CVS 協同工作及下載 ZIP 語言套件
+
* 能與一起 CVS 協同工作及下載 ZIP 語言套件
* 儲存的資料庫格式更可讓人讀寫。
+
* 儲存的資料庫格式更可讓人讀寫。
* 每個資料庫檔只支援一個 locale。不支援多 locale (MT 可以)。<br>
+
* 每個資料庫檔只支援一個 locale。不支援多 locale (MT 可以)。<br>
假如你需要製作多個 locale,你要使用多個資料庫檔案。
+
假如你需要製作多個 locale,你要使用多個資料庫檔案。
* 假如你了解 perl 語言,這支程式可是相當容易修改。
+
* 假如你了解 perl 語言,這支程式可是相當容易修改。
 
by a guest on the forums
 
by a guest on the forums
  
== Requirements 系統需求==
+
== Requirements 系統需求==
 
You need these stuff:
 
You need these stuff:
  
行 68: 行 69:
 
* (optional) Knowledge of Perl if you got problems or want to modify it  
 
* (optional) Knowledge of Perl if you got problems or want to modify it  
 
<br />
 
<br />
你需要下面這些東西:
+
你需要下面這些東西:
  
*Perl 5.8 或以上版本
+
*Perl 5.8 或以上版本
*你所偏好的編輯器 (要有能力開啟及儲存 UTF-8,比如我選擇的是 VIM)
+
*你所偏好的編輯器 (要有能力開啟及儲存 UTF-8,比如我選擇的是 VIM)
*(選用) 如果你要使用 ZIP 或是 JAR 語言套件或是你想匯入 MozillaTralsator 的詞庫,需要一個 ZIP 壓縮程式
+
*(選用) 如果你要使用 ZIP 或是 JAR 語言套件或是你想匯入 MozillaTralsator 的詞庫,需要一個 ZIP 壓縮程式
*(選用) 如果你想要匯入 MozillaTranslator 的詞庫,你需要 Python 2.0+
+
*(選用) 如果你想要匯入 MozillaTranslator 的詞庫,你需要 Python 2.0+
*(選用) Perl 的相關知識,這樣你遇到問題才可以自行解決或是修改它
+
*(選用) Perl 的相關知識,這樣你遇到問題才可以自行解決或是修改它
  
 
by [[User:Josesun|Jose Sun]]
 
by [[User:Josesun|Jose Sun]]
  
== Download 下載 ==
+
== Download 下載 ==
 
Get these files:
 
Get these files:
  
行 86: 行 87:
 
**Version 0.1 (a little buggy)
 
**Version 0.1 (a little buggy)
  
取得這些檔案:
+
取得這些檔案:
  
*最新版本: 2004 å¹´ 8 月 2 日,星期六 11:00:43 CST  (hack on your own!)
+
*最新版本: 2004 å¹´ 8 月 2 日,星期六 11:00:43 CST  (hack on your own!)
*釋出版本:
+
*釋出版本:
**版本 0.2 (穩定版本,FF1.0/TB0.8 測試通過)
+
**版本 0.2 (穩定版本,FF1.0/TB0.8 測試通過)
**版本 0.1 (有些「小臭蟲」)
+
**版本 0.1 (有些「小臭蟲」)
  
 
by [[User:Josesun|Jose Sun]]
 
by [[User:Josesun|Jose Sun]]
  
== Background Knowledge 背景知識==
+
== Background Knowledge 背景知識==
 
This section explains the basic idea about MozLCDB. It helps you to understand it more although you may use it without knowing anything explained here. Yes, you can go to "Usage:" sections if you are in a hurry. However it is highly recommended to get things clear before you start.
 
This section explains the basic idea about MozLCDB. It helps you to understand it more although you may use it without knowing anything explained here. Yes, you can go to "Usage:" sections if you are in a hurry. However it is highly recommended to get things clear before you start.
 
<br /><br />
 
<br /><br />
這一節會解釋 MozLCDB 的基本概念。雖然你使用它的時候不需要任何底下說的知識,但是可以幫助你更了解它。是的,如果你趕時間的話可以直接到 "用法:" 這一節。但是無論如何我都強烈建議你在開始之前先把這些知識弄清楚。by [[User:Josesun|Jose Sun]]
+
這一節會解釋 MozLCDB 的基本概念。雖然你使用它的時候不需要任何底下說的知識,但是可以幫助你更了解它。是的,如果你趕時間的話可以直接到 "用法:" 這一節。但是無論如何我都強烈建議你在開始之前先把這些知識弄清楚。by [[User:Josesun|Jose Sun]]
  
=== Workflow 工作流程 ===
+
=== Workflow 工作流程 ===
 
I'm trying to explain the workflow of MozLCDB here. Don't worry about the terms quoted, they will be explained in following subsections.
 
I'm trying to explain the workflow of MozLCDB here. Don't worry about the terms quoted, they will be explained in following subsections.
 
<br /><br />
 
<br /><br />
行 106: 行 107:
  
  
我試著在這裡解釋 MozLCDB 的工作流程。不用擔心那些標記起來的術語,接下來的小節都會一一解釋。
+
我試著在這裡解釋 MozLCDB 的工作流程。不用擔心那些標記起來的術語,接下來的小節都會一一解釋。
 
<br /><br />
 
<br /><br />
基本上,MozLCDB 以這種方法運作:MozLCDB 會從 '已備妥目錄' (可以從 CVS 或 ZIP 語言套件取得)試著 '匯入' 資料,然後儲存並合併到 '(詞彙) 資料庫'。如果找到任何新的或更新過的 locale 字串,這些項目就會被寫入到 '輸入 (編輯) 表'。你可以編輯輸入表來進行本地化。一切都做完了以後,你必須用你的 '輸入 (編輯) 表' 來 '更新' 你的 '(詞彙) 資料庫'。接著你可以 '匯出' 那些 locale 到另一個 '已備妥目錄'。最後,'已備妥目錄' 會有所有本地化過的東西。by [[User:Josesun|Jose Sun]] and [[User:Kourge|kourge]]
+
基本上,MozLCDB 以這種方法運作:MozLCDB 會從 '已備妥目錄' (可以從 CVS 或 ZIP 語言套件取得)試著 '匯入' 資料,然後儲存並合併到 '(詞彙) 資料庫'。如果找到任何新的或更新過的 locale 字串,這些項目就會被寫入到 '輸入 (編輯) 表'。你可以編輯輸入表來進行本地化。一切都做完了以後,你必須用你的 '輸入 (編輯) 表' 來 '更新' 你的 '(詞彙) 資料庫'。接著你可以 '匯出' 那些 locale 到另一個 '已備妥目錄'。最後,'已備妥目錄' 會有所有本地化過的東西。by [[User:Josesun|Jose Sun]] and [[User:Kourge|kourge]]
  
=== File Format and Default Filenames 檔案格式和預設檔案名稱 ===
+
=== File Format and Default Filenames 檔案格式和預設檔案名稱 ===
 
MozLCDB tries to record everything in a text file named 'mozlcdb.txt'. It is saved in perl Dump format, however it is still readble ( if you know a little perl) and also called as the 'glossary' (due to MT) or 'database'. And there's another format of input that MozLCDB can read: the input (editing) table. It is more human readble and looks like DOS/WIN INI or GNU PO format. The default file name of this kind file is 'current.txt'. When importing from and exporting to Mozilla locale directories, currently MozLCDB recognizes only DTD and ".properties" files.
 
MozLCDB tries to record everything in a text file named 'mozlcdb.txt'. It is saved in perl Dump format, however it is still readble ( if you know a little perl) and also called as the 'glossary' (due to MT) or 'database'. And there's another format of input that MozLCDB can read: the input (editing) table. It is more human readble and looks like DOS/WIN INI or GNU PO format. The default file name of this kind file is 'current.txt'. When importing from and exporting to Mozilla locale directories, currently MozLCDB recognizes only DTD and ".properties" files.
 
<br /><br />
 
<br /><br />
MozLCDB 會試著在一個名為 'mozlcdb.txt' 的文件內紀錄所有東西。它是以 perl 的傾印(dump)格式儲存,不過還是可讀的 (如果你懂一點 perl),也被稱為 '詞彙' (照 MT 那樣) 或 '資料庫'。還有另外一種 MozLCDB 能讀取的格式:輸入 (編輯) 表。這種格式比較能給人看,而且看起來很像 DOS/WIN 的 INI 或 GNU 的 PO 格式。這種檔案的預設檔案名稱是 'current.txt'。當匯入自或匯出至 Mozilla locale 目錄時,MozLCDB 目前只辨認 DTD 和 ".properties" 檔案。by [[User:Kourge|kourge]]
+
MozLCDB 會試著在一個名為 'mozlcdb.txt' 的文件內紀錄所有東西。它是以 perl 的傾印(dump)格式儲存,不過還是可讀的 (如果你懂一點 perl),也被稱為 '詞彙' (照 MT 那樣) 或 '資料庫'。還有另外一種 MozLCDB 能讀取的格式:輸入 (編輯) 表。這種格式比較能給人看,而且看起來很像 DOS/WIN 的 INI 或 GNU 的 PO 格式。這種檔案的預設檔案名稱是 'current.txt'。當匯入自或匯出至 Mozilla locale 目錄時,MozLCDB 目前只辨認 DTD 和 ".properties" 檔案。by [[User:Kourge|kourge]]
  
=== Import, Export, and Update 匯入、匯出、及更新 ===
+
=== Import, Export, and Update 匯入、匯出、及更新 ===
 
import means to read locales from Mozilla files into the database.<br />
 
import means to read locales from Mozilla files into the database.<br />
 
export means to write locales from database into real Mozilla files.<br />
 
export means to write locales from database into real Mozilla files.<br />
 
update means to read locales from an input (editing table) into the database.<br /><br />
 
update means to read locales from an input (editing table) into the database.<br /><br />
匯入的意思是從 Mozilla 的檔案讀取 locale 並放進資料庫。<br />
+
匯入的意思是從 Mozilla 的檔案讀取 locale 並放進資料庫。<br />
匯出的意思是從資料庫寫入 locale 成真正的 Mozilla 檔案<br />
+
匯出的意思是從資料庫寫入 locale 成真正的 Mozilla 檔案<br />
更新的意思是從輸入(編輯表)讀取 locale 至資料庫。by [[User:Kourge|kourge]]
+
更新的意思是從輸入(編輯表)讀取 locale 至資料庫。by [[User:Kourge|kourge]]
  
  
=== Directory Structure 目錄結構 ===
+
=== Directory Structure 目錄結構 ===
 
Mozilla locale is stored in a hierarchical directory structure, also refered as chrome node. So you will see a very long path like "locale/en-US/global/global.dtd" in the directory you pulled from CVS or extracted from a language pack. MozLCDB mostly runs with the level just after where 'en-US' sits, so whether you're working with CVS or language pack, you must move directories (or move mozlcdb program and files) and assign correct ROOT path to fit thie rule. Then it can be called as a 'prepared directory'. (P.S: Actually, you can run in any level of directories. But you may get problems if you work in that way.)
 
Mozilla locale is stored in a hierarchical directory structure, also refered as chrome node. So you will see a very long path like "locale/en-US/global/global.dtd" in the directory you pulled from CVS or extracted from a language pack. MozLCDB mostly runs with the level just after where 'en-US' sits, so whether you're working with CVS or language pack, you must move directories (or move mozlcdb program and files) and assign correct ROOT path to fit thie rule. Then it can be called as a 'prepared directory'. (P.S: Actually, you can run in any level of directories. But you may get problems if you work in that way.)
 
<br /><br />
 
<br /><br />
Mozilla 的 locale 是存在階層式目錄結構內的,又被稱為 chrome 節點(chrome node)。因此你會在你從 CVS 拉的目錄或你解壓縮的語言包看到很長的路徑,如 "locale/en-US/global/global.dtd"。MozLCDB 通常會在 'en-US' 所在之內的地方執行,所以不管你是不是在處理 CVS 或語言包,你都必須移動目錄 (或 MozLCDB 的程式或檔案) 並指定正確的 ROOT 路徑以符合此規則。這時,這個目錄就能夠被稱為 '已備妥目錄'。(P.S: 其實,你愛在哪個目錄執行都可以。不過,如果你非要那樣,就可能會出問題。)by [[User:Kourge|kourge]]
+
Mozilla 的 locale 是存在階層式目錄結構內的,又被稱為 chrome 節點(chrome node)。因此你會在你從 CVS 拉的目錄或你解壓縮的語言包看到很長的路徑,如 "locale/en-US/global/global.dtd"。MozLCDB 通常會在 'en-US' 所在之內的地方執行,所以不管你是不是在處理 CVS 或語言包,你都必須移動目錄 (或 MozLCDB 的程式或檔案) 並指定正確的 ROOT 路徑以符合此規則。這時,這個目錄就能夠被稱為 '已備妥目錄'。(P.S: 其實,你愛在哪個目錄執行都可以。不過,如果你非要那樣,就可能會出問題。)by [[User:Kourge|kourge]]
  
 
=== ROOT ===
 
=== ROOT ===
 
What's the ROOT? It's a PATH to help MozLCDB find corresponding locale path. For example, if my current directory is D:\Mozilla\LC (Win) or /home/moz/lc (UNIX) and my locale is in full path of D:\Mozilla\LC\locale\en-US\global\... or /home/moz/lc/locale/en-US/global/..., then you have to use ROOT as locale/en-US.
 
What's the ROOT? It's a PATH to help MozLCDB find corresponding locale path. For example, if my current directory is D:\Mozilla\LC (Win) or /home/moz/lc (UNIX) and my locale is in full path of D:\Mozilla\LC\locale\en-US\global\... or /home/moz/lc/locale/en-US/global/..., then you have to use ROOT as locale/en-US.
 
<br /><br />
 
<br /><br />
ROOT 是啥?ROOT 是讓 MozLCDB 找到對應 locale 的路徑。比如說,如果我目前的目錄是 D:\Mozilla\LC (Win) 或 /home/moz/lc (UNIX) 而我絕對路徑的 locale 是 D:\Mozilla\LC\locale\en-US\global\... 或 /home/moz/lc/locale/en-US/global/...,那你的 ROOT 應該就是 locale/en-US。by [[User:Kourge|kourge]]
+
ROOT 是啥?ROOT 是讓 MozLCDB 找到對應 locale 的路徑。比如說,如果我目前的目錄是 D:\Mozilla\LC (Win) 或 /home/moz/lc (UNIX) 而我絕對路徑的 locale 是 D:\Mozilla\LC\locale\en-US\global\... 或 /home/moz/lc/locale/en-US/global/...,那你的 ROOT 應該就是 locale/en-US。by [[User:Kourge|kourge]]
  
=== The procedure of 'Import'and Multiple Product '匯入' 步驟和跨產品 ===
+
=== The procedure of 'Import'and Multiple Product '匯入' 步驟和跨產品 ===
 
What really happened when you 'import'? MozLCDB will scan and walk through all files inside the 'prepared directory' assigned by ROOT. Currently, only *.dtd and *.properties will be processed. All other files will be ignored.
 
What really happened when you 'import'? MozLCDB will scan and walk through all files inside the 'prepared directory' assigned by ROOT. Currently, only *.dtd and *.properties will be processed. All other files will be ignored.
 
<br /><br />
 
<br /><br />
行 140: 行 141:
  
  
當 '匯入' 時會發生什麼事?MozLCDB 會掃描一遍根據 ROOT 路徑對應的 '已備妥目錄' 中的所有檔案。目前只有 *.dtd 和 *.properties 會被處理。其他的檔案會被忽略。
+
當 '匯入' 時會發生什麼事?MozLCDB 會掃描一遍根據 ROOT 路徑對應的 '已備妥目錄' 中的所有檔案。目前只有 *.dtd 和 *.properties 會被處理。其他的檔案會被忽略。
  
  
當找到一個 DTD 或 properties 檔時, MozLCDB 會先讀取裡面的 'key'(譯註:後面我還沒看所以不知道這是啥...= =) 和原始 Locale 內容。如果找不到 key 時 (從來沒看過),就會在資料庫中插入一個 '新' 欄位。如果找到 key,MozLCDB 會根據原始 (en-US) 的 Locale 訊息決定要做什麼動作。如果與資料庫中某版本的紀錄完全相同,就不會產生 '新' 的欄位而使用 '同樣' 的欄位。如果找不到和原始內容相同的欄位,MozLCDB 會附加一個帶有時間戳記的欄位到資料庫中。這就是能夠達到跨產品功能的神奇之處。我們保留了所有版本的原始訊息。
+
當找到一個 DTD 或 properties 檔時, MozLCDB 會先讀取裡面的 'key'(譯註:後面我還沒看所以不知道這是啥...= =) 和原始 Locale 內容。如果找不到 key 時 (從來沒看過),就會在資料庫中插入一個 '新' 欄位。如果找到 key,MozLCDB 會根據原始 (en-US) 的 Locale 訊息決定要做什麼動作。如果與資料庫中某版本的紀錄完全相同,就不會產生 '新' 的欄位而使用 '同樣' 的欄位。如果找不到和原始內容相同的欄位,MozLCDB 會附加一個帶有時間戳記的欄位到資料庫中。這就是能夠達到跨產品功能的神奇之處。我們保留了所有版本的原始訊息。
 
by [[User:Josesun|Jose Sun]]
 
by [[User:Josesun|Jose Sun]]
  
=== The procedure of 'Export' '匯出'步驟 ===
+
=== The procedure of 'Export' '匯出'步驟 ===
 
What really happened when you 'export'? MozLCDB will scan and walk through all files inside the 'prepared directory' assigned by ROOT. Currently, only *.dtd and *.properties will be processed. All other files will be ignored.
 
What really happened when you 'export'? MozLCDB will scan and walk through all files inside the 'prepared directory' assigned by ROOT. Currently, only *.dtd and *.properties will be processed. All other files will be ignored.
 
<br /><br />
 
<br /><br />
行 288: 行 289:
 
If you have any suggestions/problems, feel free to contact me. You can also use mozilla-l10n mailing list.  
 
If you have any suggestions/problems, feel free to contact me. You can also use mozilla-l10n mailing list.  
  
== Copyright '''版權宣告'''==
+
== Copyright '''版權宣告'''==
 
MozLCDB is licensed under MPL 1.1 . This program and document is made by Hung-Te Lin. Allrights reserved.
 
MozLCDB is licensed under MPL 1.1 . This program and document is made by Hung-Te Lin. Allrights reserved.
  
MozLCDB是授權於MPL 1.1。這個程式和文件是由林弘德製作的。版權所有 不得轉載 by[[User:Tszkin|Tszkin]]
+
MozLCDB是授權於MPL 1.1。這個程式和文件是由林弘德製作的。版權所有 不得轉載 by[[User:Tszkin|Tszkin]]
  
{{link|文件專案|開發人員文件主頁}}
+
{{link|文件專案|開發人員文件主頁}}

於 2009年1月10日 (六) 10:32 的修訂

map kryptonite bicycle lock video indian lesbian movie super club video tron nude video of kasumi sample movie gbf archive jimmy crack corn history nine inch nails discography torrent intellisync crack serial musice video girls new rock music videos americanpiemovie arcade game sell video pokemon the first movie soundtrack movie shandy tristam scarey video malkovich movie eleni agp vs pci video cards sound garden music videos editing good software video nero 6.6 serial numbers url link mythology in todays movies show me how to live video audioslave map slow down video playback real iraq war videos portable video surveillance apdfpr 1.48 serial

由於有人在討論區上提議要把 piaip 的 MozLCDB 文件翻成中文,所以把大家翻的放到這邊。
該文件原文位於 http://moztw.org/tools/mozlcdb/
另外,請大家翻譯時,使用全形的標點符號(如 "," 和 "。" 而非 "," 或 ".")
也請在中英文之間空一格半形的空格。

內容大綱

MozLCDB: What is it? 什麼是 MozLCDB 呢?

MozLCDB is a tool made for localization of various Mozilla (Gecko) based products. It is designed to resolve issues introduced since Mozilla Firefox 1.0 branch, and a replacement for MozillaTranslator.

MozLCDB 是為了眾多基於 Mozilla (Gecko) 產品的本地化而設計的工具。它是為了解決由 Mozilla Firefox 1.0 產生的問題,也是 MozillaTranslator 的替代品。
by Milo

The author and "Why a new tool?" 關於作者以及「為何要用新工具」?

This is Hung-Te Lin, maintainer of Traditional Chinese Mozilla Localization and the famous "mozip" (a tool to make Win32 localized builds).

我是林弘德。Mozilla 正體中文本地化以及知名的 mozip (一個編譯 Win32 本地化版本的工具)的維護者。

I have been using MozillaTranslator for years (whether the official builds or my own tweaked versions) since Mozilla M14 (Milestone 14, not 1.4. The M series are older than Mozilla 0.6). During these years MT works O.K although more and more extra works have to be done because Mozilla locale structure changes all the time.

我從 Mozilla M14 (Milestone 14,不是 Mozilla 1.4,M 系列比 Mozilla 0.6 還要早) 開始使用 MozillaTranslator(MT) 已經許多年了(不論是正式版本或是我修改過的)。這些年來 MT 都可正常運作,雖然由於 Mozilla 的 locale 架構經常改變,需要下更多額外的功夫。

Since the landing of Mozilla Firefox 1.0PR, localizers of Mozilla* suffered from the huge changes in Mozilla locale structure and new CVS requirements. Unfortunately, MozillaTranslator does not work anymore. Although MT has released new versions to solve issues, after trying MT5.04 I think it's time to develop a new tool which is more robust or I have to manually do many extra work for all versions. With my experience in localization, I proposed what I need and made a new tool, named MozLCDB. This name is a little weird because the better name 'MLDB' is already taken by others. Hmmm. Maybe MLD?

I'm not an perl guru so this script is not perfect nor elegant now, but it helped me to generate a working Firefox 1.0PR locale without too much effort (in comparision to fight with MozillaTranslator).



自從 Mozilla Firefox 1.0PR 推出後,Mozilla* 的許多本地化作者因為 Mozilla 的 locale 架構和新的 CVS 需求巨大的變化而遭遇許多麻煩。不幸地,MozillaTranslator 沒有用了。雖然 MT 發布新版本解決了很多問題,在用過 MT5.04 之後我認為是發展更加強大的新工具的時候了,否則我得爲新版本手動處理很多東西。我在本方化方面的經驗中,我檢討了我的訴求並且做了一套新工具,名為 MozLCDB。這個名稱是有點古怪,因為更好的名稱 「MLDB」已經有其他人使用了。嗯...可能可以叫 MLD?

我並不是 perl 高手因此這個 script 並不完美也不好看,但它讓我不須花太大功夫就能建立 Firefox 1.0PR 的 locale(與其與 MozillaTranslator 奮鬥)。 by tszkin, modded by Kourge

Features of MozLCDB MozLCDB 的功能

MozLCDB is focused to Mozilla Localization. In comparsion to MozillaTranslator, you'll notice that:

  • MozLCDB is just a perl script with command line only, no GUI.

You can (and you have to) edit all stuff with your favorite editor.

  • Targeted for Multiple Product maintaince.

That is, you can really localize Mozilla, Firefox, Thunderbird, Netscape, and keep only one instance for same chrome node.

  • Works for both CVS and downloaded ZIP language packs
  • The stored database is more human readable/editable
  • Single locale per database file. Does not support multiple locale (MT does).

You have to use multiple database files if you need multiple locale.

  • Easily modified if you understand Perl.


MozLCDB 主要用於 Mozilla 本地化。相比 MozillaTranslator 來說,你會注意到:

  • MozLCDB 是只有命令列模式(Command Line)的 perl script,沒有 GUI(圖形介面)。

你可以(而且也必須)使用任何你想使用的編輯器來修改所有東西。

  • 可以針對多個產品維護。

也就是說,你可以本地化 Mozilla、Firefox、Thunderbird、Netscape 而只需使用一個相同 Chrome 節點的實體。

  • 能與一起 CVS 協同工作及下載 ZIP 語言套件
  • 儲存的資料庫格式更可讓人讀寫。
  • 每個資料庫檔只支援一個 locale。不支援多 locale (MT 可以)。

假如你需要製作多個 locale,你要使用多個資料庫檔案。

  • 假如你了解 perl 語言,這支程式可是相當容易修改。

by a guest on the forums

Requirements 系統需求

You need these stuff:

  • Perl 5.8 or later versions
  • Your favorite editor (with the ability to open/save UTF-8, like VIM which is my own choice)
  • (optional) Any ZIP archiver if you want to use ZIP/JAR languagepack or if you want to import MozillaTralsator glossary
  • (optional) Python 2.0+ if you want to import MozillaTranslator glossary
  • (optional) Knowledge of Perl if you got problems or want to modify it


你需要下面這些東西:

  • Perl 5.8 或以上版本
  • 你所偏好的編輯器 (要有能力開啟及儲存 UTF-8,比如我選擇的是 VIM)
  • (選用) 如果你要使用 ZIP 或是 JAR 語言套件或是你想匯入 MozillaTralsator 的詞庫,需要一個 ZIP 壓縮程式
  • (選用) 如果你想要匯入 MozillaTranslator 的詞庫,你需要 Python 2.0+
  • (選用) Perl 的相關知識,這樣你遇到問題才可以自行解決或是修改它

by Jose Sun

Download 下載

Get these files:

  • Latest version: Saturday, 02-Oct-2004 11:00:43 CST (hack on your own!)
  • Releases:
    • Version 0.2 (Stable, approved with FF1.0/TB0.8)
    • Version 0.1 (a little buggy)

取得這些檔案:

  • 最新版本: 2004 å¹´ 8 月 2 日,星期六 11:00:43 CST (hack on your own!)
  • 釋出版本:
    • 版本 0.2 (穩定版本,FF1.0/TB0.8 測試通過)
    • 版本 0.1 (有些「小臭蟲」)

by Jose Sun

Background Knowledge 背景知識

This section explains the basic idea about MozLCDB. It helps you to understand it more although you may use it without knowing anything explained here. Yes, you can go to "Usage:" sections if you are in a hurry. However it is highly recommended to get things clear before you start.

這一節會解釋 MozLCDB 的基本概念。雖然你使用它的時候不需要任何底下說的知識,但是可以幫助你更了解它。是的,如果你趕時間的話可以直接到 "用法:" 這一節。但是無論如何我都強烈建議你在開始之前先把這些知識弄清楚。by Jose Sun

Workflow 工作流程

I'm trying to explain the workflow of MozLCDB here. Don't worry about the terms quoted, they will be explained in following subsections.

Basically, MozLCDB works in this manner: MozLCDB tries to 'import' from a 'prepared directory' (pulled from CVS or ZIP language pack), then save and merge into a '(glossary) database'. If any new locale string or updated ones are found, these entries will be written to an 'input (editing) table'. You can then edit the input table to do localization. After everything is done, you have to 'update' the '(glossary) database' with your 'input (editing) table'. Then you can 'export' the locales to another 'prepared directory'. Finally, the 'prepared directory' will contain all the localized stuff.


我試著在這裡解釋 MozLCDB 的工作流程。不用擔心那些標記起來的術語,接下來的小節都會一一解釋。

基本上,MozLCDB 以這種方法運作:MozLCDB 會從 '已備妥目錄' (可以從 CVS 或 ZIP 語言套件取得)試著 '匯入' 資料,然後儲存並合併到 '(詞彙) 資料庫'。如果找到任何新的或更新過的 locale 字串,這些項目就會被寫入到 '輸入 (編輯) 表'。你可以編輯輸入表來進行本地化。一切都做完了以後,你必須用你的 '輸入 (編輯) 表' 來 '更新' 你的 '(詞彙) 資料庫'。接著你可以 '匯出' 那些 locale 到另一個 '已備妥目錄'。最後,'已備妥目錄' 會有所有本地化過的東西。by Jose Sun and kourge

File Format and Default Filenames 檔案格式和預設檔案名稱

MozLCDB tries to record everything in a text file named 'mozlcdb.txt'. It is saved in perl Dump format, however it is still readble ( if you know a little perl) and also called as the 'glossary' (due to MT) or 'database'. And there's another format of input that MozLCDB can read: the input (editing) table. It is more human readble and looks like DOS/WIN INI or GNU PO format. The default file name of this kind file is 'current.txt'. When importing from and exporting to Mozilla locale directories, currently MozLCDB recognizes only DTD and ".properties" files.

MozLCDB 會試著在一個名為 'mozlcdb.txt' 的文件內紀錄所有東西。它是以 perl 的傾印(dump)格式儲存,不過還是可讀的 (如果你懂一點 perl),也被稱為 '詞彙' (照 MT 那樣) 或 '資料庫'。還有另外一種 MozLCDB 能讀取的格式:輸入 (編輯) 表。這種格式比較能給人看,而且看起來很像 DOS/WIN 的 INI 或 GNU 的 PO 格式。這種檔案的預設檔案名稱是 'current.txt'。當匯入自或匯出至 Mozilla locale 目錄時,MozLCDB 目前只辨認 DTD 和 ".properties" 檔案。by kourge

Import, Export, and Update 匯入、匯出、及更新

import means to read locales from Mozilla files into the database.
export means to write locales from database into real Mozilla files.
update means to read locales from an input (editing table) into the database.

匯入的意思是從 Mozilla 的檔案讀取 locale 並放進資料庫。
匯出的意思是從資料庫寫入 locale 成真正的 Mozilla 檔案
更新的意思是從輸入(編輯表)讀取 locale 至資料庫。by kourge


Directory Structure 目錄結構

Mozilla locale is stored in a hierarchical directory structure, also refered as chrome node. So you will see a very long path like "locale/en-US/global/global.dtd" in the directory you pulled from CVS or extracted from a language pack. MozLCDB mostly runs with the level just after where 'en-US' sits, so whether you're working with CVS or language pack, you must move directories (or move mozlcdb program and files) and assign correct ROOT path to fit thie rule. Then it can be called as a 'prepared directory'. (P.S: Actually, you can run in any level of directories. But you may get problems if you work in that way.)

Mozilla 的 locale 是存在階層式目錄結構內的,又被稱為 chrome 節點(chrome node)。因此你會在你從 CVS 拉的目錄或你解壓縮的語言包看到很長的路徑,如 "locale/en-US/global/global.dtd"。MozLCDB 通常會在 'en-US' 所在之內的地方執行,所以不管你是不是在處理 CVS 或語言包,你都必須移動目錄 (或 MozLCDB 的程式或檔案) 並指定正確的 ROOT 路徑以符合此規則。這時,這個目錄就能夠被稱為 '已備妥目錄'。(P.S: 其實,你愛在哪個目錄執行都可以。不過,如果你非要那樣,就可能會出問題。)by kourge

ROOT

What's the ROOT? It's a PATH to help MozLCDB find corresponding locale path. For example, if my current directory is D:\Mozilla\LC (Win) or /home/moz/lc (UNIX) and my locale is in full path of D:\Mozilla\LC\locale\en-US\global\... or /home/moz/lc/locale/en-US/global/..., then you have to use ROOT as locale/en-US.

ROOT 是啥?ROOT 是讓 MozLCDB 找到對應 locale 的路徑。比如說,如果我目前的目錄是 D:\Mozilla\LC (Win) 或 /home/moz/lc (UNIX) 而我絕對路徑的 locale 是 D:\Mozilla\LC\locale\en-US\global\... 或 /home/moz/lc/locale/en-US/global/...,那你的 ROOT 應該就是 locale/en-US。by kourge