commit f9b074496fae87e095bd8c79e79dd497819cab8c
parent d47381512e642c5d981972f455565f3b0f6d1259
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 10 Jul 2011 22:55:27 +0000
Better error for unsupported translator
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -944,6 +944,12 @@ Zotero.Translate.Base.prototype = {
* Called when translator has been retrieved and loaded
*/
"_translateTranslatorLoaded":function() {
+ if(!this.translator[0].code) {
+ this.complete(false,
+ new Error("Translator "+this.translator[0].label+" is unsupported within this environment"));
+ return;
+ }
+
// set display options to default if they don't exist
if(!this._displayOptions) this._displayOptions = this.translator[0].displayOptions;