commit ca1cf1c8a33de997df70eb98076d018a1704a445
parent a4032fe817f7e50d5a5b940d8ae2ba788b2fef15
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 11 Sep 2008 22:58:18 +0000
use more consistent function names
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js
@@ -84,7 +84,7 @@ Zotero.Translators = new function() {
/**
* Gets the translator that corresponds to a given ID
*/
- this.getTranslatorById = function(id) {
+ this.get = function(id) {
if(!_initialized) this.init();
return _translators[id] ? _translators[id] : false;
}
@@ -92,7 +92,7 @@ Zotero.Translators = new function() {
/**
* Gets all translators for a specific type of translation
*/
- this.getTranslatorsByType = function(type) {
+ this.getAllForType = function(type) {
if(!_initialized) this.init();
return _cache[type].slice(0);
}
@@ -418,12 +418,12 @@ Zotero.Translate.prototype.setTranslator = function(translator) {
if(typeof(translator[i]) == "object") {
this.translator.push([translator[i]]);
} else {
- this.translator.push([Zotero.Translators.getTranslatorById(translator[i])]);
+ this.translator.push([Zotero.Translators.get(translator[i])]);
}
}
}
} else {
- this.translator = [Zotero.Translators.getTranslatorById(translator)];
+ this.translator = [Zotero.Translators.get(translator)];
}
return !!this.translator;
@@ -542,7 +542,7 @@ Zotero.Translate.prototype.getTranslators = function() {
// do not allow simultaneous instances of getTranslators
if(this._translatorSearch) this._translatorSearch.running = false;
- var translators = Zotero.Translators.getTranslatorsByType(this.type);
+ var translators = Zotero.Translators.getAllForType(this.type);
// create a new sandbox
this._generateSandbox();