Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Mozilla Extension の作り方 トラブルシュート

http://www.mozilla-japan.org/docs/tutorials/tinderstatus/*1。基本的に、実験用の環境を使っている、という前提で。

.jar ファイルを展開しているときに何か訊かれる
次のような感じで。[A]ll でいいみたいよ。
  :
 extracting: skin/modern/messenger/messageBody.css
replace skin/classic/messenger/virtualFolderListDialog.css? [y]es, [n]o, [A]ll, [N]one, [r]ename: 
ロケーションバーが表示されない
[File]-[Open Web Location] すると "Unnamed" というウィンドウが表示される場合、chrome/en-US.jar を unzip し忘れていないか確認。どんなプラットホームでも、このファイルは展開しないとだめ。
Step 5 を完了して Mozilla を再起動してもアイコンが表示されない
一旦 Mozilla を終了し、~/.mozilla/default/????????.slt/XUL.mfasl を削除してから再起動すること。XUL.mfasl を作らないようにさせる方法は今のところ不明。
Step 6 の「この関数から直接他の関数を呼べない」理由が分からない
「呼べない」は誤訳で「呼ばない」が正しい *2。updateTinderboxStatus 関数がコールバック関数になっていることを指している。
Step 7 の最後が意味不明
誤訳。「条件文で最初に悪いステータスを期待しているため、成功のステータスより先に悪いステータスが表示されます*3」tinderbox のページ *4 を見ると分かるけれど、成功を先に判定していたら「どれか一つでも成功していたら成功と表示される」ことになってしまう。この Extension の目的は「失敗しているクライアントがないかどうか*5」を確認することなので、それでは目的に合わない。

*1:原文は http://www.mozilla.org/docs/tutorials/tinderstatus/

*2:原文: ... we can't pass the object from one function to the other because the one doesn't call the other directly.

*3:原文: Because our conditional looks for worse states (bustage, test failures) first, it will display those states before displaying the success state.

*4:http://tinderbox.mozilla.org/SeaMonkey/panel.html

*5:"Tinderbox" の章。原文: most people only care about the overall situation, i.e. whether or not any clients have failed. で、この部分も誤訳