舊文件

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

「使用者:Shyangs/中文化」修訂間的差異

出自 MozTW Wiki

zh-TW:ANSI 編碼格式
教學
 
(未顯示同一使用者於中間所作的 16 次修訂)
行 1: 行 1:
 
=教學=
 
=教學=
*[http://forum.moztw.org/viewtopic.php?t=17709 中文化詞彙搜尋]
 
 
*[http://forum.moztw.org/viewtopic.php?t=12955 擴充套件中文化資源蒐集]
 
*[http://forum.moztw.org/viewtopic.php?t=12955 擴充套件中文化資源蒐集]
 
*[[中文化專案主頁]]
 
*[[中文化專案主頁]]
 
*[[翻譯詞彙表]]
 
*[[翻譯詞彙表]]
*[http://www.mozdev.org/notes/l10n/howto-zh.html Mozilla 擴充套件中文化的小教學]
+
*[http://shyangs.110mb.com/howto-zh/howto-zh.html Mozilla 擴充套件中文化的小教學] [http://www.mozdev.org/notes/l10n/howto-zh.html]
*[http://forums.mozine.cn/index.php?showtopic=556 Mozilla 擴展中文化的小教學]
+
*[http://g.mozest.com/thread-556-1-1 Mozilla 擴展中文化的小教學]
*[http://forums.mozine.cn/index.php?showtopic=6490 Firefox 擴展中文化實例 教程]
+
*[http://g.mozest.com/viewthread.php?tid=6490 Firefox 擴展中文化實例教程]
 +
*[http://shyangs.110mb.com/howto-zh/editors-zh.html 可用於 Mozilla 地方化的工具] [http://www.mozdev.org/notes/l10n/unicode/editors-zh.html]
 +
*[http://moztw.org/docs/glossaries/ Mozilla Taiwan 正體中文化詞彙]
 +
*[http://forum.moztw.org/viewtopic.php?t=17709],[http://glossary.pank.org/?query= 中文化聯盟辭彙]
 +
*[http://terms.nict.gov.tw/search_b.php 學術名詞資訊網--名詞檢索]
 +
*[http://forum.moztw.org/viewtopic.php?p=26552&highlight=#26552 contents.rdf 檔案中的 displayName 等項目]
 +
 
 
=編碼=
 
=編碼=
 +
<!--
 +
http://tw.knowledge.yahoo.com/question/?qid=1105043006721
 +
American National Standard Institute
 +
忘記是美國國家標準局還是美國國家標準組織了....
 +
這個組織訂定的標準就稱ANSI XXXX....
 +
例如我們現在用的C語言就有個ANSI C標準....
 +
======================================================================
 +
雖然你敘述的技巧實在很爛....
 +
不過我猜你要問的是NOTEPAD裡面的ANSI格式....
 +
那是代表他用8Bit存一個英文....也就是用ASCII碼來存....
 +
所以你有打中文的話是無法用那個ANSI存的....
 +
-->
 +
<!--
 +
http://tw.knowledge.yahoo.com/question/?qid=1305082502317
 +
一般熟稔的字元是 ASCII ,ASCII 是美國標準資訊交換碼 (American Standard Code for Information Interchange) 的縮寫,有時也被稱為 ANSI 字元,這是因為 ASCII 是由美國國家標準局 (American National Standards Institute) 所制定的。某些時候 ( 通常於程式開發 ) 也被稱為 ASCIIZ ,則是表示字串結尾會附加一個零值 (Zero) 字元,用以標示字串結尾,以方便處理。
 +
 +
ASCII 的一個字元,相當於一個位元組的大小,從 0 到 255 共可容納 256 種字元,對那些螃蟹字母的國家來說,已經足夠了。但對一些使用了象形文字為基礎的國家,像是中日韓等國家來說,自然是不敷使用。於是 DBCS 系統就應運而生了。
 +
 +
DBCS 是雙位元組字元系統 ( Double Byte Char Systems ) 的縮寫,DBCS 保留了標準 ANSI 字元,但將擴充 ANSI 字元挪做己用。不要被 DBCS 的名稱給騙了,它在標準 ANSI 字元是使用一個位元組,祇有當地文字才使用兩個位元組。以中文來說,Big5 的編碼方式就是 DBCS 的編碼方式。
 +
 +
而大部份的資源中字串都是採用國際字元集( UNICODE ),UNICODE 的標準是於 1988 年由 Apple 與 Xerox 所發起,在 1991 成立聯盟推廣。目前許多著名公司如 Adobe、Apple、Borland、Digital、IBM、Lotus、Microsoft....等都是其成員。UNICODE 統一使用二個位元組來表達一個字元,這使得文字在不同國家間做資料交換更為簡易,而要撰寫可以同時支援不同語系的程式碼,也變得可行。
 +
 +
這些不同字元集之間,字元的轉換有時會成為大問題,所幸對大部份使用了資源的程式來說,這並不是問題,資源採用了固定的字串格式,而能夠處理資源的程式,自然也能夠處理這些字串。
 +
 +
不幸地是,在您動手中文化時,有時會發現有些程式並非完全使用資源,有些 ASCII 字串會夾雜在程式中。此時,一些字串的處理問題就會浮出枱面了。
 +
 +
這些問題,目前並沒有完整的解決方案,更沒有完美的處理工具。一旦遇到這種問題,通常都是霸王硬上弓,強迫用 Big5 編碼的中文填上了事。因此自然就延伸出了兩個常見問題,字串的顯示不完整,及字串長度不足。
 +
 +
字串的顯示不完整,與字元集轉換有關,肇因於把 Big5 的字串強迫當成 ASCII 字串,雪上加霜的是 NT 與 9X 作業系統間,內部使用的字元集又不相同,NT 系統內部採用 UNICODE,9X 系統內部則採用 ANSI + DBCS ,而兩者對外提供的服務則同時採用 ANSI + Wide- Char( 其實就是 UNICODE ),這些差異使得字元集轉換更形複雜。極有可能您會發現,做出來的東西一邊可以用,另一邊卻不行。這一類的問題,除非使用除錯器除錯,並修改程式碼,不然是不太能解決的。
 +
 +
字串長度不足則是另一個常見的問題,這個問題倒非無解,不過目前沒有很恰當的工具,祇能手動處理,而其過程之繁瑣足以令人卻步就是了。-->
 
*[http://tongwen.mozdev.org/text2uni.html Unicode 編碼查詢]
 
*[http://tongwen.mozdev.org/text2uni.html Unicode 編碼查詢]
 +
*[http://forum.moztw.org/viewtopic.php?t=11093 【套件中文化工具】 方便的 Unicode 轉 UCN 方法]
 
逸出萬國碼(escaped Unicode)(UTF-16BE)(UTF-16 Big Endian)
 
逸出萬國碼(escaped Unicode)(UTF-16BE)(UTF-16 Big Endian)
 +
 
=中文化=
 
=中文化=
 
==關於 .dtd 檔==
 
==關於 .dtd 檔==
 
*.dtd檔,一定要是 UTF8 編碼格式儲存,且不得有[http://en.wikipedia.org/wiki/Byte_Order_Mark BOM開頭字元]
 
*.dtd檔,一定要是 UTF8 編碼格式儲存,且不得有[http://en.wikipedia.org/wiki/Byte_Order_Mark BOM開頭字元]
 
==關於 .properties 檔==
 
==關於 .properties 檔==
*兩種編碼格式可以選擇 UTF-8 或 ANSI  
+
*兩種編碼格式可以選擇 UTF-8 或 ANSI ([http://zh.wikipedia.org/wiki/ASCII ASCII])
 
===UTF-8===
 
===UTF-8===
 
*必須是 NO [http://en.wikipedia.org/wiki/Byte_Order_Mark BOM] 的 UTF8 編碼格式儲存。
 
*必須是 NO [http://en.wikipedia.org/wiki/Byte_Order_Mark BOM] 的 UTF8 編碼格式儲存。
行 24: 行 62:
 
#以 ANSI 編碼格式儲存。
 
#以 ANSI 編碼格式儲存。
 
===編碼之選擇===
 
===編碼之選擇===
*Q: 將.properties檔存成ANSI編碼格式 好像比較麻煩?
+
*'''Q:''' 將.properties檔存成ANSI編碼格式 好像比較麻煩?
::A: 是的,存成 UTF-8 編碼格式 比較方便,也不會像天書一樣讓人看不懂;但極少數的擴充套件,對UTF-8的.properties檔 似乎消化不良,會出現錯誤,存成ANSI編碼格式 則可正常運作。例如:[http://pimpsofpain.com/imagebot.html ImageBot v3.3.5]的套件敘述,UTF-8 編碼格式會讓extensions description無法正常顯現。
+
::'''A:''' 是的,存成 UTF-8 編碼格式 比較方便,也不會像天書一樣讓人看不懂;但極少數的擴充套件,對 UTF-8 的.properties檔 似乎消化不良,會出現錯誤,存成 ANSI 編碼格式 則可正常運作。例如:[http://pimpsofpain.com/imagebot.html ImageBot v3.4.0]的套件敘述,UTF-8 編碼格式會讓extensions description無法正常顯現。
 +
 
 +
*'''Q:''' 如果想要中文化某一套件,我應該選擇 UTF-8 編碼格式 還是 ANSI 編碼格式?
 +
::'''A:''' 建議用 UTF-8 編碼格式,除非中文化後的套件出現未知錯誤,這時再用 ANSI編碼格式試試看;因為 UTF-8 編碼格式 的修改維護比 ANSI 編碼格式容易且方便。
 +
 
 +
*'''Q:''' 有那些套件的.properties翻譯檔是採用 ANSI 編碼格式?
 +
::'''A:''' 目前較著名的有:
 +
:::#'''Adblock Plus 0.7.2.4''' 的 '''ja-JP'''語系 : global.properties
 +
:::#'''All-in-One Gestures 0.18.0''' 的 '''ja-JP'''語系 : allinonegest.properties
 +
 
 +
 
 +
*'''Q:''' 如果我選擇ANSI編碼格式,但是其中有某一句敘述沒有翻譯(全為英文),我是否要將該字符串轉換成UTF-16BE 格式 呢?
 +
::'''A:''' 該字符串可以轉成 UTF-16BE 格式,也可以保留原句ANSI格式。
 +
:::'''例如:''' 原來 ''en-US (ANSI)'' 敘述'''host0.name= ImageShack''' ,放到 ''zh-TW (ANSI)'' 可以為'''host0.name= ImageShack''' ,也可以為'''host0.name=\u0049\u006d\u0061\u0067\u0065\u0053\u0068\u0061\u0063\u006b'''
 +
 
 +
*'''Q:''' 若我選擇ANSI編碼格式,但是其中有某一句敘述中英夾雜呢?
 +
::'''A:''' 須遵守一個要點: '''<big>不在[http://zh.wikipedia.org/wiki/ASCII ASCII字元表]裡的字元,必須轉成 UTF-16BE 字元格式</big>''' ;若是在ASCII字元表裡的字元 則可保留原ANSI格式,也可轉成 UTF-16BE 字元格式。
 +
:::'''例如:'''  原來 ''en-US (ANSI)'' 敘述'''template_editor.selected= Template selected -> %S''' ,放到 ''zh-TW (ANSI)'' 可以為'''template_editor.selected=\u7bc4\u672c\u9078\u64c7 -> %S''' ,也可以為'''template_editor.selected=\u7bc4\u672c\u9078\u64c7\u0020\u002d\u003e\u0020\u0025\u0053''',但不可以是'''template_editor.selected=範本選擇 -> %S'''
 +
 
 
=== .properties 檔 中文化實例===
 
=== .properties 檔 中文化實例===
==== ImageBot v3.3.5 ====
+
==== ImageBot v3.4.0 ====
 
*檔案 imgbot.properties
 
*檔案 imgbot.properties
 
===== en-US : ANSI 編碼格式 =====
 
===== en-US : ANSI 編碼格式 =====
行 73: 行 129:
 
host1.unknownError= Unknown Error
 
host1.unknownError= Unknown Error
 
</pre>
 
</pre>
===== zh-TW:UTF-8 編碼格式=====
+
===== zh-TW : UTF-8 編碼格式=====
 
<pre>
 
<pre>
 
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=一個圖片上傳管理器
 
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=一個圖片上傳管理器
行 84: 行 140:
 
upload_center.errorType=錯誤: 檔案格式
 
upload_center.errorType=錯誤: 檔案格式
 
upload_center.errorSize=錯誤: 檔案大小
 
upload_center.errorSize=錯誤: 檔案大小
upload_center.errorIntegrity=錯誤: 檔案完整性
+
upload_center.errorIntegrity=錯誤: 檔案不完整
 
upload_center.errorDupe=錯誤: 重複的圖片
 
upload_center.errorDupe=錯誤: 重複的圖片
 
upload_center.errorMisc=錯誤: Miscellaneous
 
upload_center.errorMisc=錯誤: Miscellaneous
upload_center.selectFiles= 選取欲上傳檔案
+
upload_center.selectFiles= 選取欲上傳的檔案
upload_center.supportedTypes= %S Supported Types
+
upload_center.supportedTypes= %S 支援的檔案類型
 
upload_center.initialized= ImageBot [上傳管理中心] initialized on %S
 
upload_center.initialized= ImageBot [上傳管理中心] initialized on %S
 
upload_center.imagesAdded=加入了 %S 張圖片
 
upload_center.imagesAdded=加入了 %S 張圖片
行 96: 行 152:
 
upload_center.imagesDeleted= 刪除了 %S 張圖片
 
upload_center.imagesDeleted= 刪除了 %S 張圖片
 
upload_center.confirmDelete=確定要刪除這 %S 張圖片嗎?
 
upload_center.confirmDelete=確定要刪除這 %S 張圖片嗎?
upload_center.imagesCopiedWithTemplate= %S image(s) copied with Template -> %S
+
upload_center.imagesCopiedWithTemplate=複製了 %S %S 樣式的範本
 
upload_center.filterDeactivated= Filter Deactivated
 
upload_center.filterDeactivated= Filter Deactivated
 
upload_center.filterActivated= Filter Activated: %S
 
upload_center.filterActivated= Filter Activated: %S
行 110: 行 166:
 
host0.incorrectUsernameOrPassword=使用者名稱和密碼不符合
 
host0.incorrectUsernameOrPassword=使用者名稱和密碼不符合
 
host0.name= ImageShack
 
host0.name= ImageShack
host0.syncNotLoggedIn=錯誤! 您必須登入 %S 才可同步化您的圖檔!
+
host0.syncNotLoggedIn=錯誤! 您必須登入 %S 才可同步處理您的圖檔!
host0.syncing=同步化 %S's %S 張圖片
+
host0.syncing=同步處理 %S %S 圖片
 
host1.incorrectUsernameOrPassword=使用者名稱或密碼輸入錯誤
 
host1.incorrectUsernameOrPassword=使用者名稱或密碼輸入錯誤
 
host1.tooManyFailedLogins= 多次嘗試登入失敗
 
host1.tooManyFailedLogins= 多次嘗試登入失敗
行 118: 行 174:
 
</pre>
 
</pre>
  
===== zh-TW:ANSI 編碼格式=====
+
===== zh-TW : ANSI 編碼格式=====
 
<pre>
 
<pre>
 
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=\u4e00\u500b\u5716\u7247\u4e0a\u50b3\u7ba1\u7406\u5668
 
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=\u4e00\u500b\u5716\u7247\u4e0a\u50b3\u7ba1\u7406\u5668
upload_center.loginTo =\u767b\u5165\u0020\u0025\u0053
+
upload_center.loginTo =\u767b\u5165 %S
upload_center.loggedInAs=\u5c07\u5e33\u6236\u0020\u0025\u0053\u0020\u767b\u51fa\u0020\u0025\u0053
+
upload_center.loggedInAs=\u5c07\u5e33\u6236 %S \u767b\u51fa %S
 
upload_center.clickToLogin=\u9ede\u6b64\u767b\u5165
 
upload_center.clickToLogin=\u9ede\u6b64\u767b\u5165
 
upload_center.clickToLogout=\u9ede\u6b64\u767b\u51fa
 
upload_center.clickToLogout=\u9ede\u6b64\u767b\u51fa
 
upload_center.loading=\u4e0a\u50b3\u4e2d
 
upload_center.loading=\u4e0a\u50b3\u4e2d
 
upload_center.done=\u5b8c\u6210
 
upload_center.done=\u5b8c\u6210
upload_center.errorType=\u932f\u8aa4\u003a\u0020\u6a94\u6848\u683c\u5f0f
+
upload_center.errorType=\u932f\u8aa4: \u6a94\u6848\u683c\u5f0f
upload_center.errorSize=\u932f\u8aa4\u003a\u0020\u6a94\u6848\u5927\u5c0f
+
upload_center.errorSize=\u932f\u8aa4: \u6a94\u6848\u5927\u5c0f
upload_center.errorIntegrity=\u932f\u8aa4\u003a\u0020\u6a94\u6848\u5b8c\u6574\u6027
+
upload_center.errorIntegrity=\u932f\u8aa4: \u6a94\u6848\u4e0d\u5b8c\u6574
upload_center.errorDupe=\u932f\u8aa4\u003a\u0020\u91cd\u8907\u7684\u5716\u7247
+
upload_center.errorDupe=\u932f\u8aa4: \u91cd\u8907\u7684\u5716\u7247
upload_center.errorMisc=\u932f\u8aa4\u003a\u0020\u004d\u0069\u0073\u0063\u0065\u006c\u006c\u0061\u006e\u0065\u006f\u0075\u0073
+
upload_center.errorMisc=\u932f\u8aa4: Miscellaneous
upload_center.selectFiles=\u9078\u53d6\u6b32\u4e0a\u50b3\u6a94\u6848
+
upload_center.selectFiles=\u9078\u53d6\u6b32\u4e0a\u50b3\u7684\u6a94\u6848
upload_center.supportedTypes=\u0025\u0053\u0020\u0053\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0054\u0079\u0070\u0065\u0073
+
upload_center.supportedTypes= %S \u652f\u63f4\u7684\u6a94\u6848\u985e\u578b
upload_center.initialized=\u0049\u006d\u0061\u0067\u0065\u0042\u006f\u0074\u0020\u005b\u4e0a\u50b3\u7ba1\u7406\u4e2d\u5fc3\u005d\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0069\u007a\u0065\u0064\u0020\u006f\u006e\u0020\u0025\u0053
+
upload_center.initialized= ImageBot [\u4e0a\u50b3\u7ba1\u7406\u4e2d\u5fc3] initialized on %S
upload_center.imagesAdded=\u52a0\u5165\u4e86\u0020\u0025\u0053\u0020\u5f35\u5716\u7247
+
upload_center.imagesAdded=\u52a0\u5165\u4e86 %S \u5f35\u5716\u7247
upload_center.imagesSelected=\u9078\u53d6\u0020\u0025\u0053\u0020\u5f35\u5716\u7247
+
upload_center.imagesSelected=\u9078\u53d6 %S \u5f35\u5716\u7247
upload_center.imagesCopied=\u8907\u88fd\u4e86\u0020\u0025\u0053\u0020\u5f35\u5716\u7247\u4e4b\u7db2\u5740
+
upload_center.imagesCopied=\u8907\u88fd\u4e86 %S \u5f35\u5716\u7247\u4e4b\u7db2\u5740
upload_center.imagesViewed=\u6aa2\u8996\u0020\u0025\u0053\u0020\u5f35\u5716\u7247
+
upload_center.imagesViewed=\u6aa2\u8996 %S \u5f35\u5716\u7247
upload_center.imagesDeleted=\u522a\u9664\u4e86\u0020\u0025\u0053\u0020\u5f35\u5716\u7247
+
upload_center.imagesDeleted=\u522a\u9664\u4e86 %S \u5f35\u5716\u7247
upload_center.confirmDelete=\u78ba\u5b9a\u8981\u522a\u9664\u9019\u0020\u0025\u0053\u0020\u5f35\u5716\u7247\u55ce\u003f
+
upload_center.confirmDelete=\u78ba\u5b9a\u8981\u522a\u9664\u9019 %S \u5f35\u5716\u7247\u55ce\u003f
upload_center.imagesCopiedWithTemplate=\u0025\u0053\u0020\u0069\u006d\u0061\u0067\u0065\u0028\u0073\u0029\u0020\u0063\u006f\u0070\u0069\u0065\u0064\u0020\u0077\u0069\u0074\u0068\u0020\u0054\u0065\u006d\u0070\u006c\u0061\u0074\u0065\u0020\u002d\u003e\u0020\u0025\u0053
+
upload_center.imagesCopiedWithTemplate=\u8907\u88fd\u4e86 %S \u5f35 %S \u6a23\u5f0f\u7684\u7bc4\u672c
upload_center.filterDeactivated=\u0046\u0069\u006c\u0074\u0065\u0072\u0020\u0044\u0065\u0061\u0063\u0074\u0069\u0076\u0061\u0074\u0065\u0064
+
upload_center.filterDeactivated= Filter Deactivated
upload_center.filterActivated=\u0046\u0069\u006c\u0074\u0065\u0072\u0020\u0041\u0063\u0074\u0069\u0076\u0061\u0074\u0065\u0064\u003a\u0020\u0025\u0053
+
upload_center.filterActivated= Filter Activated: %S
upload_center.requiresLogin=\u932f\u8aa4\u0021\u0020\u0025\u0053\u0020\u5fc5\u9808\u767b\u5165\u002c\u0020\u624d\u53ef\u4e0a\u50b3\u5716\u7247
+
upload_center.requiresLogin=\u932f\u8aa4! %S \u5fc5\u9808\u767b\u5165, \u624d\u53ef\u4e0a\u50b3\u5716\u7247
template_editor.initialized=\u0049\u006d\u0061\u0067\u0065\u0042\u006f\u0074\u0020\u005b\u7bc4\u672c\u7de8\u8f2f\u005d\u0020\u0069\u006e\u0069\u0074\u0069\u0061\u006c\u0069\u007a\u0065\u0064\u0020\u006f\u006e\u0020\u0025\u0053
+
template_editor.initialized= ImageBot [\u7bc4\u672c\u7de8\u8f2f] initialized on %S
template_editor.selected=\u7bc4\u672c\u9078\u64c7\u0020\u002d\u003e\u0020\u0025\u0053
+
template_editor.selected=\u7bc4\u672c\u9078\u64c7 -> %S
 
template_editor.movedUp=\u7bc4\u672c\u4e0a\u79fb
 
template_editor.movedUp=\u7bc4\u672c\u4e0a\u79fb
 
template_editor.movedDown=\u7bc4\u672c\u4e0b\u79fb
 
template_editor.movedDown=\u7bc4\u672c\u4e0b\u79fb
 
template_editor.created=\u65b0\u7bc4\u672c\u5275\u5efa
 
template_editor.created=\u65b0\u7bc4\u672c\u5275\u5efa
 
template_editor.saved=\u7bc4\u672c\u5132\u5b58
 
template_editor.saved=\u7bc4\u672c\u5132\u5b58
template_editor.deleted=\u7bc4\u672c\u522a\u9664\u0020\u002d\u003e\u0020\u0025\u0053
+
template_editor.deleted=\u7bc4\u672c\u522a\u9664 -> %S
patcher.done=\u5b8c\u6210\u0021
+
patcher.done=\u5b8c\u6210!
 
host0.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u548c\u5bc6\u78bc\u4e0d\u7b26\u5408
 
host0.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u548c\u5bc6\u78bc\u4e0d\u7b26\u5408
host0.name=\u0049\u006d\u0061\u0067\u0065\u0053\u0068\u0061\u0063\u006b
+
host0.name= ImageShack
host0.syncNotLoggedIn=\u932f\u8aa4\u0021\u0020\u60a8\u5fc5\u9808\u767b\u5165\u0020\u0025\u0053\u0020\u624d\u53ef\u540c\u6b65\u5316\u60a8\u7684\u5716\u6a94\u0021
+
host0.syncNotLoggedIn=\u932f\u8aa4! \u60a8\u5fc5\u9808\u767b\u5165 %S \u624d\u53ef\u540c\u6b65\u8655\u7406\u60a8\u7684\u5716\u6a94!
host0.syncing=\u540c\u6b65\u5316\u0020\u0025\u0053\u0027\u0073\u0020\u0025\u0053\u0020\u5f35\u5716\u7247
+
host0.syncing=\u540c\u6b65\u8655\u7406 %S \u7684 %S \u5716\u7247
 
host1.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u6216\u5bc6\u78bc\u8f38\u5165\u932f\u8aa4
 
host1.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u6216\u5bc6\u78bc\u8f38\u5165\u932f\u8aa4
 
host1.tooManyFailedLogins=\u591a\u6b21\u5617\u8a66\u767b\u5165\u5931\u6557
 
host1.tooManyFailedLogins=\u591a\u6b21\u5617\u8a66\u767b\u5165\u5931\u6557
host1.requiredFieldMissing=\u0052\u0065\u0071\u0075\u0069\u0072\u0065\u0064\u0020\u0066\u0069\u0065\u006c\u0064\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067
+
host1.requiredFieldMissing= Required field missing
 
host1.unknownError=\u672a\u77e5\u7684\u932f\u8aa4
 
host1.unknownError=\u672a\u77e5\u7684\u932f\u8aa4
 
</pre>
 
</pre>

於 2011年7月12日 (二) 15:55 的最新修訂

教學

編碼

逸出萬國碼(escaped Unicode)(UTF-16BE)(UTF-16 Big Endian)

中文化

關於 .dtd 檔

  • .dtd檔,一定要是 UTF8 編碼格式儲存,且不得有BOM開頭字元

關於 .properties 檔

  • 兩種編碼格式可以選擇 UTF-8 或 ANSI (ASCII)

UTF-8

  • 必須是 NO BOM 的 UTF8 編碼格式儲存。

ANSI

  1. 一行一敘述,按 [Enter] 換行。
  2. 翻譯的字符串必須是 UTF-16BE 格式。
    例如:
    敘述 upload_center.done=Done 譯成 upload_center.done=完成 ,還必須替換字符串為 upload_center.done=\u5b8c\u6210
  3. 以 ANSI 編碼格式儲存。

編碼之選擇

  • Q: 將.properties檔存成ANSI編碼格式 好像比較麻煩?
A: 是的,存成 UTF-8 編碼格式 比較方便,也不會像天書一樣讓人看不懂;但極少數的擴充套件,對 UTF-8 的.properties檔 似乎消化不良,會出現錯誤,存成 ANSI 編碼格式 則可正常運作。例如:ImageBot v3.4.0的套件敘述,UTF-8 編碼格式會讓extensions description無法正常顯現。
  • Q: 如果想要中文化某一套件,我應該選擇 UTF-8 編碼格式 還是 ANSI 編碼格式?
A: 建議用 UTF-8 編碼格式,除非中文化後的套件出現未知錯誤,這時再用 ANSI編碼格式試試看;因為 UTF-8 編碼格式 的修改維護比 ANSI 編碼格式容易且方便。
  • Q: 有那些套件的.properties翻譯檔是採用 ANSI 編碼格式?
A: 目前較著名的有:
  1. Adblock Plus 0.7.2.4ja-JP語系 : global.properties
  2. All-in-One Gestures 0.18.0ja-JP語系 : allinonegest.properties


  • Q: 如果我選擇ANSI編碼格式,但是其中有某一句敘述沒有翻譯(全為英文),我是否要將該字符串轉換成UTF-16BE 格式 呢?
A: 該字符串可以轉成 UTF-16BE 格式,也可以保留原句ANSI格式。
例如: 原來 en-US (ANSI) 敘述host0.name= ImageShack ,放到 zh-TW (ANSI) 可以為host0.name= ImageShack ,也可以為host0.name=\u0049\u006d\u0061\u0067\u0065\u0053\u0068\u0061\u0063\u006b
  • Q: 若我選擇ANSI編碼格式,但是其中有某一句敘述中英夾雜呢?
A: 須遵守一個要點: 不在ASCII字元表裡的字元,必須轉成 UTF-16BE 字元格式 ;若是在ASCII字元表裡的字元 則可保留原ANSI格式,也可轉成 UTF-16BE 字元格式。
例如: 原來 en-US (ANSI) 敘述template_editor.selected= Template selected -> %S ,放到 zh-TW (ANSI) 可以為template_editor.selected=\u7bc4\u672c\u9078\u64c7 -> %S ,也可以為template_editor.selected=\u7bc4\u672c\u9078\u64c7\u0020\u002d\u003e\u0020\u0025\u0053,但不可以是template_editor.selected=範本選擇 -> %S

.properties 檔 中文化實例

ImageBot v3.4.0

  • 檔案 imgbot.properties
en-US : ANSI 編碼格式
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description= An Image Uploader
upload_center.loginTo = Login to %S
upload_center.loggedInAs= Log %S out of %S
upload_center.clickToLogin= Click to Login
upload_center.clickToLogout= Click to Logout
upload_center.loading= Loading
upload_center.done= Done
upload_center.errorType= Error: File Type
upload_center.errorSize= Error: File Size
upload_center.errorIntegrity= Error: File Integrity
upload_center.errorDupe= Error: Duplicate Image
upload_center.errorMisc= Error: Miscellaneous
upload_center.selectFiles= Select Files to Upload
upload_center.supportedTypes= %S Supported Types
upload_center.initialized= ImageBot [Upload Center] initialized on %S
upload_center.imagesAdded= %S image(s) added
upload_center.imagesSelected= %S image(s) selected
upload_center.imagesCopied= %S image(s) copied
upload_center.imagesViewed= %S image(s) viewed
upload_center.imagesDeleted= %S image(s) deleted
upload_center.confirmDelete= Are you sure you want to delete %S image(s)?
upload_center.imagesCopiedWithTemplate= %S image(s) copied with Template -> %S
upload_center.filterDeactivated= Filter Deactivated
upload_center.filterActivated= Filter Activated: %S
upload_center.requiresLogin= Error! %S requires you to be logged in if uploading images.
template_editor.initialized= ImageBot [Template Editor] initialized on %S
template_editor.selected= Template selected -> %S
template_editor.movedUp= Template moved up
template_editor.movedDown= Template moved down
template_editor.created= New Template created
template_editor.saved= Template saved
template_editor.deleted= Template deleted -> %S
patcher.done= Done!
host0.incorrectUsernameOrPassword= Username and password you've entered do not match
host0.name= ImageShack
host0.syncNotLoggedIn= Error! You must be logged into %S to synchronize your images!
host0.syncing= Synchronizing %S's %S Images
host1.incorrectUsernameOrPassword= Incorrect Username or Password
host1.tooManyFailedLogins= Too many failed login attempts
host1.requiredFieldMissing= Required field missing
host1.unknownError= Unknown Error
zh-TW : UTF-8 編碼格式
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=一個圖片上傳管理器
upload_center.loginTo =登入 %S
upload_center.loggedInAs=將帳戶 %S 登出 %S
upload_center.clickToLogin=點此登入
upload_center.clickToLogout=點此登出
upload_center.loading=上傳中
upload_center.done=完成
upload_center.errorType=錯誤: 檔案格式
upload_center.errorSize=錯誤: 檔案大小
upload_center.errorIntegrity=錯誤: 檔案不完整
upload_center.errorDupe=錯誤: 重複的圖片
upload_center.errorMisc=錯誤: Miscellaneous
upload_center.selectFiles= 選取欲上傳的檔案
upload_center.supportedTypes= %S 支援的檔案類型
upload_center.initialized= ImageBot [上傳管理中心] initialized on %S
upload_center.imagesAdded=加入了 %S 張圖片
upload_center.imagesSelected=選取 %S 張圖片
upload_center.imagesCopied=複製了 %S 張圖片之網址
upload_center.imagesViewed=檢視 %S 張圖片
upload_center.imagesDeleted= 刪除了 %S 張圖片
upload_center.confirmDelete=確定要刪除這 %S 張圖片嗎?
upload_center.imagesCopiedWithTemplate=複製了 %S 張 %S 樣式的範本
upload_center.filterDeactivated= Filter Deactivated
upload_center.filterActivated= Filter Activated: %S
upload_center.requiresLogin= 錯誤! %S 必須登入, 才可上傳圖片
template_editor.initialized= ImageBot [範本編輯] initialized on %S
template_editor.selected=範本選擇 -> %S
template_editor.movedUp=範本上移
template_editor.movedDown=範本下移
template_editor.created=新範本創建
template_editor.saved=範本儲存
template_editor.deleted=範本刪除 -> %S
patcher.done=完成!
host0.incorrectUsernameOrPassword=使用者名稱和密碼不符合
host0.name= ImageShack
host0.syncNotLoggedIn=錯誤! 您必須登入 %S 才可同步處理您的圖檔!
host0.syncing=同步處理 %S 的 %S 圖片
host1.incorrectUsernameOrPassword=使用者名稱或密碼輸入錯誤
host1.tooManyFailedLogins= 多次嘗試登入失敗
host1.requiredFieldMissing= Required field missing
host1.unknownError=未知的錯誤
zh-TW : ANSI 編碼格式
extensions.{55009080-176f-11da-8cd6-0800200c9a66}.description=\u4e00\u500b\u5716\u7247\u4e0a\u50b3\u7ba1\u7406\u5668
upload_center.loginTo =\u767b\u5165 %S
upload_center.loggedInAs=\u5c07\u5e33\u6236 %S \u767b\u51fa %S
upload_center.clickToLogin=\u9ede\u6b64\u767b\u5165
upload_center.clickToLogout=\u9ede\u6b64\u767b\u51fa
upload_center.loading=\u4e0a\u50b3\u4e2d
upload_center.done=\u5b8c\u6210
upload_center.errorType=\u932f\u8aa4: \u6a94\u6848\u683c\u5f0f
upload_center.errorSize=\u932f\u8aa4: \u6a94\u6848\u5927\u5c0f
upload_center.errorIntegrity=\u932f\u8aa4: \u6a94\u6848\u4e0d\u5b8c\u6574
upload_center.errorDupe=\u932f\u8aa4: \u91cd\u8907\u7684\u5716\u7247
upload_center.errorMisc=\u932f\u8aa4: Miscellaneous
upload_center.selectFiles=\u9078\u53d6\u6b32\u4e0a\u50b3\u7684\u6a94\u6848
upload_center.supportedTypes= %S \u652f\u63f4\u7684\u6a94\u6848\u985e\u578b
upload_center.initialized= ImageBot [\u4e0a\u50b3\u7ba1\u7406\u4e2d\u5fc3] initialized on %S
upload_center.imagesAdded=\u52a0\u5165\u4e86 %S \u5f35\u5716\u7247
upload_center.imagesSelected=\u9078\u53d6 %S \u5f35\u5716\u7247
upload_center.imagesCopied=\u8907\u88fd\u4e86 %S \u5f35\u5716\u7247\u4e4b\u7db2\u5740
upload_center.imagesViewed=\u6aa2\u8996 %S \u5f35\u5716\u7247
upload_center.imagesDeleted=\u522a\u9664\u4e86 %S \u5f35\u5716\u7247
upload_center.confirmDelete=\u78ba\u5b9a\u8981\u522a\u9664\u9019 %S \u5f35\u5716\u7247\u55ce\u003f
upload_center.imagesCopiedWithTemplate=\u8907\u88fd\u4e86 %S \u5f35 %S \u6a23\u5f0f\u7684\u7bc4\u672c
upload_center.filterDeactivated= Filter Deactivated
upload_center.filterActivated= Filter Activated: %S
upload_center.requiresLogin=\u932f\u8aa4! %S \u5fc5\u9808\u767b\u5165, \u624d\u53ef\u4e0a\u50b3\u5716\u7247
template_editor.initialized= ImageBot [\u7bc4\u672c\u7de8\u8f2f] initialized on %S
template_editor.selected=\u7bc4\u672c\u9078\u64c7 -> %S
template_editor.movedUp=\u7bc4\u672c\u4e0a\u79fb
template_editor.movedDown=\u7bc4\u672c\u4e0b\u79fb
template_editor.created=\u65b0\u7bc4\u672c\u5275\u5efa
template_editor.saved=\u7bc4\u672c\u5132\u5b58
template_editor.deleted=\u7bc4\u672c\u522a\u9664 -> %S
patcher.done=\u5b8c\u6210!
host0.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u548c\u5bc6\u78bc\u4e0d\u7b26\u5408
host0.name= ImageShack
host0.syncNotLoggedIn=\u932f\u8aa4! \u60a8\u5fc5\u9808\u767b\u5165 %S \u624d\u53ef\u540c\u6b65\u8655\u7406\u60a8\u7684\u5716\u6a94!
host0.syncing=\u540c\u6b65\u8655\u7406 %S \u7684 %S \u5716\u7247
host1.incorrectUsernameOrPassword=\u4f7f\u7528\u8005\u540d\u7a31\u6216\u5bc6\u78bc\u8f38\u5165\u932f\u8aa4
host1.tooManyFailedLogins=\u591a\u6b21\u5617\u8a66\u767b\u5165\u5931\u6557
host1.requiredFieldMissing= Required field missing
host1.unknownError=\u672a\u77e5\u7684\u932f\u8aa4
個人工具