Fix some typos found by codespell (#1570)
$ codespell --skip="./.git,./styles,./translators,./chrome/locale,./resource,./chrome/content/zotero/xpcom/xregexp,./chrome/content/zotero/xpcom/rdf,./chrome/content/zotero/xpcom/citeproc.js,./test/resource,./node_modules" -q 2 -i 3 -w
This commit is contained in:
parent
4861b2e841
commit
97e53c5230
17 changed files with 20 additions and 20 deletions
|
@ -813,7 +813,7 @@ var Zotero_File_Interface = new function() {
|
||||||
|
|
||||||
|
|
||||||
function _saveBibliography(name, format) {
|
function _saveBibliography(name, format) {
|
||||||
// savable bibliography, using a file stream
|
// saveable bibliography, using a file stream
|
||||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||||
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
||||||
.createInstance(nsIFilePicker);
|
.createInstance(nsIFilePicker);
|
||||||
|
|
|
@ -503,7 +503,7 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ask whether to modifiy the preview
|
* Ask whether to modify the preview
|
||||||
*/
|
*/
|
||||||
function confirmRegenerate(focusShifted) {
|
function confirmRegenerate(focusShifted) {
|
||||||
if(document.getElementById('editor').value == _originalHTML || _originalHTML === undefined) {
|
if(document.getElementById('editor').value == _originalHTML || _originalHTML === undefined) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ var Zotero_Bibliography_Dialog = new function () {
|
||||||
// load (from selectItemsDialog.js)
|
// load (from selectItemsDialog.js)
|
||||||
doLoad();
|
doLoad();
|
||||||
|
|
||||||
// load bibliography entires
|
// load bibliography entries
|
||||||
_loadItems();
|
_loadItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1548,7 +1548,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
var convertItemHTMLToText = Zotero.Promise.coroutine(function* (itemID, html, maxLength) {
|
var convertItemHTMLToText = Zotero.Promise.coroutine(function* (itemID, html, maxLength) {
|
||||||
// Split elements to avoid word concatentation
|
// Split elements to avoid word concatenation
|
||||||
html = html.replace(/>/g, '> ');
|
html = html.replace(/>/g, '> ');
|
||||||
|
|
||||||
var text = HTMLToText(html);
|
var text = HTMLToText(html);
|
||||||
|
|
|
@ -802,7 +802,7 @@ Zotero.Integration.Fields = function(session, doc) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that it is appropriate to add fields to the current document at the current
|
* Checks that it is appropriate to add fields to the current document at the current
|
||||||
* positon, then adds one.
|
* position, then adds one.
|
||||||
*/
|
*/
|
||||||
Zotero.Integration.Fields.prototype.addField = async function(note) {
|
Zotero.Integration.Fields.prototype.addField = async function(note) {
|
||||||
// Get citation types if necessary
|
// Get citation types if necessary
|
||||||
|
@ -2075,7 +2075,7 @@ Zotero.Integration.URIMap.prototype.getZoteroItemForURIs = Zotero.Promise.corout
|
||||||
}
|
}
|
||||||
|
|
||||||
if(zoteroItem) {
|
if(zoteroItem) {
|
||||||
// make sure URI is up to date (in case user just began synching)
|
// make sure URI is up to date (in case user just began syncing)
|
||||||
var newURI = Zotero.URI.getItemURI(zoteroItem);
|
var newURI = Zotero.URI.getItemURI(zoteroItem);
|
||||||
if(newURI != uris[i]) {
|
if(newURI != uris[i]) {
|
||||||
uris[i] = newURI;
|
uris[i] = newURI;
|
||||||
|
|
|
@ -203,7 +203,7 @@ Zotero.Intl = new function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab all ASCII punctuation and space at the begining of string
|
// Grab all ASCII punctuation and space at the beginning of string
|
||||||
var initPunctuationRE = /^[\x20-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]+/;
|
var initPunctuationRE = /^[\x20-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]+/;
|
||||||
// Punctuation that should be ignored when sorting
|
// Punctuation that should be ignored when sorting
|
||||||
var ignoreInitRE = /["'[{(]+$/;
|
var ignoreInitRE = /["'[{(]+$/;
|
||||||
|
|
|
@ -354,7 +354,7 @@ Zotero.IPC.Pipe = new function() {
|
||||||
* Creates and listens on a pipe
|
* Creates and listens on a pipe
|
||||||
*
|
*
|
||||||
* @param {nsIFile} file The location where the pipe should be created
|
* @param {nsIFile} file The location where the pipe should be created
|
||||||
* @param {Function} callback A function to be passed any data recevied on the pipe
|
* @param {Function} callback A function to be passed any data received on the pipe
|
||||||
*/
|
*/
|
||||||
this.initPipeListener = function(file, callback) {
|
this.initPipeListener = function(file, callback) {
|
||||||
Zotero.debug("IPC: Initializing pipe at "+file.path);
|
Zotero.debug("IPC: Initializing pipe at "+file.path);
|
||||||
|
|
|
@ -592,7 +592,7 @@ Zotero.ItemTreeView.prototype.notify = Zotero.Promise.coroutine(function* (actio
|
||||||
refreshed = true;
|
refreshed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If refreshing a single item, clear caches and then unselect and reselect row
|
// If refreshing a single item, clear caches and then deselect and reselect row
|
||||||
else if (savedSelection.length == 1 && savedSelection[0] == ids[0]) {
|
else if (savedSelection.length == 1 && savedSelection[0] == ids[0]) {
|
||||||
let row = this._rowMap[ids[0]];
|
let row = this._rowMap[ids[0]];
|
||||||
delete this._cellTextCache[row];
|
delete this._cellTextCache[row];
|
||||||
|
|
|
@ -139,7 +139,7 @@ Zotero.MIMETypeHandler = new function () {
|
||||||
|
|
||||||
var _URIContentListener = new function() {
|
var _URIContentListener = new function() {
|
||||||
/**
|
/**
|
||||||
* Standard QI definiton
|
* Standard QI definition
|
||||||
*/
|
*/
|
||||||
this.QueryInterface = function(iid) {
|
this.QueryInterface = function(iid) {
|
||||||
if (iid.equals(Components.interfaces.nsISupports)
|
if (iid.equals(Components.interfaces.nsISupports)
|
||||||
|
@ -190,7 +190,7 @@ Zotero.MIMETypeHandler = new function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard QI definiton
|
* Standard QI definition
|
||||||
*/
|
*/
|
||||||
_StreamListener.prototype.QueryInterface = function(iid) {
|
_StreamListener.prototype.QueryInterface = function(iid) {
|
||||||
if (iid.equals(Components.interfaces.nsISupports)
|
if (iid.equals(Components.interfaces.nsISupports)
|
||||||
|
|
|
@ -1656,7 +1656,7 @@ Zotero.Schema = new function(){
|
||||||
/**
|
/**
|
||||||
* Process the response from the repository
|
* Process the response from the repository
|
||||||
*
|
*
|
||||||
* @return {Promise:Boolean} A promise for whether the update suceeded
|
* @return {Promise:Boolean} A promise for whether the update succeeded
|
||||||
**/
|
**/
|
||||||
async function _handleRepositoryResponse(xmlhttp, force) {
|
async function _handleRepositoryResponse(xmlhttp, force) {
|
||||||
if (!xmlhttp.responseXML){
|
if (!xmlhttp.responseXML){
|
||||||
|
|
|
@ -1418,7 +1418,7 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
||||||
content.appendChild(header);
|
content.appendChild(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show our own error mesages directly
|
// Show our own error messages directly
|
||||||
var msg;
|
var msg;
|
||||||
if (e instanceof Zotero.Error) {
|
if (e instanceof Zotero.Error) {
|
||||||
msg = e.message;
|
msg = e.message;
|
||||||
|
|
|
@ -103,7 +103,7 @@ Zotero.Translate.DOMWrapper = new function() {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can't call apply() directy on Xray-wrapped functions, so we have to be
|
// We can't call apply() directly on Xray-wrapped functions, so we have to be
|
||||||
// clever.
|
// clever.
|
||||||
function doApply(fun, invocant, args) {
|
function doApply(fun, invocant, args) {
|
||||||
// We implement Xrays to pure JS [[Object]] instances that filter out tricky
|
// We implement Xrays to pure JS [[Object]] instances that filter out tricky
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ Zotero.Translate.ItemGetter.prototype = {
|
||||||
|
|
||||||
if(!inExportFileDirectory) {
|
if(!inExportFileDirectory) {
|
||||||
throw new Error("Invalid path; attachment cannot be placed above export "+
|
throw new Error("Invalid path; attachment cannot be placed above export "+
|
||||||
"directory in the file hirarchy");
|
"directory in the file hierarchy");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create intermediate directories if they don't exist
|
// Create intermediate directories if they don't exist
|
||||||
|
|
|
@ -38,7 +38,7 @@ Zotero.Translators = new function() {
|
||||||
* Initializes translator cache, loading all translator metadata into memory
|
* Initializes translator cache, loading all translator metadata into memory
|
||||||
*
|
*
|
||||||
* @param {Object} [options.metadataCache] - Translator metadata keyed by filename, if already
|
* @param {Object} [options.metadataCache] - Translator metadata keyed by filename, if already
|
||||||
* available (e.g., in updateBundledFiles()), to avoid unnecesary file reads
|
* available (e.g., in updateBundledFiles()), to avoid unnecessary file reads
|
||||||
*/
|
*/
|
||||||
this.init = Zotero.Promise.coroutine(function* (options = {}) {
|
this.init = Zotero.Promise.coroutine(function* (options = {}) {
|
||||||
// Wait until bundled files have been updated, except when this is called by the schema update
|
// Wait until bundled files have been updated, except when this is called by the schema update
|
||||||
|
|
|
@ -1549,7 +1549,7 @@ Zotero.Utilities.Internal = {
|
||||||
*
|
*
|
||||||
* @param {Object} obj Target object
|
* @param {Object} obj Target object
|
||||||
* @param {String} prop Property to be defined
|
* @param {String} prop Property to be defined
|
||||||
* @param {Object} desc Propery descriptor. If not overriden, "enumerable" is true
|
* @param {Object} desc Property descriptor. If not overridden, "enumerable" is true
|
||||||
* @param {Object} opts Options:
|
* @param {Object} opts Options:
|
||||||
* lazy {Boolean} If true, the _getter_ is intended for late
|
* lazy {Boolean} If true, the _getter_ is intended for late
|
||||||
* initialization of the property. The getter is replaced with a simple
|
* initialization of the property. The getter is replaced with a simple
|
||||||
|
|
|
@ -42,7 +42,7 @@ async function getSignatures() {
|
||||||
try {
|
try {
|
||||||
signatures = await fs.readJson(signaturesFile);
|
signatures = await fs.readJson(signaturesFile);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
// if signatures files doesn't exist, return empty object istead
|
// if signatures files doesn't exist, return empty object instead
|
||||||
}
|
}
|
||||||
return signatures;
|
return signatures;
|
||||||
}
|
}
|
||||||
|
|
|
@ -573,7 +573,7 @@ describe("ZoteroPane", function() {
|
||||||
yield zp.setVirtual(group.libraryID, 'unfiled', false);
|
yield zp.setVirtual(group.libraryID, 'unfiled', false);
|
||||||
// Row should have been removed
|
// Row should have been removed
|
||||||
assert.isFalse(cv.getRowIndexByID(id));
|
assert.isFalse(cv.getRowIndexByID(id));
|
||||||
// Pref should have been udpated
|
// Pref should have been updated
|
||||||
assert.isFalse(JSON.parse(Zotero.Prefs.get('unfiledLibraries'))[group.libraryID]);
|
assert.isFalse(JSON.parse(Zotero.Prefs.get('unfiledLibraries'))[group.libraryID]);
|
||||||
// Group row shouldn't have changed
|
// Group row shouldn't have changed
|
||||||
assert.equal(cv.getRowIndexByID(group.treeViewID), groupRow);
|
assert.equal(cv.getRowIndexByID(group.treeViewID), groupRow);
|
||||||
|
@ -637,7 +637,7 @@ describe("ZoteroPane", function() {
|
||||||
assert.isOk(settings.default.dateAdded);
|
assert.isOk(settings.default.dateAdded);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should restore column visiblity when switching between default and feeds", function* () {
|
it("should restore column visibility when switching between default and feeds", function* () {
|
||||||
doc.getElementById('zotero-items-column-dateAdded').setAttribute('hidden', false);
|
doc.getElementById('zotero-items-column-dateAdded').setAttribute('hidden', false);
|
||||||
var feed = yield createFeed();
|
var feed = yield createFeed();
|
||||||
yield cv.selectLibrary(feed.libraryID);
|
yield cv.selectLibrary(feed.libraryID);
|
||||||
|
|
Loading…
Reference in a new issue