commit 0805a943bad6267c029cc1099a60f7821f5f0070 parent db313abc736f675eb5e1694f43f8d3315a47abad Author: Simon Kornblith <simon@simonster.com> Date: Thu, 9 May 2013 22:12:10 -0400 Merge branch '4.0' Conflicts: chrome/content/zotero/xpcom/zotero.js install.rdf update.rdf Diffstat:
122 files changed, 5344 insertions(+), 5028 deletions(-)
diff --git a/chrome/content/zotero/errorReport.xul b/chrome/content/zotero/errorReport.xul @@ -53,8 +53,11 @@ body += key + '=' + encodeURIComponent(parts[key]) + '&'; } body = body.substr(0, body.length - 1); - Zotero.HTTP.doPost("https://repo.zotero.org/repo/report", body, - _sendErrorReportCallback); + var url = 'https://repo.zotero.org/repo/report'; + Zotero.HTTP.promise('POST', url, + { body: body, successCodes: false, foreground: true }) + .then(_sendErrorReportCallback) + .done(); }); } @@ -65,17 +68,32 @@ return; } + var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + if (!xmlhttp.responseXML){ try { if (xmlhttp.status>1000){ - alert(Zotero.getString('errorReport.noNetworkConnection')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.noNetworkConnection') + ); } else { - alert(Zotero.getString('errorReport.invalidResponseRepository')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.invalidResponseRepository') + ); } } catch (e){ - alert(Zotero.getString('errorReport.repoCannotBeContacted')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.repoCannotBeContacted') + ); } wizard.rewind(); @@ -85,7 +103,11 @@ var reported = xmlhttp.responseXML.getElementsByTagName('reported'); if (reported.length != 1) { - alert(Zotero.getString('errorReport.invalidResponseRepository')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.invalidResponseRepository') + ); wizard.rewind(); return; } diff --git a/chrome/content/zotero/preferences/preferences_advanced.xul b/chrome/content/zotero/preferences/preferences_advanced.xul @@ -35,7 +35,6 @@ <preference id="pref-baseAttachmentPath" name="extensions.zotero.baseAttachmentPath" type="string"/> <preference id="pref-useDataDir" name="extensions.zotero.useDataDir" type="bool"/> <preference id="pref-dataDir" name="extensions.zotero.dataDir" type="string"/> - <preference id="pref-export-displayCharsetOption" name="extensions.zotero.export.displayCharsetOption" type="bool"/> <preference id="pref-debug-output-enableAfterRestart" name="extensions.zotero.debug.store" type="bool"/> <preference id="pref-import-charset" name="extensions.zotero.import.charset" type="string"/> <preference id="pref-openURL-resolver" name="extensions.zotero.openURL.resolver" type="string"/> diff --git a/chrome/content/zotero/preferences/preferences_export.xul b/chrome/content/zotero/preferences/preferences_export.xul @@ -33,6 +33,7 @@ <preferences> <preference id="pref-quickCopy-setting" name="extensions.zotero.export.quickCopy.setting" type="string"/> <preference id="pref-quickCopy-dragLimit" name="extensions.zotero.export.quickCopy.dragLimit" type="int"/> + <preference id="pref-export-displayCharsetOption" name="extensions.zotero.export.displayCharsetOption" type="bool"/> </preferences> <groupbox id="zotero-prefpane-export-groupbox"> diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js @@ -333,7 +333,9 @@ Zotero_Preferences.Sync = { // TODO: better way of checking for an active session? if (Zotero.Sync.Server.sessionIDComponent == 'sessionid=') { - Zotero.Sync.Server.login(callback); + Zotero.Sync.Server.login() + .then(callback) + .done(); } else { callback(); diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js @@ -57,7 +57,7 @@ if (!Array.indexOf) { }; } var CSL = { - PROCESSOR_VERSION: "1.0.451", + PROCESSOR_VERSION: "1.0.460", CONDITION_LEVEL_TOP: 1, CONDITION_LEVEL_BOTTOM: 2, PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/, @@ -292,6 +292,7 @@ var CSL = { "chapter-number", "collection-number", "edition", + "page", "issue", "locator", "number", @@ -350,7 +351,7 @@ var CSL = { ret[ret.length - 1] += str; return ret; }, - SKIP_WORDS: ["but", "or", "yet", "so", "for", "and", "nor", "a", "an", "the", "at", "by", "from", "in", "into", "of", "on", "to", "with", "up", "down", "as", "via", "onto", "over", "till", "de", "d'", "von", "van"], + SKIP_WORDS: ["but", "or", "yet", "so", "for", "and", "nor", "a", "an", "the", "at", "by", "from", "in", "into", "of", "on", "to", "with", "up", "down", "as", "via", "onto", "over", "till", "de", "d'", "von", "van", "before", "after", "c", "et", "through","ca"], FORMAT_KEY_SEQUENCE: [ "@strip-periods", "@font-style", @@ -386,6 +387,56 @@ var CSL = { "container-author", "collection-editor" ], + LANGS: { + "af-ZA":"Afrikaans", + "ar-AR":"Arabic", + "bg-BG":"Bulgarian", + "ca-AD":"Catalan", + "cs-CZ":"Czech", + "da-DK":"Danish", + "de-AT":"Austrian", + "de-CH":"German (CH)", + "de-DE":"German (DE)", + "el-GR":"Greek", + "en-GB":"English (GB)", + "en-US":"English (US)", + "es-ES":"Spanish", + "et-EE":"Estonian", + "eu":"European", + "fa-IR":"Persian", + "fi-FI":"Finnish", + "fr-CA":"French (CA)", + "fr-FR":"French (FR)", + "he-IL":"Hebrew", + "hr-HR":"Croatian", + "hu-HU":"Hungarian", + "is-IS":"Icelandic", + "it-IT":"Italian", + "ja-JP":"Japanese", + "km-KH":"Khmer", + "ko-KR":"Korean", + "lt-LT":"Lithuanian", + "lv-LV":"Latvian", + "mn-MN":"Mongolian", + "nb-NO":"Norwegian (Bokmål)", + "nl-NL":"Dutch", + "nn-NO":"Norwegian (Nynorsk)", + "pl-PL":"Polish", + "pt-BR":"Portuguese (BR)", + "pt-PT":"Portuguese (PT)", + "ro-RO":"Romanian", + "ru-RU":"Russian", + "sk-SK":"Slovak", + "sl-SI":"Slovenian", + "sr-RS":"Serbian", + "sv-SE":"Swedish", + "th-TH":"Thai", + "tr-TR":"Turkish", + "uk-UA":"Ukranian", + "vi-VN":"Vietnamese", + "zh-CN":"Chinese (CN)", + "zh-TW":"Chinese (TW)" + }, LANG_BASES: { af: "af_ZA", ar: "ar_AR", @@ -930,6 +981,20 @@ CSL_CHROME.prototype.flagDateMacros = function(myxml) { } } }; +var XML_PARSING; +if ("undefined" !== typeof CSL_IS_NODEJS) { + XML_PARSING = CSL_NODEJS; +} else if ("undefined" !== typeof CSL_E4X) { + XML_PARSING = CSL_E4X; +} else if ("undefined" !== typeof CSL_JSON) { + XML_PARSING = CSL_JSON; +} else { + XML_PARSING = CSL_CHROME; +} +CSL.System = {}; +CSL.System.Xml = { + "Parsing": XML_PARSING +}; CSL.getSortCompare = function () { if (CSL.stringCompare) { return CSL.stringCompare; @@ -986,2931 +1051,2506 @@ CSL.getSortCompare = function () { } return sortCompare; }; -CSL.Output = {}; -CSL.Output.Queue = function (state) { - this.levelname = ["top"]; - this.state = state; - this.queue = []; - this.empty = new CSL.Token("empty"); - var tokenstore = {}; - tokenstore.empty = this.empty; - this.formats = new CSL.Stack(tokenstore); - this.current = new CSL.Stack(this.queue); -}; -CSL.Output.Queue.prototype.pop = function () { - var drip = this.current.value(); - if (drip.length) { - return drip.pop(); +CSL.ambigConfigDiff = function(a, b) { + var ret, pos, len, ppos, llen; + if (a.names.length !== b.names.length) { + return 1; } else { - return drip.blobs.pop(); - } -}; -CSL.Output.Queue.prototype.getToken = function (name) { - var ret = this.formats.value()[name]; - return ret; -}; -CSL.Output.Queue.prototype.mergeTokenStrings = function (base, modifier) { - var base_token, modifier_token, ret, key; - base_token = this.formats.value()[base]; - modifier_token = this.formats.value()[modifier]; - ret = base_token; - if (modifier_token) { - if (!base_token) { - base_token = new CSL.Token(base, CSL.SINGLETON); - base_token.decorations = []; - } - ret = new CSL.Token(base, CSL.SINGLETON); - key = ""; - for (key in base_token.strings) { - if (base_token.strings.hasOwnProperty(key)) { - ret.strings[key] = base_token.strings[key]; - } - } - for (key in modifier_token.strings) { - if (modifier_token.strings.hasOwnProperty(key)) { - ret.strings[key] = modifier_token.strings[key]; + for (pos = 0, len = a.names.length; pos < len; pos += 1) { + if (a.names[pos] !== b.names[pos]) { + return 1; + } else { + for (ppos = 0, llen = a.givens[pos]; ppos < llen; ppos += 1) { + if (a.givens[pos][ppos] !== b.givens[pos][ppos]) { + return 1; + } + } } } - ret.decorations = base_token.decorations.concat(modifier_token.decorations); } - return ret; + if (a.disambiguate != b.disambiguate) { + return 1; + } + if (a.year_suffix !== b.year_suffix) { + return 1; + } + return 0; }; -CSL.Output.Queue.prototype.addToken = function (name, modifier, token) { - var newtok, attr; - newtok = new CSL.Token("output"); - if ("string" === typeof token) { - token = this.formats.value()[token]; +CSL.cloneAmbigConfig = function (config, oldconfig, tainters) { + var i, ilen, j, jlen, k, klen, param; + var ret = {}; + ret.names = []; + ret.givens = []; + ret.year_suffix = false; + ret.disambiguate = false; + for (i = 0, ilen = config.names.length; i < ilen; i += 1) { + param = config.names[i]; + ret.names[i] = param; } - if (token && token.strings) { - for (attr in token.strings) { - if (token.strings.hasOwnProperty(attr)) { - newtok.strings[attr] = token.strings[attr]; - } + for (i = 0, ilen = config.givens.length; i < ilen; i += 1) { + param = []; + for (j = 0, jlen = config.givens[i].length; j < jlen; j += 1) { + param.push(config.givens[i][j]); } - newtok.decorations = token.decorations; + ret.givens.push(param); } - if ("string" === typeof modifier) { - newtok.strings.delimiter = modifier; + if (oldconfig) { + ret.year_suffix = oldconfig.year_suffix; + ret.disambiguate = oldconfig.disambiguate; + } else { + ret.year_suffix = config.year_suffix; + ret.disambiguate = config.disambiguate; } - this.formats.value()[name] = newtok; + return ret; }; -CSL.Output.Queue.prototype.pushFormats = function (tokenstore) { - if (!tokenstore) { - tokenstore = {}; +CSL.getAmbigConfig = function () { + var config, ret; + config = this.tmp.disambig_request; + if (!config) { + config = this.tmp.disambig_settings; } - tokenstore.empty = this.empty; - this.formats.push(tokenstore); + ret = CSL.cloneAmbigConfig(config); + return ret; }; -CSL.Output.Queue.prototype.popFormats = function (tokenstore) { - this.formats.pop(); +CSL.getMaxVals = function () { + return this.tmp.names_max.mystack.slice(); }; -CSL.Output.Queue.prototype.startTag = function (name, token) { - var tokenstore = {}; - if (this.state.tmp["doing-macro-with-date"] && this.state.tmp.extension) { - token = this.empty; - name = "empty"; - } - tokenstore[name] = token; - this.pushFormats(tokenstore); - this.openLevel(name); +CSL.getMinVal = function () { + return this.tmp["et-al-min"]; }; -CSL.Output.Queue.prototype.endTag = function (name) { - this.closeLevel(); - this.popFormats(); +CSL.tokenExec = function (token, Item, item) { + var next, maybenext, exec, pos, len, debug; + debug = false; + next = token.next; + maybenext = false; + if (token.evaluator) { + next = token.evaluator(token, this, Item, item); + } + len = token.execs.length; + for (pos = 0; pos < len; pos += 1) { + exec = token.execs[pos]; + maybenext = exec.call(token, this, Item, item); + if (maybenext) { + next = maybenext; + } + } + return next; }; -CSL.Output.Queue.prototype.openLevel = function (token, ephemeral) { - var blob, curr, x, has_ephemeral; - if ("object" === typeof token) { - blob = new CSL.Blob(undefined, token); - } else if ("undefined" === typeof token) { - blob = new CSL.Blob(undefined, this.formats.value().empty, "empty"); +CSL.expandMacro = function (macro_key_token) { + var mkey, start_token, key, end_token, navi, macro_nodes, newoutput, mergeoutput, end_of_macro, func; + mkey = macro_key_token.postponed_macro; + if (this.build.macro_stack.indexOf(mkey) > -1) { + throw "CSL processor error: call to macro \"" + mkey + "\" would cause an infinite loop"; } else { - if (!this.formats.value() || !this.formats.value()[token]) { - throw "CSL processor error: call to nonexistent format token \"" + token + "\""; - } - blob = new CSL.Blob(undefined, this.formats.value()[token], token); + this.build.macro_stack.push(mkey); } - if (this.nestedBraces) { - blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); - blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); - blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); - blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); + var hasDate = false; + var macroid = false; + macro_nodes = this.sys.xml.getNodesByName(this.cslXml, 'macro', mkey); + if (macro_nodes.length) { + macroid = this.sys.xml.getAttributeValue(macro_nodes[0],'cslid'); + hasDate = this.sys.xml.getAttributeValue(macro_nodes[0], "macro-has-date"); } - curr = this.current.value(); - curr.push(blob); - this.current.push(blob); -}; -CSL.Output.Queue.prototype.closeLevel = function (name) { - if (name && name !== this.current.value().levelname) { - CSL.error("Level mismatch error: wanted " + name + " but found " + this.current.value().levelname); + if (hasDate) { + func = function (state, Item) { + if (state.tmp.extension) { + state.tmp["doing-macro-with-date"] = true; + } + }; + macro_key_token.execs.push(func); } - this.current.pop(); -}; -CSL.Output.Queue.prototype.append = function (str, tokname, notSerious, ignorePredecessor, noStripPeriods) { - var token, blob, curr; - var useblob = true; - if (notSerious) { - ignorePredecessor = true; + macro_key_token.tokentype = CSL.START; + macro_key_token.cslid = macroid; + CSL.Node.group.build.call(macro_key_token, this, this[this.build.area].tokens, true); + if (!this.sys.xml.getNodeValue(macro_nodes)) { + throw "CSL style error: undefined macro \"" + mkey + "\""; } - if (this.state.tmp["doing-macro-with-date"]) { - if (tokname !== "macro-with-date") { - return false; - } - if (tokname === "macro-with-date") { - tokname = "empty"; - } + navi = new this.getNavi(this, macro_nodes); + CSL.buildStyle.call(this, navi); + end_of_macro = new CSL.Token("group", CSL.END); + if (macro_key_token.decorations) { + end_of_macro.decorations = macro_key_token.decorations.slice(); } - if ("undefined" === typeof str) { - return false; + if (hasDate) { + func = function (state, Item) { + if (state.tmp.extension) { + state.tmp["doing-macro-with-date"] = false; + } + }; + end_of_macro.execs.push(func); } - if ("number" === typeof str) { - str = "" + str; + CSL.Node.group.build.call(end_of_macro, this, this[this.build.area].tokens, true); + this.build.macro_stack.pop(); +}; +CSL.XmlToToken = function (state, tokentype) { + var name, txt, attrfuncs, attributes, decorations, token, key, target; + name = state.sys.xml.nodename(this); + if (state.build.skip && state.build.skip !== name) { + return; } - if (!notSerious - && this.state.tmp.element_trace - && this.state.tmp.element_trace.value() === "suppress-me") { - return false; + if (!name) { + txt = state.sys.xml.content(this); + if (txt) { + state.build.text = txt; + } + return; } - blob = false; - if (!tokname) { - token = this.formats.value().empty; - } else if (tokname === "literal") { - token = true; - useblob = false; - } else if ("string" === typeof tokname) { - token = this.formats.value()[tokname]; - } else { - token = tokname; - } - if (!token) { - throw "CSL processor error: unknown format token name: " + tokname; - } - if (token.strings && "undefined" === typeof token.strings.delimiter) { - token.strings.delimiter = ""; - } - if ("string" === typeof str && str.length) { - str = str.replace(/ ([:;?!\u00bb])/g, "\u202f$1").replace(/\u00ab /g, "\u00ab\u202f"); - this.last_char_rendered = str.slice(-1); - str = str.replace(/\s+'/g, " \'").replace(/^'/g, " \'"); - if (!ignorePredecessor) { - this.state.tmp.term_predecessor = true; - } else if (notSerious) { - this.state.tmp.term_predecessor_name = true; - } - } - blob = new CSL.Blob(str, token); - if (this.nestedBraces) { - blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); - blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); - blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); - blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); - } - curr = this.current.value(); - if ("undefined" === typeof curr && this.current.mystack.length === 0) { - this.current.mystack.push([]); - curr = this.current.value(); - } - if ("string" === typeof blob.blobs) { - if (!ignorePredecessor) { - this.state.tmp.term_predecessor = true; - } else if (notSerious) { - this.state.tmp.term_predecessor_name = true; - } - } - if (!notSerious) { - this.state.parallel.AppendBlobPointer(curr); + if (!CSL.Node[state.sys.xml.nodename(this)]) { + throw "Undefined node name \"" + name + "\"."; } - if ("string" === typeof str) { - curr.push(blob); - if (blob.strings["text-case"]) { - blob.blobs = CSL.Output.Formatters[blob.strings["text-case"]](this.state, str); - } - if (this.state.tmp.strip_periods && !noStripPeriods) { - blob.blobs = blob.blobs.replace(/\.([^a-z]|$)/g, "$1"); - } - for (var i = blob.decorations.length - 1; i > -1; i += -1) { - if (blob.decorations[i][0] === "@quotes" && blob.decorations[i][1] === "true") { - blob.punctuation_in_quote = this.state.getOpt("punctuation-in-quote") - } - if (!blob.blobs.match(CSL.ROMANESQUE_REGEXP)) { - if (blob.decorations[i][0] === "@font-style") { - blob.decorations = blob.decorations.slice(0, i).concat(blob.decorations.slice(i + 1)); + attrfuncs = []; + attributes = state.sys.xml.attributes(this); + decorations = CSL.setDecorations.call(this, state, attributes); + token = new CSL.Token(name, tokentype); + if (tokentype !== CSL.END || name === "if" || name === "else-if" || name === "layout") { + for (key in attributes) { + if (attributes.hasOwnProperty(key)) { + if (tokentype === CSL.END && key !== "@language" && key !== "@locale") { + continue; + } + if (attributes.hasOwnProperty(key)) { + if (CSL.Attributes[key]) { + try { + CSL.Attributes[key].call(token, state, "" + attributes[key]); + } catch (e) { + CSL.error(e); + throw "CSL processor error, " + key + " attribute: " + e; + } + } else { + CSL.debug("warning: undefined attribute \""+key+"\" in style"); + } } } } - this.state.fun.flipflopper.init(str, blob); - this.state.fun.flipflopper.processTags(); - } else if (useblob) { - curr.push(blob); - } else { - curr.push(str); + token.decorations = decorations; } - return true; + target = state[state.build.area].tokens; + CSL.Node[name].build.call(token, state, target); }; -CSL.Output.Queue.prototype.string = function (state, myblobs, blob) { - var i, ilen, j, jlen, b; - var txt_esc = CSL.getSafeEscape(this.state); - var blobs = myblobs.slice(); - var ret = []; - if (blobs.length === 0) { - return ret; +CSL.DateParser = function () { + var jiy_list, jiy, jiysplitter, jy, jmd, jr, pos, key, val, yearlast, yearfirst, number, rangesep, fuzzychar, chars, rex, rexdash, rexdashslash, rexslashdash, seasonstrs, seasonrexes, seasonstr, monthstrs, monthstr, mrexes, seasonrex, len, jiymatchstring, jiymatcher; + jiy_list = [ + ["\u660E\u6CBB", 1867], + ["\u5927\u6B63", 1911], + ["\u662D\u548C", 1925], + ["\u5E73\u6210", 1988] + ]; + jiy = {}; + len = jiy_list.length; + for (pos = 0; pos < len; pos += 1) { + key = jiy_list[pos][0]; + val = jiy_list[pos][1]; + jiy[key] = val; } - var blob_delimiter = ""; - if (blob) { - blob_delimiter = blob.strings.delimiter; - } else { - state.tmp.count_offset_characters = false; - state.tmp.offset_characters = 0; + jiymatchstring = []; + for (pos = 0; pos < len; pos += 1) { + val = jiy_list[pos][0]; + jiymatchstring.push(val); } - if (blob && blob.new_locale) { - blob.old_locale = state.opt.lang; - state.opt.lang = blob.new_locale; + jiymatchstring = jiymatchstring.join("|"); + jiysplitter = "(?:" + jiymatchstring + ")(?:[0-9]+)"; + jiysplitter = new RegExp(jiysplitter); + jiymatcher = "(?:" + jiymatchstring + ")(?:[0-9]+)"; + jiymatcher = new RegExp(jiymatcher, "g"); + jmd = /(\u6708|\u5E74)/g; + jy = /\u65E5/; + jr = /\u301c/g; + yearlast = "(?:[?0-9]{1,2}%%NUMD%%){0,2}[?0-9]{4}(?![0-9])"; + yearfirst = "[?0-9]{4}(?:%%NUMD%%[?0-9]{1,2}){0,2}(?![0-9])"; + number = "[?0-9]{1,3}"; + rangesep = "[%%DATED%%]"; + fuzzychar = "[?~]"; + chars = "[a-zA-Z]+"; + rex = "(" + yearfirst + "|" + yearlast + "|" + number + "|" + rangesep + "|" + fuzzychar + "|" + chars + ")"; + rexdash = new RegExp(rex.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "-")); + rexdashslash = new RegExp(rex.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "\/")); + rexslashdash = new RegExp(rex.replace(/%%NUMD%%/g, "\/").replace(/%%DATED%%/g, "-")); + seasonstrs = []; + seasonrexes = []; + len = seasonstrs.length; + for (pos = 0; pos < len; pos += 1) { + seasonrex = new RegExp(seasonstrs[pos] + ".*"); + seasonrexes.push(seasonrex); } - var blobjr, use_suffix, use_prefix, params; - for (i = 0, ilen = blobs.length; i < ilen; i += 1) { - blobjr = blobs[i]; - if (blobjr.strings.first_blob) { - state.tmp.count_offset_characters = blobjr.strings.first_blob; + this.mstrings = "january february march april may june july august september october november december spring summer fall winter spring summer"; + this.mstrings = this.mstrings.split(" "); + this.setOrderDayMonth = function() { + this.monthguess = 1; + this.dayguess = 0; + }; + this.setOrderMonthDay = function() { + this.monthguess = 0; + this.dayguess = 1; + }; + this.setOrderMonthDay(); + this.resetMonths = function() { + var i, ilen, j, jlen; + this.msets = []; + for (i = 0, ilen = this.mstrings.length; i < ilen; i += 1) { + this.msets.push([this.mstrings[i]]); } - if ("string" === typeof blobjr.blobs) { - if ("number" === typeof blobjr.num) { - ret.push(blobjr); - } else if (blobjr.blobs) { - b = txt_esc(blobjr.blobs); - var blen = b.length; - if (!state.tmp.suppress_decorations) { - for (j = 0, jlen = blobjr.decorations.length; j < jlen; j += 1) { - params = blobjr.decorations[j]; - if (params[0] === "@showid") { - continue; + this.mabbrevs = []; + for (i = 0, ilen = this.msets.length; i < ilen; i += 1) { + this.mabbrevs.push([]); + for (j = 0, jlen = this.msets[i].length; j < jlen; j += 1) { + this.mabbrevs[i].push(this.msets[i][0].slice(0, 3)); + } + } + this.mrexes = []; + for (i = 0, ilen = this.mabbrevs.length; i < ilen; i += 1) { + this.mrexes.push(new RegExp("(?:" + this.mabbrevs[i].join("|") + ")")); + } + }; + this.resetMonths(); + this.addMonths = function(lst) { + var i, ilen, j, jlen, k, klen, jkey, kkey; + if ("string" === typeof lst) { + lst = lst.split(/\s+/); + } + if (lst.length !== 12 && lst.length !== 16) { + CSL.debug("month [+season] list of "+lst.length+", expected 12 or 16. Ignoring."); + return; + } + var othermatch = []; + var thismatch = []; + for (i = 0, ilen = lst.length; i < ilen; i += 1) { + var abbrevlen = false; + var skip = false; + var insert = 3; + var extend = {}; + for (j = 0, jlen = this.mabbrevs.length; j < jlen; j += 1) { + extend[j] = {}; + if (j === i) { + for (k = 0, klen = this.mabbrevs[i].length; k < klen; k += 1) { + if (this.mabbrevs[i][k] === lst[i].slice(0, this.mabbrevs[i][k].length)) { + skip = true; + break; } - if (state.normalDecorIsOrphan(blobjr, params)) { - continue; + } + } else { + for (k = 0, klen = this.mabbrevs[j].length; k < klen; k += 1) { + abbrevlen = this.mabbrevs[j][k].length; + if (this.mabbrevs[j][k] === lst[i].slice(0, abbrevlen)) { + while (this.msets[j][k].slice(0, abbrevlen) === lst[i].slice(0, abbrevlen)) { + if (abbrevlen > lst[i].length || abbrevlen > this.msets[j][k].length) { + CSL.debug("unable to disambiguate month string in date parser: "+lst[i]); + break; + } else { + abbrevlen += 1; + } + } + insert = abbrevlen; + extend[j][k] = abbrevlen; } - b = state.fun.decorate[params[0]][params[1]](state, b, params[2]); } } - if (b && b.length) { - b = txt_esc(blobjr.strings.prefix, state.tmp.nestedBraces) + b + txt_esc(blobjr.strings.suffix, state.tmp.nestedBraces); - if (state.opt.development_extensions.csl_reverse_lookup_support && !state.tmp.suppress_decorations) { - for (j = 0, jlen = blobjr.decorations.length; j < jlen; j += 1) { - params = blobjr.decorations[j]; - if (params[0] === "@showid") { - b = state.fun.decorate[params[0]][params[1]](state, b, params[2]); + for (jkey in extend) { + if (extend.hasOwnProperty(jkey)) { + for (kkey in extend[jkey]) { + if (extend[jkey].hasOwnProperty(kkey)) { + abbrevlen = extend[jkey][kkey]; + jkey = parseInt(jkey, 10); + kkey = parseInt(kkey, 10); + this.mabbrevs[jkey][kkey] = this.msets[jkey][kkey].slice(0, abbrevlen); } } } - ret.push(b); - if (state.tmp.count_offset_characters) { - state.tmp.offset_characters += (blen + blobjr.strings.suffix.length + blobjr.strings.prefix.length); - } } } - } else if (blobjr.blobs.length) { - var addtoret = state.output.string(state, blobjr.blobs, blobjr); - ret = ret.concat(addtoret); - } - if (blobjr.strings.first_blob) { - state.registry.registry[blobjr.strings.first_blob].offset = state.tmp.offset_characters; - state.tmp.count_offset_characters = false; + if (!skip) { + this.msets[i].push(lst[i]); + this.mabbrevs[i].push(lst[i].slice(0, insert)); + } } - } - for (i=0,ilen=ret.length - 1;i<ilen;i+=1) { - if ("number" === typeof ret[i].num && "number" === typeof ret[i+1].num && !ret[i+1].UGLY_DELIMITER_SUPPRESS_HACK) { - ret[i].strings.suffix = txt_esc(blob_delimiter); - ret[i+1].successor_prefix = ""; - ret[i+1].UGLY_DELIMITER_SUPPRESS_HACK = true; + this.mrexes = []; + for (i = 0, ilen = this.mabbrevs.length; i < ilen; i += 1) { + this.mrexes.push(new RegExp("(?:" + this.mabbrevs[i].join("|") + ")")); } - } - var span_split = 0; - for (i = 0, ilen = ret.length; i < ilen; i += 1) { - if ("string" === typeof ret[i]) { - span_split = (parseInt(i, 10) + 1); - if (i < ret.length - 1 && "object" === typeof ret[i + 1]) { - if (blob_delimiter && !ret[i + 1].UGLY_DELIMITER_SUPPRESS_HACK) { - ret[i] += txt_esc(blob_delimiter); + }; + this.parse = function (txt) { + var slash, dash, lst, l, m, number, note, thedate, slashcount, range_delim, date_delim, ret, delim_pos, delims, isrange, suff, date, breakme, item, delim, element, mm, slst, mmpos, i, ilen, j, jlen, k, klen; + if (txt) { + txt = "" + txt; + txt = txt.replace(/\s*[0-9]{2}:[0-9]{2}(?::[0-9]+)/,""); + m = txt.match(jmd); + if (m) { + txt = txt.replace(/\s+/, "", "g"); + txt = txt.replace(jy, "", "g"); + txt = txt.replace(jmd, "-", "g"); + txt = txt.replace(jr, "/", "g"); + txt = txt.replace("-/", "/", "g"); + txt = txt.replace(/-$/,"", "g"); + slst = txt.split(jiysplitter); + lst = []; + mm = txt.match(jiymatcher); + if (mm) { + var mmx = []; + for (pos = 0, len = mm.length; pos < len; pos += 1) { + mmx = mmx.concat(mm[pos].match(/([^0-9]+)([0-9]+)/).slice(1)); } - ret[i + 1].UGLY_DELIMITER_SUPPRESS_HACK = true; + for (pos = 0, len = slst.length; pos < len; pos += 1) { + lst.push(slst[pos]); + if (pos !== (len - 1)) { + mmpos = (pos * 2); + lst.push(mmx[mmpos]); + lst.push(mmx[mmpos + 1]); + } + } + } else { + lst = slst; + } + l = lst.length; + for (pos = 1; pos < l; pos += 3) { + lst[pos + 1] = jiy[lst[pos]] + parseInt(lst[pos + 1], 10); + lst[pos] = ""; } + txt = lst.join(""); + txt = txt.replace(/\s*-\s*$/, "").replace(/\s*-\s*\//, "/"); + txt = txt.replace(/\.\s*$/, ""); + txt = txt.replace(/\.(?! )/, ""); + slash = txt.indexOf("/"); + dash = txt.indexOf("-"); } } - if (blob && (blob.decorations.length || blob.strings.suffix || blob.strings.prefix)) { - span_split = ret.length; - } - var blobs_start = state.output.renderBlobs(ret.slice(0, span_split), blob_delimiter, true); - if (blobs_start && blob && (blob.decorations.length || blob.strings.suffix || blob.strings.prefix)) { - if (!state.tmp.suppress_decorations) { - for (i = 0, ilen = blob.decorations.length; i < ilen; i += 1) { - params = blob.decorations[i]; - if (["@cite","@bibliography", "@display", "@showid"].indexOf(params[0]) > -1) { + txt = txt.replace(/([A-Za-z])\./g, "$1"); + number = ""; + note = ""; + thedate = {}; + if (txt.slice(0, 1) === "\"" && txt.slice(-1) === "\"") { + thedate.literal = txt.slice(1, -1); + return thedate; + } + if (slash > -1 && dash > -1) { + slashcount = txt.split("/"); + if (slashcount.length > 3) { + range_delim = "-"; + date_delim = "/"; + lst = txt.split(rexslashdash); + } else { + range_delim = "/"; + date_delim = "-"; + lst = txt.split(rexdashslash); + } + } else { + txt = txt.replace("/", "-"); + range_delim = "-"; + date_delim = "-"; + lst = txt.split(rexdash); + } + ret = []; + len = lst.length; + for (pos = 0; pos < len; pos += 1) { + item = lst[pos]; + m = item.match(/^\s*([\-\/]|[a-zA-Z]+|[\-~?0-9]+)\s*$/); + if (m) { + ret.push(m[1]); + } + } + delim_pos = ret.indexOf(range_delim); + delims = []; + isrange = false; + if (delim_pos > -1) { + delims.push([0, delim_pos]); + delims.push([(delim_pos + 1), ret.length]); + isrange = true; + } else { + delims.push([0, ret.length]); + } + suff = ""; + for (i = 0, ilen = delims.length; i < ilen; i += 1) { + delim = delims[i]; + date = ret.slice(delim[0], delim[1]); + for (j = 0, jlen = date.length; j < jlen; j += 1) { + element = date[j]; + if (element.indexOf(date_delim) > -1) { + this.parseNumericDate(thedate, date_delim, suff, element); continue; } - if (state.normalDecorIsOrphan(blobjr, params)) { + if (element.match(/[0-9]{4}/)) { + thedate[("year" + suff)] = element.replace(/^0*/, ""); + continue; + } + breakme = false; + for (k = 0, klen = this.mrexes.length; k < klen; k += 1) { + if (element.toLocaleLowerCase().match(this.mrexes[k])) { + thedate[("month" + suff)] = "" + (parseInt(k, 10) + 1); + breakme = true; + break; + } + if (breakme) { + continue; + } + if (element.match(/^[0-9]+$/)) { + number = parseInt(element, 10); + } + if (element.toLocaleLowerCase().match(/^bc/) && number) { + thedate[("year" + suff)] = "" + (number * -1); + number = ""; + continue; + } + if (element.toLocaleLowerCase().match(/^ad/) && number) { + thedate[("year" + suff)] = "" + number; + number = ""; + continue; + } + } + breakme = false; + for (k = 0, klen = seasonrexes.length; k < klen; k += 1) { + if (element.toLocaleLowerCase().match(seasonrexes[k])) { + thedate[("season" + suff)] = "" + (parseInt(k, 10) + 1); + breakme = true; + break; + } + } + if (breakme) { + continue; + } + if (element === "~" || element === "?" || element === "c" || element.match(/^cir/)) { + thedate.circa = "" + 1; + continue; + } + if (element.toLocaleLowerCase().match(/(?:mic|tri|hil|eas)/) && !thedate[("season" + suff)]) { + note = element; continue; } - blobs_start = state.fun.decorate[params[0]][params[1]](state, blobs_start, params[2]); } - } - b = blobs_start; - use_suffix = blob.strings.suffix; - if (b && b.length) { - use_prefix = blob.strings.prefix; - b = txt_esc(use_prefix, state.tmp.nestedBraces) + b + txt_esc(use_suffix, state.tmp.nestedBraces); - if (state.tmp.count_offset_characters) { - state.tmp.offset_characters += (use_prefix.length + use_suffix.length); + if (number) { + thedate[("day" + suff)] = number; + number = ""; + } + if (note && !thedate[("season" + suff)]) { + thedate[("season" + suff)] = note; + note = ""; } + suff = "_end"; } - blobs_start = b; - if (!state.tmp.suppress_decorations) { - for (i = 0, ilen = blob.decorations.length; i < ilen; i += 1) { - params = blob.decorations[i]; - if (["@cite","@bibliography", "@display", "@showid"].indexOf(params[0]) === -1) { - continue; + if (isrange) { + for (j = 0, jlen = CSL.DATE_PARTS_ALL.length; j < jlen; j += 1) { + item = CSL.DATE_PARTS_ALL[j]; + if (thedate[item] && !thedate[(item + "_end")]) { + thedate[(item + "_end")] = thedate[item]; + } else if (!thedate[item] && thedate[(item + "_end")]) { + thedate[item] = thedate[(item + "_end")]; } - blobs_start = state.fun.decorate[params[0]][params[1]].call(blob, state, blobs_start, params[2]); } } - } - var blobs_end = ret.slice(span_split, ret.length); - if (!blobs_end.length && blobs_start) { - ret = [blobs_start]; - } else if (blobs_end.length && !blobs_start) { - ret = blobs_end; - } else if (blobs_start && blobs_end.length) { - ret = [blobs_start].concat(blobs_end); - } - if ("undefined" === typeof blob) { - this.queue = []; - this.current.mystack = []; - this.current.mystack.push(this.queue); - if (state.tmp.suppress_decorations) { - ret = state.output.renderBlobs(ret, undefined, true); + if (!thedate.year) { + thedate = { "literal": txt }; } - } else if ("boolean" === typeof blob) { - ret = state.output.renderBlobs(ret, undefined, true); - } - if (blob && blob.new_locale) { - state.opt.lang = blob.old_locale; - } - return ret; -}; -CSL.Output.Queue.prototype.clearlevel = function () { - var blob, pos, len; - blob = this.current.value(); - len = blob.blobs.length; - for (pos = 0; pos < len; pos += 1) { - blob.blobs.pop(); - } -}; -CSL.Output.Queue.prototype.renderBlobs = function (blobs, delim, in_cite) { - var state, ret, ret_last_char, use_delim, i, blob, pos, len, ppos, llen, pppos, lllen, res, str, params, txt_esc; - txt_esc = CSL.getSafeEscape(this.state); - if (!delim) { - delim = ""; - } - state = this.state; - ret = ""; - ret_last_char = []; - use_delim = ""; - len = blobs.length; - var start = true; - for (pos = 0; pos < len; pos += 1) { - if (blobs[pos].checkNext) { - blobs[pos].checkNext(blobs[(pos + 1)],start); - start = false; - } else { - start = true; - } - } - var doit = true; - for (pos = blobs.length - 1; pos > 0; pos += -1) { - if (blobs[pos].checkLast) { - if (doit && blobs[pos].checkLast(blobs[pos - 1])) { - doit = false; - } - } else { - doit = true; - } - } - len = blobs.length; - for (pos = 0; pos < len; pos += 1) { - blob = blobs[pos]; - if (ret) { - use_delim = delim; + if (this.use_array) { + this.toArray(thedate); } - if (blob && "string" === typeof blob) { - ret += txt_esc(use_delim); - ret += blob; - if (state.tmp.count_offset_characters) { - state.tmp.offset_characters += (use_delim.length); - } - } else if (blob.status !== CSL.SUPPRESS) { - str = blob.formatter.format(blob.num, blob.gender); - var strlen = str.replace(/<[^>]*>/g, "").length; - this.append(str, "empty", true); - var str_blob = this.pop(); - var count_offset_characters = state.tmp.count_offset_characters; - str = this.string(state, [str_blob], false); - state.tmp.count_offset_characters = count_offset_characters; - if (blob.strings["text-case"]) { - str = CSL.Output.Formatters[blob.strings["text-case"]](this.state, str); + return thedate; + }; + this.returnAsArray = function () { + this.use_array = true; + }; + this.returnAsKeys = function () { + this.use_array = false; + }; + this.toArray = function (thedate) { + var i, ilen, part; + thedate["date-parts"] = []; + thedate["date-parts"].push([]); + var slicelen = 0; + for (i = 0, ilen = 3; i < ilen; i += 1) { + part = ["year", "month", "day"][i]; + if (!thedate[part]) { + break; } - if (str && this.state.tmp.strip_periods) { - str = str.replace(/\.([^a-z]|$)/g, "$1"); + slicelen += 1; + thedate["date-parts"][0].push(thedate[part]); + delete thedate[part]; + } + for (i = 0, ilen = slicelen; i < ilen; i += 1) { + part = ["year_end", "month_end", "day_end"][i]; + if (thedate[part] && thedate["date-parts"].length === 1) { + thedate["date-parts"].push([]); } - if (!state.tmp.suppress_decorations) { - llen = blob.decorations.length; - for (ppos = 0; ppos < llen; ppos += 1) { - params = blob.decorations[ppos]; - if (state.normalDecorIsOrphan(blob, params)) { - continue; - } - str = state.fun.decorate[params[0]][params[1]](state, str, params[2]); + thedate["date-parts"][1].push(thedate[part]); + delete thedate[part]; + } + }; + this.parseNumericDate = function (ret, delim, suff, txt) { + var lst, i, ilen; + lst = txt.split(delim); + for (i = 0, ilen = lst.length; i < ilen; i += 1) { + if (lst[i].length === 4) { + ret[("year" + suff)] = lst[i].replace(/^0*/, ""); + if (!i) { + lst = lst.slice(1); + } else { + lst = lst.slice(0, i); } + break; } - str = txt_esc(blob.strings.prefix) + str + txt_esc(blob.strings.suffix); - var addme = ""; - if (blob.status === CSL.END) { - addme = txt_esc(blob.range_prefix); - } else if (blob.status === CSL.SUCCESSOR) { - addme = txt_esc(blob.successor_prefix); - } else if (blob.status === CSL.START) { - addme = ""; - } else if (blob.status === CSL.SEEN) { - addme = txt_esc(blob.splice_prefix); - } - ret += addme; - ret += str; - if (state.tmp.count_offset_characters) { - state.tmp.offset_characters += (addme.length + blob.strings.prefix.length + strlen + blob.strings.suffix.length); + } + for (i = 0, ilen = lst.length; i < ilen; i += 1) { + lst[i] = parseInt(lst[i], 10); + } + if (lst.length === 1 || (lst.length === 2 && !lst[1])) { + ret[("month" + suff)] = "" + lst[0]; + } else if (lst.length === 2) { + if (lst[this.monthguess] > 12) { + ret[("month" + suff)] = "" + lst[this.dayguess]; + ret[("day" + suff)] = "" + lst[this.monthguess]; + } else { + ret[("month" + suff)] = "" + lst[this.monthguess]; + ret[("day" + suff)] = "" + lst[this.dayguess]; } } - } - return ret; + }; }; -CSL.Output.Queue.purgeEmptyBlobs = function (myblobs, endOnly) { - var res, i, ilen, j, jlen, tmpblobs; - if ("string" === typeof myblobs || !myblobs.length) { - return; +CSL.Engine = function (sys, style, lang, forceLang) { + var attrs, langspec, localexml, locale; + this.processor_version = CSL.PROCESSOR_VERSION; + this.csl_version = "1.0"; + this.sys = sys; + this.sys.xml = new CSL.System.Xml.Parsing(); + if ("undefined" === typeof CSL_JSON && "string" !== typeof style) { + style = ""; } - for (i = myblobs.length - 1; i > -1; i += -1) { - CSL.Output.Queue.purgeEmptyBlobs(myblobs[i].blobs, endOnly); + if (CSL.getAbbreviation) { + this.sys.getAbbreviation = CSL.getAbbreviation; } - for (i = myblobs.length - 1; i > -1; i += -1) { - if (!myblobs[i].blobs.length) { - tmpblobs = myblobs.slice(i + 1); - for (j = i, jlen = myblobs.length; j < jlen; j += 1) { - myblobs.pop(); - } - for (j = 0, jlen = tmpblobs.length; j < jlen; j += 1) { - myblobs.push(tmpblobs[j]); + if (this.sys.stringCompare) { + CSL.stringCompare = this.sys.stringCompare; + } + this.sys.AbbreviationSegments = CSL.AbbreviationSegments; + this.parallel = new CSL.Parallel(this); + this.transform = new CSL.Transform(this); + this.setParseNames = function (val) { + this.opt['parse-names'] = val; + }; + this.opt = new CSL.Engine.Opt(); + this.tmp = new CSL.Engine.Tmp(); + this.build = new CSL.Engine.Build(); + this.fun = new CSL.Engine.Fun(this); + this.configure = new CSL.Engine.Configure(); + this.citation_sort = new CSL.Engine.CitationSort(); + this.bibliography_sort = new CSL.Engine.BibliographySort(); + this.citation = new CSL.Engine.Citation(this); + this.bibliography = new CSL.Engine.Bibliography(); + this.output = new CSL.Output.Queue(this); + this.dateput = new CSL.Output.Queue(this); + this.cslXml = this.sys.xml.makeXml(style); + if (this.opt.development_extensions.csl_reverse_lookup_support) { + this.build.cslNodeId = 0; + this.setCslNodeIds = function(myxml, nodename) { + var children = this.sys.xml.children(myxml); + this.sys.xml.setAttribute(myxml, 'cslid', this.build.cslNodeId); + this.opt.nodenames.push(nodename); + this.build.cslNodeId += 1; + for (var i = 0, ilen = this.sys.xml.numberofnodes(children); i < ilen; i += 1) { + nodename = this.sys.xml.nodename(children[i]); + if (nodename) { + this.setCslNodeIds(children[i], nodename); + } } - } - if (endOnly) { - break; - } + }; + this.setCslNodeIds(this.cslXml, "style"); } -}; -CSL.Output.Queue.purgeNearsidePrefixChars = function(myblob, chr) { - if (!chr) { - return; + this.sys.xml.addMissingNameNodes(this.cslXml); + this.sys.xml.addInstitutionNodes(this.cslXml); + this.sys.xml.insertPublisherAndPlace(this.cslXml); + this.sys.xml.flagDateMacros(this.cslXml); + attrs = this.sys.xml.attributes(this.cslXml); + if ("undefined" === typeof attrs["@sort-separator"]) { + this.sys.xml.setAttribute(this.cslXml, "sort-separator", ", "); } - if ("object" === typeof myblob) { - if ((CSL.TERMINAL_PUNCTUATION.indexOf(chr) > -1 - && CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(myblob.strings.prefix.slice(0, 1)) > -1) - && !(myblob.strings.prefix.slice(0,1) === ";" && chr === ".")) { - myblob.strings.prefix = myblob.strings.prefix.slice(1); - } else if ("object" === typeof myblob.blobs) { - CSL.Output.Queue.purgeNearsidePrefixChars(myblob.blobs[0], chr); - } + this.opt["initialize-with-hyphen"] = true; + this.setStyleAttributes(); + this.opt.xclass = sys.xml.getAttributeValue(this.cslXml, "class"); + this.opt.styleID = this.sys.xml.getStyleId(this.cslXml); + if (lang) { + lang = lang.replace("_", "-"); } -}; -CSL.Output.Queue.purgeNearsidePrefixSpaces = function(myblob, chr) { - if ("object" === typeof myblob) { - if (" " === chr && " " === myblob.strings.prefix.slice(0, 1)) { - myblob.strings.prefix = myblob.strings.prefix.slice(1); - } else if ("object" === typeof myblob.blobs) { - CSL.Output.Queue.purgeNearsidePrefixSpaces(myblob.blobs[0], chr); - } + if (this.opt["default-locale"][0]) { + this.opt["default-locale"][0] = this.opt["default-locale"][0].replace("_", "-"); } -}; -CSL.Output.Queue.purgeNearsideSuffixSpaces = function(myblob, chr) { - if ("object" === typeof myblob) { - if (" " === chr && " " === myblob.strings.suffix.slice(-1)) { - myblob.strings.suffix = myblob.strings.suffix.slice(0, -1); - } else if ("object" === typeof myblob.blobs) { - if (!chr) { - chr = myblob.strings.suffix.slice(-1); - } - chr = CSL.Output.Queue.purgeNearsideSuffixSpaces(myblob.blobs[myblob.blobs.length - 1], chr); - } else { - chr = myblob.strings.suffix.slice(-1); + if (lang && forceLang) { + this.opt["default-locale"] = [lang]; + } + if (lang && !forceLang && this.opt["default-locale"][0]) { + lang = this.opt["default-locale"][0]; + } + if (this.opt["default-locale"].length === 0) { + if (!lang) { + lang = "en-US"; } + this.opt["default-locale"].push("en-US"); } - return chr; -}; -CSL.Output.Queue.adjustPunctuation = function (state, myblobs, stk) { - var chr, suffix, dpref, blob, delimiter, suffixX, dprefX, blobX, delimiterX, prefix, prefixX, dsuffX, dsuff, slast, dsufff, dsufffX, lastchr, firstchr, exposed_suffixes, exposed, j, jlen, i, ilen; - var TERMS = CSL.TERMINAL_PUNCTUATION.slice(0, -1); - var TERM_OR_SPACE = CSL.TERMINAL_PUNCTUATION; - var SWAPS = CSL.SWAPPING_PUNCTUATION; - if (!stk) { - stk = [{suffix: "", delimiter: "", lastNode:true}]; + if (!lang) { + lang = this.opt["default-locale"][0]; } - slast = stk.length - 1; - delimiter = stk[slast].delimiter; - dpref = stk[slast].dpref; - dsuff = stk[slast].dsuff; - dsufff = stk[slast].dsufff; - prefix = stk[slast].prefix; - suffix = stk[slast].suffix; - blob = stk[slast].blob; - if ("string" === typeof myblobs) { - if (suffix) { - if (blob && - TERMS.indexOf(myblobs.slice(-1)) > -1 && - TERMS.slice(1).indexOf(suffix) > -1 && - blob.strings.suffix !== " ") { - blob.strings.suffix = blob.strings.suffix.slice(1); - } + langspec = CSL.localeResolve(lang); + this.opt.lang = langspec.best; + this.opt["default-locale"][0] = langspec.best; + this.locale = {}; + this.localeConfigure(langspec); + this.registry = new CSL.Registry(this); + this.buildTokenLists("citation"); + this.buildTokenLists("bibliography"); + this.configureTokenLists(); + this.disambiguate = new CSL.Disambiguation(this); + this.splice_delimiter = false; + this.fun.dateparser = new CSL.DateParser(); + this.fun.flipflopper = new CSL.Util.FlipFlopper(this); + this.setCloseQuotesArray(); + this.fun.ordinalizer.init(this); + this.fun.long_ordinalizer.init(this); + this.fun.page_mangler = CSL.Util.PageRangeMangler.getFunction(this, "page"); + this.fun.year_mangler = CSL.Util.PageRangeMangler.getFunction(this, "year"); + this.setOutputFormat("html"); +}; +CSL.Engine.prototype.setCloseQuotesArray = function () { + var ret; + ret = []; + ret.push(this.getTerm("close-quote")); + ret.push(this.getTerm("close-inner-quote")); + ret.push('"'); + ret.push("'"); + this.opt.close_quotes_array = ret; +}; +CSL.Engine.prototype.buildTokenLists = function (area) { + var area_nodes, navi; + area_nodes = this.sys.xml.getNodesByName(this.cslXml, area); + if (!this.sys.xml.getNodeValue(area_nodes)) { + return; + } + navi = new this.getNavi(this, area_nodes); + this.build.area = area; + CSL.buildStyle.call(this, navi); +}; +CSL.Engine.prototype.setStyleAttributes = function () { + var dummy, attr, key, attributes, attrname; + dummy = {}; + dummy.name = this.sys.xml.nodename(this.cslXml); + attributes = this.sys.xml.attributes(this.cslXml); + for (attrname in attributes) { + if (attributes.hasOwnProperty(attrname)) { + CSL.Attributes[attrname].call(dummy, this, attributes[attrname]); } - lastchr = myblobs.slice(-1); - firstchr = myblobs.slice(0,1); + } +}; +CSL.buildStyle = function (navi) { + if (navi.getkids()) { + CSL.buildStyle.call(this, navi); } else { - if (dpref) { - for (j = 0, jlen = myblobs.length - 1; j < jlen; j += 1) { - var t = myblobs[j].strings.suffix.slice(-1); - if (TERMS.indexOf(t) === -1 || - TERMS.indexOf(dpref) === -1) { - if (dpref !== " " || dpref !== myblobs[j].strings.suffix.slice(-1)) { - myblobs[j].strings.suffix += dpref; - } + if (navi.getbro()) { + CSL.buildStyle.call(this, navi); + } else { + while (navi.nodeList.length > 1) { + if (navi.remember()) { + CSL.buildStyle.call(this, navi); } } } - if (suffix === " ") { - CSL.Output.Queue.purgeNearsideSuffixSpaces(myblobs[myblobs.length - 1], " "); + } +}; +CSL.Engine.prototype.getNavi = function (state, myxml) { + this.sys = state.sys; + this.state = state; + this.nodeList = []; + this.nodeList.push([0, myxml]); + this.depth = 0; +}; +CSL.Engine.prototype.getNavi.prototype.remember = function () { + var node; + this.depth += -1; + this.nodeList.pop(); + node = this.nodeList[this.depth][1][(this.nodeList[this.depth][0])]; + CSL.XmlToToken.call(node, this.state, CSL.END); + return this.getbro(); +}; +CSL.Engine.prototype.getNavi.prototype.getbro = function () { + var sneakpeek; + sneakpeek = this.nodeList[this.depth][1][(this.nodeList[this.depth][0] + 1)]; + if (sneakpeek) { + this.nodeList[this.depth][0] += 1; + return true; + } else { + return false; + } +}; +CSL.Engine.prototype.getNavi.prototype.getkids = function () { + var currnode, sneakpeek, pos, node, len; + currnode = this.nodeList[this.depth][1][this.nodeList[this.depth][0]]; + sneakpeek = this.sys.xml.children(currnode); + if (this.sys.xml.numberofnodes(sneakpeek) === 0) { + if (this.depth) { + CSL.XmlToToken.call(currnode, this.state, CSL.SINGLETON); } - var lst = []; - var doblob; - for (i = 0, ilen = myblobs.length - 1; i < ilen; i += 1) { - doblob = myblobs[i]; - var following_prefix = myblobs[i + 1].strings.prefix; - chr = false; - var ret = CSL.Output.Queue.purgeNearsideSuffixSpaces(doblob, chr); - if (!dsuff) { - lst.push(ret); - } else { - lst.push(false); + return false; + } else { + for (pos in sneakpeek) { + node = sneakpeek[pos]; + if ("date" === this.sys.xml.nodename(node)) { + currnode = CSL.Util.fixDateNode.call(this, currnode, pos, node); + sneakpeek = this.sys.xml.children(currnode); } } - chr = false; - for (i = 1, ilen = myblobs.length; i < ilen; i += 1) { - doblob = myblobs[i]; - chr = ""; - var preceding_suffix = myblobs[i - 1].strings.suffix; - if (dsuff === " ") { - chr = dsuff; - } else if (preceding_suffix) { - chr = preceding_suffix.slice(-1); - } else if (lst[i - 1]) { - chr = lst[i - 1]; - } - CSL.Output.Queue.purgeNearsidePrefixSpaces(doblob, chr); + CSL.XmlToToken.call(currnode, this.state, CSL.START); + this.depth += 1; + this.nodeList.push([0, sneakpeek]); + return true; + } +}; +CSL.Engine.prototype.getNavi.prototype.getNodeListValue = function () { + return this.nodeList[this.depth][1]; +}; +CSL.Engine.prototype.getTerm = function (term, form, plural, gender, mode, forceDefaultLocale) { + if (term && term.match(/[A-Z]/) && term === term.toUpperCase()) { + CSL.debug("Warning: term key is in uppercase form: "+term); + term = term.toLowerCase(); + } + var lang; + if (forceDefaultLocale) { + lang = this.opt["default-locale"][0]; + } else { + lang = this.opt.lang; + } + var ret = CSL.Engine.getField(CSL.LOOSE, this.locale[lang].terms, term, form, plural, gender); + if (!ret && term === "range-delimiter") { + ret = "\u2013"; + } + if (typeof ret === "undefined") { + if (mode === CSL.STRICT) { + throw "Error in getTerm: term \"" + term + "\" does not exist."; + } else if (mode === CSL.TOLERANT) { + ret = ""; } - if (dsufff) { - CSL.Output.Queue.purgeNearsidePrefixSpaces(myblobs[0], " "); - } else if (prefix === " ") { - CSL.Output.Queue.purgeNearsidePrefixSpaces(myblobs[0], " "); + } + if (ret) { + this.tmp.cite_renders_content = true; + } + return ret; +}; +CSL.Engine.prototype.getDate = function (form, forceDefaultLocale) { + var lang; + if (forceDefaultLocale) { + lang = this.opt["default-locale"]; + } else { + lang = this.opt.lang; + } + if (this.locale[lang].dates[form]) { + return this.locale[lang].dates[form]; + } else { + return false; + } +}; +CSL.Engine.prototype.getOpt = function (arg) { + if ("undefined" !== typeof this.locale[this.opt.lang].opts[arg]) { + return this.locale[this.opt.lang].opts[arg]; + } else { + return false; + } +}; +CSL.Engine.prototype.getVariable = function (Item, varname, form, plural) { + return CSL.Engine.getField(CSL.LOOSE, Item, varname, form, plural); +}; +CSL.Engine.prototype.getDateNum = function (ItemField, partname) { + if ("undefined" === typeof ItemField) { + return 0; + } else { + return ItemField[partname]; + } +}; +CSL.Engine.getField = function (mode, hash, term, form, plural, gender) { + var ret, forms, f, pos, len, hashterm; + ret = ""; + if ("undefined" === typeof hash[term]) { + if (mode === CSL.STRICT) { + throw "Error in getField: term \"" + term + "\" does not exist."; + } else { + return undefined; } - for (i = 0, ilen = myblobs.length; i < ilen; i += 1) { - doblob = myblobs[i]; - CSL.Output.Queue.purgeNearsidePrefixChars(doblob, lastchr); - if (i === 0) { - if (prefix) { - if (doblob.strings.prefix.slice(0, 1) === " ") { - } - } - } - if (dsufff) { - if (doblob.strings.prefix) { - if (i === 0) { - if (doblob.strings.prefix.slice(0, 1) === " ") { - } - } - } - } - if (dsuff) { - if (i > 0) { - if (doblob.strings.prefix.slice(0, 1) === " ") { - } - } - } - if (i < (myblobs.length - 1)) { - var nextprefix = myblobs[i + 1].strings.prefix; - if (!delimiter) { - if (nextprefix) { - var nxtchr = nextprefix.slice(0, 1); - if (SWAPS.indexOf(nxtchr) > -1) { - myblobs[i + 1].strings.prefix = nextprefix.slice(1); - if (TERMS.indexOf(nxtchr) === -1 || - (TERMS.indexOf(nxtchr) > -1 && - TERMS.indexOf(doblob.strings.suffix.slice(-1)) === -1)) { - doblob.strings.suffix += nxtchr; - } - } else if (nxtchr === " " && - doblob.strings.suffix.slice(-1) === " ") { - doblob.strings.suffix = doblob.strings.suffix.slice(0, -1); - } - } + } + if (gender && hash[term][gender]) { + hashterm = hash[term][gender]; + } else { + hashterm = hash[term]; + } + forms = []; + if (form === "symbol") { + forms = ["symbol", "short"]; + } else if (form === "verb-short") { + forms = ["verb-short", "verb"]; + } else if (form !== "long") { + forms = [form]; + } + forms = forms.concat(["long"]); + len = forms.length; + for (pos = 0; pos < len; pos += 1) { + f = forms[pos]; + if ("string" === typeof hashterm || "number" === typeof hashterm) { + ret = hashterm; + } else if ("undefined" !== typeof hashterm[f]) { + if ("string" === typeof hashterm[f] || "number" === typeof hashterm[f]) { + ret = hashterm[f]; + } else { + if ("number" === typeof plural) { + ret = hashterm[f][plural]; + } else { + ret = hashterm[f][0]; } } - if (i === (myblobs.length - 1)) { - if (suffix) { - if (doblob.strings.suffix && - (TERMS.slice(1).indexOf(suffix) > -1 && - TERMS.indexOf(doblob.strings.suffix.slice(-1)) > -1)) { - blob.strings.suffix = blob.strings.suffix.slice(1); + break; + } + } + return ret; +}; +CSL.Engine.prototype.configureTokenLists = function () { + var dateparts_master, area, pos, token, dateparts, part, ppos, pppos, len, llen, lllen; + dateparts_master = ["year", "month", "day"]; + len = CSL.AREAS.length; + for (pos = 0; pos < len; pos += 1) { + area = CSL.AREAS[pos]; + llen = this[area].tokens.length - 1; + for (ppos = llen; ppos > -1; ppos += -1) { + token = this[area].tokens[ppos]; + if ("date" === token.name && CSL.END === token.tokentype) { + dateparts = []; + } + if ("date-part" === token.name && token.strings.name) { + lllen = dateparts_master.length; + for (pppos = 0; pppos < lllen; pppos += 1) { + part = dateparts_master[pppos]; + if (part === token.strings.name) { + dateparts.push(token.strings.name); } } } - if (state.getOpt('punctuation-in-quote')) { - var decorations = doblob.decorations; - for (j = 0, jlen = decorations.length; j < jlen; j += 1) { - if (decorations[j][0] === '@quotes' && decorations[j][1] === 'true') { - doblob.punctuation_in_quote = true; - stk[slast].lastNode = true; + if ("date" === token.name && CSL.START === token.tokentype) { + dateparts.reverse(); + token.dateparts = dateparts; + } + token.next = (ppos + 1); + if (token.name && CSL.Node[token.name].configure) { + CSL.Node[token.name].configure.call(token, this, ppos); + } + } + } + this.version = CSL.version; + return this.state; +}; +CSL.Engine.prototype.retrieveItems = function (ids) { + var ret, pos, len; + ret = []; + for (var i = 0, ilen = ids.length; i < ilen; i += 1) { + ret.push(this.retrieveItem("" + ids[i])); + } + return ret; +}; +CSL.ITERATION = 0; +CSL.Engine.prototype.retrieveItem = function (id) { + var Item, m, pos, len, mm; + if (this.opt.development_extensions.normalize_lang_keys_to_lowercase && + "boolean" === typeof this.opt.development_extensions.normalize_lang_keys_to_lowercase) { + for (var i=0,ilen=this.opt["default-locale"].length; i<ilen; i+=1) { + this.opt["default-locale"][i] = this.opt["default-locale"][i].toLowerCase(); + } + for (var i=0,ilen=this.opt["locale-translit"].length; i<ilen; i+=1) { + this.opt["locale-translit"][i] = this.opt["locale-translit"][i].toLowerCase(); + } + for (var i=0,ilen=this.opt["locale-translat"].length; i<ilen; i+=1) { + this.opt["locale-translat"][i] = this.opt["locale-translat"][i].toLowerCase(); + } + this.opt.development_extensions.normalize_lang_keys_to_lowercase = 100; + } + CSL.ITERATION += 1; + Item = this.sys.retrieveItem("" + id); + if (this.opt.development_extensions.normalize_lang_keys_to_lowercase) { + if (Item.multi) { + if (Item.multi._keys) { + for (var field in Item.multi._keys) { + for (var key in Item.multi._keys[field]) { + if (key !== key.toLowerCase()) { + Item.multi._keys[field][key.toLowerCase()] = Item.multi._keys[field][key]; + delete Item.multi._keys[field][key]; + } } } } - if (doblob.punctuation_in_quote && stk[slast].lastNode) { - var swapchar = doblob.strings.suffix.slice(0, 1); - var swapblob = false; - if (SWAPS.indexOf(swapchar) > -1) { - swapblob = doblob; - } else if (SWAPS.indexOf(suffix) > -1 && i === (myblobs.length - 1)) { - swapchar = suffix; - swapblob = blob; - } else { - swapchar = false; + if (Item.multi.main) { + for (var field in Item.multi.main) { + Item.multi.main[field] = Item.multi.main[field].toLowerCase(); } - if (swapchar) { - if ("string" === typeof doblob.blobs) { - if (SWAPS.indexOf(doblob.blobs.slice(-1)) === -1 || - (TERMS.indexOf(doblob.blobs.slice(-1)) > -1 && - SWAPS.indexOf(swapchar) > -1 && - TERMS.indexOf(swapchar) === -1)) { - doblob.blobs += swapchar; + } + } + for (var i=0, ilen=CSL.CREATORS.length; i>ilen; i+=1) { + var ctype = CSL.CREATORS[i]; + if (Item[ctype] && Item[ctype].multi) { + for (var j=0, jlen=Item[ctype].length; j<jlen; j+=1) { + var creator = Item[ctype][j]; + if (creator.multi) { + if (creator.multi._key) { + for (var key in creator.multi._key) { + if (key !== key.toLowerCase()) { + creator.multi._key[key.toLowerCase()] = creator.multi._key[key]; + delete creator.multi._key[key]; + } + } } - } else { - if (SWAPS.indexOf(doblob.blobs.slice(-1)[0].strings.suffix.slice(-1)) === -1 || - (TERMS.indexOf(doblob.blobs.slice(-1)[0].strings.suffix.slice(-1)) > -1 && - SWAPS.indexOf(swapchar) > -1 && - TERMS.indexOf(swapchar) === -1)) { - doblob.blobs.slice(-1)[0].strings.suffix += swapchar; + if (creator.multi.main) { + creator.multi.main = creator.multi.main.toLowerCase(); } } - swapblob.strings.suffix = swapblob.strings.suffix.slice(1); } } - if (i === (myblobs.length - 1)) { - if (doblob.strings.suffix) { - suffixX = doblob.strings.suffix.slice(0, 1); - blobX = doblob; - } else { - suffixX = stk[stk.length - 1].suffix; - blobX = stk[stk.length - 1].blob; - } - } else { - if (doblob.strings.suffix) { - suffixX = doblob.strings.suffix.slice(0, 1); - blobX = doblob; - } else { - suffixX = ""; - blobX = false; + } + } + if (Item.page) { + Item["page-first"] = Item.page; + var num = "" + Item.page; + m = num.split(/\s*(?:&|,|-|\u2013)\s*/); + if (m[0].slice(-1) !== "\\") { + Item["page-first"] = m[0]; + } + } + if (this.opt.development_extensions.field_hack && Item.note) { + m = Item.note.match(CSL.NOTE_FIELDS_REGEXP); + if (m) { + var names = {}; + for (pos = 0, len = m.length; pos < len; pos += 1) { + mm = m[pos].match(CSL.NOTE_FIELD_REGEXP); + if (!Item[mm[1]] && CSL.DATE_VARIABLES.indexOf(mm[1]) > -1) { + Item[mm[1]] = {raw:mm[2]}; + } else if (!Item[mm[1]] && CSL.NAME_VARIABLES.indexOf(mm[1]) > -1) { + if (!Item[mm[1]]) { + Item[mm[1]] = []; + } + var lst = mm[2].split(/\s*\|\|\s*/); + if (lst.length === 1) { + Item[mm[1]].push({family:lst[0],isInstitution:true}); + } else if (lst.length === 2) { + Item[mm[1]].push({family:lst[0],given:lst[1]}); + } + } else if (!Item[mm[1]] || mm[1] === "type") { + Item[mm[1]] = mm[2].replace(/^\s+/, "").replace(/\s+$/, ""); } + Item.note.replace(CSL.NOTE_FIELD_REGEXP, ""); } - if (SWAPS.concat([" "]).indexOf(suffixX) === -1) { - suffixX = ""; - blobX = false; - } - if (doblob.strings.delimiter && - doblob.blobs.length > 1) { - dprefX = doblob.strings.delimiter.slice(0, 1); - if (SWAPS.concat([" "]).indexOf(dprefX) > -1) { - doblob.strings.delimiter = doblob.strings.delimiter.slice(1); - } else { - dprefX = ""; + } + } + for (var i = 1, ilen = CSL.DATE_VARIABLES.length; i < ilen; i += 1) { + var dateobj = Item[CSL.DATE_VARIABLES[i]]; + if (dateobj) { + if (this.opt.development_extensions.raw_date_parsing) { + if (dateobj.raw) { + dateobj = this.fun.dateparser.parse(dateobj.raw); } - } else { - dprefX = ""; } - if (doblob.strings.prefix) { - if (doblob.strings.prefix.slice(-1) === " ") { - prefixX = " "; - } else { - prefixX = ""; - } - } else { - if (i === 0) { - prefixX = prefix; - } else { - prefixX = ""; + Item[CSL.DATE_VARIABLES[i]] = this.dateParseArray(dateobj); + } + } + if (this.opt.development_extensions.static_statute_locator) { + if (Item.type && ["bill","gazette","legislation","treaty"].indexOf(Item.type) > -1) { + var varname; + var elements = ["type", "title", "jurisdiction", "genre", "volume", "container-title"]; + var legislation_id = []; + for (i = 0, ilen = elements.length; i < ilen; i += 1) { + varname = elements[i]; + if (Item[varname]) { + legislation_id.push(Item[varname]); } } - if (dsuff) { - dsufffX = dsuff; - } else { - if (i === 0) { - dsufffX = dsufff; - } else { - dsufffX = ""; - } - } - if (doblob.strings.delimiter) { - if (doblob.strings.delimiter.slice(-1) === " " && - "object" === typeof doblob.blobs && doblob.blobs.length > 1) { - dsuffX = doblob.strings.delimiter.slice(-1); - } else { - dsuffX = ""; + elements = ["original-date", "issued"]; + for (i = 0, elements.length; i < ilen; i += 1) { + varname = elements[i]; + if (Item[varname] && Item[varname].year) { + var value = Item[varname].year; + legislation_id.push(value); + break; } - } else { - dsuffX = ""; - } - delimiterX = doblob.strings.delimiter; - var lastNode - if (i === (myblobs.length - 1) && stk[slast].lastNode) { - lastNode = true; - } else { - lastNode = false; } - stk.push({suffix: suffixX, dsuff:dsuffX, blob:blobX, delimiter:delimiterX, prefix:prefixX, dpref: dprefX, dsufff: dsufffX, lastNode: lastNode}); - lastchr = CSL.Output.Queue.adjustPunctuation(state, doblob.blobs, stk); + Item.legislation_id = legislation_id.join("::"); } - if (myblobs && myblobs.length) { - var last_suffix = myblobs[myblobs.length - 1].strings.suffix; - if (last_suffix) { - lastchr = last_suffix.slice(-1); + } + if (this.opt.development_extensions.main_title_from_short_title) { + Item["title-main"] = Item.title; + Item["title-sub"] = false; + if (Item.title && Item.shortTitle) { + offset = Item.shortTitle.length; + if (Item.title.slice(0,offset) === Item.shortTitle && Item.title.slice(offset).match(/^\s*:/)) { + Item["title-main"] = Item.title.slice(0,offset).replace(/\s+$/,""); + Item["title-sub"] = Item.title.slice(offset).replace(/^\s*:\s*/,""); } } } - if (stk.length > 1) { - stk.pop(); + if (!Item["title-short"]) { + Item["title-short"] = Item.shortTitle; } - state.tmp.last_chr = lastchr; - return lastchr; -}; -CSL.ambigConfigDiff = function(a, b) { - var ret, pos, len, ppos, llen; - if (a.names.length !== b.names.length) { - return 1; - } else { - for (pos = 0, len = a.names.length; pos < len; pos += 1) { - if (a.names[pos] !== b.names[pos]) { - return 1; - } else { - for (ppos = 0, llen = a.givens[pos]; ppos < llen; ppos += 1) { - if (a.givens[pos][ppos] !== b.givens[pos][ppos]) { - return 1; - } - } + var isLegalType = ["legal_case","legislation","gazette","regulation"].indexOf(Item.type) > -1; + if (!isLegalType && Item.title && this.sys.getAbbreviation) { + var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item.title); + if (this.transform.abbrevs[jurisdiction].title) { + if (this.transform.abbrevs[jurisdiction].title[Item.title]) { + Item["title-short"] = this.transform.abbrevs[jurisdiction].title[Item.title]; } } } - if (a.disambiguate != b.disambiguate) { - return 1; - } - if (a.year_suffix !== b.year_suffix) { - return 1; - } - return 0; -}; -CSL.cloneAmbigConfig = function (config, oldconfig, tainters) { - var i, ilen, j, jlen, k, klen, param; - var ret = {}; - ret.names = []; - ret.givens = []; - ret.year_suffix = false; - ret.disambiguate = false; - for (i = 0, ilen = config.names.length; i < ilen; i += 1) { - param = config.names[i]; - ret.names[i] = param; - } - for (i = 0, ilen = config.givens.length; i < ilen; i += 1) { - param = []; - for (j = 0, jlen = config.givens[i].length; j < jlen; j += 1) { - param.push(config.givens[i][j]); + Item["container-title-short"] = Item.journalAbbreviation; + if (Item["container-title"] && this.sys.getAbbreviation) { + var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item["container-title"]); + if (this.transform.abbrevs[jurisdiction].title) { + if (this.transform.abbrevs[jurisdiction].title[Item["container-title"]]) { + Item["container-title-short"] = this.transform.abbrevs[jurisdiction].title[Item["container-title"]]; + } } - ret.givens.push(param); - } - if (oldconfig) { - ret.year_suffix = oldconfig.year_suffix; - ret.disambiguate = oldconfig.disambiguate; - } else { - ret.year_suffix = config.year_suffix; - ret.disambiguate = config.disambiguate; } - return ret; + return Item; }; -CSL.getAmbigConfig = function () { - var config, ret; - config = this.tmp.disambig_request; - if (!config) { - config = this.tmp.disambig_settings; +CSL.Engine.prototype.setOpt = function (token, name, value) { + if (token.name === "style" || token.name === "cslstyle") { + this.opt[name] = value; + } else if (["citation", "bibliography"].indexOf(token.name) > -1) { + this[token.name].opt[name] = value; + } else if (["name-form", "name-delimiter", "names-delimiter"].indexOf(name) === -1) { + token.strings[name] = value; } - ret = CSL.cloneAmbigConfig(config); - return ret; -}; -CSL.getMaxVals = function () { - return this.tmp.names_max.mystack.slice(); -}; -CSL.getMinVal = function () { - return this.tmp["et-al-min"]; }; -CSL.tokenExec = function (token, Item, item) { - var next, maybenext, exec, pos, len, debug; - debug = false; - next = token.next; - maybenext = false; - if (token.evaluator) { - next = token.evaluator(token, this, Item, item); +CSL.Engine.prototype.fixOpt = function (token, name, localname) { + if (["citation", "bibliography"].indexOf(token.name) > -1) { + if (! this[token.name].opt[name] && "undefined" !== typeof this.opt[name]) { + this[token.name].opt[name] = this.opt[name]; + } } - len = token.execs.length; - for (pos = 0; pos < len; pos += 1) { - exec = token.execs[pos]; - maybenext = exec.call(token, this, Item, item); - if (maybenext) { - next = maybenext; + if ("name" === token.name || "names" === token.name) { + if ("undefined" === typeof token.strings[localname] && "undefined" !== typeof this[this.build.root].opt[name]) { + token.strings[localname] = this[this.build.root].opt[name]; } } - return next; }; -CSL.expandMacro = function (macro_key_token) { - var mkey, start_token, key, end_token, navi, macro_nodes, newoutput, mergeoutput, end_of_macro, func; - mkey = macro_key_token.postponed_macro; - if (this.build.macro_stack.indexOf(mkey) > -1) { - throw "CSL processor error: call to macro \"" + mkey + "\" would cause an infinite loop"; - } else { - this.build.macro_stack.push(mkey); - } - var hasDate = false; - var macroid = false; - macro_nodes = this.sys.xml.getNodesByName(this.cslXml, 'macro', mkey); - if (macro_nodes.length) { - macroid = this.sys.xml.getAttributeValue(macro_nodes[0],'cslid'); - hasDate = this.sys.xml.getAttributeValue(macro_nodes[0], "macro-has-date"); - } - if (hasDate) { - func = function (state, Item) { - if (state.tmp.extension) { - state.tmp["doing-macro-with-date"] = true; - } - }; - macro_key_token.execs.push(func); - } - macro_key_token.tokentype = CSL.START; - macro_key_token.cslid = macroid; - CSL.Node.group.build.call(macro_key_token, this, this[this.build.area].tokens, true); - if (!this.sys.xml.getNodeValue(macro_nodes)) { - throw "CSL style error: undefined macro \"" + mkey + "\""; - } - navi = new this.getNavi(this, macro_nodes); - CSL.buildStyle.call(this, navi); - end_of_macro = new CSL.Token("group", CSL.END); - if (macro_key_token.decorations) { - end_of_macro.decorations = macro_key_token.decorations.slice(); - } - if (hasDate) { - func = function (state, Item) { - if (state.tmp.extension) { - state.tmp["doing-macro-with-date"] = false; +CSL.Engine.prototype.remapSectionVariable = function (inputList) { + for (var i = 0, ilen = inputList.length; i < ilen; i += 1) { + var Item = inputList[i][0]; + var item = inputList[i][1]; + var section_label_count = 0; + var later_label = false; + var value = false; + if (["bill","gazette","legislation","treaty"].indexOf(Item.type) > -1) { + item.force_pluralism = 0; + if (!item.label) { + item.label = "page" } - }; - end_of_macro.execs.push(func); - } - CSL.Node.group.build.call(end_of_macro, this, this[this.build.area].tokens, true); - this.build.macro_stack.pop(); -}; -CSL.XmlToToken = function (state, tokentype) { - var name, txt, attrfuncs, attributes, decorations, token, key, target; - name = state.sys.xml.nodename(this); - if (state.build.skip && state.build.skip !== name) { - return; - } - if (!name) { - txt = state.sys.xml.content(this); - if (txt) { - state.build.text = txt; - } - return; - } - if (!CSL.Node[state.sys.xml.nodename(this)]) { - throw "Undefined node name \"" + name + "\"."; - } - attrfuncs = []; - attributes = state.sys.xml.attributes(this); - decorations = CSL.setDecorations.call(this, state, attributes); - token = new CSL.Token(name, tokentype); - if (tokentype !== CSL.END || name === "if" || name === "else-if" || name === "layout") { - for (key in attributes) { - if (attributes.hasOwnProperty(key)) { - if (tokentype === CSL.END && key !== "@language" && key !== "@locale") { - continue; + var loci = ["section","","",""]; + var split; + if (this.opt.development_extensions.static_statute_locator && Item.section) { + splt = Item.section.replace(/^\s+/,"").replace(/\s+$/, "").split(/\s+/); + if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { + loci[0] = " " + splt[0] + " "; + loci[1] = splt.slice(1).join(" "); + } else { + loci[0] = " sec. "; + loci[1] = splt.slice(0).join(" "); } - if (attributes.hasOwnProperty(key)) { - if (CSL.Attributes[key]) { - try { - CSL.Attributes[key].call(token, state, "" + attributes[key]); - } catch (e) { - CSL.error(e); - throw "CSL processor error, " + key + " attribute: " + e; - } - } else { - CSL.debug("warning: undefined attribute \""+key+"\" in style"); - } + } else { + if (this.opt.development_extensions.clobber_locator_if_no_statute_section) { + item.locator = undefined; + item.label = undefined; } } - } - token.decorations = decorations; - } - target = state[state.build.area].tokens; - CSL.Node[name].build.call(token, state, target); -}; -CSL.DateParser = function () { - var jiy_list, jiy, jiysplitter, jy, jmd, jr, pos, key, val, yearlast, yearfirst, number, rangesep, fuzzychar, chars, rex, rexdash, rexdashslash, rexslashdash, seasonstrs, seasonrexes, seasonstr, monthstrs, monthstr, mrexes, seasonrex, len, jiymatchstring, jiymatcher; - jiy_list = [ - ["\u660E\u6CBB", 1867], - ["\u5927\u6B63", 1911], - ["\u662D\u548C", 1925], - ["\u5E73\u6210", 1988] - ]; - jiy = {}; - len = jiy_list.length; - for (pos = 0; pos < len; pos += 1) { - key = jiy_list[pos][0]; - val = jiy_list[pos][1]; - jiy[key] = val; - } - jiymatchstring = []; - for (pos = 0; pos < len; pos += 1) { - val = jiy_list[pos][0]; - jiymatchstring.push(val); - } - jiymatchstring = jiymatchstring.join("|"); - jiysplitter = "(?:" + jiymatchstring + ")(?:[0-9]+)"; - jiysplitter = new RegExp(jiysplitter); - jiymatcher = "(?:" + jiymatchstring + ")(?:[0-9]+)"; - jiymatcher = new RegExp(jiymatcher, "g"); - jmd = /(\u6708|\u5E74)/g; - jy = /\u65E5/; - jr = /\u301c/g; - yearlast = "(?:[?0-9]{1,2}%%NUMD%%){0,2}[?0-9]{4}(?![0-9])"; - yearfirst = "[?0-9]{4}(?:%%NUMD%%[?0-9]{1,2}){0,2}(?![0-9])"; - number = "[?0-9]{1,3}"; - rangesep = "[%%DATED%%]"; - fuzzychar = "[?~]"; - chars = "[a-zA-Z]+"; - rex = "(" + yearfirst + "|" + yearlast + "|" + number + "|" + rangesep + "|" + fuzzychar + "|" + chars + ")"; - rexdash = new RegExp(rex.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "-")); - rexdashslash = new RegExp(rex.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "\/")); - rexslashdash = new RegExp(rex.replace(/%%NUMD%%/g, "\/").replace(/%%DATED%%/g, "-")); - seasonstrs = []; - seasonrexes = []; - len = seasonstrs.length; - for (pos = 0; pos < len; pos += 1) { - seasonrex = new RegExp(seasonstrs[pos] + ".*"); - seasonrexes.push(seasonrex); - } - this.mstrings = "january february march april may june july august september october november december spring summer fall winter spring summer"; - this.mstrings = this.mstrings.split(" "); - this.setOrderDayMonth = function() { - this.monthguess = 1; - this.dayguess = 0; - }; - this.setOrderMonthDay = function() { - this.monthguess = 0; - this.dayguess = 1; - }; - this.setOrderMonthDay(); - this.resetMonths = function() { - var i, ilen, j, jlen; - this.msets = []; - for (i = 0, ilen = this.mstrings.length; i < ilen; i += 1) { - this.msets.push([this.mstrings[i]]); - } - this.mabbrevs = []; - for (i = 0, ilen = this.msets.length; i < ilen; i += 1) { - this.mabbrevs.push([]); - for (j = 0, jlen = this.msets[i].length; j < jlen; j += 1) { - this.mabbrevs[i].push(this.msets[i][0].slice(0, 3)); - } - } - this.mrexes = []; - for (i = 0, ilen = this.mabbrevs.length; i < ilen; i += 1) { - this.mrexes.push(new RegExp("(?:" + this.mabbrevs[i].join("|") + ")")); - } - }; - this.resetMonths(); - this.addMonths = function(lst) { - var i, ilen, j, jlen, k, klen, jkey, kkey; - if ("string" === typeof lst) { - lst = lst.split(/\s+/); - } - if (lst.length !== 12 && lst.length !== 16) { - CSL.debug("month [+season] list of "+lst.length+", expected 12 or 16. Ignoring."); - return; - } - var othermatch = []; - var thismatch = []; - for (i = 0, ilen = lst.length; i < ilen; i += 1) { - var abbrevlen = false; - var skip = false; - var insert = 3; - var extend = {}; - for (j = 0, jlen = this.mabbrevs.length; j < jlen; j += 1) { - extend[j] = {}; - if (j === i) { - for (k = 0, klen = this.mabbrevs[i].length; k < klen; k += 1) { - if (this.mabbrevs[i][k] === lst[i].slice(0, this.mabbrevs[i][k].length)) { - skip = true; - break; - } - } + if (item.locator) { + var splt = item.locator.replace(/^\s+/,"").replace(/\s+$/, "").split(/\s+/); + if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { + loci[2] = " " + splt[0] + " "; + loci[3] = splt.slice(1).join(" "); + } else if (item.label) { + loci[2] = " " + CSL.STATUTE_SUBDIV_STRINGS_REVERSE[item.label] + " "; + loci[3] = splt.slice(0).join(" "); } else { - for (k = 0, klen = this.mabbrevs[j].length; k < klen; k += 1) { - abbrevlen = this.mabbrevs[j][k].length; - if (this.mabbrevs[j][k] === lst[i].slice(0, abbrevlen)) { - while (this.msets[j][k].slice(0, abbrevlen) === lst[i].slice(0, abbrevlen)) { - if (abbrevlen > lst[i].length || abbrevlen > this.msets[j][k].length) { - CSL.debug("unable to disambiguate month string in date parser: "+lst[i]); - break; - } else { - abbrevlen += 1; - } - } - insert = abbrevlen; - extend[j][k] = abbrevlen; - } - } + loci[3] = splt.join(" ") } - for (jkey in extend) { - if (extend.hasOwnProperty(jkey)) { - for (kkey in extend[jkey]) { - if (extend[jkey].hasOwnProperty(kkey)) { - abbrevlen = extend[jkey][kkey]; - jkey = parseInt(jkey, 10); - kkey = parseInt(kkey, 10); - this.mabbrevs[jkey][kkey] = this.msets[jkey][kkey].slice(0, abbrevlen); - } - } - } + if (loci[3] && loci[3].slice(0,1) === "&") { + loci[3] = " " + loci[3]; } } - if (!skip) { - this.msets[i].push(lst[i]); - this.mabbrevs[i].push(lst[i].slice(0, insert)); + if (!loci[2]) { + loci[2] = loci[0]; } - } - this.mrexes = []; - for (i = 0, ilen = this.mabbrevs.length; i < ilen; i += 1) { - this.mrexes.push(new RegExp("(?:" + this.mabbrevs[i].join("|") + ")")); - } - }; - this.parse = function (txt) { - var slash, dash, lst, l, m, number, note, thedate, slashcount, range_delim, date_delim, ret, delim_pos, delims, isrange, suff, date, breakme, item, delim, element, mm, slst, mmpos, i, ilen, j, jlen, k, klen; - if (txt) { - txt = "" + txt; - txt = txt.replace(/\s*[0-9]{2}:[0-9]{2}(?::[0-9]+)/,""); - m = txt.match(jmd); - if (m) { - txt = txt.replace(/\s+/, "", "g"); - txt = txt.replace(jy, "", "g"); - txt = txt.replace(jmd, "-", "g"); - txt = txt.replace(jr, "/", "g"); - txt = txt.replace("-/", "/", "g"); - txt = txt.replace(/-$/,"", "g"); - slst = txt.split(jiysplitter); - lst = []; - mm = txt.match(jiymatcher); - if (mm) { - var mmx = []; - for (pos = 0, len = mm.length; pos < len; pos += 1) { - mmx = mmx.concat(mm[pos].match(/([^0-9]+)([0-9]+)/).slice(1)); - } - for (pos = 0, len = slst.length; pos < len; pos += 1) { - lst.push(slst[pos]); - if (pos !== (len - 1)) { - mmpos = (pos * 2); - lst.push(mmx[mmpos]); - lst.push(mmx[mmpos + 1]); + if (loci[3]) { + if (loci[3].match(/^[^0-9a-zA-Z]/)) { + var loclst = loci[3].split(/\s+/); + if (loci[0] === loci[2] && loclst[1] && !CSL.STATUTE_SUBDIV_STRINGS[loclst[1].replace(/\s+/, "").replace(/\s+/, "")]) { + item.force_pluralism = 1; } + loci[2] = ""; } } else { - lst = slst; + loci[2] = ""; } - l = lst.length; - for (pos = 1; pos < l; pos += 3) { - lst[pos + 1] = jiy[lst[pos]] + parseInt(lst[pos + 1], 10); - lst[pos] = ""; + if (!loci[1]) { + loci[0] = ""; } - txt = lst.join(""); - txt = txt.replace(/\s*-\s*$/, "").replace(/\s*-\s*\//, "/"); - txt = txt.replace(/\.\s*$/, ""); - txt = txt.replace(/\.(?! )/, ""); - slash = txt.indexOf("/"); - dash = txt.indexOf("-"); - } - } - txt = txt.replace(/([A-Za-z])\./g, "$1"); - number = ""; - note = ""; - thedate = {}; - if (txt.slice(0, 1) === "\"" && txt.slice(-1) === "\"") { - thedate.literal = txt.slice(1, -1); - return thedate; - } - if (slash > -1 && dash > -1) { - slashcount = txt.split("/"); - if (slashcount.length > 3) { - range_delim = "-"; - date_delim = "/"; - lst = txt.split(rexslashdash); - } else { - range_delim = "/"; - date_delim = "-"; - lst = txt.split(rexdashslash); + var value = loci.join(""); + value = value.replace(/^\s+/,"").replace(/\s+$/, ""); + if (value) { + splt = value.split(/\s+/); + if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { + var has_other = false; + for (var j = splt.length - 2; j > 0; j += -2) { + if (splt[j] === splt[0]) { + item.force_pluralism = 1; + splt = splt.slice(0,j).concat(splt.slice(j + 1)); + } + } + item.label = CSL.STATUTE_SUBDIV_STRINGS[splt[0]]; + item.locator = splt.slice(1).join(" "); + if (item.force_pluralism === 0) { + delete item.force_pluralism; + } + } else { + item.locator = splt.slice(0).join(" "); + } } - } else { - txt = txt.replace("/", "-"); - range_delim = "-"; - date_delim = "-"; - lst = txt.split(rexdash); } - ret = []; - len = lst.length; - for (pos = 0; pos < len; pos += 1) { - item = lst[pos]; - m = item.match(/^\s*([\-\/]|[a-zA-Z]+|[\-~?0-9]+)\s*$/); - if (m) { - ret.push(m[1]); + } +} +CSL.Engine.prototype.setNumberLabels = function (Item) { + if (Item.number + && ["bill", "gazette", "legislation", "treaty"].indexOf(Item.type) > -1 + && this.opt.development_extensions.static_statute_locator + && !this.tmp.shadow_numbers["number"]) { + this.tmp.shadow_numbers["number"] = {}; + this.tmp.shadow_numbers["number"].values = []; + this.tmp.shadow_numbers["number"].plural = 0; + this.tmp.shadow_numbers["number"].numeric = false; + this.tmp.shadow_numbers["number"].label = false; + var value = "" + Item.number; + value = value.replace("\\", "", "g"); + var firstword = value.split(/\s/)[0]; + var firstlabel = CSL.STATUTE_SUBDIV_STRINGS[firstword]; + if (firstlabel) { + var m = value.match(CSL.STATUTE_SUBDIV_GROUPED_REGEX); + var splt = value.split(CSL.STATUTE_SUBDIV_PLAIN_REGEX); + if (splt.length > 1) { + var lst = []; + for (var j=1, jlen=splt.length; j < jlen; j += 1) { + var subdiv = m[j - 1].replace(/^\s*/, ""); + lst.push(subdiv.replace("sec.", "Sec.").replace("ch.", "Ch.")); + lst.push(splt[j].replace(/\s*$/, "").replace(/^\s*/, "")); + } + value = lst.join(" "); + } else { + value = splt[0]; } + this.tmp.shadow_numbers["number"].values.push(["Blob", value, false]); + this.tmp.shadow_numbers["number"].numeric = false; + } else { + this.tmp.shadow_numbers["number"].values.push(["Blob", value, false]); + this.tmp.shadow_numbers["number"].numeric = true; } - delim_pos = ret.indexOf(range_delim); - delims = []; - isrange = false; - if (delim_pos > -1) { - delims.push([0, delim_pos]); - delims.push([(delim_pos + 1), ret.length]); - isrange = true; + } +} +CSL.substituteOne = function (template) { + return function (state, list) { + if (!list) { + return ""; } else { - delims.push([0, ret.length]); + return template.replace("%%STRING%%", list); } - suff = ""; - for (i = 0, ilen = delims.length; i < ilen; i += 1) { - delim = delims[i]; - date = ret.slice(delim[0], delim[1]); - for (j = 0, jlen = date.length; j < jlen; j += 1) { - element = date[j]; - if (element.indexOf(date_delim) > -1) { - this.parseNumericDate(thedate, date_delim, suff, element); - continue; - } - if (element.match(/[0-9]{4}/)) { - thedate[("year" + suff)] = element.replace(/^0*/, ""); - continue; - } - breakme = false; - for (k = 0, klen = this.mrexes.length; k < klen; k += 1) { - if (element.toLocaleLowerCase().match(this.mrexes[k])) { - thedate[("month" + suff)] = "" + (parseInt(k, 10) + 1); - breakme = true; - break; - } - if (breakme) { - continue; - } - if (element.match(/^[0-9]+$/)) { - number = parseInt(element, 10); - } - if (element.toLocaleLowerCase().match(/^bc/) && number) { - thedate[("year" + suff)] = "" + (number * -1); - number = ""; - continue; - } - if (element.toLocaleLowerCase().match(/^ad/) && number) { - thedate[("year" + suff)] = "" + number; - number = ""; - continue; - } - } - breakme = false; - for (k = 0, klen = seasonrexes.length; k < klen; k += 1) { - if (element.toLocaleLowerCase().match(seasonrexes[k])) { - thedate[("season" + suff)] = "" + (parseInt(k, 10) + 1); - breakme = true; - break; - } - } - if (breakme) { - continue; - } - if (element === "~" || element === "?" || element === "c" || element.match(/^cir/)) { - thedate.circa = "" + 1; - continue; - } - if (element.toLocaleLowerCase().match(/(?:mic|tri|hil|eas)/) && !thedate[("season" + suff)]) { - note = element; - continue; - } + }; +}; +CSL.substituteTwo = function (template) { + return function (param) { + var template2 = template.replace("%%PARAM%%", param); + return function (state, list) { + if (!list) { + return ""; + } else { + return template2.replace("%%STRING%%", list); } - if (number) { - thedate[("day" + suff)] = number; - number = ""; + }; + }; +}; +CSL.Mode = function (mode) { + var decorations, params, param, func, val, args; + decorations = {}; + params = CSL.Output.Formats[mode]; + for (param in params) { + if (true) { + if ("@" !== param.slice(0, 1)) { + decorations[param] = params[param]; + continue; } - if (note && !thedate[("season" + suff)]) { - thedate[("season" + suff)] = note; - note = ""; + func = false; + val = params[param]; + args = param.split('/'); + if (typeof val === "string" && val.indexOf("%%STRING%%") > -1) { + if (val.indexOf("%%PARAM%%") > -1) { + func = CSL.substituteTwo(val); + } else { + func = CSL.substituteOne(val); + } + } else if (typeof val === "boolean" && !val) { + func = CSL.Output.Formatters.passthrough; + } else if (typeof val === "function") { + func = val; + } else { + throw "CSL.Compiler: Bad " + mode + " config entry for " + param + ": " + val; } - suff = "_end"; - } - if (isrange) { - for (j = 0, jlen = CSL.DATE_PARTS_ALL.length; j < jlen; j += 1) { - item = CSL.DATE_PARTS_ALL[j]; - if (thedate[item] && !thedate[(item + "_end")]) { - thedate[(item + "_end")] = thedate[item]; - } else if (!thedate[item] && thedate[(item + "_end")]) { - thedate[item] = thedate[(item + "_end")]; + if (args.length === 1) { + decorations[args[0]] = func; + } else if (args.length === 2) { + if (!decorations[args[0]]) { + decorations[args[0]] = {}; } + decorations[args[0]][args[1]] = func; } } - if (!thedate.year) { - thedate = { "literal": txt }; - } - if (this.use_array) { - this.toArray(thedate); - } - return thedate; - }; - this.returnAsArray = function () { - this.use_array = true; - }; - this.returnAsKeys = function () { - this.use_array = false; - }; - this.toArray = function (thedate) { - var i, ilen, part; - thedate["date-parts"] = []; - thedate["date-parts"].push([]); - var slicelen = 0; - for (i = 0, ilen = 3; i < ilen; i += 1) { - part = ["year", "month", "day"][i]; - if (!thedate[part]) { - break; + } + return decorations; +}; +CSL.setDecorations = function (state, attributes) { + var ret, key, pos; + ret = []; + for (pos in CSL.FORMAT_KEY_SEQUENCE) { + if (true) { + key = CSL.FORMAT_KEY_SEQUENCE[pos]; + if (attributes[key]) { + ret.push([key, attributes[key]]); + delete attributes[key]; } - slicelen += 1; - thedate["date-parts"][0].push(thedate[part]); - delete thedate[part]; } - for (i = 0, ilen = slicelen; i < ilen; i += 1) { - part = ["year_end", "month_end", "day_end"][i]; - if (thedate[part] && thedate["date-parts"].length === 1) { - thedate["date-parts"].push([]); - } - thedate["date-parts"][1].push(thedate[part]); - delete thedate[part]; + } + return ret; +}; +CSL.Engine.prototype.normalDecorIsOrphan = function (blob, params) { + if (params[1] === "normal") { + var use_param = false; + var all_the_decor; + if (this.tmp.area === "citation") { + all_the_decor = [this.citation.opt.layout_decorations].concat(blob.alldecor); + } else { + all_the_decor = blob.alldecor; } - }; - this.parseNumericDate = function (ret, delim, suff, txt) { - var lst, i, ilen; - lst = txt.split(delim); - for (i = 0, ilen = lst.length; i < ilen; i += 1) { - if (lst[i].length === 4) { - ret[("year" + suff)] = lst[i].replace(/^0*/, ""); - if (!i) { - lst = lst.slice(1); - } else { - lst = lst.slice(0, i); + for (var k = all_the_decor.length - 1; k > -1; k += -1) { + for (var n = all_the_decor[k].length - 1; n > -1; n += -1) { + if (all_the_decor[k][n][0] === params[0]) { + if (all_the_decor[k][n][1] !== "normal") { + use_param = true; + } } - break; } } - for (i = 0, ilen = lst.length; i < ilen; i += 1) { - lst[i] = parseInt(lst[i], 10); - } - if (lst.length === 1 || (lst.length === 2 && !lst[1])) { - ret[("month" + suff)] = "" + lst[0]; - } else if (lst.length === 2) { - if (lst[this.monthguess] > 12) { - ret[("month" + suff)] = "" + lst[this.dayguess]; - ret[("day" + suff)] = "" + lst[this.monthguess]; - } else { - ret[("month" + suff)] = "" + lst[this.monthguess]; - ret[("day" + suff)] = "" + lst[this.dayguess]; - } + if (!use_param) { + return true; } - }; -}; -CSL.Engine = function (sys, style, lang, forceLang) { - var attrs, langspec, localexml, locale; - this.processor_version = CSL.PROCESSOR_VERSION; - this.csl_version = "1.0"; - this.sys = sys; - this.sys.xml = new CSL.System.Xml.Parsing(); - if ("undefined" === typeof CSL_JSON && "string" !== typeof style) { - style = ""; } - if (CSL.getAbbreviation) { - this.sys.getAbbreviation = CSL.getAbbreviation; - } - if (this.sys.stringCompare) { - CSL.stringCompare = this.sys.stringCompare; + return false; +}; +CSL.Engine.prototype.getCitationLabel = function (Item) { + var label = ""; + var params = this.getTrigraphParams(); + var config = params[0]; + var myname = this.getTerm("reference", "short", 0); + if ("undefined" === typeof myname) { + myname = "reference"; } - this.sys.AbbreviationSegments = CSL.AbbreviationSegments; - this.parallel = new CSL.Parallel(this); - this.transform = new CSL.Transform(this); - this.setParseNames = function (val) { - this.opt['parse-names'] = val; - }; - this.opt = new CSL.Engine.Opt(); - this.tmp = new CSL.Engine.Tmp(); - this.build = new CSL.Engine.Build(); - this.fun = new CSL.Engine.Fun(this); - this.configure = new CSL.Engine.Configure(); - this.citation_sort = new CSL.Engine.CitationSort(); - this.bibliography_sort = new CSL.Engine.BibliographySort(); - this.citation = new CSL.Engine.Citation(this); - this.bibliography = new CSL.Engine.Bibliography(); - this.output = new CSL.Output.Queue(this); - this.dateput = new CSL.Output.Queue(this); - this.cslXml = this.sys.xml.makeXml(style); - if (this.opt.development_extensions.csl_reverse_lookup_support) { - this.build.cslNodeId = 0; - this.setCslNodeIds = function(myxml, nodename) { - var children = this.sys.xml.children(myxml); - this.sys.xml.setAttribute(myxml, 'cslid', this.build.cslNodeId); - this.opt.nodenames.push(nodename); - this.build.cslNodeId += 1; - for (var i = 0, ilen = this.sys.xml.numberofnodes(children); i < ilen; i += 1) { - nodename = this.sys.xml.nodename(children[i]); - if (nodename) { - this.setCslNodeIds(children[i], nodename); + myname = myname.replace(".", ""); + myname = myname.slice(0, 1).toUpperCase() + myname.slice(1); + for (var i = 0, ilen = CSL.CREATORS.length; i < ilen; i += 1) { + var n = CSL.CREATORS[i]; + if (Item[n]) { + var names = Item[n]; + if (names.length > params.length) { + config = params[params.length - 1]; + } else { + config = params[names.length - 1]; + } + for (var j = 0, jlen = names.length; j < jlen; j += 1) { + if (j === config.authors.length) { + break; + } + var res = this.nameOutput.getName(names[j], "locale-translit", true); + var name = res.name; + if (name && name.family) { + myname = name.family; + myname = myname.replace(/^([ \'\u2019a-z]+\s+)/, ""); + } else if (name && name.literal) { + myname = name.literal; + } + var m = myname.toLowerCase().match(/^(a\s+|the\s+|an\s+)/); + if (m) { + myname = myname.slice(m[1].length); + } + myname = myname.replace(CSL.ROMANESQUE_NOT_REGEXP, "", "g"); + if (!myname) { + break; + } + myname = myname.slice(0, config.authors[j]); + if (myname.length > 1) { + myname = myname.slice(0, 1).toUpperCase() + myname.slice(1).toLowerCase(); + } else if (myname.length === 1) { + myname = myname.toUpperCase(); } + label += myname; } - }; - this.setCslNodeIds(this.cslXml, "style"); - } - this.sys.xml.addMissingNameNodes(this.cslXml); - this.sys.xml.addInstitutionNodes(this.cslXml); - this.sys.xml.insertPublisherAndPlace(this.cslXml); - this.sys.xml.flagDateMacros(this.cslXml); - attrs = this.sys.xml.attributes(this.cslXml); - if ("undefined" === typeof attrs["@sort-separator"]) { - this.sys.xml.setAttribute(this.cslXml, "sort-separator", ", "); - } - this.opt["initialize-with-hyphen"] = true; - this.setStyleAttributes(); - this.opt.xclass = sys.xml.getAttributeValue(this.cslXml, "class"); - this.opt.styleID = this.sys.xml.getStyleId(this.cslXml); - if (lang) { - lang = lang.replace("_", "-"); - } - if (this.opt["default-locale"][0]) { - this.opt["default-locale"][0] = this.opt["default-locale"][0].replace("_", "-"); + break; + } } - if (lang && forceLang) { - this.opt["default-locale"] = [lang]; + var year = "0000"; + if (Item.issued) { + if (Item.issued.year) { + year = "" + Item.issued.year; + } } - if (lang && !forceLang && this.opt["default-locale"][0]) { - lang = this.opt["default-locale"][0]; + year = year.slice((config.year * -1)); + label = label + year; + return label; +}; +CSL.Engine.prototype.getTrigraphParams = function () { + var params = []; + var ilst = this.opt.trigraph.split(":"); + if (!this.opt.trigraph || this.opt.trigraph.slice(0,1) !== "A") { + throw "Bad trigraph definition: "+this.opt.trigraph; } - if (this.opt["default-locale"].length === 0) { - if (!lang) { - lang = "en-US"; + for (var i = 0, ilen = ilst.length; i < ilen; i += 1) { + var str = ilst[i]; + var config = {authors:[], year:0}; + for (var j = 0, jlen = str.length; j < jlen; j += 1) { + switch (str.slice(j,j+1)) { + case "A": + config.authors.push(1); + break; + case "a": + config.authors[config.authors.length - 1] += 1; + break; + case "0": + config.year += 1; + break; + default: + throw "Invalid character in trigraph definition: "+this.opt.trigraph; + } } - this.opt["default-locale"].push("en-US"); - } - if (!lang) { - lang = this.opt["default-locale"][0]; + params.push(config); } - langspec = CSL.localeResolve(lang); - this.opt.lang = langspec.best; - this.opt["default-locale"][0] = langspec.best; - this.locale = {}; - this.localeConfigure(langspec); - this.registry = new CSL.Registry(this); - this.buildTokenLists("citation"); - this.buildTokenLists("bibliography"); - this.configureTokenLists(); - this.disambiguate = new CSL.Disambiguation(this); - this.splice_delimiter = false; - this.fun.dateparser = new CSL.DateParser(); - this.fun.flipflopper = new CSL.Util.FlipFlopper(this); - this.setCloseQuotesArray(); - this.fun.ordinalizer.init(this); - this.fun.long_ordinalizer.init(this); - this.fun.page_mangler = CSL.Util.PageRangeMangler.getFunction(this, "page"); - this.fun.year_mangler = CSL.Util.PageRangeMangler.getFunction(this, "year"); - this.setOutputFormat("html"); -}; -CSL.Engine.prototype.setCloseQuotesArray = function () { - var ret; - ret = []; - ret.push(this.getTerm("close-quote")); - ret.push(this.getTerm("close-inner-quote")); - ret.push('"'); - ret.push("'"); - this.opt.close_quotes_array = ret; + return params; }; -CSL.Engine.prototype.buildTokenLists = function (area) { - var area_nodes, navi; - area_nodes = this.sys.xml.getNodesByName(this.cslXml, area); - if (!this.sys.xml.getNodeValue(area_nodes)) { - return; +CSL.Engine.prototype.setOutputFormat = function (mode) { + this.opt.mode = mode; + this.fun.decorate = CSL.Mode(mode); + if (!this.output[mode]) { + this.output[mode] = {}; + this.output[mode].tmp = {}; } - navi = new this.getNavi(this, area_nodes); - this.build.area = area; - CSL.buildStyle.call(this, navi); }; -CSL.Engine.prototype.setStyleAttributes = function () { - var dummy, attr, key, attributes, attrname; - dummy = {}; - dummy.name = this.sys.xml.nodename(this.cslXml); - attributes = this.sys.xml.attributes(this.cslXml); - for (attrname in attributes) { - if (attributes.hasOwnProperty(attrname)) { - CSL.Attributes[attrname].call(dummy, this, attributes[attrname]); +CSL.Engine.prototype.setLangTagsForCslSort = function (tags) { + var i, ilen; + if (tags) { + this.opt['locale-sort'] = []; + for (i = 0, ilen = tags.length; i < ilen; i += 1) { + this.opt['locale-sort'].push(tags[i]); } } }; -CSL.buildStyle = function (navi) { - if (navi.getkids()) { - CSL.buildStyle.call(this, navi); - } else { - if (navi.getbro()) { - CSL.buildStyle.call(this, navi); - } else { - while (navi.nodeList.length > 1) { - if (navi.remember()) { - CSL.buildStyle.call(this, navi); - } - } +CSL.Engine.prototype.setLangTagsForCslTransliteration = function (tags) { + var i, ilen; + this.opt['locale-translit'] = []; + if (tags) { + for (i = 0, ilen = tags.length; i < ilen; i += 1) { + this.opt['locale-translit'].push(tags[i]); } } }; -CSL.Engine.prototype.getNavi = function (state, myxml) { - this.sys = state.sys; - this.state = state; - this.nodeList = []; - this.nodeList.push([0, myxml]); - this.depth = 0; -}; -CSL.Engine.prototype.getNavi.prototype.remember = function () { - var node; - this.depth += -1; - this.nodeList.pop(); - node = this.nodeList[this.depth][1][(this.nodeList[this.depth][0])]; - CSL.XmlToToken.call(node, this.state, CSL.END); - return this.getbro(); +CSL.Engine.prototype.setLangTagsForCslTranslation = function (tags) { + var i, ilen; + this.opt['locale-translat'] = []; + if (tags) { + for (i = 0, ilen = tags.length; i < ilen; i += 1) { + this.opt['locale-translat'].push(tags[i]); + } + } }; -CSL.Engine.prototype.getNavi.prototype.getbro = function () { - var sneakpeek; - sneakpeek = this.nodeList[this.depth][1][(this.nodeList[this.depth][0] + 1)]; - if (sneakpeek) { - this.nodeList[this.depth][0] += 1; - return true; - } else { - return false; +CSL.Engine.prototype.setLangPrefsForCites = function (obj, conv) { + var opt = this.opt['cite-lang-prefs']; + if (!conv) { + conv = function (key) { + return key.toLowerCase(); + }; } -}; -CSL.Engine.prototype.getNavi.prototype.getkids = function () { - var currnode, sneakpeek, pos, node, len; - currnode = this.nodeList[this.depth][1][this.nodeList[this.depth][0]]; - sneakpeek = this.sys.xml.children(currnode); - if (this.sys.xml.numberofnodes(sneakpeek) === 0) { - if (this.depth) { - CSL.XmlToToken.call(currnode, this.state, CSL.SINGLETON); + var segments = ['Persons', 'Institutions', 'Titles', 'Publishers', 'Places']; + for (var i = 0, ilen = segments.length; i < ilen; i += 1) { + var clientSegment = conv(segments[i]); + var citeprocSegment = segments[i].toLowerCase(); + if (!obj[clientSegment]) { + continue; } - return false; - } else { - for (pos in sneakpeek) { - node = sneakpeek[pos]; - if ("date" === this.sys.xml.nodename(node)) { - currnode = CSL.Util.fixDateNode.call(this, currnode, pos, node); - sneakpeek = this.sys.xml.children(currnode); - } + var supplements = []; + while (obj[clientSegment].length > 1) { + supplements.push(obj[clientSegment].pop()); + } + var sortval = {orig:1,translit:2,translat:3}; + if (supplements.length === 2 && sortval[supplements[0]] < sortval[supplements[1]]) { + supplements.reverse(); + } + while (supplements.length) { + obj[clientSegment].push(supplements.pop()); + } + var lst = opt[citeprocSegment]; + while (lst.length) { + lst.pop(); + } + for (var j = 0, jlen = obj[clientSegment].length; j < jlen; j += 1) { + lst.push(obj[clientSegment][j]); } - CSL.XmlToToken.call(currnode, this.state, CSL.START); - this.depth += 1; - this.nodeList.push([0, sneakpeek]); - return true; } }; -CSL.Engine.prototype.getNavi.prototype.getNodeListValue = function () { - return this.nodeList[this.depth][1]; -}; -CSL.Engine.prototype.getTerm = function (term, form, plural, gender, mode, forceDefaultLocale) { - if (term && term.match(/[A-Z]/) && term === term.toUpperCase()) { - CSL.debug("Warning: term key is in uppercase form: "+term); - term = term.toLowerCase(); - } - var lang; - if (forceDefaultLocale) { - lang = this.opt["default-locale"][0]; - } else { - lang = this.opt.lang; - } - var ret = CSL.Engine.getField(CSL.LOOSE, this.locale[lang].terms, term, form, plural, gender); - if (!ret && term === "range-delimiter") { - ret = "\u2013"; - } - if (typeof ret === "undefined") { - if (mode === CSL.STRICT) { - throw "Error in getTerm: term \"" + term + "\" does not exist."; - } else if (mode === CSL.TOLERANT) { - ret = ""; +CSL.Engine.prototype.setLangPrefsForCiteAffixes = function (affixList) { + if (affixList && affixList.length === 40) { + var affixes = this.opt.citeAffixes; + var count = 0; + var settings = ["persons", "institutions", "titles", "publishers", "places"]; + var forms = ["translit", "orig", "translit", "translat"]; + var value; + for (var i = 0, ilen = settings.length; i < ilen; i += 1) { + for (var j = 0, jlen = forms.length; j < jlen; j += 1) { + value = ""; + if ((count % 8) === 4) { + if (!affixes[settings[i]]["locale-"+forms[j]].prefix + && !affixes[settings[i]]["locale-"+forms[j]].suffix) { + value = affixList[count] ? affixList[count] : ""; + affixes[settings[i]]["locale-" + forms[j]].prefix = value; + value = affixList[count] ? affixList[count + 1] : ""; + affixes[settings[i]]["locale-" + forms[j]].suffix = value; + } + } else { + value = affixList[count] ? affixList[count] : ""; + affixes[settings[i]]["locale-" + forms[j]].prefix = value; + value = affixList[count] ? affixList[count + 1] : ""; + affixes[settings[i]]["locale-" + forms[j]].suffix = value; + } + count += 2; + } } + this.opt.citeAffixes = affixes; } - if (ret) { - this.tmp.cite_renders_content = true; - } - return ret; }; -CSL.Engine.prototype.getDate = function (form, forceDefaultLocale) { - var lang; - if (forceDefaultLocale) { - lang = this.opt["default-locale"]; - } else { - lang = this.opt.lang; - } - if (this.locale[lang].dates[form]) { - return this.locale[lang].dates[form]; +CSL.Engine.prototype.setAutoVietnameseNamesOption = function (arg) { + if (arg) { + this.opt["auto-vietnamese-names"] = true; } else { - return false; + this.opt["auto-vietnamese-names"] = false; } }; -CSL.Engine.prototype.getOpt = function (arg) { - if ("undefined" !== typeof this.locale[this.opt.lang].opts[arg]) { - return this.locale[this.opt.lang].opts[arg]; - } else { - return false; +CSL.Engine.prototype.setAbbreviations = function (arg) { + if (this.sys.setAbbreviations) { + this.sys.setAbbreviations(arg); } }; -CSL.Engine.prototype.getVariable = function (Item, varname, form, plural) { - return CSL.Engine.getField(CSL.LOOSE, Item, varname, form, plural); +CSL.Output = {}; +CSL.Output.Queue = function (state) { + this.levelname = ["top"]; + this.state = state; + this.queue = []; + this.empty = new CSL.Token("empty"); + var tokenstore = {}; + tokenstore.empty = this.empty; + this.formats = new CSL.Stack(tokenstore); + this.current = new CSL.Stack(this.queue); }; -CSL.Engine.prototype.getDateNum = function (ItemField, partname) { - if ("undefined" === typeof ItemField) { - return 0; +CSL.Output.Queue.prototype.pop = function () { + var drip = this.current.value(); + if (drip.length) { + return drip.pop(); } else { - return ItemField[partname]; + return drip.blobs.pop(); } }; -CSL.Engine.getField = function (mode, hash, term, form, plural, gender) { - var ret, forms, f, pos, len, hashterm; - ret = ""; - if ("undefined" === typeof hash[term]) { - if (mode === CSL.STRICT) { - throw "Error in getField: term \"" + term + "\" does not exist."; - } else { - return undefined; +CSL.Output.Queue.prototype.getToken = function (name) { + var ret = this.formats.value()[name]; + return ret; +}; +CSL.Output.Queue.prototype.mergeTokenStrings = function (base, modifier) { + var base_token, modifier_token, ret, key; + base_token = this.formats.value()[base]; + modifier_token = this.formats.value()[modifier]; + ret = base_token; + if (modifier_token) { + if (!base_token) { + base_token = new CSL.Token(base, CSL.SINGLETON); + base_token.decorations = []; } - } - if (gender && hash[term][gender]) { - hashterm = hash[term][gender]; - } else { - hashterm = hash[term]; - } - forms = []; - if (form === "symbol") { - forms = ["symbol", "short"]; - } else if (form === "verb-short") { - forms = ["verb-short", "verb"]; - } else if (form !== "long") { - forms = [form]; - } - forms = forms.concat(["long"]); - len = forms.length; - for (pos = 0; pos < len; pos += 1) { - f = forms[pos]; - if ("string" === typeof hashterm || "number" === typeof hashterm) { - ret = hashterm; - } else if ("undefined" !== typeof hashterm[f]) { - if ("string" === typeof hashterm[f] || "number" === typeof hashterm[f]) { - ret = hashterm[f]; - } else { - if ("number" === typeof plural) { - ret = hashterm[f][plural]; - } else { - ret = hashterm[f][0]; - } + ret = new CSL.Token(base, CSL.SINGLETON); + key = ""; + for (key in base_token.strings) { + if (base_token.strings.hasOwnProperty(key)) { + ret.strings[key] = base_token.strings[key]; + } + } + for (key in modifier_token.strings) { + if (modifier_token.strings.hasOwnProperty(key)) { + ret.strings[key] = modifier_token.strings[key]; } - break; } + ret.decorations = base_token.decorations.concat(modifier_token.decorations); } return ret; }; -CSL.Engine.prototype.configureTokenLists = function () { - var dateparts_master, area, pos, token, dateparts, part, ppos, pppos, len, llen, lllen; - dateparts_master = ["year", "month", "day"]; - len = CSL.AREAS.length; - for (pos = 0; pos < len; pos += 1) { - area = CSL.AREAS[pos]; - llen = this[area].tokens.length - 1; - for (ppos = llen; ppos > -1; ppos += -1) { - token = this[area].tokens[ppos]; - if ("date" === token.name && CSL.END === token.tokentype) { - dateparts = []; - } - if ("date-part" === token.name && token.strings.name) { - lllen = dateparts_master.length; - for (pppos = 0; pppos < lllen; pppos += 1) { - part = dateparts_master[pppos]; - if (part === token.strings.name) { - dateparts.push(token.strings.name); - } - } - } - if ("date" === token.name && CSL.START === token.tokentype) { - dateparts.reverse(); - token.dateparts = dateparts; - } - token.next = (ppos + 1); - if (token.name && CSL.Node[token.name].configure) { - CSL.Node[token.name].configure.call(token, this, ppos); +CSL.Output.Queue.prototype.addToken = function (name, modifier, token) { + var newtok, attr; + newtok = new CSL.Token("output"); + if ("string" === typeof token) { + token = this.formats.value()[token]; + } + if (token && token.strings) { + for (attr in token.strings) { + if (token.strings.hasOwnProperty(attr)) { + newtok.strings[attr] = token.strings[attr]; } } + newtok.decorations = token.decorations; } - this.version = CSL.version; - return this.state; + if ("string" === typeof modifier) { + newtok.strings.delimiter = modifier; + } + this.formats.value()[name] = newtok; }; -CSL.Engine.prototype.retrieveItems = function (ids) { - var ret, pos, len; - ret = []; - for (var i = 0, ilen = ids.length; i < ilen; i += 1) { - ret.push(this.retrieveItem("" + ids[i])); +CSL.Output.Queue.prototype.pushFormats = function (tokenstore) { + if (!tokenstore) { + tokenstore = {}; } - return ret; + tokenstore.empty = this.empty; + this.formats.push(tokenstore); }; -CSL.ITERATION = 0; -CSL.Engine.prototype.retrieveItem = function (id) { - var Item, m, pos, len, mm; - if (this.opt.development_extensions.normalize_lang_keys_to_lowercase && - "boolean" === typeof this.opt.development_extensions.normalize_lang_keys_to_lowercase) { - for (var i=0,ilen=this.opt["default-locale"].length; i<ilen; i+=1) { - this.opt["default-locale"][i] = this.opt["default-locale"][i].toLowerCase(); - } - for (var i=0,ilen=this.opt["locale-translit"].length; i<ilen; i+=1) { - this.opt["locale-translit"][i] = this.opt["locale-translit"][i].toLowerCase(); - } - for (var i=0,ilen=this.opt["locale-translat"].length; i<ilen; i+=1) { - this.opt["locale-translat"][i] = this.opt["locale-translat"][i].toLowerCase(); - } - this.opt.development_extensions.normalize_lang_keys_to_lowercase = 100; +CSL.Output.Queue.prototype.popFormats = function (tokenstore) { + this.formats.pop(); +}; +CSL.Output.Queue.prototype.startTag = function (name, token) { + var tokenstore = {}; + if (this.state.tmp["doing-macro-with-date"] && this.state.tmp.extension) { + token = this.empty; + name = "empty"; } - CSL.ITERATION += 1; - Item = this.sys.retrieveItem("" + id); - if (this.opt.development_extensions.normalize_lang_keys_to_lowercase) { - if (Item.multi) { - if (Item.multi._keys) { - for (var field in Item.multi._keys) { - for (var key in Item.multi._keys[field]) { - if (key !== key.toLowerCase()) { - Item.multi._keys[field][key.toLowerCase()] = Item.multi._keys[field][key]; - delete Item.multi._keys[field][key]; - } - } - } - } - if (Item.multi.main) { - for (var field in Item.multi.main) { - Item.multi.main[field] = Item.multi.main[field].toLowerCase(); - } - } - } - for (var i=0, ilen=CSL.CREATORS.length; i>ilen; i+=1) { - var ctype = CSL.CREATORS[i]; - if (Item[ctype] && Item[ctype].multi) { - for (var j=0, jlen=Item[ctype].length; j<jlen; j+=1) { - var creator = Item[ctype][j]; - if (creator.multi) { - if (creator.multi._key) { - for (var key in creator.multi._key) { - if (key !== key.toLowerCase()) { - creator.multi._key[key.toLowerCase()] = creator.multi._key[key]; - delete creator.multi._key[key]; - } - } - } - if (creator.multi.main) { - creator.multi.main = creator.multi.main.toLowerCase(); - } - } - } - } + tokenstore[name] = token; + this.pushFormats(tokenstore); + this.openLevel(name); +}; +CSL.Output.Queue.prototype.endTag = function (name) { + this.closeLevel(); + this.popFormats(); +}; +CSL.Output.Queue.prototype.openLevel = function (token, ephemeral) { + var blob, curr, x, has_ephemeral; + if ("object" === typeof token) { + blob = new CSL.Blob(undefined, token); + } else if ("undefined" === typeof token) { + blob = new CSL.Blob(undefined, this.formats.value().empty, "empty"); + } else { + if (!this.formats.value() || !this.formats.value()[token]) { + throw "CSL processor error: call to nonexistent format token \"" + token + "\""; } + blob = new CSL.Blob(undefined, this.formats.value()[token], token); } - if (Item.page) { - Item["page-first"] = Item.page; - var num = "" + Item.page; - m = num.split(/\s*(?:&|,|-|\u2013)\s*/); - if (m[0].slice(-1) !== "\\") { - Item["page-first"] = m[0]; - } + if (this.nestedBraces) { + blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); + blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); + blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); + blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); } - if (this.opt.development_extensions.field_hack && Item.note) { - m = Item.note.match(CSL.NOTE_FIELDS_REGEXP); - if (m) { - var names = {}; - for (pos = 0, len = m.length; pos < len; pos += 1) { - mm = m[pos].match(CSL.NOTE_FIELD_REGEXP); - if (!Item[mm[1]] && CSL.DATE_VARIABLES.indexOf(mm[1]) > -1) { - Item[mm[1]] = {raw:mm[2]}; - } else if (!Item[mm[1]] && CSL.NAME_VARIABLES.indexOf(mm[1]) > -1) { - if (!Item[mm[1]]) { - Item[mm[1]] = []; - } - var lst = mm[2].split(/\s*\|\|\s*/); - if (lst.length === 1) { - Item[mm[1]].push({family:lst[0],isInstitution:true}); - } else if (lst.length === 2) { - Item[mm[1]].push({family:lst[0],given:lst[1]}); - } - } else if (!Item[mm[1]] || mm[1] === "type") { - Item[mm[1]] = mm[2].replace(/^\s+/, "").replace(/\s+$/, ""); - } - Item.note.replace(CSL.NOTE_FIELD_REGEXP, ""); - } - } + curr = this.current.value(); + curr.push(blob); + this.current.push(blob); +}; +CSL.Output.Queue.prototype.closeLevel = function (name) { + if (name && name !== this.current.value().levelname) { + CSL.error("Level mismatch error: wanted " + name + " but found " + this.current.value().levelname); } - for (var i = 1, ilen = CSL.DATE_VARIABLES.length; i < ilen; i += 1) { - var dateobj = Item[CSL.DATE_VARIABLES[i]]; - if (dateobj) { - if (this.opt.development_extensions.raw_date_parsing) { - if (dateobj.raw) { - dateobj = this.fun.dateparser.parse(dateobj.raw); - } - } - Item[CSL.DATE_VARIABLES[i]] = this.dateParseArray(dateobj); - } + this.current.pop(); +}; +CSL.Output.Queue.prototype.append = function (str, tokname, notSerious, ignorePredecessor, noStripPeriods) { + var token, blob, curr; + var useblob = true; + if (notSerious) { + ignorePredecessor = true; } - if (this.opt.development_extensions.static_statute_locator) { - if (Item.type && ["bill","gazette","legislation","treaty"].indexOf(Item.type) > -1) { - var varname; - var elements = ["type", "title", "jurisdiction", "genre", "volume", "container-title"]; - var legislation_id = []; - for (i = 0, ilen = elements.length; i < ilen; i += 1) { - varname = elements[i]; - if (Item[varname]) { - legislation_id.push(Item[varname]); - } - } - elements = ["original-date", "issued"]; - for (i = 0, elements.length; i < ilen; i += 1) { - varname = elements[i]; - if (Item[varname] && Item[varname].year) { - var value = Item[varname].year; - legislation_id.push(value); - break; - } - } - Item.legislation_id = legislation_id.join("::"); + if (this.state.tmp["doing-macro-with-date"]) { + if (tokname !== "macro-with-date") { + return false; } - } - if (this.opt.development_extensions.main_title_from_short_title) { - Item["title-main"] = Item.title; - Item["title-sub"] = false; - if (Item.title && Item.shortTitle) { - offset = Item.shortTitle.length; - if (Item.title.slice(0,offset) === Item.shortTitle && Item.title.slice(offset).match(/^\s*:/)) { - Item["title-main"] = Item.title.slice(0,offset).replace(/\s+$/,""); - Item["title-sub"] = Item.title.slice(offset).replace(/^\s*:\s*/,""); - } + if (tokname === "macro-with-date") { + tokname = "empty"; } } - if (!Item["title-short"]) { - Item["title-short"] = Item.shortTitle; + if ("undefined" === typeof str) { + return false; } - var isLegalType = ["legal_case","legislation","gazette","regulation"].indexOf(Item.type) > -1; - if (isLegalType) { - if (!Item["title-short"]) { - Item["title-short"] = Item.title; - } - } else if (Item.title && this.sys.getAbbreviation) { - var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item.title); - if (this.transform.abbrevs[jurisdiction].title) { - if (this.transform.abbrevs[jurisdiction].title[Item.title]) { - Item["title-short"] = this.transform.abbrevs[jurisdiction].title[Item.title]; - } - } + if ("number" === typeof str) { + str = "" + str; } - Item["container-title-short"] = Item.journalAbbreviation; - if (Item["container-title"] && this.sys.getAbbreviation) { - var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item["container-title"]); - if (this.transform.abbrevs[jurisdiction].title) { - if (this.transform.abbrevs[jurisdiction].title[Item["container-title"]]) { - Item["container-title-short"] = this.transform.abbrevs[jurisdiction].title[Item["container-title"]]; - } - } + if (!notSerious + && this.state.tmp.element_trace + && this.state.tmp.element_trace.value() === "suppress-me") { + return false; } - return Item; -}; -CSL.Engine.prototype.setOpt = function (token, name, value) { - if (token.name === "style" || token.name === "cslstyle") { - this.opt[name] = value; - } else if (["citation", "bibliography"].indexOf(token.name) > -1) { - this[token.name].opt[name] = value; - } else if (["name-form", "name-delimiter", "names-delimiter"].indexOf(name) === -1) { - token.strings[name] = value; + blob = false; + if (!tokname) { + token = this.formats.value().empty; + } else if (tokname === "literal") { + token = true; + useblob = false; + } else if ("string" === typeof tokname) { + token = this.formats.value()[tokname]; + } else { + token = tokname; } -}; -CSL.Engine.prototype.fixOpt = function (token, name, localname) { - if (["citation", "bibliography"].indexOf(token.name) > -1) { - if (! this[token.name].opt[name] && "undefined" !== typeof this.opt[name]) { - this[token.name].opt[name] = this.opt[name]; - } + if (!token) { + throw "CSL processor error: unknown format token name: " + tokname; } - if ("name" === token.name || "names" === token.name) { - if ("undefined" === typeof token.strings[localname] && "undefined" !== typeof this[this.build.root].opt[name]) { - token.strings[localname] = this[this.build.root].opt[name]; + if (token.strings && "undefined" === typeof token.strings.delimiter) { + token.strings.delimiter = ""; + } + if ("string" === typeof str && str.length) { + str = str.replace(/ ([:;?!\u00bb])/g, "\u202f$1").replace(/\u00ab /g, "\u00ab\u202f"); + this.last_char_rendered = str.slice(-1); + str = str.replace(/\s+'/g, " \'").replace(/^'/g, " \'"); + if (!ignorePredecessor) { + this.state.tmp.term_predecessor = true; + } else if (notSerious) { + this.state.tmp.term_predecessor_name = true; } } -}; -CSL.Engine.prototype.remapSectionVariable = function (inputList) { - for (var i = 0, ilen = inputList.length; i < ilen; i += 1) { - var Item = inputList[i][0]; - var item = inputList[i][1]; - var section_label_count = 0; - var later_label = false; - var value = false; - if (["bill","gazette","legislation","treaty"].indexOf(Item.type) > -1) { - item.force_pluralism = 0; - if (!item.label) { - item.label = "page" - } - var loci = ["section","","",""]; - var split; - if (this.opt.development_extensions.static_statute_locator && Item.section) { - splt = Item.section.replace(/^\s+/,"").replace(/\s+$/, "").split(/\s+/); - if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { - loci[0] = " " + splt[0] + " "; - loci[1] = splt.slice(1).join(" "); - } else { - loci[0] = " sec. "; - loci[1] = splt.slice(0).join(" "); - } - } else { - if (this.opt.development_extensions.clobber_locator_if_no_statute_section) { - item.locator = undefined; - item.label = undefined; - } - } - if (item.locator) { - var splt = item.locator.replace(/^\s+/,"").replace(/\s+$/, "").split(/\s+/); - if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { - loci[2] = " " + splt[0] + " "; - loci[3] = splt.slice(1).join(" "); - } else if (item.label) { - loci[2] = " " + CSL.STATUTE_SUBDIV_STRINGS_REVERSE[item.label] + " "; - loci[3] = splt.slice(0).join(" "); - } else { - loci[3] = splt.join(" ") - } - if (loci[3] && loci[3].slice(0,1) === "&") { - loci[3] = " " + loci[3]; - } - } - if (!loci[2]) { - loci[2] = loci[0]; - } - if (loci[3]) { - if (loci[3].match(/^[^0-9a-zA-Z]/)) { - var loclst = loci[3].split(/\s+/); - if (loci[0] === loci[2] && loclst[1] && !CSL.STATUTE_SUBDIV_STRINGS[loclst[1].replace(/\s+/, "").replace(/\s+/, "")]) { - item.force_pluralism = 1; - } - loci[2] = ""; - } - } else { - loci[2] = ""; - } - if (!loci[1]) { - loci[0] = ""; - } - var value = loci.join(""); - value = value.replace(/^\s+/,"").replace(/\s+$/, ""); - if (value) { - splt = value.split(/\s+/); - if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { - var has_other = false; - for (var j = splt.length - 2; j > 0; j += -2) { - if (splt[j] === splt[0]) { - item.force_pluralism = 1; - splt = splt.slice(0,j).concat(splt.slice(j + 1)); - } - } - item.label = CSL.STATUTE_SUBDIV_STRINGS[splt[0]]; - item.locator = splt.slice(1).join(" "); - if (item.force_pluralism === 0) { - delete item.force_pluralism; - } - } else { - item.locator = splt.slice(0).join(" "); - } - } - } + blob = new CSL.Blob(str, token); + if (this.nestedBraces) { + blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); + blob.strings.prefix = blob.strings.prefix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); + blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[0][0], this.nestedBraces[0][1]); + blob.strings.suffix = blob.strings.suffix.replace(this.nestedBraces[1][0], this.nestedBraces[1][1]); } -} -CSL.Engine.prototype.setNumberLabels = function (Item) { - if (Item.number - && ["bill", "gazette", "legislation", "treaty"].indexOf(Item.type) > -1 - && this.opt.development_extensions.static_statute_locator - && !this.tmp.shadow_numbers["number"]) { - this.tmp.shadow_numbers["number"] = {}; - this.tmp.shadow_numbers["number"].values = []; - this.tmp.shadow_numbers["number"].plural = 0; - this.tmp.shadow_numbers["number"].numeric = false; - this.tmp.shadow_numbers["number"].label = false; - var value = "" + Item.number; - value = value.replace("\\", "", "g"); - var firstword = value.split(/\s/)[0]; - var firstlabel = CSL.STATUTE_SUBDIV_STRINGS[firstword]; - if (firstlabel) { - var m = value.match(CSL.STATUTE_SUBDIV_GROUPED_REGEX); - var splt = value.split(CSL.STATUTE_SUBDIV_PLAIN_REGEX); - if (splt.length > 1) { - var lst = []; - for (var j=1, jlen=splt.length; j < jlen; j += 1) { - var subdiv = m[j - 1].replace(/^\s*/, ""); - lst.push(subdiv.replace("sec.", "Sec.").replace("ch.", "Ch.")); - lst.push(splt[j].replace(/\s*$/, "").replace(/^\s*/, "")); - } - value = lst.join(" "); - } else { - value = splt[0]; - } - this.tmp.shadow_numbers["number"].values.push(["Blob", value, false]); - this.tmp.shadow_numbers["number"].numeric = false; - } else { - this.tmp.shadow_numbers["number"].values.push(["Blob", value, false]); - this.tmp.shadow_numbers["number"].numeric = true; - } + curr = this.current.value(); + if ("undefined" === typeof curr && this.current.mystack.length === 0) { + this.current.mystack.push([]); + curr = this.current.value(); } -} -CSL.substituteOne = function (template) { - return function (state, list) { - if (!list) { - return ""; - } else { - return template.replace("%%STRING%%", list); - } - }; -}; -CSL.substituteTwo = function (template) { - return function (param) { - var template2 = template.replace("%%PARAM%%", param); - return function (state, list) { - if (!list) { - return ""; - } else { - return template2.replace("%%STRING%%", list); - } - }; - }; -}; -CSL.Mode = function (mode) { - var decorations, params, param, func, val, args; - decorations = {}; - params = CSL.Output.Formats[mode]; - for (param in params) { - if (true) { - if ("@" !== param.slice(0, 1)) { - decorations[param] = params[param]; - continue; - } - func = false; - val = params[param]; - args = param.split('/'); - if (typeof val === "string" && val.indexOf("%%STRING%%") > -1) { - if (val.indexOf("%%PARAM%%") > -1) { - func = CSL.substituteTwo(val); - } else { - func = CSL.substituteOne(val); - } - } else if (typeof val === "boolean" && !val) { - func = CSL.Output.Formatters.passthrough; - } else if (typeof val === "function") { - func = val; - } else { - throw "CSL.Compiler: Bad " + mode + " config entry for " + param + ": " + val; - } - if (args.length === 1) { - decorations[args[0]] = func; - } else if (args.length === 2) { - if (!decorations[args[0]]) { - decorations[args[0]] = {}; - } - decorations[args[0]][args[1]] = func; - } + if ("string" === typeof blob.blobs) { + if (!ignorePredecessor) { + this.state.tmp.term_predecessor = true; + } else if (notSerious) { + this.state.tmp.term_predecessor_name = true; } } - return decorations; -}; -CSL.setDecorations = function (state, attributes) { - var ret, key, pos; - ret = []; - for (pos in CSL.FORMAT_KEY_SEQUENCE) { - if (true) { - key = CSL.FORMAT_KEY_SEQUENCE[pos]; - if (attributes[key]) { - ret.push([key, attributes[key]]); - delete attributes[key]; - } - } + if (!notSerious) { + this.state.parallel.AppendBlobPointer(curr); } - return ret; -}; -CSL.Engine.prototype.normalDecorIsOrphan = function (blob, params) { - if (params[1] === "normal") { - var use_param = false; - var all_the_decor; - if (this.tmp.area === "citation") { - all_the_decor = [this.citation.opt.layout_decorations].concat(blob.alldecor); - } else { - all_the_decor = blob.alldecor; - } - for (var k = all_the_decor.length - 1; k > -1; k += -1) { - for (var n = all_the_decor[k].length - 1; n > -1; n += -1) { - if (all_the_decor[k][n][0] === params[0]) { - if (all_the_decor[k][n][1] !== "normal") { - use_param = true; - } - } - } - } - if (!use_param) { - return true; + if ("string" === typeof str) { + curr.push(blob); + if (blob.strings["text-case"]) { + blob.blobs = CSL.Output.Formatters[blob.strings["text-case"]](this.state, str); } - } - return false; -}; -CSL.Engine.prototype.setOutputFormat = function (mode) { - this.opt.mode = mode; - this.fun.decorate = CSL.Mode(mode); - if (!this.output[mode]) { - this.output[mode] = {}; - this.output[mode].tmp = {}; - } -}; -CSL.Engine.prototype.setLangTagsForCslSort = function (tags) { - var i, ilen; - if (tags) { - this.opt['locale-sort'] = []; - for (i = 0, ilen = tags.length; i < ilen; i += 1) { - this.opt['locale-sort'].push(tags[i]); + if (this.state.tmp.strip_periods && !noStripPeriods) { + blob.blobs = blob.blobs.replace(/\.([^a-z]|$)/g, "$1"); } - } -}; -CSL.Engine.prototype.setLangTagsForCslTransliteration = function (tags) { - var i, ilen; - this.opt['locale-translit'] = []; - if (tags) { - for (i = 0, ilen = tags.length; i < ilen; i += 1) { - this.opt['locale-translit'].push(tags[i]); - } - } -}; -CSL.Engine.prototype.setLangTagsForCslTranslation = function (tags) { - var i, ilen; - this.opt['locale-translat'] = []; - if (tags) { - for (i = 0, ilen = tags.length; i < ilen; i += 1) { - this.opt['locale-translat'].push(tags[i]); - } - } -}; -CSL.Engine.prototype.setLangPrefsForCites = function (obj, conv) { - var opt = this.opt['cite-lang-prefs']; - if (!conv) { - conv = function (key) { - return key.toLowerCase(); - }; - } - var segments = ['Persons', 'Institutions', 'Titles', 'Publishers', 'Places']; - for (var i = 0, ilen = segments.length; i < ilen; i += 1) { - var clientSegment = conv(segments[i]); - var citeprocSegment = segments[i].toLowerCase(); - if (!obj[clientSegment]) { - continue; - } - var supplements = []; - while (obj[clientSegment].length > 1) { - supplements.push(obj[clientSegment].pop()); - } - var sortval = {orig:1,translit:2,translat:3}; - if (supplements.length === 2 && sortval[supplements[0]] < sortval[supplements[1]]) { - supplements.reverse(); - } - while (supplements.length) { - obj[clientSegment].push(supplements.pop()); - } - var lst = opt[citeprocSegment]; - while (lst.length) { - lst.pop(); - } - for (var j = 0, jlen = obj[clientSegment].length; j < jlen; j += 1) { - lst.push(obj[clientSegment][j]); - } - } -}; -CSL.Engine.prototype.setLangPrefsForCiteAffixes = function (affixList) { - if (affixList && affixList.length === 40) { - var affixes = this.opt.citeAffixes; - var count = 0; - var settings = ["persons", "institutions", "titles", "publishers", "places"]; - var forms = ["translit", "orig", "translit", "translat"]; - var value; - for (var i = 0, ilen = settings.length; i < ilen; i += 1) { - for (var j = 0, jlen = forms.length; j < jlen; j += 1) { - value = ""; - if ((count % 8) === 4) { - if (!affixes[settings[i]]["locale-"+forms[j]].prefix - && !affixes[settings[i]]["locale-"+forms[j]].suffix) { - value = affixList[count] ? affixList[count] : ""; - affixes[settings[i]]["locale-" + forms[j]].prefix = value; - value = affixList[count] ? affixList[count + 1] : ""; - affixes[settings[i]]["locale-" + forms[j]].suffix = value; - } - } else { - value = affixList[count] ? affixList[count] : ""; - affixes[settings[i]]["locale-" + forms[j]].prefix = value; - value = affixList[count] ? affixList[count + 1] : ""; - affixes[settings[i]]["locale-" + forms[j]].suffix = value; - } - count += 2; - } - } - this.opt.citeAffixes = affixes; - } -}; -CSL.Engine.prototype.setAutoVietnameseNamesOption = function (arg) { - if (arg) { - this.opt["auto-vietnamese-names"] = true; - } else { - this.opt["auto-vietnamese-names"] = false; - } -}; -CSL.Engine.prototype.setAbbreviations = function (arg) { - if (this.sys.setAbbreviations) { - this.sys.setAbbreviations(arg); - } -}; -CSL.Engine.Opt = function () { - this.has_disambiguate = false; - this.mode = "html"; - this.dates = {}; - this["locale-sort"] = []; - this["locale-translit"] = []; - this["locale-translat"] = []; - this.citeAffixes = { - persons:{ - "locale-orig":{ - prefix:"", - suffix:"" - }, - "locale-translit":{ - prefix:"", - suffix:"" - }, - "locale-translat":{ - prefix:"", - suffix:"" - } - }, - institutions:{ - "locale-orig":{ - prefix:"", - suffix:"" - }, - "locale-translit":{ - prefix:"", - suffix:"" - }, - "locale-translat":{ - prefix:"", - suffix:"" - } - }, - titles:{ - "locale-orig":{ - prefix:"", - suffix:"" - }, - "locale-translit":{ - prefix:"", - suffix:"" - }, - "locale-translat":{ - prefix:"", - suffix:"" - } - }, - publishers:{ - "locale-orig":{ - prefix:"", - suffix:"" - }, - "locale-translit":{ - prefix:"", - suffix:"" - }, - "locale-translat":{ - prefix:"", - suffix:"" - } - }, - places:{ - "locale-orig":{ - prefix:"", - suffix:"" - }, - "locale-translit":{ - prefix:"", - suffix:"" - }, - "locale-translat":{ - prefix:"", - suffix:"" - } - } - }; - this["default-locale"] = []; - this.update_mode = CSL.NONE; - this.bib_mode = CSL.NONE; - this.sort_citations = false; - this["et-al-min"] = 0; - this["et-al-use-first"] = 1; - this["et-al-use-last"] = false; - this["et-al-subsequent-min"] = false; - this["et-al-subsequent-use-first"] = false; - this["demote-non-dropping-particle"] = "display-and-sort"; - this["parse-names"] = true; - this.citation_number_slug = false; - this.max_number_of_names = 0; - this.trigraph = "Aaaa00:AaAa00:AaAA00:AAAA00"; - this.development_extensions = {}; - this.development_extensions.field_hack = true; - this.development_extensions.locator_date_and_revision = true; - this.development_extensions.locator_parsing_for_plurals = true; - this.development_extensions.locator_label_parse = true; - this.development_extensions.raw_date_parsing = true; - this.development_extensions.clean_up_csl_flaws = true; - this.development_extensions.flip_parentheses_to_braces = true; - this.development_extensions.jurisdiction_subfield = true; - this.development_extensions.static_statute_locator = false; - this.development_extensions.csl_reverse_lookup_support = false; - this.development_extensions.clobber_locator_if_no_statute_section = false; - this.development_extensions.wrap_url_and_doi = false; - this.development_extensions.allow_force_lowercase = false; - this.development_extensions.handle_parallel_articles = false; - this.development_extensions.thin_non_breaking_space_html_hack = false; - this.development_extensions.apply_citation_wrapper = false; - this.development_extensions.main_title_from_short_title = false; - this.development_extensions.normalize_lang_keys_to_lowercase = false; - this.development_extensions.strict_text_case_locales = false; - this.nodenames = []; - this.gender = {}; - this['cite-lang-prefs'] = { - persons:['orig'], - institutions:['orig'], - titles:['orig','translat'], - publishers:['orig'], - places:['orig'], - number:['translat'] - }; -}; -CSL.Engine.Tmp = function () { - this.names_max = new CSL.Stack(); - this.names_base = new CSL.Stack(); - this.givens_base = new CSL.Stack(); - this.value = []; - this.namepart_decorations = {}; - this.namepart_type = false; - this.area = "citation"; - this.root = "citation"; - this.extension = ""; - this.can_substitute = new CSL.Stack(0, CSL.LITERAL); - this.element_rendered_ok = false; - this.element_trace = new CSL.Stack("style"); - this.nameset_counter = 0; - this.group_context = new CSL.Stack([false, false, false], CSL.LITERAL); - this.term_predecessor = false; - this.jump = new CSL.Stack(0, CSL.LITERAL); - this.decorations = new CSL.Stack(); - this.tokenstore_stack = new CSL.Stack(); - this.last_suffix_used = ""; - this.last_names_used = []; - this.last_years_used = []; - this.years_used = []; - this.names_used = []; - this.taintedItemIDs = {}; - this.taintedCitationIDs = {}; - this.initialize_with = new CSL.Stack(); - this.disambig_request = false; - this["name-as-sort-order"] = false; - this.suppress_decorations = false; - this.disambig_settings = new CSL.AmbigConfig(); - this.bib_sort_keys = []; - this.prefix = new CSL.Stack("", CSL.LITERAL); - this.suffix = new CSL.Stack("", CSL.LITERAL); - this.delimiter = new CSL.Stack("", CSL.LITERAL); - this.cite_locales = []; - this.cite_affixes = false; - this.strip_periods = 0; - this.shadow_numbers = {}; -}; -CSL.Engine.Fun = function (state) { - this.match = new CSL.Util.Match(); - this.suffixator = new CSL.Util.Suffixator(CSL.SUFFIX_CHARS); - this.romanizer = new CSL.Util.Romanizer(); - this.ordinalizer = new CSL.Util.Ordinalizer(state); - this.long_ordinalizer = new CSL.Util.LongOrdinalizer(); -}; -CSL.Engine.Build = function () { - this["alternate-term"] = false; - this.in_bibliography = false; - this.in_style = false; - this.skip = false; - this.postponed_macro = false; - this.layout_flag = false; - this.name = false; - this.form = false; - this.term = false; - this.macro = {}; - this.macro_stack = []; - this.text = false; - this.lang = false; - this.area = "citation"; - this.root = "citation"; - this.extension = ""; - this.substitute_level = new CSL.Stack(0, CSL.LITERAL); - this.names_level = 0; - this.render_nesting_level = 0; - this.render_seen = false; -}; -CSL.Engine.Configure = function () { - this.fail = []; - this.succeed = []; -}; -CSL.Engine.Citation = function (state) { - this.opt = {}; - this.tokens = []; - this.srt = new CSL.Registry.Comparifier(state, "citation_sort"); - this.opt.collapse = []; - this.opt["disambiguate-add-names"] = false; - this.opt["disambiguate-add-givenname"] = false; - this.opt["disambiguate-add-year-suffix"] = false; - this.opt["givenname-disambiguation-rule"] = "by-cite"; - this.opt["near-note-distance"] = 5; - this.opt.topdecor = []; - this.opt.layout_decorations = []; - this.opt.layout_prefix = ""; - this.opt.layout_suffix = ""; - this.opt.layout_delimiter = ""; -}; -CSL.Engine.Bibliography = function () { - this.opt = {}; - this.tokens = []; - this.opt.collapse = []; - this.opt.topdecor = []; - this.opt.layout_decorations = []; - this.opt.layout_prefix = ""; - this.opt.layout_suffix = ""; - this.opt.layout_delimiter = ""; - this.opt["line-spacing"] = 1; - this.opt["entry-spacing"] = 1; -}; -CSL.Engine.BibliographySort = function () { - this.tokens = []; - this.opt = {}; - this.opt.sort_directions = []; - this.keys = []; - this.opt.topdecor = []; -}; -CSL.Engine.CitationSort = function () { - this.tokens = []; - this.opt = {}; - this.opt.sort_directions = []; - this.keys = []; - this.opt.topdecor = []; -}; -CSL.Engine.prototype.setCitationId = function (citation, force) { - var ret, id, direction; - ret = false; - if (!citation.citationID || force) { - id = Math.floor(Math.random() * 100000000000000); - while (true) { - direction = 0; - if (!this.registry.citationreg.citationById[id]) { - citation.citationID = id.toString(32); - break; - } else if (!direction && id < 50000000000000) { - direction = 1; - } else { - direction = -1; + for (var i = blob.decorations.length - 1; i > -1; i += -1) { + if (blob.decorations[i][0] === "@quotes" && blob.decorations[i][1] === "true") { + blob.punctuation_in_quote = this.state.getOpt("punctuation-in-quote") } - if (direction === 1) { - id += 1; - } else { - id += -1; + if (!blob.blobs.match(CSL.ROMANESQUE_REGEXP)) { + if (blob.decorations[i][0] === "@font-style") { + blob.decorations = blob.decorations.slice(0, i).concat(blob.decorations.slice(i + 1)); + } } } - ret = "" + id; + this.state.fun.flipflopper.init(str, blob); + this.state.fun.flipflopper.processTags(); + } else if (useblob) { + curr.push(blob); + } else { + curr.push(str); } - this.registry.citationreg.citationById[citation.citationID] = citation; - return ret; + return true; }; -CSL.Engine.prototype.rebuildProcessorState = function (citations, mode, uncitedItemIDs) { - if (!citations) { - citations = []; +CSL.Output.Queue.prototype.string = function (state, myblobs, blob) { + var i, ilen, j, jlen, b; + var txt_esc = CSL.getSafeEscape(this.state); + var blobs = myblobs.slice(); + var ret = []; + if (blobs.length === 0) { + return ret; } - if (!mode) { - mode = 'html'; + var blob_delimiter = ""; + if (blob) { + blob_delimiter = blob.strings.delimiter; + } else { + state.tmp.count_offset_characters = false; + state.tmp.offset_characters = 0; } - var itemIDs = []; - for (var i=0,ilen=citations.length;i<ilen;i+=1) { - for (var j=0,jlen=citations[i].citationItems.length;j<jlen;j+=1) { - var itemID = "" + citations[i].citationItems[j].id; - itemIDs.push(itemID); - } + if (blob && blob.new_locale) { + blob.old_locale = state.opt.lang; + state.opt.lang = blob.new_locale; } - this.updateItems(itemIDs); - var pre = []; - var post = []; - var ret = []; - var oldMode = this.opt.mode; - this.setOutputFormat(mode); - for (var i=0,ilen=citations.length;i<ilen;i+=1) { - var res = this.processCitationCluster(citations[i],pre,post,CSL.ASSUME_ALL_ITEMS_REGISTERED); - pre.push([citations[i].citationID,citations[i].properties.noteIndex]); - for (var j=0,jlen=res[1].length;j<jlen;j+=1) { - var index = res[1][j][0]; - ret[index] = [ - pre[index][0], - pre[index][1], - res[1][j][1] - ]; + var blobjr, use_suffix, use_prefix, params; + for (i = 0, ilen = blobs.length; i < ilen; i += 1) { + blobjr = blobs[i]; + if (blobjr.strings.first_blob) { + state.tmp.count_offset_characters = blobjr.strings.first_blob; + } + if ("string" === typeof blobjr.blobs) { + if ("number" === typeof blobjr.num) { + ret.push(blobjr); + } else if (blobjr.blobs) { + b = txt_esc(blobjr.blobs); + var blen = b.length; + if (!state.tmp.suppress_decorations) { + for (j = 0, jlen = blobjr.decorations.length; j < jlen; j += 1) { + params = blobjr.decorations[j]; + if (params[0] === "@showid") { + continue; + } + if (state.normalDecorIsOrphan(blobjr, params)) { + continue; + } + b = state.fun.decorate[params[0]][params[1]](state, b, params[2]); + } + } + if (b && b.length) { + b = txt_esc(blobjr.strings.prefix, state.tmp.nestedBraces) + b + txt_esc(blobjr.strings.suffix, state.tmp.nestedBraces); + if (state.opt.development_extensions.csl_reverse_lookup_support && !state.tmp.suppress_decorations) { + for (j = 0, jlen = blobjr.decorations.length; j < jlen; j += 1) { + params = blobjr.decorations[j]; + if (params[0] === "@showid") { + b = state.fun.decorate[params[0]][params[1]](state, b, params[2]); + } + } + } + ret.push(b); + if (state.tmp.count_offset_characters) { + state.tmp.offset_characters += (blen + blobjr.strings.suffix.length + blobjr.strings.prefix.length); + } + } + } + } else if (blobjr.blobs.length) { + var addtoret = state.output.string(state, blobjr.blobs, blobjr); + ret = ret.concat(addtoret); + } + if (blobjr.strings.first_blob) { + state.registry.registry[blobjr.strings.first_blob].offset = state.tmp.offset_characters; + state.tmp.count_offset_characters = false; } } - this.updateUncitedItems(uncitedItemIDs); - this.setOutputFormat(oldMode); - return ret; -} -CSL.Engine.prototype.restoreProcessorState = function (citations) { - var i, ilen, j, jlen, item, Item, newitem, citationList, itemList, sortedItems; - citationList = []; - itemList = []; - if (!citations) { - citations = []; - } - var indexNumbers = []; - var citationIds = {}; - for (i = 0, ilen = citations.length; i < ilen; i += 1) { - if (citationIds[citations[i].citationID]) { - this.setCitationId(citations[i], true); + for (i=0,ilen=ret.length - 1;i<ilen;i+=1) { + if ("number" === typeof ret[i].num && "number" === typeof ret[i+1].num && !ret[i+1].UGLY_DELIMITER_SUPPRESS_HACK) { + ret[i].strings.suffix = txt_esc(blob_delimiter); + ret[i+1].successor_prefix = ""; + ret[i+1].UGLY_DELIMITER_SUPPRESS_HACK = true; } - citationIds[citations[i].citationID] = true; - indexNumbers.push(citations[i].properties.index); } - var oldCitations = citations.slice(); - oldCitations.sort( - function (a,b) { - if (a.properties.index < b.properties.index) { - return -1; - } else if (a.properties.index > b.properties.index) { - return 1; - } else { - return 0; + var span_split = 0; + for (i = 0, ilen = ret.length; i < ilen; i += 1) { + if ("string" === typeof ret[i]) { + span_split = (parseInt(i, 10) + 1); + if (i < ret.length - 1 && "object" === typeof ret[i + 1]) { + if (blob_delimiter && !ret[i + 1].UGLY_DELIMITER_SUPPRESS_HACK) { + ret[i] += txt_esc(blob_delimiter); + } + ret[i + 1].UGLY_DELIMITER_SUPPRESS_HACK = true; } } - ); - for (i = 0, ilen = oldCitations.length; i < ilen; i += 1) { - oldCitations[i].properties.index = i; } - for (i = 0, ilen = oldCitations.length; i < ilen; i += 1) { - sortedItems = []; - for (j = 0, jlen = oldCitations[i].citationItems.length; j < jlen; j += 1) { - item = oldCitations[i].citationItems[j]; - if ("undefined" === typeof item.sortkeys) { - item.sortkeys = []; + if (blob && (blob.decorations.length || blob.strings.suffix || blob.strings.prefix)) { + span_split = ret.length; + } + var blobs_start = state.output.renderBlobs(ret.slice(0, span_split), blob_delimiter, true); + if (blobs_start && blob && (blob.decorations.length || blob.strings.suffix || blob.strings.prefix)) { + if (!state.tmp.suppress_decorations) { + for (i = 0, ilen = blob.decorations.length; i < ilen; i += 1) { + params = blob.decorations[i]; + if (["@cite","@bibliography", "@display", "@showid"].indexOf(params[0]) > -1) { + continue; + } + if (state.normalDecorIsOrphan(blobjr, params)) { + continue; + } + blobs_start = state.fun.decorate[params[0]][params[1]](state, blobs_start, params[2]); } - Item = this.retrieveItem("" + item.id); - newitem = [Item, item]; - sortedItems.push(newitem); - oldCitations[i].citationItems[j].item = Item; - itemList.push("" + item.id); } - if (!oldCitations[i].properties.unsorted) { - sortedItems.sort(this.citation.srt.compareCompositeKeys); + b = blobs_start; + use_suffix = blob.strings.suffix; + if (b && b.length) { + use_prefix = blob.strings.prefix; + b = txt_esc(use_prefix, state.tmp.nestedBraces) + b + txt_esc(use_suffix, state.tmp.nestedBraces); + if (state.tmp.count_offset_characters) { + state.tmp.offset_characters += (use_prefix.length + use_suffix.length); + } + } + blobs_start = b; + if (!state.tmp.suppress_decorations) { + for (i = 0, ilen = blob.decorations.length; i < ilen; i += 1) { + params = blob.decorations[i]; + if (["@cite","@bibliography", "@display", "@showid"].indexOf(params[0]) === -1) { + continue; + } + blobs_start = state.fun.decorate[params[0]][params[1]].call(blob, state, blobs_start, params[2]); + } } - oldCitations[i].sortedItems = sortedItems; - this.registry.citationreg.citationById[oldCitations[i].citationID] = oldCitations[i]; } - this.updateItems(itemList); - for (i = 0, ilen = citations.length; i < ilen; i += 1) { - citationList.push(["" + citations[i].citationID, citations[i].properties.noteIndex]); + var blobs_end = ret.slice(span_split, ret.length); + if (!blobs_end.length && blobs_start) { + ret = [blobs_start]; + } else if (blobs_end.length && !blobs_start) { + ret = blobs_end; + } else if (blobs_start && blobs_end.length) { + ret = [blobs_start].concat(blobs_end); } - var ret = []; - if (citations && citations.length) { - ret = this.processCitationCluster(citations[0], [], citationList.slice(1)); - } else { - this.registry = new CSL.Registry(this); - this.tmp = new CSL.Engine.Tmp(); - this.disambiguate = new CSL.Disambiguation(this); + if ("undefined" === typeof blob) { + this.queue = []; + this.current.mystack = []; + this.current.mystack.push(this.queue); + if (state.tmp.suppress_decorations) { + ret = state.output.renderBlobs(ret, undefined, true); + } + } else if ("boolean" === typeof blob) { + ret = state.output.renderBlobs(ret, undefined, true); + } + if (blob && blob.new_locale) { + state.opt.lang = blob.old_locale; } return ret; }; -CSL.Engine.prototype.updateItems = function (idList, nosort, rerun_ambigs) { - var debug = false; - var oldArea = this.tmp.area; - this.registry.init(idList); - if (rerun_ambigs) { - for (var ambig in this.registry.ambigcites) { - this.registry.ambigsTouched[ambig] = true; +CSL.Output.Queue.prototype.clearlevel = function () { + var blob, pos, len; + blob = this.current.value(); + len = blob.blobs.length; + for (pos = 0; pos < len; pos += 1) { + blob.blobs.pop(); + } +}; +CSL.Output.Queue.prototype.renderBlobs = function (blobs, delim, in_cite) { + var state, ret, ret_last_char, use_delim, i, blob, pos, len, ppos, llen, pppos, lllen, res, str, params, txt_esc; + txt_esc = CSL.getSafeEscape(this.state); + if (!delim) { + delim = ""; + } + state = this.state; + ret = ""; + ret_last_char = []; + use_delim = ""; + len = blobs.length; + var start = true; + for (pos = 0; pos < len; pos += 1) { + if (blobs[pos].checkNext) { + blobs[pos].checkNext(blobs[(pos + 1)],start); + start = false; + } else { + start = true; } } - this.registry.dodeletes(this.registry.myhash); - this.registry.doinserts(this.registry.mylist); - this.registry.dorefreshes(); - this.registry.rebuildlist(); - this.registry.setsortkeys(); - this.registry.setdisambigs(); - if (!nosort) { - this.registry.sorttokens(); - } - this.registry.renumber(); - this.tmp.area = oldArea; - return this.registry.getSortedIds(); -}; -CSL.Engine.prototype.updateUncitedItems = function (idList, nosort) { - var debug = false; - if (!idList) { - idList = []; + var doit = true; + for (pos = blobs.length - 1; pos > 0; pos += -1) { + if (blobs[pos].checkLast) { + if (doit && blobs[pos].checkLast(blobs[pos - 1])) { + doit = false; + } + } else { + doit = true; + } } - if ("object" == typeof idList) { - if ("undefined" == typeof idList.length) { - var idHash = idList; - idList = []; - for (var key in idHash) { - idList.push(key); + len = blobs.length; + for (pos = 0; pos < len; pos += 1) { + blob = blobs[pos]; + if (ret) { + use_delim = delim; + } + if (blob && "string" === typeof blob) { + ret += txt_esc(use_delim); + ret += blob; + if (state.tmp.count_offset_characters) { + state.tmp.offset_characters += (use_delim.length); } - } else if ("number" == typeof idList.length) { - var idHash = {}; - for (var i=0,ilen=idList.length;i<ilen;i+=1) { - idHash[idList[i]] = true; + } else if (blob.status !== CSL.SUPPRESS) { + str = blob.formatter.format(blob.num, blob.gender); + var strlen = str.replace(/<[^>]*>/g, "").length; + this.append(str, "empty", true); + var str_blob = this.pop(); + var count_offset_characters = state.tmp.count_offset_characters; + str = this.string(state, [str_blob], false); + state.tmp.count_offset_characters = count_offset_characters; + if (blob.strings["text-case"]) { + str = CSL.Output.Formatters[blob.strings["text-case"]](this.state, str); + } + if (str && this.state.tmp.strip_periods) { + str = str.replace(/\.([^a-z]|$)/g, "$1"); + } + if (!state.tmp.suppress_decorations) { + llen = blob.decorations.length; + for (ppos = 0; ppos < llen; ppos += 1) { + params = blob.decorations[ppos]; + if (state.normalDecorIsOrphan(blob, params)) { + continue; + } + str = state.fun.decorate[params[0]][params[1]](state, str, params[2]); + } + } + str = txt_esc(blob.strings.prefix) + str + txt_esc(blob.strings.suffix); + var addme = ""; + if (blob.status === CSL.END) { + addme = txt_esc(blob.range_prefix); + } else if (blob.status === CSL.SUCCESSOR) { + addme = txt_esc(blob.successor_prefix); + } else if (blob.status === CSL.START) { + addme = ""; + } else if (blob.status === CSL.SEEN) { + addme = txt_esc(blob.splice_prefix); + } + ret += addme; + ret += str; + if (state.tmp.count_offset_characters) { + state.tmp.offset_characters += (addme.length + blob.strings.prefix.length + strlen + blob.strings.suffix.length); } } } - this.registry.init(idList, true); - this.registry.dopurge(idHash); - this.registry.doinserts(this.registry.mylist); - this.registry.dorefreshes(); - this.registry.rebuildlist(); - this.registry.setsortkeys(); - this.registry.setdisambigs(); - if (!nosort) { - this.registry.sorttokens(); - } - this.registry.renumber(); - return this.registry.getSortedIds(); + return ret; }; -CSL.Engine.prototype.getCitationLabel = function (Item) { - var label = ""; - var params = this.getTrigraphParams(); - var config = params[0]; - var myname = this.getTerm("reference", "short", 0); - if ("undefined" === typeof myname) { - myname = "reference"; +CSL.Output.Queue.purgeEmptyBlobs = function (myblobs, endOnly) { + var res, i, ilen, j, jlen, tmpblobs; + if ("string" === typeof myblobs || !myblobs.length) { + return; } - myname = myname.replace(".", ""); - myname = myname.slice(0, 1).toUpperCase() + myname.slice(1); - for (var i = 0, ilen = CSL.CREATORS.length; i < ilen; i += 1) { - var n = CSL.CREATORS[i]; - if (Item[n]) { - var names = Item[n]; - if (names.length > params.length) { - config = params[params.length - 1]; - } else { - config = params[names.length - 1]; + for (i = myblobs.length - 1; i > -1; i += -1) { + CSL.Output.Queue.purgeEmptyBlobs(myblobs[i].blobs, endOnly); + } + for (i = myblobs.length - 1; i > -1; i += -1) { + if (!myblobs[i].blobs.length) { + tmpblobs = myblobs.slice(i + 1); + for (j = i, jlen = myblobs.length; j < jlen; j += 1) { + myblobs.pop(); } - for (var j = 0, jlen = names.length; j < jlen; j += 1) { - if (j === config.authors.length) { - break; - } - var res = this.nameOutput.getName(names[j], "locale-translit", true); - var name = res.name; - if (name && name.family) { - myname = name.family; - myname = myname.replace(/^([ \'\u2019a-z]+\s+)/, ""); - } else if (name && name.literal) { - myname = name.literal; - } - var m = myname.toLowerCase().match(/^(a\s+|the\s+|an\s+)/); - if (m) { - myname = myname.slice(m[1].length); - } - myname = myname.replace(CSL.ROMANESQUE_NOT_REGEXP, "", "g"); - if (!myname) { - break; - } - myname = myname.slice(0, config.authors[j]); - if (myname.length > 1) { - myname = myname.slice(0, 1).toUpperCase() + myname.slice(1).toLowerCase(); - } else if (myname.length === 1) { - myname = myname.toUpperCase(); - } - label += myname; + for (j = 0, jlen = tmpblobs.length; j < jlen; j += 1) { + myblobs.push(tmpblobs[j]); } - break; } - } - var year = "0000"; - if (Item.issued) { - if (Item.issued.year) { - year = "" + Item.issued.year; + if (endOnly) { + break; } } - year = year.slice((config.year * -1)); - label = label + year; - return label; }; -CSL.Engine.prototype.getTrigraphParams = function () { - var params = []; - var ilst = this.opt.trigraph.split(":"); - if (!this.opt.trigraph || this.opt.trigraph.slice(0,1) !== "A") { - throw "Bad trigraph definition: "+this.opt.trigraph; +CSL.Output.Queue.purgeNearsidePrefixChars = function(myblob, chr) { + if (!chr) { + return; } - for (var i = 0, ilen = ilst.length; i < ilen; i += 1) { - var str = ilst[i]; - var config = {authors:[], year:0}; - for (var j = 0, jlen = str.length; j < jlen; j += 1) { - switch (str.slice(j,j+1)) { - case "A": - config.authors.push(1); - break; - case "a": - config.authors[config.authors.length - 1] += 1; - break; - case "0": - config.year += 1; - break; - default: - throw "Invalid character in trigraph definition: "+this.opt.trigraph; - } + if ("object" === typeof myblob) { + if ((CSL.TERMINAL_PUNCTUATION.indexOf(chr) > -1 + && CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(myblob.strings.prefix.slice(0, 1)) > -1) + && !(myblob.strings.prefix.slice(0,1) === ";" && chr === ".")) { + myblob.strings.prefix = myblob.strings.prefix.slice(1); + } else if ("object" === typeof myblob.blobs) { + CSL.Output.Queue.purgeNearsidePrefixChars(myblob.blobs[0], chr); } - params.push(config); } - return params; }; -CSL.Engine.prototype.makeBibliography = function (bibsection) { - var debug, ret, params, maxoffset, item, len, pos, tok, tokk, tokkk, entry_ids, entry_strings, bibliography_errors; - debug = false; - if (!this.bibliography.tokens.length) { - return false; - } - if ("string" === typeof bibsection) { - this.opt.citation_number_slug = bibsection; - bibsection = false; - } - ret = CSL.getBibliographyEntries.call(this, bibsection); - entry_ids = ret[0]; - entry_strings = ret[1]; - var done = ret[2]; - params = { - "maxoffset": 0, - "entryspacing": this.bibliography.opt["entry-spacing"], - "linespacing": this.bibliography.opt["line-spacing"], - "second-field-align": false, - "entry_ids": entry_ids, - "bibliography_errors": this.tmp.bibliography_errors.slice(), - "done": done - }; - if (this.bibliography.opt["second-field-align"]) { - params["second-field-align"] = this.bibliography.opt["second-field-align"]; +CSL.Output.Queue.purgeNearsidePrefixSpaces = function(myblob, chr) { + if ("object" === typeof myblob) { + if (" " === chr && " " === myblob.strings.prefix.slice(0, 1)) { + myblob.strings.prefix = myblob.strings.prefix.slice(1); + } else if ("object" === typeof myblob.blobs) { + CSL.Output.Queue.purgeNearsidePrefixSpaces(myblob.blobs[0], chr); + } } - maxoffset = 0; - len = this.registry.reflist.length; - for (pos = 0; pos < len; pos += 1) { - item = this.registry.reflist[pos]; - if (item.offset > params.maxoffset) { - params.maxoffset = item.offset; +}; +CSL.Output.Queue.purgeNearsideSuffixSpaces = function(myblob, chr) { + if ("object" === typeof myblob) { + if (" " === chr && " " === myblob.strings.suffix.slice(-1)) { + myblob.strings.suffix = myblob.strings.suffix.slice(0, -1); + } else if ("object" === typeof myblob.blobs) { + if (!chr) { + chr = myblob.strings.suffix.slice(-1); + } + chr = CSL.Output.Queue.purgeNearsideSuffixSpaces(myblob.blobs[myblob.blobs.length - 1], chr); + } else { + chr = myblob.strings.suffix.slice(-1); } } - if (this.bibliography.opt.hangingindent) { - params.hangingindent = this.bibliography.opt.hangingindent; - } - params.bibstart = this.fun.decorate.bibstart; - params.bibend = this.fun.decorate.bibend; - this.opt.citation_number_slug = false; - return [params, entry_strings]; + return chr; }; -CSL.getBibliographyEntries = function (bibsection) { - var ret, input, include, anymatch, allmatch, bib_entry, res, len, pos, item, llen, ppos, spec, lllen, pppos, bib_layout, topblobs, all_item_ids, entry_item_ids, debug, collapse_parallel, i, ilen, siblings, skips, sortedItems, eyetem, chr, entry_item_data, j, jlen, newIDs, originalIDs; - ret = []; - entry_item_data = []; - this.tmp.area = "bibliography"; - this.tmp.last_rendered_name = false; - this.tmp.bibliography_errors = []; - this.tmp.bibliography_pos = 0; - if (bibsection && bibsection.page_start && bibsection.page_length) { - input = this.registry.getSortedIds(); - } else { - input = this.retrieveItems(this.registry.getSortedIds()); +CSL.Output.Queue.adjustPunctuation = function (state, myblobs, stk) { + var chr, suffix, dpref, blob, delimiter, suffixX, dprefX, blobX, delimiterX, prefix, prefixX, dsuffX, dsuff, slast, dsufff, dsufffX, lastchr, firstchr, exposed_suffixes, exposed, j, jlen, i, ilen; + var TERMS = CSL.TERMINAL_PUNCTUATION.slice(0, -1); + var TERM_OR_SPACE = CSL.TERMINAL_PUNCTUATION; + var SWAPS = CSL.SWAPPING_PUNCTUATION; + if (!stk) { + stk = [{suffix: "", delimiter: "", lastNode:true}]; } - this.tmp.disambig_override = true; - function eval_string(a, b) { - if (a === b) { - return true; + slast = stk.length - 1; + delimiter = stk[slast].delimiter; + dpref = stk[slast].dpref; + dsuff = stk[slast].dsuff; + dsufff = stk[slast].dsufff; + prefix = stk[slast].prefix; + suffix = stk[slast].suffix; + blob = stk[slast].blob; + if ("string" === typeof myblobs) { + if (suffix) { + if (blob && + TERMS.indexOf(myblobs.slice(-1)) > -1 && + TERMS.slice(1).indexOf(suffix) > -1 && + blob.strings.suffix !== " ") { + blob.strings.suffix = blob.strings.suffix.slice(1); + } } - return false; - } - function eval_list(a, lst) { - lllen = lst.length; - for (pppos = 0; pppos < lllen; pppos += 1) { - if (eval_string(a, lst[pppos])) { - return true; + lastchr = myblobs.slice(-1); + firstchr = myblobs.slice(0,1); + } else { + if (dpref) { + for (j = 0, jlen = myblobs.length - 1; j < jlen; j += 1) { + var t = myblobs[j].strings.suffix.slice(-1); + if (TERMS.indexOf(t) === -1 || + TERMS.indexOf(dpref) === -1) { + if (dpref !== " " || dpref !== myblobs[j].strings.suffix.slice(-1)) { + myblobs[j].strings.suffix += dpref; + } + } } } - return false; - } - function eval_spec(a, b) { - if ((a === "none" || !a) && !b) { - return true; + if (suffix === " ") { + CSL.Output.Queue.purgeNearsideSuffixSpaces(myblobs[myblobs.length - 1], " "); } - if ("string" === typeof b) { - return eval_string(a, b); - } else if (!b) { - return false; - } else { - return eval_list(a, b); + var lst = []; + var doblob; + for (i = 0, ilen = myblobs.length - 1; i < ilen; i += 1) { + doblob = myblobs[i]; + var following_prefix = myblobs[i + 1].strings.prefix; + chr = false; + var ret = CSL.Output.Queue.purgeNearsideSuffixSpaces(doblob, chr); + if (!dsuff) { + lst.push(ret); + } else { + lst.push(false); + } } - } - skips = {}; - var page_item_count; - if (bibsection && bibsection.page_start && bibsection.page_length) { - page_item_count = 0; - if (bibsection.page_start !== true) { - for (i = 0, ilen = input.length; i < ilen; i += 1) { - skips[input[i]] = true; - if (bibsection.page_start == input[i]) { - break; - } + chr = false; + for (i = 1, ilen = myblobs.length; i < ilen; i += 1) { + doblob = myblobs[i]; + chr = ""; + var preceding_suffix = myblobs[i - 1].strings.suffix; + if (dsuff === " ") { + chr = dsuff; + } else if (preceding_suffix) { + chr = preceding_suffix.slice(-1); + } else if (lst[i - 1]) { + chr = lst[i - 1]; } + CSL.Output.Queue.purgeNearsidePrefixSpaces(doblob, chr); } - } - var processed_item_ids = []; - for (i = 0, ilen = input.length; i < ilen; i += 1) { - if (bibsection && bibsection.page_start && bibsection.page_length) { - if (skips[input[i]]) { - continue; + if (dsufff) { + CSL.Output.Queue.purgeNearsidePrefixSpaces(myblobs[0], " "); + } else if (prefix === " ") { + CSL.Output.Queue.purgeNearsidePrefixSpaces(myblobs[0], " "); + } + for (i = 0, ilen = myblobs.length; i < ilen; i += 1) { + doblob = myblobs[i]; + CSL.Output.Queue.purgeNearsidePrefixChars(doblob, lastchr); + if (i === 0) { + if (prefix) { + if (doblob.strings.prefix.slice(0, 1) === " ") { + } + } } - item = this.retrieveItem(input[i]); - if (page_item_count === bibsection.page_length) { - break; + if (dsufff) { + if (doblob.strings.prefix) { + if (i === 0) { + if (doblob.strings.prefix.slice(0, 1) === " ") { + } + } + } } - } else { - item = input[i]; - if (skips[item.id]) { - continue; + if (dsuff) { + if (i > 0) { + if (doblob.strings.prefix.slice(0, 1) === " ") { + } + } } - } - if (bibsection) { - include = true; - if (bibsection.include) { - include = false; - for (j = 0, jlen = bibsection.include.length; j < jlen; j += 1) { - spec = bibsection.include[j]; - if (eval_spec(spec.value, item[spec.field])) { - include = true; - break; + if (i < (myblobs.length - 1)) { + var nextprefix = myblobs[i + 1].strings.prefix; + if (!delimiter) { + if (nextprefix) { + var nxtchr = nextprefix.slice(0, 1); + if (SWAPS.indexOf(nxtchr) > -1) { + myblobs[i + 1].strings.prefix = nextprefix.slice(1); + if (TERMS.indexOf(nxtchr) === -1 || + (TERMS.indexOf(nxtchr) > -1 && + TERMS.indexOf(doblob.strings.suffix.slice(-1)) === -1)) { + doblob.strings.suffix += nxtchr; + } + } else if (nxtchr === " " && + doblob.strings.suffix.slice(-1) === " ") { + doblob.strings.suffix = doblob.strings.suffix.slice(0, -1); + } } } - } else if (bibsection.exclude) { - anymatch = false; - for (j = 0, jlen = bibsection.exclude.length; j < jlen; j += 1) { - spec = bibsection.exclude[j]; - if (eval_spec(spec.value, item[spec.field])) { - anymatch = true; - break; + } + if (i === (myblobs.length - 1)) { + if (suffix) { + if (doblob.strings.suffix && + (TERMS.slice(1).indexOf(suffix) > -1 && + TERMS.indexOf(doblob.strings.suffix.slice(-1)) > -1)) { + blob.strings.suffix = blob.strings.suffix.slice(1); } } - if (anymatch) { - include = false; + } + if (state.getOpt('punctuation-in-quote')) { + var decorations = doblob.decorations; + for (j = 0, jlen = decorations.length; j < jlen; j += 1) { + if (decorations[j][0] === '@quotes' && decorations[j][1] === 'true') { + doblob.punctuation_in_quote = true; + stk[slast].lastNode = true; + } + } + } + if (doblob.punctuation_in_quote && stk[slast].lastNode) { + var swapchar = doblob.strings.suffix.slice(0, 1); + var swapblob = false; + if (SWAPS.indexOf(swapchar) > -1) { + swapblob = doblob; + } else if (SWAPS.indexOf(suffix) > -1 && i === (myblobs.length - 1)) { + swapchar = suffix; + swapblob = blob; + } else { + swapchar = false; + } + if (swapchar) { + if ("string" === typeof doblob.blobs) { + if (SWAPS.indexOf(doblob.blobs.slice(-1)) === -1 || + (TERMS.indexOf(doblob.blobs.slice(-1)) > -1 && + SWAPS.indexOf(swapchar) > -1 && + TERMS.indexOf(swapchar) === -1)) { + doblob.blobs += swapchar; + } + } else { + if (SWAPS.indexOf(doblob.blobs.slice(-1)[0].strings.suffix.slice(-1)) === -1 || + (TERMS.indexOf(doblob.blobs.slice(-1)[0].strings.suffix.slice(-1)) > -1 && + SWAPS.indexOf(swapchar) > -1 && + TERMS.indexOf(swapchar) === -1)) { + doblob.blobs.slice(-1)[0].strings.suffix += swapchar; + } + } + swapblob.strings.suffix = swapblob.strings.suffix.slice(1); + } + } + if (i === (myblobs.length - 1)) { + if (doblob.strings.suffix) { + suffixX = doblob.strings.suffix.slice(0, 1); + blobX = doblob; + } else { + suffixX = stk[stk.length - 1].suffix; + blobX = stk[stk.length - 1].blob; + } + } else { + if (doblob.strings.suffix) { + suffixX = doblob.strings.suffix.slice(0, 1); + blobX = doblob; + } else { + suffixX = ""; + blobX = false; + } + } + if (SWAPS.concat([" "]).indexOf(suffixX) === -1) { + suffixX = ""; + blobX = false; + } + if (doblob.strings.delimiter && + doblob.blobs.length > 1) { + dprefX = doblob.strings.delimiter.slice(0, 1); + if (SWAPS.concat([" "]).indexOf(dprefX) > -1) { + doblob.strings.delimiter = doblob.strings.delimiter.slice(1); + } else { + dprefX = ""; } - } else if (bibsection.select) { - include = false; - allmatch = true; - for (j = 0, jlen = bibsection.select.length; j < jlen; j += 1) { - spec = bibsection.select[j]; - if (!eval_spec(spec.value, item[spec.field])) { - allmatch = false; - } + } else { + dprefX = ""; + } + if (doblob.strings.prefix) { + if (doblob.strings.prefix.slice(-1) === " ") { + prefixX = " "; + } else { + prefixX = ""; } - if (allmatch) { - include = true; + } else { + if (i === 0) { + prefixX = prefix; + } else { + prefixX = ""; } } - if (bibsection.quash) { - allmatch = true; - for (j = 0, jlen = bibsection.quash.length; j < jlen; j += 1) { - spec = bibsection.quash[j]; - if (!eval_spec(spec.value, item[spec.field])) { - allmatch = false; - } + if (dsuff) { + dsufffX = dsuff; + } else { + if (i === 0) { + dsufffX = dsufff; + } else { + dsufffX = ""; } - if (allmatch) { - include = false; + } + if (doblob.strings.delimiter) { + if (doblob.strings.delimiter.slice(-1) === " " && + "object" === typeof doblob.blobs && doblob.blobs.length > 1) { + dsuffX = doblob.strings.delimiter.slice(-1); + } else { + dsuffX = ""; } + } else { + dsuffX = ""; } - if (!include) { - continue; + delimiterX = doblob.strings.delimiter; + var lastNode + if (i === (myblobs.length - 1) && stk[slast].lastNode) { + lastNode = true; + } else { + lastNode = false; } + stk.push({suffix: suffixX, dsuff:dsuffX, blob:blobX, delimiter:delimiterX, prefix:prefixX, dpref: dprefX, dsufff: dsufffX, lastNode: lastNode}); + lastchr = CSL.Output.Queue.adjustPunctuation(state, doblob.blobs, stk); } - bib_entry = new CSL.Token("group", CSL.START); - bib_entry.decorations = [["@bibliography", "entry"]].concat(this.bibliography.opt.layout_decorations); - this.output.startTag("bib_entry", bib_entry); - if (item.system_id && this.sys.embedBibliographyEntry) { - this.output.current.value().item_id = item.system_id; - } else { - this.output.current.value().system_id = item.id; + if (myblobs && myblobs.length) { + var last_suffix = myblobs[myblobs.length - 1].strings.suffix; + if (last_suffix) { + lastchr = last_suffix.slice(-1); + } } - sortedItems = [[{id: "" + item.id}, item]]; - entry_item_ids = []; - if (this.registry.registry[item.id].master - && !(bibsection && bibsection.page_start && bibsection.page_length)) { - collapse_parallel = true; - this.parallel.StartCitation(sortedItems); - this.output.queue[0].strings.delimiter = ", "; - this.tmp.term_predecessor = false; - entry_item_ids.push("" + CSL.getCite.call(this, item)); - skips[item.id] = true; - siblings = this.registry.registry[item.id].siblings; - for (j = 0, jlen = siblings.length; j < jlen; j += 1) { - var k = this.registry.registry[item.id].siblings[j]; - eyetem = this.retrieveItem(k); - entry_item_ids.push("" + CSL.getCite.call(this, eyetem)); - skips[eyetem.id] = true; + } + if (stk.length > 1) { + stk.pop(); + } + state.tmp.last_chr = lastchr; + return lastchr; +}; +CSL.Engine.Opt = function () { + this.has_disambiguate = false; + this.mode = "html"; + this.dates = {}; + this["locale-sort"] = []; + this["locale-translit"] = []; + this["locale-translat"] = []; + this.citeAffixes = { + persons:{ + "locale-orig":{ + prefix:"", + suffix:"" + }, + "locale-translit":{ + prefix:"", + suffix:"" + }, + "locale-translat":{ + prefix:"", + suffix:"" } - this.parallel.ComposeSet(); - this.parallel.PruneOutputQueue(); - } else if (!this.registry.registry[item.id].siblings) { - this.parallel.StartCitation(sortedItems); - this.tmp.term_predecessor = false; - entry_item_ids.push("" + CSL.getCite.call(this, item)); - if (bibsection && bibsection.page_start && bibsection.page_length) { - page_item_count += 1; + }, + institutions:{ + "locale-orig":{ + prefix:"", + suffix:"" + }, + "locale-translit":{ + prefix:"", + suffix:"" + }, + "locale-translat":{ + prefix:"", + suffix:"" } - } - entry_item_data.push(""); - this.tmp.bibliography_pos += 1; - processed_item_ids.push(entry_item_ids); - this.output.endTag("bib_entry"); - if (this.output.queue[0].blobs.length && this.output.queue[0].blobs[0].blobs.length) { - if (collapse_parallel || !this.output.queue[0].blobs[0].blobs[0].strings) { - topblobs = this.output.queue[0].blobs; - collapse_parallel = false; - } else { - topblobs = this.output.queue[0].blobs[0].blobs; + }, + titles:{ + "locale-orig":{ + prefix:"", + suffix:"" + }, + "locale-translit":{ + prefix:"", + suffix:"" + }, + "locale-translat":{ + prefix:"", + suffix:"" } - for (j = topblobs.length - 1; j > -1; j += -1) { - if (topblobs[j].blobs && topblobs[j].blobs.length !== 0) { - chr = this.bibliography.opt.layout_suffix.slice(0, 1); - if (chr && topblobs[j].strings.suffix.slice(-1) === chr) { - topblobs[j].strings.suffix = topblobs[j].strings.suffix.slice(0, -1); - } - topblobs[j].strings.suffix += this.bibliography.opt.layout_suffix; - break; - } + }, + publishers:{ + "locale-orig":{ + prefix:"", + suffix:"" + }, + "locale-translit":{ + prefix:"", + suffix:"" + }, + "locale-translat":{ + prefix:"", + suffix:"" + } + }, + places:{ + "locale-orig":{ + prefix:"", + suffix:"" + }, + "locale-translit":{ + prefix:"", + suffix:"" + }, + "locale-translat":{ + prefix:"", + suffix:"" } - topblobs[0].strings.prefix = this.bibliography.opt.layout_prefix + topblobs[0].strings.prefix; - } - CSL.Output.Queue.purgeEmptyBlobs(this.output.queue); - CSL.Output.Queue.adjustPunctuation(this, this.output.queue); - res = this.output.string(this, this.output.queue)[0]; - if (!res) { - res = "\n[CSL STYLE ERROR: reference with no printed form.]\n"; - } - ret.push(res); - } - var done = false; - if (bibsection && bibsection.page_start && bibsection.page_length) { - var last_expected_id = input.slice(-1)[0]; - var last_seen_id = processed_item_ids.slice(-1)[0]; - if (!last_expected_id || !last_seen_id || last_expected_id == last_seen_id) { - done = true; } - } - this.tmp.disambig_override = false; - return [processed_item_ids, ret, done]; + }; + this["default-locale"] = []; + this.update_mode = CSL.NONE; + this.bib_mode = CSL.NONE; + this.sort_citations = false; + this["et-al-min"] = 0; + this["et-al-use-first"] = 1; + this["et-al-use-last"] = false; + this["et-al-subsequent-min"] = false; + this["et-al-subsequent-use-first"] = false; + this["demote-non-dropping-particle"] = "display-and-sort"; + this["parse-names"] = true; + this.citation_number_slug = false; + this.max_number_of_names = 0; + this.trigraph = "Aaaa00:AaAa00:AaAA00:AAAA00"; + this.development_extensions = {}; + this.development_extensions.field_hack = true; + this.development_extensions.locator_date_and_revision = true; + this.development_extensions.locator_parsing_for_plurals = true; + this.development_extensions.locator_label_parse = true; + this.development_extensions.raw_date_parsing = true; + this.development_extensions.clean_up_csl_flaws = true; + this.development_extensions.flip_parentheses_to_braces = true; + this.development_extensions.jurisdiction_subfield = true; + this.development_extensions.static_statute_locator = false; + this.development_extensions.csl_reverse_lookup_support = false; + this.development_extensions.clobber_locator_if_no_statute_section = false; + this.development_extensions.wrap_url_and_doi = false; + this.development_extensions.allow_force_lowercase = false; + this.development_extensions.handle_parallel_articles = false; + this.development_extensions.thin_non_breaking_space_html_hack = false; + this.development_extensions.apply_citation_wrapper = false; + this.development_extensions.main_title_from_short_title = false; + this.development_extensions.normalize_lang_keys_to_lowercase = false; + this.development_extensions.strict_text_case_locales = false; + this.nodenames = []; + this.gender = {}; + this['cite-lang-prefs'] = { + persons:['orig'], + institutions:['orig'], + titles:['orig','translat'], + publishers:['orig'], + places:['orig'], + number:['translat'] + }; +}; +CSL.Engine.Tmp = function () { + this.names_max = new CSL.Stack(); + this.names_base = new CSL.Stack(); + this.givens_base = new CSL.Stack(); + this.value = []; + this.namepart_decorations = {}; + this.namepart_type = false; + this.area = "citation"; + this.root = "citation"; + this.extension = ""; + this.can_substitute = new CSL.Stack(0, CSL.LITERAL); + this.element_rendered_ok = false; + this.element_trace = new CSL.Stack("style"); + this.nameset_counter = 0; + this.group_context = new CSL.Stack([false, false, false], CSL.LITERAL); + this.term_predecessor = false; + this.jump = new CSL.Stack(0, CSL.LITERAL); + this.decorations = new CSL.Stack(); + this.tokenstore_stack = new CSL.Stack(); + this.last_suffix_used = ""; + this.last_names_used = []; + this.last_years_used = []; + this.years_used = []; + this.names_used = []; + this.taintedItemIDs = {}; + this.taintedCitationIDs = {}; + this.initialize_with = new CSL.Stack(); + this.disambig_request = false; + this["name-as-sort-order"] = false; + this.suppress_decorations = false; + this.disambig_settings = new CSL.AmbigConfig(); + this.bib_sort_keys = []; + this.prefix = new CSL.Stack("", CSL.LITERAL); + this.suffix = new CSL.Stack("", CSL.LITERAL); + this.delimiter = new CSL.Stack("", CSL.LITERAL); + this.cite_locales = []; + this.cite_affixes = false; + this.strip_periods = 0; + this.shadow_numbers = {}; +}; +CSL.Engine.Fun = function (state) { + this.match = new CSL.Util.Match(); + this.suffixator = new CSL.Util.Suffixator(CSL.SUFFIX_CHARS); + this.romanizer = new CSL.Util.Romanizer(); + this.ordinalizer = new CSL.Util.Ordinalizer(state); + this.long_ordinalizer = new CSL.Util.LongOrdinalizer(); +}; +CSL.Engine.Build = function () { + this["alternate-term"] = false; + this.in_bibliography = false; + this.in_style = false; + this.skip = false; + this.postponed_macro = false; + this.layout_flag = false; + this.name = false; + this.form = false; + this.term = false; + this.macro = {}; + this.macro_stack = []; + this.text = false; + this.lang = false; + this.area = "citation"; + this.root = "citation"; + this.extension = ""; + this.substitute_level = new CSL.Stack(0, CSL.LITERAL); + this.names_level = 0; + this.render_nesting_level = 0; + this.render_seen = false; +}; +CSL.Engine.Configure = function () { + this.fail = []; + this.succeed = []; +}; +CSL.Engine.Citation = function (state) { + this.opt = {}; + this.tokens = []; + this.srt = new CSL.Registry.Comparifier(state, "citation_sort"); + this.opt.collapse = []; + this.opt["disambiguate-add-names"] = false; + this.opt["disambiguate-add-givenname"] = false; + this.opt["disambiguate-add-year-suffix"] = false; + this.opt["givenname-disambiguation-rule"] = "by-cite"; + this.opt["near-note-distance"] = 5; + this.opt.topdecor = []; + this.opt.layout_decorations = []; + this.opt.layout_prefix = ""; + this.opt.layout_suffix = ""; + this.opt.layout_delimiter = ""; +}; +CSL.Engine.Bibliography = function () { + this.opt = {}; + this.tokens = []; + this.opt.collapse = []; + this.opt.topdecor = []; + this.opt.layout_decorations = []; + this.opt.layout_prefix = ""; + this.opt.layout_suffix = ""; + this.opt.layout_delimiter = ""; + this.opt["line-spacing"] = 1; + this.opt["entry-spacing"] = 1; +}; +CSL.Engine.BibliographySort = function () { + this.tokens = []; + this.opt = {}; + this.opt.sort_directions = []; + this.keys = []; + this.opt.topdecor = []; +}; +CSL.Engine.CitationSort = function () { + this.tokens = []; + this.opt = {}; + this.opt.sort_directions = []; + this.keys = []; + this.opt.topdecor = []; }; CSL.Engine.prototype.previewCitationCluster = function (citation, citationsPre, citationsPost, newMode) { var oldMode = this.opt.mode; @@ -4483,359 +4123,728 @@ CSL.getCitationCluster = function (inputList, citationID) { delete lst.slice(-1)[0].label; } } - } + } + } + myparams = []; + len = inputList.length; + for (pos = 0; pos < len; pos += 1) { + Item = inputList[pos][0]; + item = inputList[pos][1]; + last_collapsed = this.tmp.have_collapsed; + params = {}; + if (pos > 0) { + CSL.getCite.call(this, Item, item, "" + inputList[(pos - 1)][0].id); + } else { + this.tmp.term_predecessor = false; + CSL.getCite.call(this, Item, item); + } + if (!this.tmp.cite_renders_content) { + error_object = { + citationID: "" + this.tmp.citation_id, + index: this.tmp.citation_pos, + noteIndex: this.tmp.citation_note_index, + itemID: "" + Item.id, + citationItems_pos: pos, + error_code: CSL.ERROR_NO_RENDERED_FORM + }; + this.tmp.citation_errors.push(error_object); + } + if (pos === (inputList.length - 1)) { + this.parallel.ComposeSet(); + } + params.splice_delimiter = CSL.getSpliceDelimiter.call(this, last_collapsed, pos); + if (item && item["author-only"]) { + this.tmp.suppress_decorations = true; + } + if (pos > 0) { + preceding_item = inputList[pos - 1][1]; + if (preceding_item.suffix && pos > 0 && preceding_item.suffix.slice(-1) === ".") { + var spaceidx = params.splice_delimiter.indexOf(" "); + if (spaceidx > -1) { + params.splice_delimiter = params.splice_delimiter.slice(spaceidx); + } else { + params.splice_delimiter = ""; + } + } + } + params.suppress_decorations = this.tmp.suppress_decorations; + params.have_collapsed = this.tmp.have_collapsed; + myparams.push(params); + } + this.tmp.has_purged_parallel = false; + this.parallel.PruneOutputQueue(this); + empties = 0; + myblobs = this.output.queue.slice(); + var fakeblob = { + strings: { + suffix: this.citation.opt.layout_suffix, + delimiter: this.citation.opt.layout_delimiter + } + }; + var suffix = this.citation.opt.layout_suffix; + var last_locale = this.tmp.cite_locales[this.tmp.cite_locales.length - 1]; + if (last_locale && this.tmp.cite_affixes[last_locale] && this.tmp.cite_affixes[last_locale].suffix) { + suffix = this.tmp.cite_affixes[last_locale].suffix; + } + if (CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(suffix.slice(0, 1)) > -1) { + suffix = suffix.slice(0, 1); + } + var delimiter = this.citation.opt.layout_delimiter; + if (!delimiter) { + delimiter = ""; + } + if (CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(delimiter.slice(0, 1)) > -1) { + delimiter = delimiter.slice(0, 1); + } + var mystk = [ + { + suffix: "", + delimiter: delimiter, + blob: fakeblob, + lastNode: true + } + ]; + var use_layout_suffix = suffix; + for (pos = 0, len = myblobs.length; pos < len; pos += 1) { + CSL.Output.Queue.purgeEmptyBlobs(this.output.queue, true); + } + for (pos = 0, len = myblobs.length; pos < len; pos += 1) { + this.output.queue = [myblobs[pos]]; + this.tmp.suppress_decorations = myparams[pos].suppress_decorations; + this.tmp.splice_delimiter = myparams[pos].splice_delimiter; + if (myblobs[pos].parallel_delimiter) { + this.tmp.splice_delimiter = myblobs[pos].parallel_delimiter; + } + this.tmp.have_collapsed = myparams[pos].have_collapsed; + if (pos === (myblobs.length - 1)) { + mystk[0].suffix = use_layout_suffix; + } + if (this.opt.development_extensions.clean_up_csl_flaws) { + CSL.Output.Queue.adjustPunctuation(this, this.output.queue, mystk); + } + composite = this.output.string(this, this.output.queue); + this.tmp.suppress_decorations = false; + if ("string" === typeof composite) { + this.tmp.suppress_decorations = false; + return composite; + } + if ("object" === typeof composite && composite.length === 0 && !item["suppress-author"]) { + if (this.tmp.has_purged_parallel) { + composite.push(""); + } else { + composite.push("[CSL STYLE ERROR: reference with no printed form.]"); + } + } + if (objects.length && "string" === typeof composite[0]) { + composite.reverse(); + var tmpstr = composite.pop(); + if (tmpstr && tmpstr.slice(0, 1) === ",") { + objects.push(tmpstr); + } else if ("string" == typeof objects.slice(-1)[0] && objects.slice(-1)[0].slice(-1) === ",") { + objects.push(" " + tmpstr); + } else if (tmpstr) { + objects.push(txt_esc(this.tmp.splice_delimiter) + tmpstr); + } + } else { + composite.reverse(); + compie = composite.pop(); + if ("undefined" !== typeof compie) { + if (objects.length && "string" === typeof objects[objects.length - 1]) { + objects[objects.length - 1] += compie.successor_prefix; + } + objects.push(compie); + } + } + llen = composite.length; + for (ppos = 0; ppos < llen; ppos += 1) { + obj = composite[ppos]; + if ("string" === typeof obj) { + objects.push(txt_esc(this.tmp.splice_delimiter) + obj); + continue; + } + compie = composite.pop(); + if ("undefined" !== typeof compie) { + objects.push(compie); + } + } + if (objects.length === 0 && !inputList[pos][1]["suppress-author"]) { + empties += 1; + } } - myparams = []; - len = inputList.length; - for (pos = 0; pos < len; pos += 1) { - Item = inputList[pos][0]; - item = inputList[pos][1]; - last_collapsed = this.tmp.have_collapsed; - params = {}; - if (pos > 0) { - CSL.getCite.call(this, Item, item, "" + inputList[(pos - 1)][0].id); - } else { - this.tmp.term_predecessor = false; - CSL.getCite.call(this, Item, item); + result += this.output.renderBlobs(objects); + if (result) { + if (CSL.TERMINAL_PUNCTUATION.indexOf(this.tmp.last_chr) > -1 + && this.tmp.last_chr === use_layout_suffix.slice(0, 1)) { + use_layout_suffix = use_layout_suffix.slice(1); } - if (!this.tmp.cite_renders_content) { + this.output.nestedBraces = false; + if (!(this.opt.development_extensions.apply_citation_wrapper + && this.sys.wrapCitationEntry + && !this.tmp.just_looking + && this.tmp.area === "citation")) { + result = txt_esc(this.citation.opt.layout_prefix) + result + txt_esc(use_layout_suffix); + } + if (!this.tmp.suppress_decorations) { + len = this.citation.opt.layout_decorations.length; + for (pos = 0; pos < len; pos += 1) { + params = this.citation.opt.layout_decorations[pos]; + if (params[1] === "normal") { + continue; + } + result = this.fun.decorate[params[0]][params[1]](this, result); + } + } + } + this.tmp.suppress_decorations = false; + return result; +}; +CSL.getCite = function (Item, item, prevItemID) { + var next, error_object; + this.tmp.cite_renders_content = false; + this.parallel.StartCite(Item, item, prevItemID); + CSL.citeStart.call(this, Item, item); + next = 0; + this.nameOutput = new CSL.NameOutput(this, Item, item); + while (next < this[this.tmp.area].tokens.length) { + next = CSL.tokenExec.call(this, this[this.tmp.area].tokens[next], Item, item); + } + CSL.citeEnd.call(this, Item, item); + this.parallel.CloseCite(this); + if (!this.tmp.cite_renders_content && !this.tmp.just_looking) { + if (this.tmp.area === "bibliography") { error_object = { - citationID: "" + this.tmp.citation_id, - index: this.tmp.citation_pos, - noteIndex: this.tmp.citation_note_index, + index: this.tmp.bibliography_pos, itemID: "" + Item.id, - citationItems_pos: pos, error_code: CSL.ERROR_NO_RENDERED_FORM }; - this.tmp.citation_errors.push(error_object); + this.tmp.bibliography_errors.push(error_object); } - if (pos === (inputList.length - 1)) { - this.parallel.ComposeSet(); + } + return "" + Item.id; +}; +CSL.citeStart = function (Item, item) { + this.tmp.disambiguate_count = 0; + this.tmp.disambiguate_maxMax = 0; + this.tmp.same_author_as_previous_cite = false; + if (!this.tmp.suppress_decorations) { + this.tmp.subsequent_author_substitute_ok = true; + } else { + this.tmp.subsequent_author_substitute_ok = false; + } + this.tmp.lastchr = ""; + if (this.tmp.area === "citation" && this.citation.opt.collapse && this.citation.opt.collapse.length) { + this.tmp.have_collapsed = true; + } else { + this.tmp.have_collapsed = false; + } + this.tmp.render_seen = false; + if (this.tmp.disambig_request && ! this.tmp.disambig_override) { + this.tmp.disambig_settings = this.tmp.disambig_request; + } else if (this.registry.registry[Item.id] && ! this.tmp.disambig_override) { + this.tmp.disambig_request = this.registry.registry[Item.id].disambig; + this.tmp.disambig_settings = this.registry.registry[Item.id].disambig; + } else { + this.tmp.disambig_settings = new CSL.AmbigConfig(); + } + if (this.tmp.area === 'bibliography' && this.opt["disambiguate-add-names"] && this.registry.registry[Item.id] && this.tmp.disambig_override) { + this.tmp.disambig_request = this.tmp.disambig_settings; + this.tmp.disambig_request.names = this.registry.registry[Item.id].disambig.names.slice(); + this.tmp.disambig_settings.names = this.registry.registry[Item.id].disambig.names.slice(); + } + this.tmp.names_used = []; + this.tmp.nameset_counter = 0; + this.tmp.years_used = []; + this.tmp.names_max.clear(); + this.tmp.splice_delimiter = this[this.tmp.area].opt.layout_delimiter; + this.bibliography_sort.keys = []; + this.citation_sort.keys = []; + this.tmp.has_done_year_suffix = false; + this.tmp.last_cite_locale = false; + if (!this.tmp.just_looking && item && !item.position && this.registry.registry[Item.id]) { + this.tmp.disambig_restore = CSL.cloneAmbigConfig(this.registry.registry[Item.id].disambig); + } + this.tmp.shadow_numbers = {}; + this.setNumberLabels(Item); + this.tmp.first_name_string = false; + if (this.opt.development_extensions.flip_parentheses_to_braces && item && item.prefix) { + var openBrace = CSL.checkNestedBraceOpen.exec(item.prefix); + var closeBrace = CSL.checkNestedBraceClose.exec(item.prefix); + if (openBrace) { + if (!closeBrace) { + this.output.nestedBraces = CSL.NestedBraces; + } else if (closeBrace[0].length < openBrace[0].length) { + this.output.nestedBraces = CSL.NestedBraces; + } else { + this.output.nestedBraces = false; + } + } else if (closeBrace) { + this.output.nestedBraces = false; } - params.splice_delimiter = CSL.getSpliceDelimiter.call(this, last_collapsed, pos); - if (item && item["author-only"]) { - this.tmp.suppress_decorations = true; + } +}; +CSL.citeEnd = function (Item, item) { + if (this.tmp.disambig_restore) { + this.registry.registry[Item.id].disambig.names = this.tmp.disambig_restore.names; + this.registry.registry[Item.id].disambig.givens = this.tmp.disambig_restore.givens; + } + this.tmp.disambig_restore = false; + this.tmp.last_suffix_used = this.tmp.suffix.value(); + this.tmp.last_years_used = this.tmp.years_used.slice(); + this.tmp.last_names_used = this.tmp.names_used.slice(); + this.tmp.cut_var = false; + this.tmp.disambig_request = false; + this.tmp.cite_locales.push(this.tmp.last_cite_locale); + if (this.tmp.issued_date && this.tmp.renders_collection_number) { + var buf = []; + for (var i = this.tmp.issued_date.list.length - 1; i > this.tmp.issued_date.pos; i += -1) { + buf.push(this.tmp.issued_date.list.pop()); } - if (pos > 0) { - preceding_item = inputList[pos - 1][1]; - if (preceding_item.suffix && pos > 0 && preceding_item.suffix.slice(-1) === ".") { - var spaceidx = params.splice_delimiter.indexOf(" "); - if (spaceidx > -1) { - params.splice_delimiter = params.splice_delimiter.slice(spaceidx); - } else { - params.splice_delimiter = ""; - } - } + this.tmp.issued_date.list.pop(); + for (i = buf.length - 1; i > -1; i += -1) { + this.tmp.issued_date.list.push(buf.pop()); + } + if (this.parallel.use_parallels) { + this.parallel.cite["issued"] = false; } - params.suppress_decorations = this.tmp.suppress_decorations; - params.have_collapsed = this.tmp.have_collapsed; - myparams.push(params); } - this.tmp.has_purged_parallel = false; - this.parallel.PruneOutputQueue(this); - empties = 0; - myblobs = this.output.queue.slice(); - var fakeblob = { - strings: { - suffix: this.citation.opt.layout_suffix, - delimiter: this.citation.opt.layout_delimiter + this.tmp.issued_date = false; + this.tmp.renders_collection_number = false; + if (this.opt.development_extensions.flip_parentheses_to_braces && item && item.suffix) { + var openBrace = CSL.checkNestedBraceOpen.exec(item.suffix); + var closeBrace = CSL.checkNestedBraceClose.exec(item.suffix); + if (closeBrace) { + if (!openBrace) { + this.output.nestedBraces = false; + } else if (openBrace[0].length < closeBrace[0].length) { + this.output.nestedBraces = false; + } else { + this.output.nestedBraces = CSL.NestedBraces; + } + } else if (openBrace) { + this.output.nestedBraces = CSL.NestedBraces; } + } +}; +CSL.Engine.prototype.makeBibliography = function (bibsection) { + var debug, ret, params, maxoffset, item, len, pos, tok, tokk, tokkk, entry_ids, entry_strings, bibliography_errors; + debug = false; + if (!this.bibliography.tokens.length) { + return false; + } + if ("string" === typeof bibsection) { + this.opt.citation_number_slug = bibsection; + bibsection = false; + } + ret = CSL.getBibliographyEntries.call(this, bibsection); + entry_ids = ret[0]; + entry_strings = ret[1]; + var done = ret[2]; + params = { + "maxoffset": 0, + "entryspacing": this.bibliography.opt["entry-spacing"], + "linespacing": this.bibliography.opt["line-spacing"], + "second-field-align": false, + "entry_ids": entry_ids, + "bibliography_errors": this.tmp.bibliography_errors.slice(), + "done": done }; - var suffix = this.citation.opt.layout_suffix; - var last_locale = this.tmp.cite_locales[this.tmp.cite_locales.length - 1]; - if (last_locale && this.tmp.cite_affixes[last_locale] && this.tmp.cite_affixes[last_locale].suffix) { - suffix = this.tmp.cite_affixes[last_locale].suffix; + if (this.bibliography.opt["second-field-align"]) { + params["second-field-align"] = this.bibliography.opt["second-field-align"]; } - if (CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(suffix.slice(0, 1)) > -1) { - suffix = suffix.slice(0, 1); + maxoffset = 0; + len = this.registry.reflist.length; + for (pos = 0; pos < len; pos += 1) { + item = this.registry.reflist[pos]; + if (item.offset > params.maxoffset) { + params.maxoffset = item.offset; + } } - var delimiter = this.citation.opt.layout_delimiter; - if (!delimiter) { - delimiter = ""; + if (this.bibliography.opt.hangingindent) { + params.hangingindent = this.bibliography.opt.hangingindent; } - if (CSL.TERMINAL_PUNCTUATION.slice(0, -1).indexOf(delimiter.slice(0, 1)) > -1) { - delimiter = delimiter.slice(0, 1); + params.bibstart = this.fun.decorate.bibstart; + params.bibend = this.fun.decorate.bibend; + this.opt.citation_number_slug = false; + return [params, entry_strings]; +}; +CSL.getBibliographyEntries = function (bibsection) { + var ret, input, include, anymatch, allmatch, bib_entry, res, len, pos, item, llen, ppos, spec, lllen, pppos, bib_layout, topblobs, all_item_ids, entry_item_ids, debug, collapse_parallel, i, ilen, siblings, skips, sortedItems, eyetem, chr, entry_item_data, j, jlen, newIDs, originalIDs; + ret = []; + entry_item_data = []; + this.tmp.area = "bibliography"; + this.tmp.last_rendered_name = false; + this.tmp.bibliography_errors = []; + this.tmp.bibliography_pos = 0; + if (bibsection && bibsection.page_start && bibsection.page_length) { + input = this.registry.getSortedIds(); + } else { + input = this.retrieveItems(this.registry.getSortedIds()); } - var mystk = [ - { - suffix: "", - delimiter: delimiter, - blob: fakeblob, - lastNode: true + this.tmp.disambig_override = true; + function eval_string(a, b) { + if (a === b) { + return true; } - ]; - var use_layout_suffix = suffix; - for (pos = 0, len = myblobs.length; pos < len; pos += 1) { - CSL.Output.Queue.purgeEmptyBlobs(this.output.queue, true); + return false; } - for (pos = 0, len = myblobs.length; pos < len; pos += 1) { - this.output.queue = [myblobs[pos]]; - this.tmp.suppress_decorations = myparams[pos].suppress_decorations; - this.tmp.splice_delimiter = myparams[pos].splice_delimiter; - if (myblobs[pos].parallel_delimiter) { - this.tmp.splice_delimiter = myblobs[pos].parallel_delimiter; - } - this.tmp.have_collapsed = myparams[pos].have_collapsed; - if (pos === (myblobs.length - 1)) { - mystk[0].suffix = use_layout_suffix; + function eval_list(a, lst) { + lllen = lst.length; + for (pppos = 0; pppos < lllen; pppos += 1) { + if (eval_string(a, lst[pppos])) { + return true; + } } - if (this.opt.development_extensions.clean_up_csl_flaws) { - CSL.Output.Queue.adjustPunctuation(this, this.output.queue, mystk); + return false; + } + function eval_spec(a, b) { + if ((a === "none" || !a) && !b) { + return true; } - composite = this.output.string(this, this.output.queue); - this.tmp.suppress_decorations = false; - if ("string" === typeof composite) { - this.tmp.suppress_decorations = false; - return composite; + if ("string" === typeof b) { + return eval_string(a, b); + } else if (!b) { + return false; + } else { + return eval_list(a, b); } - if ("object" === typeof composite && composite.length === 0 && !item["suppress-author"]) { - if (this.tmp.has_purged_parallel) { - composite.push(""); - } else { - composite.push("[CSL STYLE ERROR: reference with no printed form.]"); + } + skips = {}; + var page_item_count; + if (bibsection && bibsection.page_start && bibsection.page_length) { + page_item_count = 0; + if (bibsection.page_start !== true) { + for (i = 0, ilen = input.length; i < ilen; i += 1) { + skips[input[i]] = true; + if (bibsection.page_start == input[i]) { + break; + } } } - if (objects.length && "string" === typeof composite[0]) { - composite.reverse(); - var tmpstr = composite.pop(); - if (tmpstr && tmpstr.slice(0, 1) === ",") { - objects.push(tmpstr); - } else if ("string" == typeof objects.slice(-1)[0] && objects.slice(-1)[0].slice(-1) === ",") { - objects.push(" " + tmpstr); - } else if (tmpstr) { - objects.push(txt_esc(this.tmp.splice_delimiter) + tmpstr); + } + var processed_item_ids = []; + for (i = 0, ilen = input.length; i < ilen; i += 1) { + if (bibsection && bibsection.page_start && bibsection.page_length) { + if (skips[input[i]]) { + continue; + } + item = this.retrieveItem(input[i]); + if (page_item_count === bibsection.page_length) { + break; } } else { - composite.reverse(); - compie = composite.pop(); - if ("undefined" !== typeof compie) { - if (objects.length && "string" === typeof objects[objects.length - 1]) { - objects[objects.length - 1] += compie.successor_prefix; - } - objects.push(compie); + item = input[i]; + if (skips[item.id]) { + continue; } } - llen = composite.length; - for (ppos = 0; ppos < llen; ppos += 1) { - obj = composite[ppos]; - if ("string" === typeof obj) { - objects.push(txt_esc(this.tmp.splice_delimiter) + obj); - continue; + if (bibsection) { + include = true; + if (bibsection.include) { + include = false; + for (j = 0, jlen = bibsection.include.length; j < jlen; j += 1) { + spec = bibsection.include[j]; + if (eval_spec(spec.value, item[spec.field])) { + include = true; + break; + } + } + } else if (bibsection.exclude) { + anymatch = false; + for (j = 0, jlen = bibsection.exclude.length; j < jlen; j += 1) { + spec = bibsection.exclude[j]; + if (eval_spec(spec.value, item[spec.field])) { + anymatch = true; + break; + } + } + if (anymatch) { + include = false; + } + } else if (bibsection.select) { + include = false; + allmatch = true; + for (j = 0, jlen = bibsection.select.length; j < jlen; j += 1) { + spec = bibsection.select[j]; + if (!eval_spec(spec.value, item[spec.field])) { + allmatch = false; + } + } + if (allmatch) { + include = true; + } } - compie = composite.pop(); - if ("undefined" !== typeof compie) { - objects.push(compie); + if (bibsection.quash) { + allmatch = true; + for (j = 0, jlen = bibsection.quash.length; j < jlen; j += 1) { + spec = bibsection.quash[j]; + if (!eval_spec(spec.value, item[spec.field])) { + allmatch = false; + } + } + if (allmatch) { + include = false; + } + } + if (!include) { + continue; } } - if (objects.length === 0 && !inputList[pos][1]["suppress-author"]) { - empties += 1; - } - } - result += this.output.renderBlobs(objects); - if (result) { - if (CSL.TERMINAL_PUNCTUATION.indexOf(this.tmp.last_chr) > -1 - && this.tmp.last_chr === use_layout_suffix.slice(0, 1)) { - use_layout_suffix = use_layout_suffix.slice(1); + bib_entry = new CSL.Token("group", CSL.START); + bib_entry.decorations = [["@bibliography", "entry"]].concat(this.bibliography.opt.layout_decorations); + this.output.startTag("bib_entry", bib_entry); + if (item.system_id && this.sys.embedBibliographyEntry) { + this.output.current.value().item_id = item.system_id; + } else { + this.output.current.value().system_id = item.id; } - this.output.nestedBraces = false; - if (!(this.opt.development_extensions.apply_citation_wrapper - && this.sys.wrapCitationEntry - && !this.tmp.just_looking - && this.tmp.area === "citation")) { - result = txt_esc(this.citation.opt.layout_prefix) + result + txt_esc(use_layout_suffix); + sortedItems = [[{id: "" + item.id}, item]]; + entry_item_ids = []; + if (this.registry.registry[item.id].master + && !(bibsection && bibsection.page_start && bibsection.page_length)) { + collapse_parallel = true; + this.parallel.StartCitation(sortedItems); + this.output.queue[0].strings.delimiter = ", "; + this.tmp.term_predecessor = false; + entry_item_ids.push("" + CSL.getCite.call(this, item)); + skips[item.id] = true; + siblings = this.registry.registry[item.id].siblings; + for (j = 0, jlen = siblings.length; j < jlen; j += 1) { + var k = this.registry.registry[item.id].siblings[j]; + eyetem = this.retrieveItem(k); + entry_item_ids.push("" + CSL.getCite.call(this, eyetem)); + skips[eyetem.id] = true; + } + this.parallel.ComposeSet(); + this.parallel.PruneOutputQueue(); + } else if (!this.registry.registry[item.id].siblings) { + this.parallel.StartCitation(sortedItems); + this.tmp.term_predecessor = false; + entry_item_ids.push("" + CSL.getCite.call(this, item)); + if (bibsection && bibsection.page_start && bibsection.page_length) { + page_item_count += 1; + } } - if (!this.tmp.suppress_decorations) { - len = this.citation.opt.layout_decorations.length; - for (pos = 0; pos < len; pos += 1) { - params = this.citation.opt.layout_decorations[pos]; - if (params[1] === "normal") { - continue; + entry_item_data.push(""); + this.tmp.bibliography_pos += 1; + processed_item_ids.push(entry_item_ids); + this.output.endTag("bib_entry"); + if (this.output.queue[0].blobs.length && this.output.queue[0].blobs[0].blobs.length) { + if (collapse_parallel || !this.output.queue[0].blobs[0].blobs[0].strings) { + topblobs = this.output.queue[0].blobs; + collapse_parallel = false; + } else { + topblobs = this.output.queue[0].blobs[0].blobs; + } + for (j = topblobs.length - 1; j > -1; j += -1) { + if (topblobs[j].blobs && topblobs[j].blobs.length !== 0) { + chr = this.bibliography.opt.layout_suffix.slice(0, 1); + if (chr && topblobs[j].strings.suffix.slice(-1) === chr) { + topblobs[j].strings.suffix = topblobs[j].strings.suffix.slice(0, -1); + } + topblobs[j].strings.suffix += this.bibliography.opt.layout_suffix; + break; } - result = this.fun.decorate[params[0]][params[1]](this, result); } + topblobs[0].strings.prefix = this.bibliography.opt.layout_prefix + topblobs[0].strings.prefix; } + CSL.Output.Queue.purgeEmptyBlobs(this.output.queue); + CSL.Output.Queue.adjustPunctuation(this, this.output.queue); + res = this.output.string(this, this.output.queue)[0]; + if (!res) { + res = "\n[CSL STYLE ERROR: reference with no printed form.]\n"; + } + ret.push(res); } - this.tmp.suppress_decorations = false; - return result; -}; -CSL.getCite = function (Item, item, prevItemID) { - var next, error_object; - this.tmp.cite_renders_content = false; - this.parallel.StartCite(Item, item, prevItemID); - CSL.citeStart.call(this, Item, item); - next = 0; - this.nameOutput = new CSL.NameOutput(this, Item, item); - while (next < this[this.tmp.area].tokens.length) { - next = CSL.tokenExec.call(this, this[this.tmp.area].tokens[next], Item, item); - } - CSL.citeEnd.call(this, Item, item); - this.parallel.CloseCite(this); - if (!this.tmp.cite_renders_content && !this.tmp.just_looking) { - if (this.tmp.area === "bibliography") { - error_object = { - index: this.tmp.bibliography_pos, - itemID: "" + Item.id, - error_code: CSL.ERROR_NO_RENDERED_FORM - }; - this.tmp.bibliography_errors.push(error_object); + var done = false; + if (bibsection && bibsection.page_start && bibsection.page_length) { + var last_expected_id = input.slice(-1)[0]; + var last_seen_id = processed_item_ids.slice(-1)[0]; + if (!last_expected_id || !last_seen_id || last_expected_id == last_seen_id) { + done = true; } } - return "" + Item.id; + this.tmp.disambig_override = false; + return [processed_item_ids, ret, done]; }; -CSL.citeStart = function (Item, item) { - this.tmp.disambiguate_count = 0; - this.tmp.disambiguate_maxMax = 0; - this.tmp.same_author_as_previous_cite = false; - if (!this.tmp.suppress_decorations) { - this.tmp.subsequent_author_substitute_ok = true; - } else { - this.tmp.subsequent_author_substitute_ok = false; - } - this.tmp.lastchr = ""; - if (this.tmp.area === "citation" && this.citation.opt.collapse && this.citation.opt.collapse.length) { - this.tmp.have_collapsed = true; - } else { - this.tmp.have_collapsed = false; - } - this.tmp.render_seen = false; - if (this.tmp.disambig_request && ! this.tmp.disambig_override) { - this.tmp.disambig_settings = this.tmp.disambig_request; - } else if (this.registry.registry[Item.id] && ! this.tmp.disambig_override) { - this.tmp.disambig_request = this.registry.registry[Item.id].disambig; - this.tmp.disambig_settings = this.registry.registry[Item.id].disambig; - } else { - this.tmp.disambig_settings = new CSL.AmbigConfig(); - } - if (this.tmp.area === 'bibliography' && this.opt["disambiguate-add-names"] && this.registry.registry[Item.id] && this.tmp.disambig_override) { - this.tmp.disambig_request = this.tmp.disambig_settings; - this.tmp.disambig_request.names = this.registry.registry[Item.id].disambig.names.slice(); - this.tmp.disambig_settings.names = this.registry.registry[Item.id].disambig.names.slice(); - } - this.tmp.names_used = []; - this.tmp.nameset_counter = 0; - this.tmp.years_used = []; - this.tmp.names_max.clear(); - this.tmp.splice_delimiter = this[this.tmp.area].opt.layout_delimiter; - this.bibliography_sort.keys = []; - this.citation_sort.keys = []; - this.tmp.has_done_year_suffix = false; - this.tmp.last_cite_locale = false; - if (!this.tmp.just_looking && item && !item.position && this.registry.registry[Item.id]) { - this.tmp.disambig_restore = CSL.cloneAmbigConfig(this.registry.registry[Item.id].disambig); - } - this.tmp.shadow_numbers = {}; - this.setNumberLabels(Item); - this.tmp.first_name_string = false; - if (this.opt.development_extensions.flip_parentheses_to_braces && item && item.prefix) { - var openBrace = CSL.checkNestedBraceOpen.exec(item.prefix); - var closeBrace = CSL.checkNestedBraceClose.exec(item.prefix); - if (openBrace) { - if (!closeBrace) { - this.output.nestedBraces = CSL.NestedBraces; - } else if (closeBrace[0].length < openBrace[0].length) { - this.output.nestedBraces = CSL.NestedBraces; +CSL.Engine.prototype.setCitationId = function (citation, force) { + var ret, id, direction; + ret = false; + if (!citation.citationID || force) { + id = Math.floor(Math.random() * 100000000000000); + while (true) { + direction = 0; + if (!this.registry.citationreg.citationById[id]) { + citation.citationID = id.toString(32); + break; + } else if (!direction && id < 50000000000000) { + direction = 1; } else { - this.output.nestedBraces = false; + direction = -1; + } + if (direction === 1) { + id += 1; + } else { + id += -1; } - } else if (closeBrace) { - this.output.nestedBraces = false; } + ret = "" + id; } + this.registry.citationreg.citationById[citation.citationID] = citation; + return ret; }; -CSL.citeEnd = function (Item, item) { - if (this.tmp.disambig_restore) { - this.registry.registry[Item.id].disambig.names = this.tmp.disambig_restore.names; - this.registry.registry[Item.id].disambig.givens = this.tmp.disambig_restore.givens; +CSL.Engine.prototype.rebuildProcessorState = function (citations, mode, uncitedItemIDs) { + if (!citations) { + citations = []; } - this.tmp.disambig_restore = false; - this.tmp.last_suffix_used = this.tmp.suffix.value(); - this.tmp.last_years_used = this.tmp.years_used.slice(); - this.tmp.last_names_used = this.tmp.names_used.slice(); - this.tmp.cut_var = false; - this.tmp.disambig_request = false; - this.tmp.cite_locales.push(this.tmp.last_cite_locale); - if (this.tmp.issued_date && this.tmp.renders_collection_number) { - var buf = []; - for (var i = this.tmp.issued_date.list.length - 1; i > this.tmp.issued_date.pos; i += -1) { - buf.push(this.tmp.issued_date.list.pop()); + if (!mode) { + mode = 'html'; + } + var itemIDs = []; + for (var i=0,ilen=citations.length;i<ilen;i+=1) { + for (var j=0,jlen=citations[i].citationItems.length;j<jlen;j+=1) { + var itemID = "" + citations[i].citationItems[j].id; + itemIDs.push(itemID); } - this.tmp.issued_date.list.pop(); - for (i = buf.length - 1; i > -1; i += -1) { - this.tmp.issued_date.list.push(buf.pop()); + } + this.updateItems(itemIDs); + var pre = []; + var post = []; + var ret = []; + var oldMode = this.opt.mode; + this.setOutputFormat(mode); + for (var i=0,ilen=citations.length;i<ilen;i+=1) { + var res = this.processCitationCluster(citations[i],pre,post,CSL.ASSUME_ALL_ITEMS_REGISTERED); + pre.push([citations[i].citationID,citations[i].properties.noteIndex]); + for (var j=0,jlen=res[1].length;j<jlen;j+=1) { + var index = res[1][j][0]; + ret[index] = [ + pre[index][0], + pre[index][1], + res[1][j][1] + ]; } - if (this.parallel.use_parallels) { - this.parallel.cite["issued"] = false; + } + this.updateUncitedItems(uncitedItemIDs); + this.setOutputFormat(oldMode); + return ret; +} +CSL.Engine.prototype.restoreProcessorState = function (citations) { + var i, ilen, j, jlen, item, Item, newitem, citationList, itemList, sortedItems; + citationList = []; + itemList = []; + if (!citations) { + citations = []; + } + var indexNumbers = []; + var citationIds = {}; + for (i = 0, ilen = citations.length; i < ilen; i += 1) { + if (citationIds[citations[i].citationID]) { + this.setCitationId(citations[i], true); } + citationIds[citations[i].citationID] = true; + indexNumbers.push(citations[i].properties.index); } - this.tmp.issued_date = false; - this.tmp.renders_collection_number = false; - if (this.opt.development_extensions.flip_parentheses_to_braces && item && item.suffix) { - var openBrace = CSL.checkNestedBraceOpen.exec(item.suffix); - var closeBrace = CSL.checkNestedBraceClose.exec(item.suffix); - if (closeBrace) { - if (!openBrace) { - this.output.nestedBraces = false; - } else if (openBrace[0].length < closeBrace[0].length) { - this.output.nestedBraces = false; + var oldCitations = citations.slice(); + oldCitations.sort( + function (a,b) { + if (a.properties.index < b.properties.index) { + return -1; + } else if (a.properties.index > b.properties.index) { + return 1; } else { - this.output.nestedBraces = CSL.NestedBraces; + return 0; } - } else if (openBrace) { - this.output.nestedBraces = CSL.NestedBraces; } + ); + for (i = 0, ilen = oldCitations.length; i < ilen; i += 1) { + oldCitations[i].properties.index = i; + } + for (i = 0, ilen = oldCitations.length; i < ilen; i += 1) { + sortedItems = []; + for (j = 0, jlen = oldCitations[i].citationItems.length; j < jlen; j += 1) { + item = oldCitations[i].citationItems[j]; + if ("undefined" === typeof item.sortkeys) { + item.sortkeys = []; + } + Item = this.retrieveItem("" + item.id); + newitem = [Item, item]; + sortedItems.push(newitem); + oldCitations[i].citationItems[j].item = Item; + itemList.push("" + item.id); + } + if (!oldCitations[i].properties.unsorted) { + sortedItems.sort(this.citation.srt.compareCompositeKeys); + } + oldCitations[i].sortedItems = sortedItems; + this.registry.citationreg.citationById[oldCitations[i].citationID] = oldCitations[i]; } + this.updateItems(itemList); + for (i = 0, ilen = citations.length; i < ilen; i += 1) { + citationList.push(["" + citations[i].citationID, citations[i].properties.noteIndex]); + } + var ret = []; + if (citations && citations.length) { + ret = this.processCitationCluster(citations[0], [], citationList.slice(1)); + } else { + this.registry = new CSL.Registry(this); + this.tmp = new CSL.Engine.Tmp(); + this.disambiguate = new CSL.Disambiguation(this); + } + return ret; }; -CSL.Node = {}; -CSL.Node.bibliography = { - build: function (state, target) { - if (this.tokentype === CSL.START) { - state.build.area = "bibliography"; - state.build.root = "bibliography"; - state.fixOpt(this, "names-delimiter", "delimiter"); - state.fixOpt(this, "name-delimiter", "delimiter"); - state.fixOpt(this, "name-form", "form"); - state.fixOpt(this, "and", "and"); - state.fixOpt(this, "delimiter-precedes-last", "delimiter-precedes-last"); - state.fixOpt(this, "delimiter-precedes-et-al", "delimiter-precedes-et-al"); - state.fixOpt(this, "initialize-with", "initialize-with"); - state.fixOpt(this, "initialize", "initialize"); - state.fixOpt(this, "name-as-sort-order", "name-as-sort-order"); - state.fixOpt(this, "sort-separator", "sort-separator"); - state.fixOpt(this, "and", "and"); - state.fixOpt(this, "et-al-min", "et-al-min"); - state.fixOpt(this, "et-al-use-first", "et-al-use-first"); - state.fixOpt(this, "et-al-use-last", "et-al-use-last"); - state.fixOpt(this, "et-al-subsequent-min", "et-al-subsequent-min"); - state.fixOpt(this, "et-al-subsequent-use-first", "et-al-subsequent-use-first"); +CSL.Engine.prototype.updateItems = function (idList, nosort, rerun_ambigs) { + var debug = false; + var oldArea = this.tmp.area; + this.registry.init(idList); + if (rerun_ambigs) { + for (var ambig in this.registry.ambigcites) { + this.registry.ambigsTouched[ambig] = true; } - target.push(this); } + this.registry.dodeletes(this.registry.myhash); + this.registry.doinserts(this.registry.mylist); + this.registry.dorefreshes(); + this.registry.rebuildlist(); + this.registry.setsortkeys(); + this.registry.setdisambigs(); + if (!nosort) { + this.registry.sorttokens(); + } + this.registry.renumber(); + this.tmp.area = oldArea; + return this.registry.getSortedIds(); }; -CSL.Node.choose = { - build: function (state, target) { - var func; - if (this.tokentype === CSL.START) { - func = function (state, Item) { - state.tmp.jump.push(undefined, CSL.LITERAL); - }; - } - if (this.tokentype === CSL.END) { - func = function (state, Item) { - state.tmp.jump.pop(); - }; - } - this.execs.push(func); - target.push(this); - }, - configure: function (state, pos) { - if (this.tokentype === CSL.END) { - state.configure.fail.push((pos)); - state.configure.succeed.push((pos)); - } else { - state.configure.fail.pop(); - state.configure.succeed.pop(); +CSL.Engine.prototype.updateUncitedItems = function (idList, nosort) { + var debug = false; + if (!idList) { + idList = []; + } + if ("object" == typeof idList) { + if ("undefined" == typeof idList.length) { + var idHash = idList; + idList = []; + for (var key in idHash) { + idList.push(key); + } + } else if ("number" == typeof idList.length) { + var idHash = {}; + for (var i=0,ilen=idList.length;i<ilen;i+=1) { + idHash[idList[i]] = true; + } } } + this.registry.init(idList, true); + this.registry.dopurge(idHash); + this.registry.doinserts(this.registry.mylist); + this.registry.dorefreshes(); + this.registry.rebuildlist(); + this.registry.setsortkeys(); + this.registry.setdisambigs(); + if (!nosort) { + this.registry.sorttokens(); + } + this.registry.renumber(); + return this.registry.getSortedIds(); }; CSL.localeResolve = function (langstr) { var ret, langlst; @@ -5078,6 +5087,58 @@ CSL.Engine.prototype.localeSet = function (myxml, lang_in, lang_out) { } } }; +CSL.Node = {}; +CSL.Node.bibliography = { + build: function (state, target) { + if (this.tokentype === CSL.START) { + state.build.area = "bibliography"; + state.build.root = "bibliography"; + state.fixOpt(this, "names-delimiter", "delimiter"); + state.fixOpt(this, "name-delimiter", "delimiter"); + state.fixOpt(this, "name-form", "form"); + state.fixOpt(this, "and", "and"); + state.fixOpt(this, "delimiter-precedes-last", "delimiter-precedes-last"); + state.fixOpt(this, "delimiter-precedes-et-al", "delimiter-precedes-et-al"); + state.fixOpt(this, "initialize-with", "initialize-with"); + state.fixOpt(this, "initialize", "initialize"); + state.fixOpt(this, "name-as-sort-order", "name-as-sort-order"); + state.fixOpt(this, "sort-separator", "sort-separator"); + state.fixOpt(this, "and", "and"); + state.fixOpt(this, "et-al-min", "et-al-min"); + state.fixOpt(this, "et-al-use-first", "et-al-use-first"); + state.fixOpt(this, "et-al-use-last", "et-al-use-last"); + state.fixOpt(this, "et-al-subsequent-min", "et-al-subsequent-min"); + state.fixOpt(this, "et-al-subsequent-use-first", "et-al-subsequent-use-first"); + } + target.push(this); + } +}; +CSL.Node.choose = { + build: function (state, target) { + var func; + if (this.tokentype === CSL.START) { + func = function (state, Item) { + state.tmp.jump.push(undefined, CSL.LITERAL); + }; + } + if (this.tokentype === CSL.END) { + func = function (state, Item) { + state.tmp.jump.pop(); + }; + } + this.execs.push(func); + target.push(this); + }, + configure: function (state, pos) { + if (this.tokentype === CSL.END) { + state.configure.fail.push((pos)); + state.configure.succeed.push((pos)); + } else { + state.configure.fail.pop(); + state.configure.succeed.pop(); + } + } +}; CSL.Node.citation = { build: function (state, target) { if (this.tokentype === CSL.START) { @@ -5116,6 +5177,10 @@ CSL.Node.citation = { } } }; +CSL.Node["#comment"] = { + build: function (state, target) { + } +}; CSL.Node.date = { build: function (state, target) { var func, date_obj, tok, len, pos, part, dpx, parts, mypos, start, end; @@ -5444,6 +5509,8 @@ CSL.Node["else-if"] = { if (this.locale) { state.opt.lang = this.locale; } + var func = state.fun.match[this.match](this, state, this.rawtests, CSL.CONDITION_LEVEL_BOTTOM); + this.tests.push(func); if (!this.evaluator) { this.evaluator = function (token, state, Item, item) { var record = function (result) { @@ -5501,10 +5568,6 @@ CSL.Node["else"] = { } } }; -CSL.Node["#comment"] = { - build: function (state, target) { - } -}; CSL.Node["et-al"] = { build: function (state, target) { if (state.build.area === "citation" || state.build.area === "bibliography") { @@ -5617,6 +5680,8 @@ CSL.Node["if"] = { if (this.locale) { state.opt.lang = this.locale; } + var func = state.fun.match[this.match](this, state, this.rawtests, CSL.CONDITION_LEVEL_BOTTOM); + this.tests.push(func); if (!this.evaluator) { this.evaluator = function (token, state, Item, item) { var record = function (result) { @@ -6759,78 +6824,6 @@ CSL.NameOutput.prototype._getToken = function (tokenname) { } return token; }; -CSL.NameOutput.prototype.disambigNames = function () { - var pos = this.nameset_base; - for (var i = 0, ilen = this.variables.length; i < ilen; i += 1) { - var v = this.variables[i]; - if (this.freeters[v].length) { - this._runDisambigNames(this.freeters[v], pos); - pos += 1; - } - if (this.institutions[v].length) { - pos += 1; - } - for (var j = 0, jlen = this.persons[v].length; j < jlen; j += 1) { - if (this.persons[v][j].length) { - this._runDisambigNames(this.persons[v][j], pos); - this.state.tmp.disambig_settings.givens.push([]); - pos += 1; - } - } - } -}; -CSL.NameOutput.prototype._runDisambigNames = function (lst, pos) { - var chk, myform, myinitials, param, i, ilen, paramx; - for (i = 0, ilen = lst.length; i < ilen; i += 1) { - if (!lst[i].given && !lst[i].family) { - continue; - } - myinitials = this.name.strings["initialize-with"]; - this.state.registry.namereg.addname("" + this.Item.id, lst[i], i); - chk = this.state.tmp.disambig_settings.givens[pos]; - if ("undefined" === typeof chk) { - for (var j = 0, jlen = pos + 1; j < jlen; j += 1) { - if (!this.state.tmp.disambig_settings.givens[j]) { - this.state.tmp.disambig_settings.givens[j] = []; - } - } - } - chk = this.state.tmp.disambig_settings.givens[pos][i]; - if ("undefined" === typeof chk) { - myform = this.name.strings.form; - param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials); - this.state.tmp.disambig_settings.givens[pos].push(param); - } - myform = this.name.strings.form; - paramx = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials); - if (this.state.tmp.disambig_request) { - var val = this.state.tmp.disambig_settings.givens[pos][i]; - if (val === 1 && - this.state.citation.opt["givenname-disambiguation-rule"] === "by-cite" && - ("undefined" === typeof this.name.strings["initialize-with"] - || "undefined" === typeof lst[i].given)) { - val = 2; - } - param = val; - if (this.state.opt["disambiguate-add-givenname"] && lst[i].given) { - param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, param, this.name.strings.form, this.name.strings["initialize-with"]); - } - } else { - param = paramx; - } - if (!this.state.tmp.just_looking && this.item && this.item.position === CSL.POSITION_FIRST) { - param = paramx; - } - if (!this.state.tmp.sort_key_flag) { - this.state.tmp.disambig_settings.givens[pos][i] = param; - if ("string" === typeof myinitials - && ("undefined" === typeof this.name.strings["initialize"] - || true === this.name.strings["initialize"])) { - this.state.tmp.disambig_settings.use_initials = true; - } - } - } -}; CSL.NameOutput.prototype.setCommonTerm = function () { var variables = this.variables; var varnames = variables.slice(); @@ -6952,12 +6945,84 @@ CSL.NameOutput.prototype._imposeNameConstraints = function (lst, count, key, pos } else { lst[key] = display_names.slice(0, discretionary_names_length); } - if (!lst[key].length) { - this.etal_spec.push(0); + if (!lst[key].length) { + this.etal_spec.push(0); + } + } + this.state.tmp.disambig_settings.names[pos] = lst[key].length; + this.state.disambiguate.padBase(this.state.tmp.disambig_settings); +}; +CSL.NameOutput.prototype.disambigNames = function () { + var pos = this.nameset_base; + for (var i = 0, ilen = this.variables.length; i < ilen; i += 1) { + var v = this.variables[i]; + if (this.freeters[v].length) { + this._runDisambigNames(this.freeters[v], pos); + pos += 1; + } + if (this.institutions[v].length) { + pos += 1; + } + for (var j = 0, jlen = this.persons[v].length; j < jlen; j += 1) { + if (this.persons[v][j].length) { + this._runDisambigNames(this.persons[v][j], pos); + this.state.tmp.disambig_settings.givens.push([]); + pos += 1; + } + } + } +}; +CSL.NameOutput.prototype._runDisambigNames = function (lst, pos) { + var chk, myform, myinitials, param, i, ilen, paramx; + for (i = 0, ilen = lst.length; i < ilen; i += 1) { + if (!lst[i].given && !lst[i].family) { + continue; + } + myinitials = this.name.strings["initialize-with"]; + this.state.registry.namereg.addname("" + this.Item.id, lst[i], i); + chk = this.state.tmp.disambig_settings.givens[pos]; + if ("undefined" === typeof chk) { + for (var j = 0, jlen = pos + 1; j < jlen; j += 1) { + if (!this.state.tmp.disambig_settings.givens[j]) { + this.state.tmp.disambig_settings.givens[j] = []; + } + } + } + chk = this.state.tmp.disambig_settings.givens[pos][i]; + if ("undefined" === typeof chk) { + myform = this.name.strings.form; + param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials); + this.state.tmp.disambig_settings.givens[pos].push(param); + } + myform = this.name.strings.form; + paramx = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials); + if (this.state.tmp.disambig_request) { + var val = this.state.tmp.disambig_settings.givens[pos][i]; + if (val === 1 && + this.state.citation.opt["givenname-disambiguation-rule"] === "by-cite" && + ("undefined" === typeof this.name.strings["initialize-with"] + || "undefined" === typeof lst[i].given)) { + val = 2; + } + param = val; + if (this.state.opt["disambiguate-add-givenname"] && lst[i].given) { + param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, param, this.name.strings.form, this.name.strings["initialize-with"]); + } + } else { + param = paramx; + } + if (!this.state.tmp.just_looking && this.item && this.item.position === CSL.POSITION_FIRST) { + param = paramx; + } + if (!this.state.tmp.sort_key_flag) { + this.state.tmp.disambig_settings.givens[pos][i] = param; + if ("string" === typeof myinitials + && ("undefined" === typeof this.name.strings["initialize"] + || true === this.name.strings["initialize"])) { + this.state.tmp.disambig_settings.use_initials = true; + } } } - this.state.tmp.disambig_settings.names[pos] = lst[key].length; - this.state.disambiguate.padBase(this.state.tmp.disambig_settings); }; CSL.NameOutput.prototype.getEtAlConfig = function () { var item = this.item; @@ -7005,6 +7070,40 @@ CSL.NameOutput.prototype.getEtAlConfig = function () { this.state.tmp["et-al-min"] = this.etal_min; } }; +CSL.NameOutput.prototype.setEtAlParameters = function () { + var i, ilen, j, jlen; + for (i = 0, ilen = this.variables.length; i < ilen; i += 1) { + var v = this.variables[i]; + if (this.freeters[v].length) { + this._setEtAlParameter("freeters", v); + } + if (this.institutions[v].length) { + this._setEtAlParameter("institutions", v); + } + for (j = 0, jlen = this.persons[v].length; j < jlen; j += 1) { + this._setEtAlParameter("persons", v, j); + } + } +}; +CSL.NameOutput.prototype._setEtAlParameter = function (type, v, j) { + var lst, count; + if ("undefined" === typeof j) { + lst = this[type][v]; + count = this[type + "_count"][v]; + } else { + lst = this[type][v][j]; + count = this[type + "_count"][v][j]; + } + if (lst.length < count && !this.state.tmp.sort_key_flag) { + if (this.etal_use_last) { + this.etal_spec.push(2); + } else { + this.etal_spec.push(1); + } + } else { + this.etal_spec.push(0); + } +}; CSL.NameOutput.prototype.renderAllNames = function () { var pos = this.nameset_base; for (var i = 0, ilen = this.variables.length; i < ilen; i += 1) { @@ -7803,116 +7902,6 @@ CSL.NameOutput.prototype._trimInstitution = function (subunits, v, i) { } return subunits; }; -CSL.NameOutput.prototype.setEtAlParameters = function () { - var i, ilen, j, jlen; - for (i = 0, ilen = this.variables.length; i < ilen; i += 1) { - var v = this.variables[i]; - if (this.freeters[v].length) { - this._setEtAlParameter("freeters", v); - } - if (this.institutions[v].length) { - this._setEtAlParameter("institutions", v); - } - for (j = 0, jlen = this.persons[v].length; j < jlen; j += 1) { - this._setEtAlParameter("persons", v, j); - } - } -}; -CSL.NameOutput.prototype._setEtAlParameter = function (type, v, j) { - var lst, count; - if ("undefined" === typeof j) { - lst = this[type][v]; - count = this[type + "_count"][v]; - } else { - lst = this[type][v][j]; - count = this[type + "_count"][v][j]; - } - if (lst.length < count && !this.state.tmp.sort_key_flag) { - if (this.etal_use_last) { - this.etal_spec.push(2); - } else { - this.etal_spec.push(1); - } - } else { - this.etal_spec.push(0); - } -}; -CSL.evaluateLabel = function (node, state, Item, item) { - var myterm; - if ("locator" === node.strings.term) { - if (item && item.label) { - if (item.label === "sub verbo") { - myterm = "sub-verbo"; - } else { - myterm = item.label; - } - } - if (!myterm) { - myterm = "page"; - } - } else { - myterm = node.strings.term; - } - var plural = node.strings.plural; - if (item && "number" === typeof item.force_pluralism) { - plural = item.force_pluralism; - } else if ("number" !== typeof plural) { - if ("locator" === node.strings.term) { - if (item && item.locator) { - if (state.opt.development_extensions.locator_parsing_for_plurals) { - if (!state.tmp.shadow_numbers.locator) { - state.processNumber(false, item, "locator", Item.type); - } - plural = state.tmp.shadow_numbers.locator.plural; - } else { - plural = CSL.evaluateStringPluralism(item.locator); - } - } - } else if (["page", "page-first"].indexOf(node.variables[0]) > -1) { - state.processNumber(false, Item, myterm, Item.type); - plural = state.tmp.shadow_numbers[myterm].plural; - myterm = state.tmp.shadow_numbers[myterm].label; - } else { - if (!state.tmp.shadow_numbers[myterm]) { - state.processNumber(false, Item, myterm, Item.type); - } - plural = state.tmp.shadow_numbers[myterm].plural; - } - if (node.decorations && state.opt.development_extensions.csl_reverse_lookup_support) { - node.decorations.reverse(); - node.decorations.push(["@showid","true", node.cslid]); - node.decorations.reverse(); - } - } - return CSL.castLabel(state, node, myterm, plural, CSL.TOLERANT); -}; -CSL.evaluateStringPluralism = function (str) { - if (str) { - var m = str.match(/(?:[0-9],\s*[0-9]|\s+and\s+|&|([0-9]+)\s*[\-\u2013]\s*([0-9]+))/); - if (m && (!m[1] || parseInt(m[1], 10) < parseInt(m[2], 10))) { - return 1; - } - } - return 0; -}; -CSL.castLabel = function (state, node, term, plural, mode) { - var label_form = node.strings.form; - if (state.tmp.group_context.value()[5]) { - label_form = state.tmp.group_context.value()[5]; - } - var ret = state.getTerm(term, label_form, plural, false, mode); - if (state.tmp.strip_periods) { - ret = ret.replace(/\./g, ""); - } else { - for (var i = 0, ilen = node.decorations.length; i < ilen; i += 1) { - if ("@strip-periods" === node.decorations[i][0] && "true" === node.decorations[i][1]) { - ret = ret.replace(/\./g, ""); - break; - } - } - } - return ret; -}; CSL.PublisherOutput = function (state, group_tok) { this.state = state; this.group_tok = group_tok; @@ -7989,89 +7978,77 @@ CSL.PublisherOutput.prototype.clearVars = function () { this.state.tmp["publisher-token"] = false; this.state.tmp["publisher-place-token"] = false; }; -CSL.dateMacroAsSortKey = function (state, Item) { - CSL.dateAsSortKey.call(this, state, Item, true); -}; -CSL.dateAsSortKey = function (state, Item, isMacro) { - var dp, elem, value, e, yr, prefix, i, ilen, num; - var variable = this.variables[0]; - var macroFlag = "empty"; - if (isMacro) { - macroFlag = "macro-with-date"; - } - dp = Item[variable]; - if ("undefined" === typeof dp) { - dp = {"date-parts": [[0]] }; - if (!dp.year) { - state.tmp.empty_date = true; - } - } - if ("undefined" === typeof this.dateparts) { - this.dateparts = ["year", "month", "day"]; - } - if (dp.raw) { - dp = state.fun.dateparser.parse(dp.raw); - } else if (dp["date-parts"]) { - dp = state.dateParseArray(dp); - } - if ("undefined" === typeof dp) { - dp = {}; - } - for (i = 0, ilen = CSL.DATE_PARTS_INTERNAL.length; i < ilen; i += 1) { - elem = CSL.DATE_PARTS_INTERNAL[i]; - value = 0; - e = elem; - if (e.slice(-4) === "_end") { - e = e.slice(0, -4); +CSL.evaluateLabel = function (node, state, Item, item) { + var myterm; + if ("locator" === node.strings.term) { + if (item && item.label) { + if (item.label === "sub verbo") { + myterm = "sub-verbo"; + } else { + myterm = item.label; + } } - if (dp[elem] && this.dateparts.indexOf(e) > -1) { - value = dp[elem]; + if (!myterm) { + myterm = "page"; } - if (elem.slice(0, 4) === "year") { - yr = CSL.Util.Dates[e].numeric(state, value); - prefix = "Y"; - if (yr[0] === "-") { - prefix = "X"; - yr = yr.slice(1); - yr = 9999 - parseInt(yr, 10); + } else { + myterm = node.strings.term; + } + var plural = node.strings.plural; + if (item && "number" === typeof item.force_pluralism) { + plural = item.force_pluralism; + } else if ("number" !== typeof plural) { + if ("locator" === node.strings.term) { + if (item && item.locator) { + if (state.opt.development_extensions.locator_parsing_for_plurals) { + if (!state.tmp.shadow_numbers.locator) { + state.processNumber(false, item, "locator", Item.type); + } + plural = state.tmp.shadow_numbers.locator.plural; + } else { + plural = CSL.evaluateStringPluralism(item.locator); + } } - state.output.append(CSL.Util.Dates[elem.slice(0, 4)].numeric(state, (prefix + yr)), macroFlag); + } else if (["page", "page-first"].indexOf(node.variables[0]) > -1) { + state.processNumber(false, Item, myterm, Item.type); + plural = state.tmp.shadow_numbers[myterm].plural; + myterm = state.tmp.shadow_numbers[myterm].label; } else { - value = CSL.Util.Dates[e]["numeric-leading-zeros"](state, value); - if (!value) { - value = "00"; + if (!state.tmp.shadow_numbers[myterm]) { + state.processNumber(false, Item, myterm, Item.type); } - state.output.append(value, macroFlag); + plural = state.tmp.shadow_numbers[myterm].plural; + } + if (node.decorations && state.opt.development_extensions.csl_reverse_lookup_support) { + node.decorations.reverse(); + node.decorations.push(["@showid","true", node.cslid]); + node.decorations.reverse(); + } + } + return CSL.castLabel(state, node, myterm, plural, CSL.TOLERANT); +}; +CSL.evaluateStringPluralism = function (str) { + if (str) { + var m = str.match(/(?:[0-9],\s*[0-9]|\s+and\s+|&|([0-9]+)\s*[\-\u2013]\s*([0-9]+))/); + if (m && (!m[1] || parseInt(m[1], 10) < parseInt(m[2], 10))) { + return 1; } } + return 0; }; -CSL.Engine.prototype.dateParseArray = function (date_obj) { - var ret, field, dpos, ppos, dp, exts, llen, pos, len, pppos, lllen; - ret = {}; - for (field in date_obj) { - if (field === "date-parts") { - dp = date_obj["date-parts"]; - if (dp.length > 1) { - if (dp[0].length !== dp[1].length) { - CSL.error("CSL data error: element mismatch in date range input."); - } - } - exts = ["", "_end"]; - for (var i = 0, ilen = dp.length; i < ilen; i += 1) { - for (var j = 0, jlen = CSL.DATE_PARTS.length; j < jlen; j += 1) { - if ("undefined" === typeof dp[i][j]) { - ret[(CSL.DATE_PARTS[j] + exts[i])] = dp[i][j]; - } else { - ret[(CSL.DATE_PARTS[j] + exts[i])] = parseInt(dp[i][j], 10); - } - } - } - } else if (date_obj.hasOwnProperty(field)) { - if (field === "literal" && "object" === typeof date_obj.literal && "string" === typeof date_obj.literal.part) { - CSL.debug("Warning: fixing up weird literal date value"); - ret.literal = date_obj.literal.part; - } else { - ret[field] = date_obj[field]; +CSL.castLabel = function (state, node, term, plural, mode) { + var label_form = node.strings.form; + if (state.tmp.group_context.value()[5]) { + label_form = state.tmp.group_context.value()[5]; + } + var ret = state.getTerm(term, label_form, plural, false, mode); + if (state.tmp.strip_periods) { + ret = ret.replace(/\./g, ""); + } else { + for (var i = 0, ilen = node.decorations.length; i < ilen; i += 1) { + if ("@strip-periods" === node.decorations[i][0] && "true" === node.decorations[i][1]) { + ret = ret.replace(/\./g, ""); + break; } } } @@ -8680,7 +8657,7 @@ CSL.Node.text = { parallel_variable = "shortTitle"; } state.parallel.StartVariable(parallel_variable); - state.parallel.AppendToVariable(Item[parallel_variable]); + state.parallel.AppendToVariable(Item[parallel_variable],parallel_variable); }; this.execs.push(func); if (CSL.MULTI_FIELDS.indexOf(this.variables_real[0]) > -1) { @@ -8833,13 +8810,12 @@ CSL.Attributes["@disambiguate"] = function (state, arg) { this.tests.push(func); } }; -CSL.Attributes["@is-numeric"] = function (state, arg) { +CSL.Attributes["@is-numeric"] = function (state, arg, joiner) { var variables = arg.split(/\s+/); var reverses = CSL.Util.setReverseConditions.call(this, variables); var maketest = function(variable, reverse) { return function (Item, item) { var myitem = Item; - var mytests = []; if (["locator","locator-revision"].indexOf(variable) > -1) { myitem = item; } @@ -8860,18 +8836,9 @@ CSL.Attributes["@is-numeric"] = function (state, arg) { return reverse ? true : false; } } - var mytests = []; for (var i=0; i<variables.length; i+=1) { - mytests.push(maketest(variables[i], reverses[i])); + this.rawtests.push(maketest(variables[i], reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@is-numeric-any"] = function (state, arg) { - CSL.Attributes["@is-numeric"].call(this, state, arg, "any"); -}; -CSL.Attributes["@is-numeric-all"] = function (state, arg) { - CSL.Attributes["@is-numeric"].call(this, state, arg, "all"); }; CSL.Attributes["@is-uncertain-date"] = function (state, arg) { var variables = arg.split(/\s+/); @@ -8885,18 +8852,9 @@ CSL.Attributes["@is-uncertain-date"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=variables.length;i<ilen;i+=1) { - mytests.push(maketest(variables[i], reverses[i])); + this.rawtests.push(maketest(variables[i], reverses[i])); }; - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@is-uncertain-date-any"] = function (state, arg) { - CSL.Attributes["@is-uncertain-date"].call(this, state, arg, "any"); -}; -CSL.Attributes["@is-uncertain-date-all"] = function (state, arg) { - CSL.Attributes["@is-uncertain-date"].call(this, state, arg, "all"); }; CSL.Attributes["@locator"] = function (state, arg) { var trylabels = arg.replace("sub verbo", "sub-verbo"); @@ -8919,18 +8877,9 @@ CSL.Attributes["@locator"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=trylabels.length;i<ilen;i+=1) { - mytests.push(maketest(trylabels[i], reverses[i])); + this.rawtests.push(maketest(trylabels[i], reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@locator-any"] = function (state, arg) { - CSL.Attributes["@locator"].call(this, state, arg, "any"); -}; -CSL.Attributes["@locator-all"] = function (state, arg) { - CSL.Attributes["@locator"].call(this, state, arg, "all"); }; CSL.Attributes["@position"] = function (state, arg) { var tryposition; @@ -8957,7 +8906,6 @@ CSL.Attributes["@position"] = function (state, arg) { return false; } } - var mytests = []; for (var i=0,ilen=trypositions.length;i<ilen;i+=1) { var tryposition = trypositions[i]; if (tryposition === "first") { @@ -8970,18 +8918,16 @@ CSL.Attributes["@position"] = function (state, arg) { tryposition = CSL.POSITION_IBID_WITH_LOCATOR; } if ("near-note" === tryposition) { - mytests.push(function (Item, item) { + this.rawtests.push(function (Item, item) { if (item && item.position === CSL.POSITION_SUBSEQUENT && item["near-note"]) { return true; } return false; }); } else { - mytests.push(maketest(tryposition)); + this.rawtests.push(maketest(tryposition)); } } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); }; CSL.Attributes["@type"] = function (state, arg) { var types = arg.split(/\s+/); @@ -8996,20 +8942,12 @@ CSL.Attributes["@type"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=types.length;i<ilen;i+=1) { - mytests.push(maketest(types[i], reverses[i])); + this.rawtests.push(maketest(types[i], reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@type-any"] = function (state, arg) { - CSL.Attributes["@type"].call(this, state, arg, "any"); -}; -CSL.Attributes["@type-all"] = function (state, arg) { - CSL.Attributes["@type"].call(this, state, arg, "all"); }; CSL.Attributes["@variable"] = function (state, arg) { + var func; this.variables = arg.split(/\s+/); this.variables_real = this.variables.slice(); if ("label" === this.name && this.variables[0]) { @@ -9155,20 +9093,11 @@ CSL.Attributes["@variable"] = function (state, arg) { return reverse ? true : false; } } - var mytests = []; for (var i=0,ilen=this.variables.length;i<ilen;i+=1) { - mytests.push(maketest(this.variables[i], reverses[i])); + this.rawtests.push(maketest(this.variables[i], reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); } }; -CSL.Attributes["@variable-any"] = function (state, arg) { - CSL.Attributes["@variable"].call(this, state, arg, "any"); -}; -CSL.Attributes["@variable-all"] = function (state, arg) { - CSL.Attributes["@variable"].call(this, state, arg, "all"); -}; CSL.Attributes["@page"] = function (state, arg) { var trylabels = arg.replace("sub verbo", "sub-verbo"); trylabels = trylabels.split(/\s+/); @@ -9191,18 +9120,9 @@ CSL.Attributes["@page"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=trylabels.length;i<ilen;i+=1) { - mytests.push(maketest(trylabels[i], reverses[i])); + this.rawtests.push(maketest(trylabels[i], reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@page-any"] = function (state, arg) { - CSL.Attributes["@page"].call(this, state, arg, "any"); -}; -CSL.Attributes["@page-all"] = function (state, arg) { - CSL.Attributes["@page"].call(this, state, arg, "all"); }; CSL.Attributes["@jurisdiction"] = function (state, arg) { var tryjurisdictions = arg.split(/\s+/); @@ -9229,19 +9149,10 @@ CSL.Attributes["@jurisdiction"] = function (state, arg) { return reverse ? true : false; } } - var mytests = []; for (var i=0,ilen=tryjurisdictions.length;i<ilen;i+=1) { var tryjurisdictionSlice = tryjurisdictions[i].slice(); - mytests.push(maketests(tryjurisdictionSlice, reverses[i])); + this.rawtests.push(maketests(tryjurisdictionSlice, reverses[i])); } - var func = state.fun.match[this.match](this, state, mytests, CSL.CONDITION_LEVEL_BOTTOM); - this.tests.push(func); -}; -CSL.Attributes["@jurisdiction-any"] = function (state, arg) { - CSL.Attributes["@jurisdiction"].call(this, state, arg, "any"); -}; -CSL.Attributes["@jurisdiction-all"] = function (state, arg) { - CSL.Attributes["@jurisdiction"].call(this, state, arg, "all"); }; CSL.Attributes["@context"] = function (state, arg) { var func = function (Item, item) { @@ -9265,12 +9176,9 @@ CSL.Attributes["@has-year-only"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=trydates.length;i<ilen;i+=1) { - mytests.push(maketest(trydates[i])); + this.rawtests.push(maketest(trydates[i])); } - var func = state.fun.match[this.match](this, state, mytests); - this.tests.push(func); }; CSL.Attributes["@has-month-or-season-only"] = function (state, arg) { var trydates = arg.split(/\s+/); @@ -9284,12 +9192,9 @@ CSL.Attributes["@has-month-or-season-only"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=trydates.length;i<ilen;i+=1) { - mytests.push(maketest(trydates[i])); + this.rawtests.push(maketest(trydates[i])); } - var func = state.fun.match[this.match](this, state, mytests); - this.tests.push(func); }; CSL.Attributes["@has-day-only"] = function (state, arg) { var trydates = arg.split(/\s+/); @@ -9303,12 +9208,9 @@ CSL.Attributes["@has-day-only"] = function (state, arg) { } } } - var mytests = []; for (var i=0,ilen=trydates.length;i<ilen;i+=1) { - mytests.push(maketest(trydates[i])); + this.rawtests.push(maketest(trydates[i])); }; - var func = state.fun.match[this.match](this, state, mytests); - this.tests.push(func); }; CSL.Attributes["@subjurisdictions"] = function (state, arg) { var trysubjurisdictions = parseInt(arg, 10); @@ -9808,20 +9710,6 @@ CSL.Attributes["@reverse-order"] = function (state, arg) { CSL.Attributes["@display"] = function (state, arg) { this.strings.cls = arg; }; -var XML_PARSING; -if ("undefined" !== typeof CSL_IS_NODEJS) { - XML_PARSING = CSL_NODEJS; -} else if ("undefined" !== typeof CSL_E4X) { - XML_PARSING = CSL_E4X; -} else if ("undefined" !== typeof CSL_JSON) { - XML_PARSING = CSL_JSON; -} else { - XML_PARSING = CSL_CHROME; -} -CSL.System = {}; -CSL.System.Xml = { - "Parsing": XML_PARSING -}; CSL.Stack = function (val, literal) { this.mystack = []; if (literal || val) { @@ -9857,848 +9745,871 @@ CSL.Stack.prototype.value = function () { CSL.Stack.prototype.length = function () { return this.mystack.length; }; -CSL.Util = { - setReverseConditions: function (lst) { - reverses = []; - for (var i=0,ilen=lst.length;i<ilen;i+=1) { - if (lst[i].slice(0,4) === "not:") { - lst[i] = lst[i].slice(4); - reverses.push(true); - } else { - reverses.push(false); - } +CSL.Parallel = function (state) { + this.state = state; + this.sets = new CSL.Stack([]); + this.try_cite = true; + this.use_parallels = false; + this.midVars = ["section", "volume", "container-title", "collection-number", "issue", "page-first", "page", "number"]; + this.ignoreVarsLawGeneral = ["first-reference-note-number", "locator", "label","page-first","page","genre"]; + this.ignoreVarsLawProceduralHistory = ["issued", "first-reference-note-number", "locator", "label","page-first","page","genre","jurisdiction"]; + this.ignoreVarsOrders = ["first-reference-note-number"]; + this.ignoreVarsOther = ["first-reference-note-number", "locator", "label","section","page-first","page"]; +}; +CSL.Parallel.prototype.isMid = function (variable) { + return (this.midVars.indexOf(variable) > -1); +}; +CSL.Parallel.prototype.StartCitation = function (sortedItems, out) { + this.parallel_conditional_blobs_list = []; + if (this.use_parallels) { + this.sortedItems = sortedItems; + this.sortedItemsPos = -1; + this.sets.clear(); + this.sets.push([]); + this.in_series = true; + this.delim_counter = 0; + this.delim_pointers = []; + if (out) { + this.out = out; + } else { + this.out = this.state.output.queue; } - return reverses; + this.master_was_neutral_cite = true; } }; -CSL.Util.Match = function () { - this.any = function (token, state, tests, level) { - return function (Item, item) { - for (var i=0, ilen=tests.length; i < ilen; i += 1) { - result = tests[i](Item, item); - if (result) { - return true; +CSL.Parallel.prototype.StartCite = function (Item, item, prevItemID) { + var position, len, pos, x, curr, master, last_id, prev_locator, curr_locator, is_master, parallel; + if (this.use_parallels) { + if (this.sets.value().length && this.sets.value()[0].itemId == Item.id) { + this.ComposeSet(); + } + this.sortedItemsPos += 1; + if (item) { + position = item.position; + } + this.try_cite = true; + var has_required_var = false; + for (var i = 0, ilen = CSL.PARALLEL_MATCH_VARS.length; i < ilen; i += 1) { + if (Item[CSL.PARALLEL_MATCH_VARS[i]]) { + has_required_var = true; + break; + } + } + var basics_ok = true; + var last_cite = this.sets.value().slice(-1)[0]; + if (last_cite && last_cite.Item) { + if (last_cite.Item.title !== Item.title) { + basics_ok = false; + } else if (last_cite.Item.type !== Item.type) { + basics_ok = false; + } else if (["article-journal","article-magazine"].indexOf(Item.type) > -1) { + if (!this.state.opt.development_extensions.handle_parallel_articles + || last_cite.Item["container-title"] !== Item["container-title"]) { + basics_ok = false; } } - return false; - }; - }; - this[undefined] = this.any; - this.none = function (token, state, tests, level) { - if (CSL.CONDITION_LEVEL_TOP !== level) { - return this.any(token, state, tests, level); } - return function (Item, item) { - for (var i=0,ilen=tests.length;i<ilen;i+=1) { - result = tests[i](Item,item); - if (result) { - return false; + if (!basics_ok || !has_required_var || CSL.PARALLEL_TYPES.indexOf(Item.type) === -1) { + this.try_cite = true; + if (this.in_series) { + this.in_series = false; + } + } + this.cite = {}; + this.cite.front = []; + this.cite.mid = []; + this.cite.back = []; + this.cite.front_collapse = {}; + this.cite.back_forceme = []; + this.cite.position = position; + this.cite.Item = Item; + this.cite.itemId = "" + Item.id; + this.cite.prevItemID = "" + prevItemID; + this.target = "front"; + if (["treaty"].indexOf(Item.type) > -1) { + this.ignoreVars = this.ignoreVarsOrders; + } else if (["article-journal","article-magazine"].indexOf(Item.type) > -1) { + this.ignoreVars = this.ignoreVarsOther; + } else if (item && item.prefix) { + this.ignoreVars = this.ignoreVarsLawProceduralHistory; + this.cite.useProceduralHistory = true; + var prev = this.sets.value()[(this.sets.value().length - 1)]; + if (prev && prev.back) { + for (var i=prev.back.length-1;i>-1;i+=-1) { + if (prev.back[i] && prev[prev.back[i]]) { + delete prev[prev.back[i]]; + } } } - return true; - }; - }; - this.all = function (token, state, tests, level) { - return function (Item, item) { - for (var i=0,ilen=tests.length;i<ilen;i+=1) { - result = tests[i](Item,item); - if (!result) { - return false; + } else { + this.ignoreVars = this.ignoreVarsLawGeneral; + } + if (this.sortedItems && this.sortedItemsPos > 0 && this.sortedItemsPos < this.sortedItems.length) { + curr = this.sortedItems[this.sortedItemsPos][1]; + last_id = "" + this.sortedItems[(this.sortedItemsPos - 1)][1].id; + master = this.state.registry.registry[last_id].parallel; + prev_locator = false; + if (master == curr.id) { + len = this.sortedItemsPos - 1; + for (pos = len; pos > -1; pos += -1) { + if (this.sortedItems[pos][1].id == Item.id) { + prev_locator = this.sortedItems[pos][1].locator; + break; + } + } + curr_locator = this.sortedItems[this.sortedItemsPos][1].locator; + if (!prev_locator && curr_locator) { + curr.position = CSL.POSITION_IBID_WITH_LOCATOR; + } else if (curr_locator === prev_locator) { + curr.position = CSL.POSITION_IBID; + } else { + curr.position = CSL.POSITION_IBID_WITH_LOCATOR; } } - return true; - }; - }; + } else if (this.state.registry.registry[Item.id]) { + this.state.registry.registry[Item.id].parallel = false; + } else { + this.try_cite = false; + this.force_collapse = false; + return; + } + this.force_collapse = false; + if (this.state.registry.registry[Item.id].parallel) { + this.force_collapse = true; + } + } }; -CSL.Transform = function (state) { - var debug = false, abbreviations, token, fieldname, abbrev_family, opt; - this.abbrevs = {}; - this.abbrevs["default"] = new state.sys.AbbreviationSegments(); - this.getTextSubField = getTextSubField; - function abbreviate(state, Item, altvar, basevalue, myabbrev_family, use_field) { - var value; - if (!myabbrev_family) { - return basevalue; +CSL.Parallel.prototype.StartVariable = function (variable, real_variable) { + if (this.use_parallels && (this.try_cite || this.force_collapse)) { + if (variable === "names") { + this.variable = variable + ":" + this.target; + } else { + this.variable = variable; } - var variable = myabbrev_family; - if (CSL.NUMERIC_VARIABLES.indexOf(myabbrev_family) > -1) { - myabbrev_family = "number"; + if (this.ignoreVars.indexOf(variable) > -1) { + return; } - if (["publisher-place", "event-place", "jurisdiction", "archive-place"].indexOf(myabbrev_family) > -1) { - myabbrev_family = "place"; + if (variable === "container-title" && this.sets.value().length === 0) { + this.master_was_neutral_cite = false; } - if (["publisher", "authority"].indexOf(myabbrev_family) > -1) { - myabbrev_family = "institution-part"; + this.data = {}; + this.data.value = ""; + this.data.blobs = []; + var is_mid = this.isMid(variable); + if (real_variable === "authority" && this.variable === "names:front") { + this.try_cite = true; + this.in_series = false; + } else if (this.target === "front" && is_mid) { + this.target = "mid"; + } else if (this.target === "mid" && !is_mid && this.cite.Item.title && variable !== "names") { + this.target = "back"; + } else if (this.target === "back" && is_mid) { + this.try_cite = true; + this.in_series = false; } - if (["genre", "event", "medium", "title-short"].indexOf(myabbrev_family) > -1) { - myabbrev_family = "title"; + if (variable === "number") { + this.cite.front.push(this.variable); + } else if (CSL.PARALLEL_COLLAPSING_MID_VARSET.indexOf(variable) > -1) { + if (["article-journal","article-magazine"].indexOf(this.cite.Item.type) > -1) { + this.cite.mid.push(this.variable); + } else { + this.cite.front.push(this.variable); + } + } else { + this.cite[this.target].push(this.variable); } - if (["archive"].indexOf(myabbrev_family) > -1) { - myabbrev_family = "collection-title"; + } +}; +CSL.Parallel.prototype.AppendBlobPointer = function (blob) { + if (this.use_parallels) { + if (this.ignoreVars.indexOf(this.variable) > -1) { + return; } - value = ""; - if (state.sys.getAbbreviation) { - var jurisdiction = state.transform.loadAbbreviation(Item.jurisdiction, myabbrev_family, basevalue); - if (state.transform.abbrevs[jurisdiction][myabbrev_family] && basevalue && state.sys.getAbbreviation) { - if (state.transform.abbrevs[jurisdiction][myabbrev_family][basevalue]) { - value = state.transform.abbrevs[jurisdiction][myabbrev_family][basevalue]; + if (this.use_parallels && (this.force_collapse || this.try_cite)) { + if (["article-journal", "article-magazine"].indexOf(this.cite.Item.type) > -1) { + if (["volume","page","page-first","issue"].indexOf(this.variable) > -1) { + return; + } + if ("container-title" === this.variable && this.cite.mid.length > 1) { + return; + } + } + if (this.variable && (this.try_cite || this.force_collapse) && blob && blob.blobs) { + if (!(this.cite.useProceduralHistory && this.target === "back")) { + this.data.blobs.push([blob, blob.blobs.length]); } } } - if (!value && Item.type !== 'legal_case' && altvar && Item[altvar] && use_field) { - value = Item[altvar]; + } +}; +CSL.Parallel.prototype.AppendToVariable = function (str, varname) { + if (this.use_parallels) { + if (this.ignoreVars.indexOf(this.variable) > -1) { + return; } - if (!value) { - value = basevalue; + if (str && varname === "jurisdiction") { + str = str.split(';')[0]; } - if (value && value.slice(0, 10) === "!here>>>") { - if (variable === "jurisdiction" && ["treaty", "patent"].indexOf(variable) > -1) { - value = value.slice(10); + if (this.try_cite || this.force_collapse) { + if (this.target !== "back" || true) { + this.data.value += "::" + str; } else { - value = false; + var prev = this.sets.value()[(this.sets.value().length - 1)]; + if (prev) { + if (prev[this.variable]) { + if (prev[this.variable].value) { + this.data.value += "::" + str; + } + } + } } - } - return value; + } } - function getFieldLocale(Item,field) { - var ret = state.opt["default-locale"][0].slice(0, 2) - var localeRex; - if (state.opt.development_extensions.strict_text_case_locales) { - localeRex = new RegExp("^([a-zA-Z]{2})(?:$|-.*| .*)"); - } else { - localeRex = new RegExp("^([a-zA-Z]{2})(?:$|-.*|.*)"); +}; +CSL.Parallel.prototype.CloseVariable = function () { + if (this.use_parallels) { + if (this.ignoreVars.indexOf(this.variable) > -1) { + return; } - if (Item.language) { - m = ("" + Item.language).match(localeRex); - if (m) { - ret = m[1]; - } else { - ret = "tlh"; + if (this.try_cite || this.force_collapse) { + this.cite[this.variable] = this.data; + if (this.sets.value().length > 0) { + var prev = this.sets.value()[(this.sets.value().length - 1)]; + if (this.target === "front" && this.variable === "issued") { + if (this.data.value && this.master_was_neutral_cite) { + this.target = "mid"; + } + } + if (this.target === "front") { + if ((prev[this.variable] || this.data.value) && (!prev[this.variable] || this.data.value !== prev[this.variable].value)) { + if ("issued" !== this.variable) { + this.in_series = false; + } + } + } else if (this.target === "mid") { + if (CSL.PARALLEL_COLLAPSING_MID_VARSET.indexOf(this.variable) > -1) { + if (prev[this.variable]) { + if (prev[this.variable].value === this.data.value) { + this.cite.front_collapse[this.variable] = true; + } else { + this.cite.front_collapse[this.variable] = false; + } + } else { + this.cite.front_collapse[this.variable] = false; + } + } + } else if (this.target === "back") { + if (prev[this.variable]) { + if (this.data.value !== prev[this.variable].value + && this.sets.value().slice(-1)[0].back_forceme.indexOf(this.variable) === -1) { + this.in_series = false; + } + } + } } } - if (Item.multi && Item.multi && Item.multi.main && Item.multi.main[field]) { - ret = Item.multi.main[field]; + this.variable = false; + } +}; +CSL.Parallel.prototype.CloseCite = function () { + var x, pos, len, has_issued, use_journal_info, volume_pos, container_title_pos, section_pos; + if (this.use_parallels && (this.force_collapse || this.try_cite)) { + use_journal_info = false; + if (!this.cite.front_collapse["container-title"]) { + use_journal_info = true; } - if (!state.opt.development_extensions.strict_text_case_locales - || state.opt.development_extensions.normalize_lang_keys_to_lowercase) { - ret = ret.toLowerCase(); + if (this.cite.front_collapse.volume === false) { + use_journal_info = true; } - return ret; - }; - function getTextSubField(Item, field, locale_type, use_default, stopOrig) { - var m, lst, opt, o, oo, pos, key, ret, len, myret, opts; - var usedOrig = stopOrig; - if (!Item[field]) { - return {name:"", usedOrig:stopOrig}; + if (this.cite.front_collapse["collection-number"] === false) { + use_journal_info = true; } - ret = {name:"", usedOrig:stopOrig,locale:getFieldLocale(Item,field)}; - opts = state.opt[locale_type]; - if (locale_type === 'locale-orig') { - if (stopOrig) { - ret = {name:"", usedOrig:stopOrig}; - } else { - ret = {name:Item[field], usedOrig:false, locale:getFieldLocale(Item,field)}; - } - return ret; - } else if (use_default && ("undefined" === typeof opts || opts.length === 0)) { - return {name:Item[field], usedOrig:true, locale:getFieldLocale(Item,field)}; + if (this.cite.front_collapse.section === false) { + use_journal_info = true; } - for (var i = 0, ilen = opts.length; i < ilen; i += 1) { - opt = opts[i]; - o = opt.split(/[\-_]/)[0]; - if (opt && Item.multi && Item.multi._keys[field] && Item.multi._keys[field][opt]) { - ret.name = Item.multi._keys[field][opt]; - ret.locale = o; - break; - } else if (o && Item.multi && Item.multi._keys[field] && Item.multi._keys[field][o]) { - ret.name = Item.multi._keys[field][o]; - ret.locale = o; - break; + if (use_journal_info) { + this.cite.use_journal_info = true; + section_pos = this.cite.front.indexOf("section"); + if (section_pos > -1) { + this.cite.front = this.cite.front.slice(0,section_pos).concat(this.cite.front.slice(section_pos + 1)); } - } - if (!ret.name && use_default) { - ret = {name:Item[field], usedOrig:true, locale:getFieldLocale(Item,field)}; - } - return ret; - } - function loadAbbreviation(jurisdiction, category, orig) { - var pos, len; - if (!jurisdiction) { - jurisdiction = "default"; - } - if (!orig) { - if (!this.abbrevs[jurisdiction]) { - this.abbrevs[jurisdiction] = new state.sys.AbbreviationSegments(); + volume_pos = this.cite.front.indexOf("volume"); + if (volume_pos > -1) { + this.cite.front = this.cite.front.slice(0,volume_pos).concat(this.cite.front.slice(volume_pos + 1)); + } + container_title_pos = this.cite.front.indexOf("container-title"); + if (container_title_pos > -1) { + this.cite.front = this.cite.front.slice(0,container_title_pos).concat(this.cite.front.slice(container_title_pos + 1)); + } + collection_number_pos = this.cite.front.indexOf("collection-number"); + if (collection_number_pos > -1) { + this.cite.front = this.cite.front.slice(0,collection_number_pos).concat(this.cite.front.slice(collection_number_pos + 1)); } - return jurisdiction; } - if (state.sys.getAbbreviation) { - var tryList = ['default']; - if (jurisdiction !== 'default') { - var workLst = jurisdiction.split(/\s*;\s*/); - for (var i=0, ilen=workLst.length; i < ilen; i += 1) { - tryList.push(workLst.slice(0,i+1).join(';')); + if (!this.in_series && !this.force_collapse) { + this.ComposeSet(true); + } + if (this.sets.value().length === 0) { + has_date = false; + for (pos = 0, len = this.cite.back.length; pos < len; pos += 1) { + x = this.cite.back[pos]; + if (x === "issued" && this.cite["issued"] && this.cite["issued"].value) { + has_date = true; + break; } } - for (var i=tryList.length - 1; i > -1; i += -1) { - if (!this.abbrevs[tryList[i]]) { - this.abbrevs[tryList[i]] = new state.sys.AbbreviationSegments(); + if (!has_date) { + this.cite.back_forceme.push("issued"); + } + } else { + var idx = this.cite.front.indexOf("issued"); + if (idx === -1 || this.master_was_neutral_cite) { + this.cite.back_forceme = this.sets.value().slice(-1)[0].back_forceme; + } + if (idx > -1) { + var prev = this.sets.value()[this.sets.value().length - 1]; + if (!prev["issued"]) { + this.cite.front = this.cite.front.slice(0, idx).concat(this.cite.front.slice(idx + 1)); } - if (!this.abbrevs[tryList[i]][category][orig]) { - state.sys.getAbbreviation(state.opt.styleID, this.abbrevs, tryList[i], category, orig); + } + if (this.master_was_neutral_cite && this.cite.mid.indexOf("names:mid") > -1) { + this.cite.front.push("names:mid"); + } + } + this.sets.value().push(this.cite); + } +}; +CSL.Parallel.prototype.ComposeSet = function (next_output_in_progress) { + var cite, pos, master, len; + if (this.use_parallels && (this.force_collapse || this.try_cite)) { + var lengthCheck = this.sets.value().length; + if (this.sets.value().length === 1) { + if (!this.in_series) { + this.sets.value().pop(); + this.delim_counter += 1; + } + } else { + len = this.sets.value().length; + for (pos = 0; pos < len; pos += 1) { + cite = this.sets.value()[pos]; + if (pos === 0) { + this.delim_counter += 1; + } else { + if (!cite.Item.title && cite.use_journal_info) { + this.delim_pointers.push(false); + } else { + this.delim_pointers.push(this.delim_counter); + } + this.delim_counter += 1; } - if (this.abbrevs[tryList[i]][category][orig]) { - if (i < tryList.length) { - this.abbrevs[jurisdiction][category][orig] = this.abbrevs[tryList[i]][category][orig]; + if (CSL.POSITION_FIRST === cite.position) { + if (pos === 0) { + this.state.registry.registry[cite.itemId].master = true; + this.state.registry.registry[cite.itemId].siblings = []; + this.state.registry.registry[cite.itemId].parallel = false; + } else { + if (cite.prevItemID) { + if (!this.state.registry.registry[cite.prevItemID].parallel) { + this.state.registry.registry[cite.itemId].parallel = cite.prevItemID; + } else { + this.state.registry.registry[cite.itemId].parallel = this.state.registry.registry[cite.prevItemID].parallel; + } + this.state.registry.registry[cite.itemId].siblings = this.state.registry.registry[cite.prevItemID].siblings; + if (!this.state.registry.registry[cite.itemId].siblings) { + this.state.registry.registry[cite.itemId].siblings = []; + CSL.debug("WARNING: adding missing siblings array to registry object"); + } + this.state.registry.registry[cite.itemId].siblings.push(cite.itemId); + } } - break; } } + this.sets.push([]); } - return jurisdiction; + if (lengthCheck < 2) { + this.purgeGroupsIfParallel(false); + } else { + this.purgeGroupsIfParallel(true); + } + this.in_series = true; } - this.loadAbbreviation = loadAbbreviation; - function publisherCheck (tok, Item, primary, myabbrev_family) { - var varname = tok.variables[0]; - if (state.publisherOutput && primary) { - if (["publisher","publisher-place"].indexOf(varname) === -1) { - return false; - } else { - state.publisherOutput[varname + "-token"] = tok; - state.publisherOutput.varlist.push(varname); - var lst = primary.split(/;\s*/); - if (lst.length === state.publisherOutput[varname + "-list"].length) { - state.publisherOutput[varname + "-list"] = lst; - } - for (var i = 0, ilen = lst.length; i < ilen; i += 1) { - lst[i] = abbreviate(state, Item, false, lst[i], myabbrev_family, true); +}; +CSL.Parallel.prototype.PruneOutputQueue = function () { + var len, pos, series, ppos, llen, cite; + if (this.use_parallels) { + len = this.sets.mystack.length; + for (pos = 0; pos < len; pos += 1) { + series = this.sets.mystack[pos]; + if (series.length > 1) { + llen = series.length; + for (ppos = 0; ppos < llen; ppos += 1) { + cite = series[ppos]; + if (ppos === 0) { + this.purgeVariableBlobs(cite, cite.back); + } else if (ppos === (series.length - 1)) { + this.purgeVariableBlobs(cite, cite.front.concat(cite.back_forceme)); + } else { + this.purgeVariableBlobs(cite, cite.front.concat(cite.back)); + } } - state.tmp[varname + "-token"] = tok; - return true; } } - return false; } - function getOutputFunction(variables, myabbrev_family, abbreviation_fallback, alternative_varname, transform_fallback) { - var localesets; - var langPrefs = CSL.LangPrefsMap[variables[0]]; - if (!langPrefs) { - localesets = false; - } else { - localesets = state.opt['cite-lang-prefs'][langPrefs]; +}; +CSL.Parallel.prototype.purgeVariableBlobs = function (cite, varnames) { + var len, pos, varname, b, llen, ppos, out; + if (this.use_parallels) { + out = this.state.output.current.value(); + if ("undefined" === typeof out.length) { + out = out.blobs; } - return function (state, Item, item, usedOrig) { - var primary, primary_locale, secondary, secondary_locale, tertiary, tertiary_locale, primary_tok, group_tok, key; - if (!variables[0] || (!Item[variables[0]] && !Item[alternative_varname])) { - return null; + for (pos = 0, len = this.delim_pointers.length; pos < len; pos += 1) { + ppos = this.delim_pointers[pos]; + if (ppos !== false) { + out[ppos].parallel_delimiter = ", "; } - var slot = {primary:false, secondary:false, tertiary:false}; - if (state.tmp.area.slice(-5) === "_sort") { - slot.primary = 'locale-sort'; - } else { - if (localesets) { - var slotnames = ["primary", "secondary", "tertiary"]; - for (var i = 0, ilen = slotnames.length; i < ilen; i += 1) { - if (localesets.length - 1 < i) { - break; - } - if (localesets[i]) { - slot[slotnames[i]] = 'locale-' + localesets[i]; - } + } + len = varnames.length - 1; + for (pos = len; pos > -1; pos += -1) { + varname = varnames[pos]; + if (cite[varname]) { + llen = cite[varname].blobs.length - 1; + for (ppos = llen; ppos > -1; ppos += -1) { + b = cite[varname].blobs[ppos]; + b[0].blobs = b[0].blobs.slice(0, b[1]).concat(b[0].blobs.slice((b[1] + 1))); + this.state.tmp.has_purged_parallel = true; + if (b[0] && b[0].strings && "string" == typeof b[0].strings.oops + && b[0].parent && b[0].parent) { + b[0].parent.parent.strings.delimiter = b[0].strings.oops; } - } else { - slot.primary = 'locale-orig'; } } - if ((state.tmp.area !== "bibliography" - && !(state.tmp.area === "citation" - && state.opt.xclass === "note" - && item && !item.position))) { - slot.secondary = false; - slot.tertiary = false; - } - if (state.tmp["publisher-list"]) { - if (variables[0] === "publisher") { - state.tmp["publisher-token"] = this; - } else if (variables[0] === "publisher-place") { - state.tmp["publisher-place-token"] = this; - } - return null; - } - var res = getTextSubField(Item, variables[0], slot.primary, true); - primary = res.name; - primary_locale = res.locale; - var primaryUsedOrig = res.usedOrig; - if (publisherCheck(this, Item, primary, myabbrev_family)) { - return null; + } + } +}; +CSL.Parallel.prototype.purgeGroupsIfParallel = function (original_condition) { + for (var i = this.parallel_conditional_blobs_list.length - 1; i > -1; i += -1) { + var obj = this.parallel_conditional_blobs_list[i]; + var purgeme = true; + for (var j = 0, jlen = obj.conditions.length; j < jlen; j += 1) { + if (!(!obj.conditions[j] === !!original_condition + || ("master" === obj.conditions[j] + && !this.state.registry.registry[obj.id].master) + || ("servant" === obj.conditions[j] + && !this.state.registry.registry[obj.id].parallel))) { + var purgeme = false; + break; } - secondary = false; - tertiary = false; - if (slot.secondary) { - res = getTextSubField(Item, variables[0], slot.secondary, false, res.usedOrig); - secondary = res.name; - secondary_locale = res.locale; + } + if (purgeme) { + var buffer = []; + while (obj.blobs.length > obj.pos) { + buffer.push(obj.blobs.pop()); } - if (slot.tertiary) { - res = getTextSubField(Item, variables[0], slot.tertiary, false, res.usedOrig); - tertiary = res.name; - tertiary_locale = res.locale; + if (buffer.length) { + buffer.pop(); } - if (myabbrev_family) { - primary = abbreviate(state, Item, alternative_varname, primary, myabbrev_family, true); - if (primary) { - primary = quashCheck(primary); - } - secondary = abbreviate(state, Item, false, secondary, myabbrev_family, true); - tertiary = abbreviate(state, Item, false, tertiary, myabbrev_family, true); + while (buffer.length) { + obj.blobs.push(buffer.pop()); } - if ("demote" === this["leading-noise-words"]) { - primary = CSL.demoteNoiseWords(state, primary); - secondary = CSL.demoteNoiseWords(state, secondary); - tertiary = CSL.demoteNoiseWords(state, tertiary); + } + this.parallel_conditional_blobs_list.pop(); + } +} +CSL.Util = { + setReverseConditions: function (lst) { + reverses = []; + for (var i=0,ilen=lst.length;i<ilen;i+=1) { + if (lst[i].slice(0,4) === "not:") { + lst[i] = lst[i].slice(4); + reverses.push(true); + } else { + reverses.push(false); } - var template_tok = CSL.Util.cloneToken(this); - var primary_tok = CSL.Util.cloneToken(this); - var primaryPrefix; - if (slot.primary === "locale-translit") { - primaryPrefix = state.opt.citeAffixes[langPrefs][slot.primary].prefix; - } - if (primaryPrefix === "<i>" && variables[0] === 'title' && !primaryUsedOrig) { - var hasItalic = false; - for (var i = 0, ilen = primary_tok.decorations.length; i < ilen; i += 1) { - if (primary_tok.decorations[i][0] === "@font-style" - && primary_tok.decorations[i][1] === "italic") { - hasItalic = true; - } - } - if (!hasItalic) { - primary_tok.decorations.push(["@font-style", "italic"]) + } + return reverses; + } +}; +CSL.Util.Match = function () { + this.any = function (token, state, tests, level) { + return function (Item, item) { + for (var i=0, ilen=tests.length; i < ilen; i += 1) { + result = tests[i](Item, item); + if (result) { + return true; } } - if (primary_locale !== "en" && primary_tok.strings["text-case"] === "title") { - primary_tok.strings["text-case"] = "passthrough"; - } - if (secondary || tertiary) { - state.output.openLevel("empty"); - primary_tok.strings.suffix = ""; - state.output.append(primary, primary_tok); - if (secondary) { - secondary_tok = CSL.Util.cloneToken(template_tok); - secondary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.secondary].prefix; - secondary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.secondary].suffix; - if (!secondary_tok.strings.prefix) { - secondary_tok.strings.prefix = " "; - } - for (var i = secondary_tok.decorations.length - 1; i > -1; i += -1) { - if (['@quotes/true','@font-style/italic','@font-style/oblique','@font-weight/bold'].indexOf(secondary_tok.decorations[i].join('/')) > -1) { - secondary_tok.decorations = secondary_tok.decorations.slice(0, i).concat(secondary_tok.decorations.slice(i + 1)) - } - } - if (secondary_locale !== "en" && secondary_tok.strings["text-case"] === "title") { - secondary_tok.strings["text-case"] = "passthrough"; - } - state.output.append(secondary, secondary_tok); - var blob_obj = state.output.current.value(); - var blobs_pos = state.output.current.value().blobs.length - 1; - if (state.parallel.use_parallels) { - state.parallel.cite.front.push(variables[0] + ":secondary"); - state.parallel.cite[variables[0] + ":secondary"] = {blobs:[[blob_obj, blobs_pos]]}; - } - } - if (tertiary) { - tertiary_tok = CSL.Util.cloneToken(template_tok); - tertiary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.tertiary].prefix; - tertiary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.tertiary].suffix; - if (!tertiary_tok.strings.prefix) { - tertiary_tok.strings.prefix = " "; - } - for (var i = tertiary_tok.decorations.length - 1; i > -1; i += -1) { - if (['@quotes/true','@font-style/italic','@font-style/oblique','@font-weight/bold'].indexOf(tertiary_tok.decorations[i].join('/')) > -1) { - tertiary_tok.decorations = tertiary_tok.decorations.slice(0, i).concat(tertiary_tok.decorations.slice(i + 1)) - } - } - if (tertiary_locale !== "en" && tertiary_tok.strings["text-case"] === "title") { - tertiary_tok.strings["text-case"] = "passthrough"; - } - state.output.append(tertiary, tertiary_tok); - var blob_obj = state.output.current.value(); - var blobs_pos = state.output.current.value().blobs.length - 1; - if (state.parallel.use_parallels) { - state.parallel.cite.front.push(variables[0] + ":tertiary"); - state.parallel.cite[variables[0] + ":tertiary"] = {blobs:[[blob_obj, blobs_pos]]}; - } + return false; + }; + }; + this[undefined] = this.any; + this.none = function (token, state, tests, level) { + if (CSL.CONDITION_LEVEL_TOP !== level) { + return this.any(token, state, tests, level); + } + return function (Item, item) { + for (var i=0,ilen=tests.length;i<ilen;i+=1) { + result = tests[i](Item,item); + if (result) { + return false; } - state.output.closeLevel(); - } else { - state.output.append(primary, primary_tok); } - return null; + return true; }; - } - this.getOutputFunction = getOutputFunction; - function quashCheck(value) { - var m = value.match(/^!([-,_a-z]+)>>>/); - if (m) { - var fields = m[1].split(","); - value = value.slice(m[0].length); - for (var i = 0, ilen = fields.length; i < ilen; i += 1) { - if (state.tmp.done_vars.indexOf(fields[i]) === -1) { - state.tmp.done_vars.push(fields[i]); + }; + this.all = function (token, state, tests, level) { + return function (Item, item) { + for (var i=0,ilen=tests.length;i<ilen;i+=1) { + result = tests[i](Item,item); + if (!result) { + return false; } } - } - return value; - } - this.quashCheck = quashCheck; -}; -CSL.Parallel = function (state) { - this.state = state; - this.sets = new CSL.Stack([]); - this.try_cite = true; - this.use_parallels = false; - this.midVars = ["section", "volume", "container-title", "collection-number", "issue", "page-first", "page", "number"]; - this.ignoreVarsLawGeneral = ["first-reference-note-number", "locator", "label","page-first","page","genre"]; - this.ignoreVarsOrders = ["first-reference-note-number"]; - this.ignoreVarsOther = ["first-reference-note-number", "locator", "label","section","page-first","page"]; -}; -CSL.Parallel.prototype.isMid = function (variable) { - return (this.midVars.indexOf(variable) > -1); + return true; + }; + }; }; -CSL.Parallel.prototype.StartCitation = function (sortedItems, out) { - this.parallel_conditional_blobs_list = []; - if (this.use_parallels) { - this.sortedItems = sortedItems; - this.sortedItemsPos = -1; - this.sets.clear(); - this.sets.push([]); - this.in_series = true; - this.delim_counter = 0; - this.delim_pointers = []; - if (out) { - this.out = out; - } else { - this.out = this.state.output.queue; +CSL.Transform = function (state) { + var debug = false, abbreviations, token, fieldname, abbrev_family, opt; + this.abbrevs = {}; + this.abbrevs["default"] = new state.sys.AbbreviationSegments(); + this.getTextSubField = getTextSubField; + function abbreviate(state, Item, altvar, basevalue, myabbrev_family, use_field) { + var value; + if (!myabbrev_family) { + return basevalue; } - this.master_was_neutral_cite = true; - } -}; -CSL.Parallel.prototype.StartCite = function (Item, item, prevItemID) { - var position, len, pos, x, curr, master, last_id, prev_locator, curr_locator, is_master, parallel; - if (["treaty"].indexOf(Item.type) > -1) { - this.ignoreVars = this.ignoreVarsOrders; - } else if (["article-journal","article-magazine"].indexOf(Item.type) > -1) { - this.ignoreVars = this.ignoreVarsOther; - } else { - this.ignoreVars = this.ignoreVarsLawGeneral; - } - if (this.use_parallels) { - if (this.sets.value().length && this.sets.value()[0].itemId == Item.id) { - this.ComposeSet(); + var variable = myabbrev_family; + if (CSL.NUMERIC_VARIABLES.indexOf(myabbrev_family) > -1) { + myabbrev_family = "number"; } - this.sortedItemsPos += 1; - if (item) { - position = item.position; + if (["publisher-place", "event-place", "jurisdiction", "archive-place"].indexOf(myabbrev_family) > -1) { + myabbrev_family = "place"; } - this.try_cite = true; - var has_required_var = false; - for (var i = 0, ilen = CSL.PARALLEL_MATCH_VARS.length; i < ilen; i += 1) { - if (Item[CSL.PARALLEL_MATCH_VARS[i]]) { - has_required_var = true; - break; - } + if (["publisher", "authority"].indexOf(myabbrev_family) > -1) { + myabbrev_family = "institution-part"; } - var basics_ok = true; - var last_cite = this.sets.value().slice(-1)[0]; - if (last_cite && last_cite.Item) { - if (last_cite.Item.title !== Item.title) { - basics_ok = false; - } else if (last_cite.Item.type !== Item.type) { - basics_ok = false; - } else if (["article-journal","article-magazine"].indexOf(Item.type) > -1) { - if (!this.state.opt.development_extensions.handle_parallel_articles - || last_cite.Item["container-title"] !== Item["container-title"]) { - basics_ok = false; - } - } + if (["genre", "event", "medium", "title-short"].indexOf(myabbrev_family) > -1) { + myabbrev_family = "title"; } - if (!basics_ok || !has_required_var || CSL.PARALLEL_TYPES.indexOf(Item.type) === -1) { - this.try_cite = true; - if (this.in_series) { - this.in_series = false; - } + if (["archive"].indexOf(myabbrev_family) > -1) { + myabbrev_family = "collection-title"; } - this.cite = {}; - this.cite.front = []; - this.cite.mid = []; - this.cite.back = []; - this.cite.front_collapse = {}; - this.cite.back_forceme = []; - this.cite.position = position; - this.cite.Item = Item; - this.cite.itemId = "" + Item.id; - this.cite.prevItemID = "" + prevItemID; - this.target = "front"; - if (this.sortedItems && this.sortedItemsPos > 0 && this.sortedItemsPos < this.sortedItems.length) { - curr = this.sortedItems[this.sortedItemsPos][1]; - last_id = "" + this.sortedItems[(this.sortedItemsPos - 1)][1].id; - master = this.state.registry.registry[last_id].parallel; - prev_locator = false; - if (master == curr.id) { - len = this.sortedItemsPos - 1; - for (pos = len; pos > -1; pos += -1) { - if (this.sortedItems[pos][1].id == Item.id) { - prev_locator = this.sortedItems[pos][1].locator; - break; - } - } - curr_locator = this.sortedItems[this.sortedItemsPos][1].locator; - if (!prev_locator && curr_locator) { - curr.position = CSL.POSITION_IBID_WITH_LOCATOR; - } else if (curr_locator === prev_locator) { - curr.position = CSL.POSITION_IBID; - } else { - curr.position = CSL.POSITION_IBID_WITH_LOCATOR; + value = ""; + if (state.sys.getAbbreviation) { + var jurisdiction = state.transform.loadAbbreviation(Item.jurisdiction, myabbrev_family, basevalue, Item.type); + if (state.transform.abbrevs[jurisdiction][myabbrev_family] && basevalue && state.sys.getAbbreviation) { + if (state.transform.abbrevs[jurisdiction][myabbrev_family][basevalue]) { + value = state.transform.abbrevs[jurisdiction][myabbrev_family][basevalue]; } } - } else if (this.state.registry.registry[Item.id]) { - this.state.registry.registry[Item.id].parallel = false; - } else { - this.try_cite = false; - this.force_collapse = false; - return; } - this.force_collapse = false; - if (this.state.registry.registry[Item.id].parallel) { - this.force_collapse = true; + if (!value && Item.type !== 'legal_case' && altvar && Item[altvar] && use_field) { + value = Item[altvar]; } + if (!value) { + value = basevalue; + } + if (value && value.slice(0, 10) === "!here>>>") { + if (variable === "jurisdiction" && ["treaty", "patent"].indexOf(variable) > -1) { + value = value.slice(10); + } else { + value = false; + } + } + return value; } -}; -CSL.Parallel.prototype.StartVariable = function (variable, real_variable) { - if (this.use_parallels && (this.try_cite || this.force_collapse)) { - if (variable === "names") { - this.variable = variable + ":" + this.target; + function getFieldLocale(Item,field) { + var ret = state.opt["default-locale"][0].slice(0, 2) + var localeRex; + if (state.opt.development_extensions.strict_text_case_locales) { + localeRex = new RegExp("^([a-zA-Z]{2})(?:$|-.*| .*)"); } else { - this.variable = variable; + localeRex = new RegExp("^([a-zA-Z]{2})(?:$|-.*|.*)"); } - if (this.ignoreVars.indexOf(variable) > -1) { - return; + if (Item.language) { + m = ("" + Item.language).match(localeRex); + if (m) { + ret = m[1]; + } else { + ret = "tlh"; + } } - if (variable === "container-title" && this.sets.value().length === 0) { - this.master_was_neutral_cite = false; + if (Item.multi && Item.multi && Item.multi.main && Item.multi.main[field]) { + ret = Item.multi.main[field]; } - this.data = {}; - this.data.value = ""; - this.data.blobs = []; - var is_mid = this.isMid(variable); - if (real_variable === "authority" && this.variable === "names:front") { - this.try_cite = true; - this.in_series = false; - } else if (this.target === "front" && is_mid) { - this.target = "mid"; - } else if (this.target === "mid" && !is_mid && this.cite.Item.title && variable !== "names") { - this.target = "back"; - } else if (this.target === "back" && is_mid) { - this.try_cite = true; - this.in_series = false; + if (!state.opt.development_extensions.strict_text_case_locales + || state.opt.development_extensions.normalize_lang_keys_to_lowercase) { + ret = ret.toLowerCase(); } - if (variable === "number") { - this.cite.front.push(this.variable); - } else if (CSL.PARALLEL_COLLAPSING_MID_VARSET.indexOf(variable) > -1) { - if (["article-journal","article-magazine"].indexOf(this.cite.Item.type) > -1) { - this.cite.mid.push(this.variable); - } else { - this.cite.front.push(this.variable); - } - } else { - this.cite[this.target].push(this.variable); + return ret; + }; + function getTextSubField(Item, field, locale_type, use_default, stopOrig) { + var m, lst, opt, o, oo, pos, key, ret, len, myret, opts; + var usedOrig = stopOrig; + if (!Item[field]) { + return {name:"", usedOrig:stopOrig}; } - } -}; -CSL.Parallel.prototype.AppendBlobPointer = function (blob) { - if (this.ignoreVars.indexOf(this.variable) > -1) { - return; - } - if (this.use_parallels && (this.force_collapse || this.try_cite)) { - if (["article-journal", "article-magazine"].indexOf(this.cite.Item.type) > -1) { - if (["volume","page","page-first","issue"].indexOf(this.variable) > -1) { - return; + ret = {name:"", usedOrig:stopOrig,locale:getFieldLocale(Item,field)}; + opts = state.opt[locale_type]; + if (locale_type === 'locale-orig') { + if (stopOrig) { + ret = {name:"", usedOrig:stopOrig}; + } else { + ret = {name:Item[field], usedOrig:false, locale:getFieldLocale(Item,field)}; } - if ("container-title" === this.variable && this.cite.mid.length > 1) { - return; + return ret; + } else if (use_default && ("undefined" === typeof opts || opts.length === 0)) { + return {name:Item[field], usedOrig:true, locale:getFieldLocale(Item,field)}; + } + for (var i = 0, ilen = opts.length; i < ilen; i += 1) { + opt = opts[i]; + o = opt.split(/[\-_]/)[0]; + if (opt && Item.multi && Item.multi._keys[field] && Item.multi._keys[field][opt]) { + ret.name = Item.multi._keys[field][opt]; + ret.locale = o; + break; + } else if (o && Item.multi && Item.multi._keys[field] && Item.multi._keys[field][o]) { + ret.name = Item.multi._keys[field][o]; + ret.locale = o; + break; } } - if (this.variable && (this.try_cite || this.force_collapse) && blob && blob.blobs) { - this.data.blobs.push([blob, blob.blobs.length]); + if (!ret.name && use_default) { + ret = {name:Item[field], usedOrig:true, locale:getFieldLocale(Item,field)}; } + return ret; } -}; -CSL.Parallel.prototype.AppendToVariable = function (str, varname) { - if (this.ignoreVars.indexOf(this.variable) > -1) { - return; - } - if (this.use_parallels && (this.try_cite || this.force_collapse)) { - if (this.target !== "back" || true) { - this.data.value += "::" + str; - } else { - var prev = this.sets.value()[(this.sets.value().length - 1)]; - if (prev) { - if (prev[this.variable]) { - if (prev[this.variable].value) { - this.data.value += "::" + str; - } - } + function loadAbbreviation(jurisdiction, category, orig, itemType) { + var pos, len; + if (!jurisdiction) { + jurisdiction = "default"; + } + if (!orig) { + if (!this.abbrevs[jurisdiction]) { + this.abbrevs[jurisdiction] = new state.sys.AbbreviationSegments(); } + return jurisdiction; } - } -}; -CSL.Parallel.prototype.CloseVariable = function () { - if (this.ignoreVars.indexOf(this.variable) > -1) { - return; - } - if (this.use_parallels && (this.try_cite || this.force_collapse)) { - this.cite[this.variable] = this.data; - if (this.sets.value().length > 0) { - var prev = this.sets.value()[(this.sets.value().length - 1)]; - if (this.target === "front" && this.variable === "issued") { - if (this.data.value && this.master_was_neutral_cite) { - this.target = "mid"; + if (state.sys.getAbbreviation) { + var tryList = ['default']; + if (jurisdiction !== 'default') { + var workLst = jurisdiction.split(/\s*;\s*/); + for (var i=0, ilen=workLst.length; i < ilen; i += 1) { + tryList.push(workLst.slice(0,i+1).join(';')); } } - if (this.target === "front") { - if ((prev[this.variable] || this.data.value) && (!prev[this.variable] || this.data.value !== prev[this.variable].value)) { - if ("issued" !== this.variable) { - this.in_series = false; - } + for (var i=tryList.length - 1; i > -1; i += -1) { + if (!this.abbrevs[tryList[i]]) { + this.abbrevs[tryList[i]] = new state.sys.AbbreviationSegments(); } - } else if (this.target === "mid") { - if (CSL.PARALLEL_COLLAPSING_MID_VARSET.indexOf(this.variable) > -1) { - if (prev[this.variable]) { - if (prev[this.variable].value === this.data.value) { - this.cite.front_collapse[this.variable] = true; - } else { - this.cite.front_collapse[this.variable] = false; - } - } else { - this.cite.front_collapse[this.variable] = false; - } + if (!this.abbrevs[tryList[i]][category][orig]) { + state.sys.getAbbreviation(state.opt.styleID, this.abbrevs, tryList[i], category, orig, itemType); } - } else if (this.target === "back") { - if (prev[this.variable]) { - if (this.data.value !== prev[this.variable].value - && this.sets.value().slice(-1)[0].back_forceme.indexOf(this.variable) === -1) { - this.in_series = false; + if (this.abbrevs[tryList[i]][category][orig]) { + if (i < tryList.length) { + this.abbrevs[jurisdiction][category][orig] = this.abbrevs[tryList[i]][category][orig]; } + break; } } } + return jurisdiction; } - this.variable = false; -}; -CSL.Parallel.prototype.CloseCite = function () { - var x, pos, len, has_issued, use_journal_info, volume_pos, container_title_pos, section_pos; - if (this.use_parallels && (this.force_collapse || this.try_cite)) { - use_journal_info = false; - if (!this.cite.front_collapse["container-title"]) { - use_journal_info = true; - } - if (this.cite.front_collapse.volume === false) { - use_journal_info = true; - } - if (this.cite.front_collapse["collection-number"] === false) { - use_journal_info = true; + this.loadAbbreviation = loadAbbreviation; + function publisherCheck (tok, Item, primary, myabbrev_family) { + var varname = tok.variables[0]; + if (state.publisherOutput && primary) { + if (["publisher","publisher-place"].indexOf(varname) === -1) { + return false; + } else { + state.publisherOutput[varname + "-token"] = tok; + state.publisherOutput.varlist.push(varname); + var lst = primary.split(/;\s*/); + if (lst.length === state.publisherOutput[varname + "-list"].length) { + state.publisherOutput[varname + "-list"] = lst; + } + for (var i = 0, ilen = lst.length; i < ilen; i += 1) { + lst[i] = abbreviate(state, Item, false, lst[i], myabbrev_family, true); + } + state.tmp[varname + "-token"] = tok; + return true; + } } - if (this.cite.front_collapse.section === false) { - use_journal_info = true; + return false; + } + function getOutputFunction(variables, myabbrev_family, abbreviation_fallback, alternative_varname, transform_fallback) { + var localesets; + var langPrefs = CSL.LangPrefsMap[variables[0]]; + if (!langPrefs) { + localesets = false; + } else { + localesets = state.opt['cite-lang-prefs'][langPrefs]; } - if (use_journal_info) { - this.cite.use_journal_info = true; - section_pos = this.cite.front.indexOf("section"); - if (section_pos > -1) { - this.cite.front = this.cite.front.slice(0,section_pos).concat(this.cite.front.slice(section_pos + 1)); - } - volume_pos = this.cite.front.indexOf("volume"); - if (volume_pos > -1) { - this.cite.front = this.cite.front.slice(0,volume_pos).concat(this.cite.front.slice(volume_pos + 1)); + return function (state, Item, item, usedOrig) { + var primary, primary_locale, secondary, secondary_locale, tertiary, tertiary_locale, primary_tok, group_tok, key; + if (!variables[0] || (!Item[variables[0]] && !Item[alternative_varname])) { + return null; } - container_title_pos = this.cite.front.indexOf("container-title"); - if (container_title_pos > -1) { - this.cite.front = this.cite.front.slice(0,container_title_pos).concat(this.cite.front.slice(container_title_pos + 1)); + var slot = {primary:false, secondary:false, tertiary:false}; + if (state.tmp.area.slice(-5) === "_sort") { + slot.primary = 'locale-sort'; + } else { + if (localesets) { + var slotnames = ["primary", "secondary", "tertiary"]; + for (var i = 0, ilen = slotnames.length; i < ilen; i += 1) { + if (localesets.length - 1 < i) { + break; + } + if (localesets[i]) { + slot[slotnames[i]] = 'locale-' + localesets[i]; + } + } + } else { + slot.primary = 'locale-orig'; + } } - collection_number_pos = this.cite.front.indexOf("collection-number"); - if (collection_number_pos > -1) { - this.cite.front = this.cite.front.slice(0,collection_number_pos).concat(this.cite.front.slice(collection_number_pos + 1)); + if ((state.tmp.area !== "bibliography" + && !(state.tmp.area === "citation" + && state.opt.xclass === "note" + && item && !item.position))) { + slot.secondary = false; + slot.tertiary = false; } - } - if (!this.in_series && !this.force_collapse) { - this.ComposeSet(true); - } - if (this.sets.value().length === 0) { - has_date = false; - for (pos = 0, len = this.cite.back.length; pos < len; pos += 1) { - x = this.cite.back[pos]; - if (x === "issued" && this.cite["issued"] && this.cite["issued"].value) { - has_date = true; - break; + if (state.tmp["publisher-list"]) { + if (variables[0] === "publisher") { + state.tmp["publisher-token"] = this; + } else if (variables[0] === "publisher-place") { + state.tmp["publisher-place-token"] = this; } + return null; } - if (!has_date) { - this.cite.back_forceme.push("issued"); + var res = getTextSubField(Item, variables[0], slot.primary, true); + primary = res.name; + primary_locale = res.locale; + var primaryUsedOrig = res.usedOrig; + if (publisherCheck(this, Item, primary, myabbrev_family)) { + return null; } - } else { - var idx = this.cite.front.indexOf("issued"); - if (idx === -1 || this.master_was_neutral_cite) { - this.cite.back_forceme = this.sets.value().slice(-1)[0].back_forceme; + secondary = false; + tertiary = false; + if (slot.secondary) { + res = getTextSubField(Item, variables[0], slot.secondary, false, res.usedOrig); + secondary = res.name; + secondary_locale = res.locale; } - if (idx > -1) { - var prev = this.sets.value()[this.sets.value().length - 1]; - if (!prev["issued"]) { - this.cite.front = this.cite.front.slice(0, idx).concat(this.cite.front.slice(idx + 1)); + if (slot.tertiary) { + res = getTextSubField(Item, variables[0], slot.tertiary, false, res.usedOrig); + tertiary = res.name; + tertiary_locale = res.locale; + } + if (myabbrev_family) { + primary = abbreviate(state, Item, alternative_varname, primary, myabbrev_family, true); + if (primary) { + primary = quashCheck(primary); } + secondary = abbreviate(state, Item, false, secondary, myabbrev_family, true); + tertiary = abbreviate(state, Item, false, tertiary, myabbrev_family, true); } - if (this.master_was_neutral_cite && this.cite.mid.indexOf("names:mid") > -1) { - this.cite.front.push("names:mid"); + if ("demote" === this["leading-noise-words"]) { + primary = CSL.demoteNoiseWords(state, primary); + secondary = CSL.demoteNoiseWords(state, secondary); + tertiary = CSL.demoteNoiseWords(state, tertiary); } - } - this.sets.value().push(this.cite); - } -}; -CSL.Parallel.prototype.ComposeSet = function (next_output_in_progress) { - var cite, pos, master, len; - if (this.use_parallels && (this.force_collapse || this.try_cite)) { - var lengthCheck = this.sets.value().length; - if (this.sets.value().length === 1) { - if (!this.in_series) { - this.sets.value().pop(); - this.delim_counter += 1; + var template_tok = CSL.Util.cloneToken(this); + var primary_tok = CSL.Util.cloneToken(this); + var primaryPrefix; + if (slot.primary === "locale-translit") { + primaryPrefix = state.opt.citeAffixes[langPrefs][slot.primary].prefix; + } + if (primaryPrefix === "<i>" && variables[0] === 'title' && !primaryUsedOrig) { + var hasItalic = false; + for (var i = 0, ilen = primary_tok.decorations.length; i < ilen; i += 1) { + if (primary_tok.decorations[i][0] === "@font-style" + && primary_tok.decorations[i][1] === "italic") { + hasItalic = true; + } + } + if (!hasItalic) { + primary_tok.decorations.push(["@font-style", "italic"]) + } } - } else { - len = this.sets.value().length; - for (pos = 0; pos < len; pos += 1) { - cite = this.sets.value()[pos]; - if (pos === 0) { - this.delim_counter += 1; - } else { - if (!cite.Item.title && cite.use_journal_info) { - this.delim_pointers.push(false); - } else { - this.delim_pointers.push(this.delim_counter); + if (primary_locale !== "en" && primary_tok.strings["text-case"] === "title") { + primary_tok.strings["text-case"] = "passthrough"; + } + if (secondary || tertiary) { + state.output.openLevel("empty"); + primary_tok.strings.suffix = ""; + state.output.append(primary, primary_tok); + if (secondary) { + secondary_tok = CSL.Util.cloneToken(template_tok); + secondary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.secondary].prefix; + secondary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.secondary].suffix; + if (!secondary_tok.strings.prefix) { + secondary_tok.strings.prefix = " "; } - this.delim_counter += 1; - } - if (CSL.POSITION_FIRST === cite.position) { - if (pos === 0) { - this.state.registry.registry[cite.itemId].master = true; - this.state.registry.registry[cite.itemId].siblings = []; - this.state.registry.registry[cite.itemId].parallel = false; - } else { - if (cite.prevItemID) { - if (!this.state.registry.registry[cite.prevItemID].parallel) { - this.state.registry.registry[cite.itemId].parallel = cite.prevItemID; - } else { - this.state.registry.registry[cite.itemId].parallel = this.state.registry.registry[cite.prevItemID].parallel; - } - this.state.registry.registry[cite.itemId].siblings = this.state.registry.registry[cite.prevItemID].siblings; - if (!this.state.registry.registry[cite.itemId].siblings) { - this.state.registry.registry[cite.itemId].siblings = []; - CSL.debug("WARNING: adding missing siblings array to registry object"); - } - this.state.registry.registry[cite.itemId].siblings.push(cite.itemId); + for (var i = secondary_tok.decorations.length - 1; i > -1; i += -1) { + if (['@quotes/true','@font-style/italic','@font-style/oblique','@font-weight/bold'].indexOf(secondary_tok.decorations[i].join('/')) > -1) { + secondary_tok.decorations = secondary_tok.decorations.slice(0, i).concat(secondary_tok.decorations.slice(i + 1)) } } + if (secondary_locale !== "en" && secondary_tok.strings["text-case"] === "title") { + secondary_tok.strings["text-case"] = "passthrough"; + } + state.output.append(secondary, secondary_tok); + var blob_obj = state.output.current.value(); + var blobs_pos = state.output.current.value().blobs.length - 1; + if (state.parallel.use_parallels) { + state.parallel.cite.front.push(variables[0] + ":secondary"); + state.parallel.cite[variables[0] + ":secondary"] = {blobs:[[blob_obj, blobs_pos]]}; + } } - } - this.sets.push([]); - } - if (lengthCheck < 2) { - this.purgeGroupsIfParallel(false); - } else { - this.purgeGroupsIfParallel(true); - } - this.in_series = true; - } -}; -CSL.Parallel.prototype.PruneOutputQueue = function () { - var len, pos, series, ppos, llen, cite; - if (this.use_parallels) { - len = this.sets.mystack.length; - for (pos = 0; pos < len; pos += 1) { - series = this.sets.mystack[pos]; - if (series.length > 1) { - llen = series.length; - for (ppos = 0; ppos < llen; ppos += 1) { - cite = series[ppos]; - if (ppos === 0) { - this.purgeVariableBlobs(cite, cite.back); - } else if (ppos === (series.length - 1)) { - this.purgeVariableBlobs(cite, cite.front.concat(cite.back_forceme)); - } else { - this.purgeVariableBlobs(cite, cite.front.concat(cite.back)); + if (tertiary) { + tertiary_tok = CSL.Util.cloneToken(template_tok); + tertiary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.tertiary].prefix; + tertiary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.tertiary].suffix; + if (!tertiary_tok.strings.prefix) { + tertiary_tok.strings.prefix = " "; + } + for (var i = tertiary_tok.decorations.length - 1; i > -1; i += -1) { + if (['@quotes/true','@font-style/italic','@font-style/oblique','@font-weight/bold'].indexOf(tertiary_tok.decorations[i].join('/')) > -1) { + tertiary_tok.decorations = tertiary_tok.decorations.slice(0, i).concat(tertiary_tok.decorations.slice(i + 1)) + } + } + if (tertiary_locale !== "en" && tertiary_tok.strings["text-case"] === "title") { + tertiary_tok.strings["text-case"] = "passthrough"; + } + state.output.append(tertiary, tertiary_tok); + var blob_obj = state.output.current.value(); + var blobs_pos = state.output.current.value().blobs.length - 1; + if (state.parallel.use_parallels) { + state.parallel.cite.front.push(variables[0] + ":tertiary"); + state.parallel.cite[variables[0] + ":tertiary"] = {blobs:[[blob_obj, blobs_pos]]}; } } + state.output.closeLevel(); + } else { + state.output.append(primary, primary_tok); } - } + return null; + }; } -}; -CSL.Parallel.prototype.purgeVariableBlobs = function (cite, varnames) { - var len, pos, varname, b, llen, ppos, out; - if (this.use_parallels) { - out = this.state.output.current.value(); - if ("undefined" === typeof out.length) { - out = out.blobs; - } - for (pos = 0, len = this.delim_pointers.length; pos < len; pos += 1) { - ppos = this.delim_pointers[pos]; - if (ppos !== false) { - out[ppos].parallel_delimiter = ", "; - } - } - len = varnames.length - 1; - for (pos = len; pos > -1; pos += -1) { - varname = varnames[pos]; - if (cite[varname]) { - llen = cite[varname].blobs.length - 1; - for (ppos = llen; ppos > -1; ppos += -1) { - b = cite[varname].blobs[ppos]; - b[0].blobs = b[0].blobs.slice(0, b[1]).concat(b[0].blobs.slice((b[1] + 1))); - this.state.tmp.has_purged_parallel = true; - if (b[0] && b[0].strings && "string" == typeof b[0].strings.oops - && b[0].parent && b[0].parent) { - b[0].parent.parent.strings.delimiter = b[0].strings.oops; - } + this.getOutputFunction = getOutputFunction; + function quashCheck(value) { + var m = value.match(/^!([-,_a-z]+)>>>/); + if (m) { + var fields = m[1].split(","); + value = value.slice(m[0].length); + for (var i = 0, ilen = fields.length; i < ilen; i += 1) { + if (state.tmp.done_vars.indexOf(fields[i]) === -1) { + state.tmp.done_vars.push(fields[i]); } } } + return value; } + this.quashCheck = quashCheck; }; -CSL.Parallel.prototype.purgeGroupsIfParallel = function (original_condition) { - for (var i = this.parallel_conditional_blobs_list.length - 1; i > -1; i += -1) { - var obj = this.parallel_conditional_blobs_list[i]; - var purgeme = true; - for (var j = 0, jlen = obj.conditions.length; j < jlen; j += 1) { - if (!(!obj.conditions[j] === !!original_condition - || ("master" === obj.conditions[j] - && !this.state.registry.registry[obj.id].master) - || ("servant" === obj.conditions[j] - && !this.state.registry.registry[obj.id].parallel))) { - var purgeme = false; - break; - } - } - if (purgeme) { - var buffer = []; - while (obj.blobs.length > obj.pos) { - buffer.push(obj.blobs.pop()); - } - if (buffer.length) { - buffer.pop(); - } - while (buffer.length) { - obj.blobs.push(buffer.pop()); - } - } - this.parallel_conditional_blobs_list.pop(); - } -} CSL.Token = function (name, tokentype) { this.name = name; this.strings = {}; @@ -10711,6 +10622,7 @@ CSL.Token = function (name, tokentype) { this.tokentype = tokentype; this.evaluator = false; this.tests = []; + this.rawtests = []; this.succeed = false; this.fail = false; this.next = false; @@ -10738,6 +10650,7 @@ CSL.Util.cloneToken = function (token) { if (token.execs) { newtok.execs = token.execs.slice(); newtok.tests = token.tests.slice(); + newtok.rawtests = token.tests.slice(); } return newtok; }; @@ -10935,6 +10848,94 @@ CSL.Util.fixDateNode = function (parent, pos, node) { } return this.sys.xml.insertChildNodeAfter(parent, node, pos, datexml); }; +CSL.dateMacroAsSortKey = function (state, Item) { + CSL.dateAsSortKey.call(this, state, Item, true); +}; +CSL.dateAsSortKey = function (state, Item, isMacro) { + var dp, elem, value, e, yr, prefix, i, ilen, num; + var variable = this.variables[0]; + var macroFlag = "empty"; + if (isMacro) { + macroFlag = "macro-with-date"; + } + dp = Item[variable]; + if ("undefined" === typeof dp) { + dp = {"date-parts": [[0]] }; + if (!dp.year) { + state.tmp.empty_date = true; + } + } + if ("undefined" === typeof this.dateparts) { + this.dateparts = ["year", "month", "day"]; + } + if (dp.raw) { + dp = state.fun.dateparser.parse(dp.raw); + } else if (dp["date-parts"]) { + dp = state.dateParseArray(dp); + } + if ("undefined" === typeof dp) { + dp = {}; + } + for (i = 0, ilen = CSL.DATE_PARTS_INTERNAL.length; i < ilen; i += 1) { + elem = CSL.DATE_PARTS_INTERNAL[i]; + value = 0; + e = elem; + if (e.slice(-4) === "_end") { + e = e.slice(0, -4); + } + if (dp[elem] && this.dateparts.indexOf(e) > -1) { + value = dp[elem]; + } + if (elem.slice(0, 4) === "year") { + yr = CSL.Util.Dates[e].numeric(state, value); + prefix = "Y"; + if (yr[0] === "-") { + prefix = "X"; + yr = yr.slice(1); + yr = 9999 - parseInt(yr, 10); + } + state.output.append(CSL.Util.Dates[elem.slice(0, 4)].numeric(state, (prefix + yr)), macroFlag); + } else { + value = CSL.Util.Dates[e]["numeric-leading-zeros"](state, value); + if (!value) { + value = "00"; + } + state.output.append(value, macroFlag); + } + } +}; +CSL.Engine.prototype.dateParseArray = function (date_obj) { + var ret, field, dpos, ppos, dp, exts, llen, pos, len, pppos, lllen; + ret = {}; + for (field in date_obj) { + if (field === "date-parts") { + dp = date_obj["date-parts"]; + if (dp.length > 1) { + if (dp[0].length !== dp[1].length) { + CSL.error("CSL data error: element mismatch in date range input."); + } + } + exts = ["", "_end"]; + for (var i = 0, ilen = dp.length; i < ilen; i += 1) { + for (var j = 0, jlen = CSL.DATE_PARTS.length; j < jlen; j += 1) { + if ("undefined" === typeof dp[i][j]) { + ret[(CSL.DATE_PARTS[j] + exts[i])] = dp[i][j]; + } else { + ret[(CSL.DATE_PARTS[j] + exts[i])] = parseInt(dp[i][j], 10); + } + } + } + } else if (date_obj.hasOwnProperty(field)) { + if (field === "literal" && "object" === typeof date_obj.literal && "string" === typeof date_obj.literal.part) { + CSL.debug("Warning: fixing up weird literal date value"); + ret.literal = date_obj.literal.part; + } else { + ret[field] = date_obj[field]; + } + } + } + return ret; +}; CSL.Util.Names = {}; CSL.Util.Names.compareNamesets = CSL.NameOutput.prototype._compareNamesets; CSL.Util.Names.unInitialize = function (state, name) { @@ -12931,12 +12932,13 @@ CSL.Registry.prototype.registerAmbigToken = function (akey, id, ambig_config) { var old_names_params = this.registry[id].disambig.names[i]; if (new_names_params !== old_names_params) { this.state.tmp.taintedItemIDs[id] = true; - } - for (var j=0,jlen=ambig_config.givens[i].length;j<jlen;j+=1) { - var new_gnames_params = ambig_config.givens[i][j]; - var old_gnames_params = this.registry[id].disambig.givens[i][j]; - if (new_gnames_params !== old_gnames_params) { - this.state.tmp.taintedItemIDs[id] = true; + } else if (ambig_config.givens[i]) { + for (var j=0,jlen=ambig_config.givens[i].length;j<jlen;j+=1) { + var new_gnames_params = ambig_config.givens[i][j]; + var old_gnames_params = this.registry[id].disambig.givens[i][j]; + if (new_gnames_params !== old_gnames_params) { + this.state.tmp.taintedItemIDs[id] = true; + } } } } @@ -13194,6 +13196,10 @@ CSL.Registry.NameReg = function (state) { this.delitems = delitems; this.evalname = evalname; }; +CSL.Registry.CitationReg = function (state) { + this.citationById = {}; + this.citationByIndex = []; +}; CSL.Disambiguation = function (state) { this.state = state; this.sys = this.state.sys; @@ -13550,12 +13556,9 @@ CSL.Disambiguation.prototype.getCiteData = function(Item, base) { } }; CSL.Disambiguation.prototype.captureStepToBase = function() { - if (this.state.citation.opt["givenname-disambiguation-rule"] === "by-cite") { + if (this.state.citation.opt["givenname-disambiguation-rule"] === "by-cite" + && this.base.givens && this.base.givens.length) { this.betterbase.givens[this.gnameset][this.gname] = this.base.givens[this.gnameset][this.gname]; } this.betterbase.names[this.gnameset] = this.base.names[this.gnameset]; }; -CSL.Registry.CitationReg = function (state) { - this.citationById = {}; - this.citationByIndex = []; -}; diff --git a/chrome/content/zotero/xpcom/data/group.js b/chrome/content/zotero/xpcom/data/group.js @@ -59,7 +59,7 @@ Zotero.Group.prototype.__defineGetter__('description', function () { return this Zotero.Group.prototype.__defineSetter__('description', function (val) { this._set('description', val); }); Zotero.Group.prototype.__defineGetter__('editable', function () { return this._get('editable'); }); Zotero.Group.prototype.__defineSetter__('editable', function (val) { this._set('editable', val); }); -Zotero.Group.prototype.__defineGetter__('filesEditable', function () { return this._get('filesEditable'); }); +Zotero.Group.prototype.__defineGetter__('filesEditable', function () { if (!this.editable) { return false; } return this._get('filesEditable'); }); Zotero.Group.prototype.__defineSetter__('filesEditable', function (val) { this._set('filesEditable', val); }); @@ -146,8 +146,8 @@ Zotero.Group.prototype.loadFromRow = function(row) { this._libraryID = row.libraryID; this._name = row.name; this._description = row.description; - this._editable = row.editable; - this._filesEditable = row.filesEditable; + this._editable = !!row.editable; + this._filesEditable = !!row.filesEditable; } diff --git a/chrome/content/zotero/xpcom/data/libraries.js b/chrome/content/zotero/xpcom/data/libraries.js @@ -78,6 +78,9 @@ Zotero.Libraries = new function () { this.isEditable = function (libraryID) { var type = this.getType(libraryID); switch (type) { + case 'user': + return true; + case 'group': var groupID = Zotero.Groups.getGroupIDFromLibraryID(libraryID); var group = Zotero.Groups.get(groupID); @@ -87,4 +90,21 @@ Zotero.Libraries = new function () { throw ("Unsupported library type '" + type + "' in Zotero.Libraries.getName()"); } } + + + this.isFilesEditable = function (libraryID) { + var type = this.getType(libraryID); + switch (type) { + case 'user': + return true; + + case 'group': + var groupID = Zotero.Groups.getGroupIDFromLibraryID(libraryID); + var group = Zotero.Groups.get(groupID); + return group.filesEditable; + + default: + throw ("Unsupported library type '" + type + "' in Zotero.Libraries.getName()"); + } + } } diff --git a/chrome/content/zotero/xpcom/data/tag.js b/chrome/content/zotero/xpcom/data/tag.js @@ -47,7 +47,9 @@ Zotero.Tag.prototype._init = function () { this._previousData = false; this._linkedItemsLoaded = false; - this._linkedItems = []; + this._linkedItems = {}; + this._linkedItemIDsToAdd = []; + this._linkedItemIDsToRemove = []; } @@ -212,66 +214,63 @@ Zotero.Tag.prototype.getLinkedItems = function (asIDs) { this._loadLinkedItems(); } - if (this._linkedItems.length == 0) { - return false; + if (Zotero.Utilities.isEmpty(this._linkedItems)) { + return []; } // Return itemIDs if (asIDs) { - var ids = []; - for each(var item in this._linkedItems) { - ids.push(item.id); - } - return ids; + return Object.keys(this._linkedItems); } // Return Zotero.Item objects - var objs = []; - for each(var item in this._linkedItems) { - objs.push(item); - } - return objs; + return [item for each(item in this._linkedItems)]; } Zotero.Tag.prototype.countLinkedItems = function () { - return this.getLinkedItems().length; + return Object.keys(this._linkedItems).length; } Zotero.Tag.prototype.addItem = function (itemID) { - var current = this.getLinkedItems(true); - if (current && current.indexOf(itemID) != -1) { + if (!this._linkedItemsLoaded) { + this._loadLinkedItems(); + } + + if (this._linkedItems[itemID]) { Zotero.debug("Item " + itemID + " already has tag " + this.id + " in Zotero.Tag.addItem()"); return false; } - this._prepFieldChange('linkedItems'); var item = Zotero.Items.get(itemID); if (!item) { - throw ("Can't link invalid item " + itemID + " to tag " + this.id - + " in Zotero.Tag.addItem()"); + throw new Error("Can't link invalid item " + itemID + " to tag " + this.id); } - this._linkedItems.push(item); + this._prepFieldChange('linkedItems'); + this._linkedItems[itemID] = item; + this._linkedItemIDsToAdd.push(itemID); + this._linkedItemIDsToRemove = this._linkedItemIDsToRemove.filter(function (x) x != itemID); return true; } Zotero.Tag.prototype.removeItem = function (itemID) { - var current = this.getLinkedItems(true); - if (current) { - var index = current.indexOf(itemID); + if (!this._linkedItemsLoaded) { + this._loadLinkedItems(); } - if (!current || index == -1) { + if (!this._linkedItems[itemID]) { Zotero.debug("Item " + itemID + " doesn't have tag " + this.id + " in Zotero.Tag.removeItem()"); return false; } this._prepFieldChange('linkedItems'); - this._linkedItems.splice(index, 1); + delete this._linkedItems[itemID]; + this._linkedItemIDsToAdd = this._linkedItemIDsToAdd.filter(function (x) x != itemID); + this._linkedItemIDsToRemove.push(itemID); return true; } @@ -406,7 +405,6 @@ Zotero.Tag.prototype.save = function (full) { } } - // Linked items if (full || this._changed.linkedItems) { var removed = []; @@ -430,17 +428,8 @@ Zotero.Tag.prototype.save = function (full) { } } else { - if (this._previousData.linkedItems) { - removed = Zotero.Utilities.arrayDiff( - this._previousData.linkedItems, currentIDs - ); - newids = Zotero.Utilities.arrayDiff( - currentIDs, this._previousData.linkedItems - ); - } - else { - newids = currentIDs; - } + removed = this._linkedItemIDsToRemove; + newids = this._linkedItemIDsToAdd; } if (removed.length) { @@ -513,8 +502,6 @@ Zotero.Tag.prototype.save = function (full) { this._key = key; } - Zotero.Tags.reload(this.id); - if (isNew) { Zotero.Notifier.trigger('add', 'tag', this.id); } @@ -522,6 +509,9 @@ Zotero.Tag.prototype.save = function (full) { Zotero.Notifier.trigger('modify', 'tag', this.id, this._previousData); } + this._reset(); + Zotero.Tags.reload(this.id); + return this.id; } @@ -655,10 +645,23 @@ Zotero.Tag.prototype.erase = function () { Zotero.DB.commitTransaction(); + this._reset(); + Zotero.Prefs.set('purge.tags', true); } +Zotero.Tag.prototype._reset = function () { + var id = this._id; + var libraryID = this._libraryID; + var key = this._key; + this._init(); + this._id = id; + this._libraryID = libraryID; + this._key = key; +} + + Zotero.Tag.prototype._loadLinkedItems = function() { if (!this.id && !this.key) { this._linkedItemsLoaded = true; @@ -675,14 +678,13 @@ Zotero.Tag.prototype._loadLinkedItems = function() { } var sql = "SELECT itemID FROM itemTags WHERE tagID=?"; - var ids = Zotero.DB.columnQuery(sql, this.id); + var ids = Zotero.DB.columnQuery(sql, this.id) || []; - this._linkedItems = []; + this._linkedItems = {}; - if (ids) { - for each(var id in ids) { - this._linkedItems.push(Zotero.Items.get(id)); - } + for (let i=0; i<ids.length; i++) { + let id = ids[i]; + this._linkedItems[id] = Zotero.Items.get(id); } this._linkedItemsLoaded = true; @@ -694,57 +696,64 @@ Zotero.Tag.prototype._setLinkedItems = function (itemIDs) { this._loadLinkedItems(); } - if (itemIDs.constructor.name != 'Array') { - throw ('ids must be an array in Zotero.Tag._setLinkedItems()'); + if (!Array.isArray(itemIDs)) { + throw new Error('itemIDs must be an array'); } - var currentIDs = this.getLinkedItems(true); - if (!currentIDs) { - currentIDs = []; - } - var oldIDs = []; // children being kept - var newIDs = []; // new children + var numCurrent = this.countLinkedItems(); if (itemIDs.length == 0) { - if (currentIDs.length == 0) { + if (numCurrent == 0) { Zotero.debug('No linked items added', 4); return false; } + + // No items passed, so remove all currently linked items + this._prepFieldChange('linkedItems'); + this._linkedItems = {}; + this._linkedItemIDsToAdd = []; + this._linkedItemIDsToRemove = this.getLinkedItems(true); + return true; } - else { - for (var i in itemIDs) { - var id = parseInt(itemIDs[i]); - if (isNaN(id)) { - throw ("Invalid itemID '" + itemIDs[i] - + "' in Zotero.Tag._setLinkedItems()"); - } - - if (currentIDs.indexOf(id) != -1) { - Zotero.debug("Item " + itemIDs[i] - + " is already linked to tag " + this.id); - if (oldIDs.indexOf(id) == -1) { - oldIDs.push(id); - } - continue; - } - - newIDs.push(id); + + // Get all new items + for (let i=0; i<itemIDs.length; i++) { + let id = itemIDs[i]; + if (isNaN(parseInt(id))) { + throw new Error("Invalid itemID '" + itemIDs[i] + "'"); + } + + if (this._linkedItems[id]) { + Zotero.debug("Item " + id + " is already linked to tag " + this.id); + } + else { + this._linkedItemIDsToAdd.push(id); } } - // Mark as changed if new or removed ids - if (newIDs.length > 0 || oldIDs.length != currentIDs.length) { - this._prepFieldChange('linkedItems'); - } - else { + // If no new items and the old and new lengths match, none are being removed either + if (!this._linkedItemIDsToAdd.length && numCurrent == itemIDs.length) { Zotero.debug('Linked items not changed in Zotero.Tag._setLinkedItems()', 4); return false; } - newIDs = oldIDs.concat(newIDs); + this._prepFieldChange('linkedItems'); + + // Rebuild linked items with items that exist + var items = Zotero.Items.get(itemIDs) || []; + this._linkedItems = {}; + for (let i=0; i<items.length; i++) { + this._linkedItems[items[i].id] = items[i]; + } + + // Mark items not found for removal + for (let i=0; i<itemIDs.length; i++) { + let id = itemIDs[i]; + if (!this._linkedItems[id]) { + this._linkedItemIDsToRemove.push(id); + } + } - var items = Zotero.Items.get(itemIDs); - this._linkedItems = items ? items : []; return true; } diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js @@ -53,11 +53,12 @@ Zotero.HTTP = new function() { * <li>cookieSandbox - The sandbox from which cookies should be taken</li> * <li>debug - Log response text and status code</li> * <li>dontCache - If set, specifies that the request should not be fulfilled from the cache</li> + * <li>foreground - Make a foreground request, showing certificate/authentication dialogs if necessary</li> * <li>headers - HTTP headers to include in the request</li> * <li>requestObserver - Callback to receive XMLHttpRequest after open()</li> * <li>responseType - The type of the response. See XHR 2 documentation for legal values</li> * <li>responseCharset - The charset the response should be interpreted as</li> - * <li>successCodes - HTTP status codes that are considered successful</li> + * <li>successCodes - HTTP status codes that are considered successful, or FALSE to allow all</li> * </ul> * @param {Zotero.CookieSandbox} [cookieSandbox] Cookie sandbox object * @return {Promise} A promise resolved with the XMLHttpRequest object if the request @@ -105,7 +106,9 @@ Zotero.HTTP = new function() { var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createInstance(); // Prevent certificate/authentication dialogs from popping up - xmlhttp.mozBackgroundRequest = true; + if (!options || !options.foreground) { + xmlhttp.mozBackgroundRequest = true; + } xmlhttp.open(method, url, true); // Pass the request to a callback @@ -157,6 +160,10 @@ Zotero.HTTP = new function() { if (options && options.successCodes) { var success = options.successCodes.indexOf(status) != -1; } + // Explicit FALSE means allow any status code + else if (options && options.successCodes === false) { + var success = true; + } else if(isFile) { var success = status == 200 || status == 0; } @@ -440,6 +447,53 @@ Zotero.HTTP = new function() { return xmlhttp; } + + /** + * Make a foreground HTTP request in order to trigger a proxy authentication + * dialog in Standalone + * + * Other Zotero.HTTP requests are background requests by default, and + * background requests don't trigger a proxy auth prompt, so we make a + * foreground request on startup and resolve the promise + * Zotero.proxyAuthComplete when we're done. Any network requests that want + * to wait for proxy authentication can wait for that promise. + */ + this.triggerProxyAuth = function () { + if (!Zotero.isStandalone + || !Zotero.Prefs.get("triggerProxyAuthentication") + || Zotero.HTTP.browserIsOffline()) { + Zotero.proxyAuthComplete = Q(); + return false; + } + + var deferred = Q.defer(); + Zotero.proxyAuthComplete = deferred.promise; + + var uri = ZOTERO_CONFIG.PROXY_AUTH_URL; + + Zotero.debug("HTTP GET " + uri); + + var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] + .createInstance(); + xmlhttp.open("GET", uri, true); + + xmlhttp.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; + + var useMethodjit = Components.utils.methodjit; + /** @ignore */ + xmlhttp.onreadystatechange = function() { + Components.utils.methodjit = useMethodjit; + _stateChange(xmlhttp, function (xmlhttp) { + Zotero.debug("Proxy auth request completed with status " + + xmlhttp.status + ": " + xmlhttp.responseText); + deferred.resolve(); + }); + }; + xmlhttp.send(null); + return xmlhttp; + } + + // // WebDAV methods // diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -54,7 +54,9 @@ Zotero.ItemTreeView = function(itemGroup, sourcesOnly) this._dataItems = []; this._itemImages = {}; - this._unregisterID = Zotero.Notifier.registerObserver(this, ['item', 'collection-item', 'share-items', 'bucket']); + this._unregisterID = Zotero.Notifier.registerObserver( + this, ['item', 'collection-item', 'item-tag', 'share-items', 'bucket'] + ); } @@ -434,6 +436,14 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) return; } + // Clear item type icon and tag colors + if (type == 'item-tag') { + ids.map(function (val) val.split("-")[0]).forEach(function (val) { + delete this._itemImages[val]; + }.bind(this)); + return; + } + var itemGroup = this._itemGroup; var madeChanges = false; @@ -580,6 +590,13 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) if (itemGroup.isTrash() || itemGroup.isSearch()) { Zotero.ItemGroupCache.clear(); + + // Clear item type icons + var items = Zotero.Items.get(ids); + for (let i=0; i<items.length; i++) { + delete this._itemImages[items[i].id]; + } + this.refresh(); madeChanges = true; sort = true; @@ -599,7 +616,7 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) this._refreshHashMap(); } var row = this._itemRowMap[id]; - // Clear item type icon and tag colors + // Clear item type icon delete this._itemImages[id]; // Deleted items get a modify that we have to ignore when @@ -666,17 +683,19 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) // If quicksearch, re-run it, since the results may have changed else { - // If not viewing trash and all items were deleted, ignore modify var allDeleted = true; - if (!itemGroup.isTrash()) { - var items = Zotero.Items.get(ids); - for each(var item in items) { - if (!item.deleted) { - allDeleted = false; - break; - } + var isTrash = itemGroup.isTrash(); + var items = Zotero.Items.get(ids); + for each(var item in items) { + // Clear item type icon + delete this._itemImages[item.id]; + + // If not viewing trash and all items were deleted, ignore modify + if (allDeleted && !isTrash && !item.deleted) { + allDeleted = false; } } + if (!allDeleted) { quicksearch.doCommand(); madeChanges = true; diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -215,22 +215,12 @@ Zotero.Schema = new function(){ // After a delay, start update of bundled files and repo updates setTimeout(function () { - try { - Zotero.UnresponsiveScriptIndicator.disable(); - var up = Zotero.Schema.updateBundledFiles(); - } - finally { + Zotero.UnresponsiveScriptIndicator.disable(); + Zotero.Schema.updateBundledFiles(null, false, true) + .finally(function () { Zotero.UnresponsiveScriptIndicator.enable(); - } - if (up) { - // Run a manual scraper update if upgraded and pref set - if (Zotero.Prefs.get('automaticScraperUpdates')) { - Zotero.Schema.updateFromRepository(2); - } - } - else { - Zotero.Schema.updateFromRepository(); - } + }) + .done(); }, 5000); } @@ -448,39 +438,70 @@ Zotero.Schema = new function(){ * it should only be updated the last time through */ this.updateBundledFiles = function(mode, skipDeleteUpdate, runRemoteUpdateWhenComplete) { - if(_localUpdateInProgress) return; - _localUpdateInProgress = true; - - // Get path to addon and then call updateBundledFilesCallback, potentially asynchronously - if(Zotero.isStandalone) { - var appChrome = Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("AChrom", Components.interfaces.nsIFile); - _updateBundledFilesCallback(appChrome.parent, mode, skipDeleteUpdate, - runRemoteUpdateWhenComplete); - } else { + if (_localUpdateInProgress) return Q(); + + return Q.fcall(function () { + _localUpdateInProgress = true; + + // Get path to addon and then call updateBundledFilesCallback + + // Synchronous in Standalone + if (Zotero.isStandalone) { + var appChrome = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties) + .get("AChrom", Components.interfaces.nsIFile); + return _updateBundledFilesCallback(appChrome.parent, mode, skipDeleteUpdate); + } + + // Asynchronous in Firefox + var deferred = Q.defer(); Components.utils.import("resource://gre/modules/AddonManager.jsm"); - AddonManager.getAddonByID(ZOTERO_CONFIG['GUID'], + AddonManager.getAddonByID( + ZOTERO_CONFIG['GUID'], function(addon) { - _updateBundledFilesCallback( + var up = _updateBundledFilesCallback( addon.getResourceURI().QueryInterface(Components.interfaces.nsIFileURL).file, - mode, skipDeleteUpdate, runRemoteUpdateWhenComplete); - }); - } + mode, + skipDeleteUpdate + ); + deferred.resolve(up); + } + ); + return deferred.promise; + }) + .then(function (updated) { + if (runRemoteUpdateWhenComplete) { + var deferred = Q.defer(); + if (updated) { + if (Zotero.Prefs.get('automaticScraperUpdates')) { + Zotero.proxyAuthComplete + .then(function () { + Zotero.Schema.updateFromRepository(2, function () deferred.resolve()); + }) + } + } + else { + Zotero.proxyAuthComplete + .then(function () { + Zotero.Schema.updateFromRepository(false, function () deferred.resolve()); + }) + .done(); + } + return deferred.promise; + } + }); } /** * Callback to update bundled files, after finding the path to the Zotero install location */ - function _updateBundledFilesCallback(installLocation, mode, skipDeleteUpdate, - runRemoteUpdateWhenComplete) { + function _updateBundledFilesCallback(installLocation, mode, skipDeleteUpdate) { _localUpdateInProgress = false; if (!mode) { - var up1 = _updateBundledFilesCallback(installLocation, 'translators', true, false); - var up2 = _updateBundledFilesCallback(installLocation, 'styles', false, - runRemoteUpdateWhenComplete); - return up1 && up2; + var up1 = _updateBundledFilesCallback(installLocation, 'translators', true); + var up2 = _updateBundledFilesCallback(installLocation, 'styles', false); + return up1 || up2; } var xpiZipReader, isUnpacked = installLocation.isDirectory(); @@ -928,12 +949,6 @@ Zotero.Schema = new function(){ Zotero[Modes].init(); - if (runRemoteUpdateWhenComplete) { - // Run a manual scraper update if upgraded and pref set - if (Zotero.Prefs.get('automaticScraperUpdates')){ - Zotero.Schema.updateFromRepository(2); - } - } return true; } @@ -1072,11 +1087,13 @@ Zotero.Schema = new function(){ stylesDir.remove(true); Zotero.getStylesDirectory(); // recreate directory Zotero.Styles.init(); - this.updateBundledFiles('styles', null, true); - - if (callback) { - callback(); - } + this.updateBundledFiles('styles', null, true) + .then(function () { + if (callback) { + callback(); + } + }) + .done(); } @@ -1093,20 +1110,13 @@ Zotero.Schema = new function(){ translatorsDir.remove(true); Zotero.getTranslatorsDirectory(); // recreate directory Zotero.Translators.init(); - this.updateBundledFiles('translators'); - - // Run a manual update from repository if pref set - if (Zotero.Prefs.get('automaticScraperUpdates')) { - this.updateFromRepository(2, function () { - if (callback) { - callback(); - } - }); - } - - if (callback) { - callback(); - } + this.updateBundledFiles('translators', null, true) + .then(function () { + if (callback) { + callback(); + } + }) + .done(); } @@ -1123,20 +1133,13 @@ Zotero.Schema = new function(){ stylesDir.remove(true); Zotero.getStylesDirectory(); // recreate directory Zotero.Styles.init(); - this.updateBundledFiles('styles'); - - // Run a manual update from repository if pref set - if (Zotero.Prefs.get('automaticScraperUpdates')) { - this.updateFromRepository(2, function () { - if (callback) { - callback(); - } - }); - } - - if (callback) { - callback(); - } + this.updateBundledFiles('styles', null, true) + .then(function () { + if (callback) { + callback(); + } + }) + .done(); } @@ -1477,14 +1480,12 @@ Zotero.Schema = new function(){ throw(e); } - try { - Zotero.Schema.updateBundledFiles(null, null, true); - } - catch (e) { + Zotero.Schema.updateBundledFiles(null, null, true) + .catch(function (e) { Zotero.debug(e); Zotero.logError(e); alert('Error updating Zotero translators and styles'); - } + }); } @@ -3305,7 +3306,7 @@ Zotero.Schema = new function(){ fromVersion = 76; } - if (fromVersion == toVersion) { + if (fromVersion >= toVersion) { return false; } @@ -3320,9 +3321,13 @@ Zotero.Schema = new function(){ // previous revision to that one. for (var i=fromVersion + 1; i<=toVersion; i++) { if (i == 77) { - Zotero.DB.query("CREATE TABLE syncedSettings (\n setting TEXT NOT NULL,\n libraryID INT NOT NULL,\n value NOT NULL,\n version INT NOT NULL DEFAULT 0,\n synced INT NOT NULL DEFAULT 0,\n PRIMARY KEY (setting, libraryID)\n)"); + Zotero.DB.query("CREATE TABLE IF NOT EXISTS syncedSettings (\n setting TEXT NOT NULL,\n libraryID INT NOT NULL,\n value NOT NULL,\n version INT NOT NULL DEFAULT 0,\n synced INT NOT NULL DEFAULT 0,\n PRIMARY KEY (setting, libraryID)\n)"); Zotero.DB.query("INSERT OR IGNORE INTO syncObjectTypes VALUES (7, 'setting')"); } + + if (i == 78) { + Zotero.DB.query("CREATE INDEX IF NOT EXISTS creatorData_name ON creatorData(lastName, firstName)"); + } } _updateDBVersion('userdata2', toVersion); diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -733,7 +733,7 @@ Zotero.Search.prototype.search = function(asTempTable){ var sql = "SELECT GROUP_CONCAT(itemID) FROM items WHERE " + "itemID NOT IN (SELECT itemID FROM " + tmpTable + ")"; - var res = Zotero.DB.valueQuery(sql).split(","); + var res = Zotero.DB.valueQuery(sql); var scopeIDs = res ? res.split(",") : []; } // If an ALL search, scan only items from the main search diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js @@ -369,7 +369,7 @@ Zotero.Server.DataListener.prototype._processEndpoint = function(method, postDat this._requestFinished(this._generateResponse(400, "text/plain", "Invalid JSON provided\n")); return; } - } else if(supportedDataTypes && this.contentType === "application/x-www-urlencoded") { + } else if(supportedDataTypes && this.contentType === "application/x-www-form-urlencoded") { decodedData = Zotero.Server.decodeQueryString(postData); } else { decodedData = postData; diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -51,6 +51,7 @@ Zotero.Sync.Storage = new function () { this.ERROR_NOT_ALLOWED = -14; this.ERROR_UNKNOWN = -15; this.ERROR_FILE_MISSING_AFTER_UPLOAD = -16; + this.ERROR_NONEXISTENT_FILE_NOT_MISSING = -17; // TEMP this.__defineGetter__("defaultError", function () Zotero.getString('sync.storage.error.default', Zotero.appName)); @@ -263,9 +264,14 @@ Zotero.Sync.Storage = new function () { } // Get files to upload - for each(var itemID in _getFilesToUpload(libraryID)) { - var item = Zotero.Items.get(itemID); - self.queueItem(item); + if (Zotero.Libraries.isFilesEditable(libraryID)) { + for each(var itemID in _getFilesToUpload(libraryID)) { + var item = Zotero.Items.get(itemID); + self.queueItem(item); + } + } + else { + Zotero.debug("No file editing access -- skipping file uploads for library " + libraryID); } } diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -995,10 +995,12 @@ Zotero.Sync.Storage.WebDAV = (function () { }) .then(function () { return Zotero.HTTP.promise("GET", lastSyncURI, - { debug: true, successCodes: [200, 404] }); + { debug: true, successCodes: [200, 300, 404] }); }) .then(function (req) { - if (req.status == 404) { + // If lastsync exists but not lastsync.txt, some servers try to + // be helpful and return 300. + if (req.status == 300 || req.status == 404) { Zotero.debug("No last WebDAV sync file"); // If no lastsync.txt, check previously used 'lastsync', @@ -1209,89 +1211,120 @@ Zotero.Sync.Storage.WebDAV = (function () { switch (req.status) { case 207: - // Test if Zotero directory is writable - var testFileURI = uri.clone(); - testFileURI.spec += "zotero-test-file.prop"; - Zotero.HTTP.WebDAV.doPut(testFileURI, " ", function (req) { - Zotero.debug(req.responseText); - Zotero.debug(req.status); - - switch (req.status) { - case 200: - case 201: - case 204: - Zotero.HTTP.doGet( - testFileURI, - function (req) { - Zotero.debug(req.responseText); - Zotero.debug(req.status); - - switch (req.status) { - case 200: - // Delete test file - Zotero.HTTP.WebDAV.doDelete( - testFileURI, - function (req) { - Zotero.debug(req.responseText); - Zotero.debug(req.status); - - switch (req.status) { - case 200: // IIS 5.1 and Sakai return 200 - case 204: - return deferred.resolve([uri, Zotero.Sync.Storage.SUCCESS]); - - case 401: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); - - case 403: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); + // Test if missing files return 404s + var missingFileURI = uri.clone(); + missingFileURI.spec += "nonexistent.prop"; + Zotero.HTTP.promise("GET", missingFileURI, { successCodes: [404], debug: true }) + .then(function () { + // Test if Zotero directory is writable + var testFileURI = uri.clone(); + testFileURI.spec += "zotero-test-file.prop"; + Zotero.HTTP.WebDAV.doPut(testFileURI, " ", function (req) { + Zotero.debug(req.responseText); + Zotero.debug(req.status); + + switch (req.status) { + case 200: + case 201: + case 204: + Zotero.HTTP.doGet( + testFileURI, + function (req) { + Zotero.debug(req.responseText); + Zotero.debug(req.status); + + switch (req.status) { + case 200: + // Delete test file + Zotero.HTTP.WebDAV.doDelete( + testFileURI, + function (req) { + Zotero.debug(req.responseText); + Zotero.debug(req.status); - default: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + switch (req.status) { + case 200: // IIS 5.1 and Sakai return 200 + case 204: + return deferred.resolve([uri, Zotero.Sync.Storage.SUCCESS]); + + case 401: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); + + case 403: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); + + default: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + } } - } - ); - return; - - case 401: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); - - case 403: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); - - // This can happen with cloud storage services - // backed by S3 or other eventually consistent - // data stores. - // - // This can also be from IIS 6+, which is configured - // not to serve .prop files. - // http://support.microsoft.com/kb/326965 - case 404: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FILE_MISSING_AFTER_UPLOAD]); - - case 500: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_SERVER_ERROR]); - - default: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + ); + return; + + case 401: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); + + case 403: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); + + // This can happen with cloud storage services + // backed by S3 or other eventually consistent + // data stores. + // + // This can also be from IIS 6+, which is configured + // not to serve .prop files. + // http://support.microsoft.com/kb/326965 + case 404: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FILE_MISSING_AFTER_UPLOAD]); + + case 500: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_SERVER_ERROR]); + + default: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + } } - } - ); - return; - - case 401: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); - - case 403: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); - - case 500: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_SERVER_ERROR]); - - default: - return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + ); + return; + + case 401: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); + + case 403: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); + + case 500: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_SERVER_ERROR]); + + default: + return deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + } + }); + }) + .catch(function (e) { + if (e instanceof Zotero.HTTP.UnexpectedStatusException) { + if (e.status >= 200 && e.status < 300) { + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_NONEXISTENT_FILE_NOT_MISSING]); + } + else if (e.status == 401) { + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_AUTH_FAILED]); + } + else if (e.status == 403) { + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_FORBIDDEN]); + } + else if (e.status == 500) { + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_SERVER_ERROR]); + } + else { + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + } } - }); + else { + Zotero.debug(e, 1); + Components.utils.reportError(e); + deferred.resolve([uri, Zotero.Sync.Storage.ERROR_UNKNOWN]); + } + }) + .done(); return; case 400: @@ -1489,6 +1522,11 @@ Zotero.Sync.Storage.WebDAV = (function () { Zotero.getString('sync.storage.error.checkFileSyncSettings') ]); break; + + case Zotero.Sync.Storage.ERROR_NONEXISTENT_FILE_NOT_MISSING: + var errorTitle = Zotero.getString('sync.storage.error.webdav.serverConfig.title'); + var errorMessage = Zotero.getString('sync.storage.error.webdav.nonexistentFileNotMissing'); + break; } if (!skipSuccessMessage) { diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js @@ -382,7 +382,9 @@ Zotero.Styles = new function() { var enumerator = wm.getEnumerator("zotero:pref"); while(enumerator.hasMoreElements()) { var win = enumerator.getNext(); - win.Zotero_Preferences.Cite.refreshStylesList(styleID); + if(win.Zotero_Preferences.Cite) { + win.Zotero_Preferences.Cite.refreshStylesList(styleID); + } } }); } diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1345,7 +1345,7 @@ Zotero.Sync.Server = new function () { } }; - function login(callback) { + function login() { var url = _serverURL + "login"; var username = Zotero.Sync.Server.username; @@ -1368,7 +1368,9 @@ Zotero.Sync.Server = new function () { Zotero.Sync.Runner.setSyncStatus(Zotero.getString('sync.status.loggingIn')); - Zotero.HTTP.doPost(url, body, function (xmlhttp) { + return Zotero.HTTP.promise("POST", url, + { body: body, successCodes: false, foreground: !Zotero.Sync.Runner.background }) + .then(function (xmlhttp) { _checkResponse(xmlhttp, true); var response = xmlhttp.responseXML.childNodes[0]; @@ -1396,10 +1398,6 @@ Zotero.Sync.Server = new function () { //Zotero.debug('Got session ID ' + _sessionID + ' from server'); - - if (callback) { - callback(); - } }); } @@ -1416,9 +1414,11 @@ Zotero.Sync.Server = new function () { if (!_sessionID) { Zotero.debug("Session ID not available -- logging in"); - Zotero.Sync.Server.login(function () { + Zotero.Sync.Server.login() + .then(function () { Zotero.Sync.Server.sync(_callbacks); - }); + }) + .done(); return; } @@ -1472,9 +1472,11 @@ Zotero.Sync.Server = new function () { Zotero.debug("Invalid session ID -- logging in"); _sessionID = false; _syncInProgress = false; - Zotero.Sync.Server.login(function () { + Zotero.Sync.Server.login() + .then(function () { Zotero.Sync.Server.sync(_callbacks); - }); + }) + .done(); return; } @@ -1800,9 +1802,11 @@ Zotero.Sync.Server = new function () { function clear(callback) { if (!_sessionID) { Zotero.debug("Session ID not available -- logging in"); - Zotero.Sync.Server.login(function () { + Zotero.Sync.Server.login() + .then(function () { Zotero.Sync.Server.clear(callback); - }); + }) + .done(); return; } @@ -1814,9 +1818,11 @@ Zotero.Sync.Server = new function () { if (_invalidSession(xmlhttp)) { Zotero.debug("Invalid session ID -- logging in"); _sessionID = false; - Zotero.Sync.Server.login(function () { + Zotero.Sync.Server.login() + .then(function () { Zotero.Sync.Server.clear(callback); - }); + }) + .done(); return; } @@ -1896,27 +1902,29 @@ Zotero.Sync.Server = new function () { if (!xmlhttp.responseText) { var channel = xmlhttp.channel; // Check SSL cert - var secInfo = channel.securityInfo; - if (secInfo instanceof Ci.nsITransportSecurityInfo) { - secInfo.QueryInterface(Ci.nsITransportSecurityInfo); - if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) == Ci.nsIWebProgressListener.STATE_IS_INSECURE) { - var url = channel.name; - var ios = Components.classes["@mozilla.org/network/io-service;1"]. - getService(Components.interfaces.nsIIOService); - try { - var uri = ios.newURI(url, null, null); - var host = uri.host; + if (channel) { + var secInfo = channel.securityInfo; + if (secInfo instanceof Ci.nsITransportSecurityInfo) { + secInfo.QueryInterface(Ci.nsITransportSecurityInfo); + if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) == Ci.nsIWebProgressListener.STATE_IS_INSECURE) { + var url = channel.name; + var ios = Components.classes["@mozilla.org/network/io-service;1"]. + getService(Components.interfaces.nsIIOService); + try { + var uri = ios.newURI(url, null, null); + var host = uri.host; + } + catch (e) { + Zotero.debug(e); + } + var kbURL = 'http://zotero.org/support/kb/ssl_certificate_error'; + _error(Zotero.getString('sync.storage.error.webdav.sslCertificateError', host) + "\n\n" + + Zotero.getString('general.seeForMoreInformation', kbURL), + false, noReloadOnFailure); } - catch (e) { - Zotero.debug(e); + else if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) == Ci.nsIWebProgressListener.STATE_IS_BROKEN) { + _error(Zotero.getString('sync.error.sslConnectionError'), false, noReloadOnFailure); } - var kbURL = 'http://zotero.org/support/kb/ssl_certificate_error'; - _error(Zotero.getString('sync.storage.error.webdav.sslCertificateError', host) + "\n\n" - + Zotero.getString('general.seeForMoreInformation', kbURL), - false, noReloadOnFailure); - } - else if ((secInfo.securityState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) == Ci.nsIWebProgressListener.STATE_IS_BROKEN) { - _error(Zotero.getString('sync.error.sslConnectionError'), false, noReloadOnFailure); } } if (xmlhttp.status === 0) { @@ -2664,9 +2672,9 @@ Zotero.Sync.Server.Data = new function() { // Remotely deleted groups var deletedGroups = updatedNode.xpath("deleted/groups"); - if (deletedGroups.length && deletedGroups.textContent) { + if (deletedGroups.length && deletedGroups[0].textContent) { Zotero.debug("Processing remotely deleted groups"); - var groupIDs = deletedGroups.textContent.split(' '); + var groupIDs = deletedGroups[0].textContent.split(' '); Zotero.debug(groupIDs); for each(var groupID in groupIDs) { @@ -3241,8 +3249,8 @@ Zotero.Sync.Server.Data = new function() { continue; default: - alert('Delete reconciliation unimplemented for ' + types); - throw ('Delete reconciliation unimplemented for ' + types); + Components.utils.reportError('Delete reconciliation unimplemented for ' + types + ' -- ignoring'); + continue; } } @@ -3778,7 +3786,7 @@ Zotero.Sync.Server.Data = new function() { } var msg = Zotero.getString('sync.conflict.autoChange.log', itemType) + "\n\n"; - msg += Zotero.getString('sync.conflict.localVersion', localName); + msg += Zotero.getString('sync.conflict.localVersion', localName) + "\n"; msg += Zotero.getString('sync.conflict.remoteVersion', remoteName); msg += "\n\n"; if (localDelete) { diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -360,9 +360,7 @@ Zotero.Translate.DOMWrapper = new function() { * Unwraps an object */ this.unwrap = function(obj) { - if("__wrappedDOMObject" in obj) { - return obj.__wrappedDOMObject; - } else if(isWrapper(obj)) { + if(isWrapper(obj)) { return unwrapPrivileged(obj); } else { return obj; @@ -374,9 +372,7 @@ Zotero.Translate.DOMWrapper = new function() { * @param {XPCCrossOriginWrapper} obj * @return {Boolean} Whether or not the object is wrapped */ - this.isWrapped = function(obj) { - return "__wrappedDOMObject" in obj || isWrapper(obj); - } + this.isWrapped = isWrapper; } /** @@ -390,12 +386,8 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) { // import functions missing from global scope into Fx sandbox this.sandbox.XPathResult = Components.interfaces.nsIDOMXPathResult; - if(typeof sandboxLocation === "object" && - ("wrappedJSObject" in sandboxLocation - ? "DOMParser" in sandboxLocation.wrappedJSObject - : "DOMParser" in sandboxLocation)) { - this.sandbox.DOMParser = "wrappedJSObject" in sandboxLocation - ? sandboxLocation.wrappedJSObject.DOMParser : sandboxLocation.DOMParser; + if(typeof sandboxLocation === "object" && "DOMParser" in sandboxLocation) { + this.sandbox.DOMParser = sandboxLocation.DOMParser; } else { var sandbox = this.sandbox; this.sandbox.DOMParser = function() { @@ -500,7 +492,7 @@ Zotero.Translate.SandboxManager.prototype = { "_copyObject":function(obj, wm) { if(typeof obj !== "object" || obj === null || (obj.__proto__ !== Object.prototype && obj.__proto__ !== Array.prototype) - || "__exposedProps__" in obj || "__wrappedDOMObject" in obj) { + || "__exposedProps__" in obj) { return obj; } if(!wm) wm = new WeakMap(); diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -557,11 +557,11 @@ Zotero.Utilities = { * otherwise return the values */ "arrayDiff":function(array1, array2, useIndex) { - if (array1.constructor.name != 'Array') { - throw ("array1 is not an array in Zotero.Utilities.arrayDiff() (" + array1 + ")"); + if (!Array.isArray(array1)) { + throw ("array1 is not an array (" + array1 + ")"); } - if (array2.constructor.name != 'Array') { - throw ("array2 is not an array in Zotero.Utilities.arrayDiff() (" + array2 + ")"); + if (!Array.isArray(array2)) { + throw ("array2 is not an array (" + array2 + ")"); } var val, pos, vals = []; @@ -575,6 +575,7 @@ Zotero.Utilities = { return vals; }, + /** * Return new array with duplicate values removed * diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -31,6 +31,7 @@ const ZOTERO_CONFIG = { REPOSITORY_RETRY_INTERVAL: 3600, // 1 hour BASE_URI: 'http://zotero.org/', WWW_BASE_URL: 'http://www.zotero.org/', + PROXY_AUTH_URL: 'http://zotero.org.s3.amazonaws.com/proxy-auth', SYNC_URL: 'https://sync.zotero.org/', API_URL: 'https://api.zotero.org/', API_VERSION: 2, @@ -537,6 +538,8 @@ Components.utils.import("resource://gre/modules/Services.jsm"); if(!_initDB()) return false; + Zotero.HTTP.triggerProxyAuth(); + // Add notifier queue callbacks to the DB layer Zotero.DB.addCallback('begin', Zotero.Notifier.begin); Zotero.DB.addCallback('commit', Zotero.Notifier.commit); @@ -1423,28 +1426,26 @@ Components.utils.import("resource://gre/modules/Services.jsm"); * values and/or an arbitrary number of individual values */ function flattenArguments(args){ - var isArguments = args.callee && args.length; - // Put passed scalar values into an array - if (args === null || (args.constructor.name != 'Array' && !isArguments)) { + if (args === null || typeof args == 'string' || typeof args.length == 'undefined') { args = [args]; } var returns = []; for (var i=0; i<args.length; i++){ - if (!args[i] && args[i] !== 0) { + var arg = args[i]; + if (!arg && arg !== 0) { continue; } - if (args[i].constructor.name == 'Array') { - for (var j=0; j<args[i].length; j++){ - returns.push(args[i][j]); + if (Array.isArray(arg)) { + for (var j=0; j<arg.length; j++){ + returns.push(arg[j]); } } else { - returns.push(args[i]); + returns.push(arg); } } - return returns; } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -415,7 +415,9 @@ var ZoteroPane = new function() // Auto-sync on pane open if (Zotero.Prefs.get('sync.autoSync')) { - setTimeout(function () { + Zotero.proxyAuthComplete + .delay(1000) + .then(function () { if (!Zotero.Sync.Server.enabled) { Zotero.debug('Sync not enabled -- skipping auto-sync', 4); return; @@ -432,7 +434,8 @@ var ZoteroPane = new function() } Zotero.Sync.Runner.sync(true); - }, 1000); + }) + .done(); } // Set sync icon to spinning or not diff --git a/chrome/locale/af-ZA/zotero/preferences.dtd b/chrome/locale/af-ZA/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/af-ZA/zotero/zotero.properties b/chrome/locale/af-ZA/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/ar/zotero/about.dtd b/chrome/locale/ar/zotero/about.dtd @@ -10,4 +10,4 @@ <!ENTITY zotero.thanks "شكر خاص:"> <!ENTITY zotero.about.close "إغلاق"> <!ENTITY zotero.moreCreditsAndAcknowledgements "المزيد من الشكر والتقدير"> -<!ENTITY zotero.citationProcessing "Citation & Bibliography Processing"> +<!ENTITY zotero.citationProcessing "معالجي الاستشهادات والببليوجرافيات"> diff --git a/chrome/locale/ar/zotero/preferences.dtd b/chrome/locale/ar/zotero/preferences.dtd @@ -3,7 +3,7 @@ <!ENTITY zotero.preferences.default "الإفتراضي:"> <!ENTITY zotero.preferences.items "عناصر"> <!ENTITY zotero.preferences.period "."> -<!ENTITY zotero.preferences.settings "Settings"> +<!ENTITY zotero.preferences.settings "اعدادات"> <!ENTITY zotero.preferences.prefpane.general "عام"> @@ -11,14 +11,14 @@ <!ENTITY zotero.preferences.showIn "عرض زوتيرو في:"> <!ENTITY zotero.preferences.showIn.browserPane "جزء التصفح"> <!ENTITY zotero.preferences.showIn.separateTab "تبويب منفصل"> -<!ENTITY zotero.preferences.showIn.appTab "App tab"> +<!ENTITY zotero.preferences.showIn.appTab "تبويب التطبيقات"> <!ENTITY zotero.preferences.statusBarIcon "أيقونة شريط الحالة:"> <!ENTITY zotero.preferences.statusBarIcon.none "بدون أيقونة"> <!ENTITY zotero.preferences.fontSize "حجم الخط:"> <!ENTITY zotero.preferences.fontSize.small "صغير"> <!ENTITY zotero.preferences.fontSize.medium "متوسط"> <!ENTITY zotero.preferences.fontSize.large "كبير"> -<!ENTITY zotero.preferences.fontSize.xlarge "X-Large"> +<!ENTITY zotero.preferences.fontSize.xlarge "كبير الحجم"> <!ENTITY zotero.preferences.fontSize.notes "حجم خط الملاحظات:"> <!ENTITY zotero.preferences.miscellaneous "أخرى"> @@ -39,7 +39,7 @@ <!ENTITY zotero.preferences.groups.childNotes "الملاحظات الفرعية"> <!ENTITY zotero.preferences.groups.childFiles "اللقطات الفرعية والملفات المستوردة"> <!ENTITY zotero.preferences.groups.childLinks "الروابط الفرعية"> -<!ENTITY zotero.preferences.groups.tags "tags"> +<!ENTITY zotero.preferences.groups.tags "سمات"> <!ENTITY zotero.preferences.openurl.caption "الرابط المفتوح"> @@ -60,14 +60,14 @@ <!ENTITY zotero.preferences.sync.fileSyncing.url "الرابط:"> <!ENTITY zotero.preferences.sync.fileSyncing.myLibrary "قم بمزامنة الملفات المرفقة في مكتبتي باستخدام"> <!ENTITY zotero.preferences.sync.fileSyncing.groups "قم بمزامنة الملفات المرفقة في مجموعة المكتبات باستخدام مساحة تخزين زوتيرو"> -<!ENTITY zotero.preferences.sync.fileSyncing.download "Download files"> -<!ENTITY zotero.preferences.sync.fileSyncing.download.atSyncTime "at sync time"> -<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "as needed"> +<!ENTITY zotero.preferences.sync.fileSyncing.download "تحميل الملفات"> +<!ENTITY zotero.preferences.sync.fileSyncing.download.atSyncTime "في وقت التزامن"> +<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "عند الحاجة"> <!ENTITY zotero.preferences.sync.fileSyncing.tos1 "باستخدامك مساحة تخزين زوتيرو، فإنك توافق على الالتزام بكافة"> <!ENTITY zotero.preferences.sync.fileSyncing.tos2 "الشروط والأحكام"> <!ENTITY zotero.preferences.sync.reset.warning1 "The following operations are for use only in rare, specific situations and should not be used for general troubleshooting. In many cases, resetting will cause additional problems. See "> -<!ENTITY zotero.preferences.sync.reset.warning2 "Sync Reset Options"> -<!ENTITY zotero.preferences.sync.reset.warning3 " for more information."> +<!ENTITY zotero.preferences.sync.reset.warning2 "خيارات اعادة ضبط التزامن"> +<!ENTITY zotero.preferences.sync.reset.warning3 "لمزيد من المعلومات."> <!ENTITY zotero.preferences.sync.reset.fullSync "التزامن الكامل مع خادم زوتيرو"> <!ENTITY zotero.preferences.sync.reset.fullSync.desc "دمج بيانات زوتيرو المحلية مع البيانات من خادم التزامن، مع تجاهل سجل التزامن."> <!ENTITY zotero.preferences.sync.reset.restoreFromServer "الاسترجاع من خادم زوتيرو"> @@ -76,7 +76,7 @@ <!ENTITY zotero.preferences.sync.reset.restoreToServer.desc "حذف جميع بيانات الخادم وإحلال بيانات زوتيرو المحلية على الخادم."> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "إعادة تعيين ملف سجل المزامنة"> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "تنفيذ عملية التحقق من الخادم لتخزين جميع الملفات المحلية المرفقة."> -<!ENTITY zotero.preferences.sync.reset "Reset"> +<!ENTITY zotero.preferences.sync.reset "اعادة ضبط"> <!ENTITY zotero.preferences.sync.reset.button "إعادة التعيين..."> @@ -120,7 +120,7 @@ <!ENTITY zotero.preferences.cite.styles.styleManager "مدير الانماط"> <!ENTITY zotero.preferences.cite.styles.styleManager.title "اسم النمط"> <!ENTITY zotero.preferences.cite.styles.styleManager.updated "آخر تحديث"> -<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL"> +<!ENTITY zotero.preferences.cite.styles.styleManager.csl "لغة نمط الاستشهاد"> <!ENTITY zotero.preferences.export.getAdditionalStyles "احصل على انماط اضافية..."> <!ENTITY zotero.preferences.prefpane.keys "اختصارات"> @@ -161,7 +161,7 @@ <!ENTITY zotero.preferences.proxies.a_variable "%a - لأي سلسلة حرفية"> <!ENTITY zotero.preferences.prefpane.advanced "متقدم"> -<!ENTITY zotero.preferences.advanced.filesAndFolders "Files and Folders"> +<!ENTITY zotero.preferences.advanced.filesAndFolders "الملفات والمجلدات"> <!ENTITY zotero.preferences.prefpane.locate "تحديد موقع المقتنى"> <!ENTITY zotero.preferences.locate.locateEngineManager "إدارة محرك البحث"> @@ -183,8 +183,8 @@ <!ENTITY zotero.preferences.attachmentBaseDir.caption "Linked Attachment Base Directory"> <!ENTITY zotero.preferences.attachmentBaseDir.message "Zotero will use relative paths for linked file attachments within the base directory, allowing you to access files on different computers as long as the file structure within the base directory remains the same."> -<!ENTITY zotero.preferences.attachmentBaseDir.basePath "Base directory:"> -<!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "Choose…"> +<!ENTITY zotero.preferences.attachmentBaseDir.basePath "الفهرس الرئيسي:"> +<!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "اختار..."> <!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Revert to Absolute Paths…"> <!ENTITY zotero.preferences.dbMaintenance "صيانة قاعدة البيانات"> @@ -201,6 +201,7 @@ <!ENTITY zotero.preferences.debugOutputLogging.clearOutput "مسح سجل اخطاء البرنامج"> <!ENTITY zotero.preferences.debugOutputLogging.submitToServer "ارسال سجل الاخطاء لخادم زوتيرو"> -<!ENTITY zotero.preferences.openAboutConfig "Open about:config"> -<!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> -<!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutConfig "فتح about:config"> +<!ENTITY zotero.preferences.openCSLEdit "افتح محرر لغة نمط الاستشهاد"> +<!ENTITY zotero.preferences.openCSLPreview "افتح مستعرض لغة نمط الاستشهاد"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ar/zotero/zotero.dtd b/chrome/locale/ar/zotero/zotero.dtd @@ -13,7 +13,7 @@ <!ENTITY zotero.errorReport.postToForums "برجاء كتابة رسالة في منتديات زوتيرو (forums.zotero.org) تتضمن رقم التقرير، ووصف للمشكلة، والخطوات التي تؤدي لظهورها."> <!ENTITY zotero.errorReport.notReviewed "لن يتم مراجعة تقارير الخطأ ما لم يكن مشار إليها في المنتديات."> -<!ENTITY zotero.upgrade.title "Zotero Upgrade Wizard"> +<!ENTITY zotero.upgrade.title "معالج تحديث زوتيرو"> <!ENTITY zotero.upgrade.newVersionInstalled "لقد قمتَ بتنصيب نسخة جديدة من زوتيرو."> <!ENTITY zotero.upgrade.upgradeRequired "يجب ترقية قاعدة بيانات زوتيرو لكي تعمل مع النسخة الجديدة."> <!ENTITY zotero.upgrade.autoBackup "سيتم عمل نسخة احتياطية من قاعدة البيانات قبل إجراء أي تغييرات."> @@ -59,12 +59,12 @@ <!ENTITY zotero.items.dateAdded_column "تاريخ الإضافة"> <!ENTITY zotero.items.dateModified_column "تاريخ التعديل"> <!ENTITY zotero.items.extra_column "Extra"> -<!ENTITY zotero.items.archive_column "Archive"> +<!ENTITY zotero.items.archive_column "الارشيف"> <!ENTITY zotero.items.archiveLocation_column "Loc. in Archive"> -<!ENTITY zotero.items.place_column "Place"> -<!ENTITY zotero.items.volume_column "Volume"> -<!ENTITY zotero.items.edition_column "Edition"> -<!ENTITY zotero.items.pages_column "Pages"> +<!ENTITY zotero.items.place_column "مكان"> +<!ENTITY zotero.items.volume_column "صوت"> +<!ENTITY zotero.items.edition_column "طبعة"> +<!ENTITY zotero.items.pages_column "صفحات"> <!ENTITY zotero.items.issue_column "Issue"> <!ENTITY zotero.items.series_column "Series"> <!ENTITY zotero.items.seriesTitle_column "Series Title"> @@ -86,9 +86,9 @@ <!ENTITY zotero.items.menu.restoreToLibrary "استعادة المكتبة"> <!ENTITY zotero.items.menu.duplicateItem "تكرار العنصر المحدد"> -<!ENTITY zotero.items.menu.mergeItems "Merge Items…"> +<!ENTITY zotero.items.menu.mergeItems "دمج العناصر..."> -<!ENTITY zotero.duplicatesMerge.versionSelect "Choose the version of the item to use as the master item:"> +<!ENTITY zotero.duplicatesMerge.versionSelect "اختار اصدارة العنصر المناسبة لاستخدامه كعنصر رئيسي:"> <!ENTITY zotero.duplicatesMerge.fieldSelect "Select fields to keep from other versions of the item:"> <!ENTITY zotero.toolbar.newItem.label "عنصر جديد"> @@ -144,13 +144,13 @@ <!ENTITY zotero.tagSelector.deleteTag "حذف الوسم..."> <!ENTITY zotero.tagColorChooser.title "Choose a Tag Color and Position"> -<!ENTITY zotero.tagColorChooser.color "Color:"> +<!ENTITY zotero.tagColorChooser.color "لون:"> <!ENTITY zotero.tagColorChooser.position "Position:"> -<!ENTITY zotero.tagColorChooser.setColor "Set Color"> -<!ENTITY zotero.tagColorChooser.removeColor "Remove Color"> +<!ENTITY zotero.tagColorChooser.setColor "ضبط اللون"> +<!ENTITY zotero.tagColorChooser.removeColor "حذف اللون"> <!ENTITY zotero.lookup.description "ادخل الترقيم الدولي الموحد للكتاب او معرف مقالات الميدلاين او معرف الوثيقة الرقمية."> -<!ENTITY zotero.lookup.button.search "Search"> +<!ENTITY zotero.lookup.button.search "بحث"> <!ENTITY zotero.selectitems.title "تحديد العناصر"> <!ENTITY zotero.selectitems.intro.label "حدد العناصر التي تريد إضافتها لمكتبتك"> @@ -159,8 +159,8 @@ <!ENTITY zotero.bibliography.title "إنشاء ببليوجرافية"> <!ENTITY zotero.bibliography.style.label "نمط الاستشهاد:"> -<!ENTITY zotero.bibliography.outputMode "Output Mode:"> -<!ENTITY zotero.bibliography.bibliography "Bibliography"> +<!ENTITY zotero.bibliography.outputMode "وضع المخرجات:"> +<!ENTITY zotero.bibliography.bibliography "ببليوجرافية"> <!ENTITY zotero.bibliography.outputMethod "Output Method:"> <!ENTITY zotero.bibliography.saveAsRTF.label "حفظ كملف RTF"> <!ENTITY zotero.bibliography.saveAsHTML.label "حفظ كملف HTML"> @@ -241,7 +241,7 @@ <!ENTITY zotero.merge.title "Conflict Resolution"> <!ENTITY zotero.merge.of "of"> -<!ENTITY zotero.merge.deleted "Deleted"> +<!ENTITY zotero.merge.deleted "محذوف"> <!ENTITY zotero.proxy.recognized.title "التعرف على الوكيل"> <!ENTITY zotero.proxy.recognized.warning "قم فقط بإضافة الوكلاء التي لها وصلات على موقع مكتبتك او مدرستك او شركتك"> diff --git a/chrome/locale/ar/zotero/zotero.properties b/chrome/locale/ar/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=لمزيد من المعلومات sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=تحميل موقع WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/bg-BG/zotero/preferences.dtd b/chrome/locale/bg-BG/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/bg-BG/zotero/zotero.properties b/chrome/locale/bg-BG/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Заредете WebDAV адрес sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/ca-AD/zotero/preferences.dtd b/chrome/locale/ca-AD/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Obri about:config"> <!ENTITY zotero.preferences.openCSLEdit "Obri l'editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Obri la previsualització CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ca-AD/zotero/zotero.properties b/chrome/locale/ca-AD/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Carregueu la URL WebDAV al navegado sync.storage.error.webdav.seeCertOverrideDocumentation=Consulteu la documentació d'anul·lació del certificat per a més informació. sync.storage.error.webdav.loadURL=Carrega la URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/cs-CZ/zotero/preferences.dtd b/chrome/locale/cs-CZ/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Otevřít about:config"> <!ENTITY zotero.preferences.openCSLEdit "Otevřít editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Otevřít náhled CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/cs-CZ/zotero/zotero.properties b/chrome/locale/cs-CZ/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Nahrajte vaší WebDAV URL do prohl sync.storage.error.webdav.seeCertOverrideDocumentation=Více informací najdete v dokumentaci překonání certifikátu (certificate override documentation). sync.storage.error.webdav.loadURL=Načíst WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/da-DK/zotero/preferences.dtd b/chrome/locale/da-DK/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Åbn about:config"> <!ENTITY zotero.preferences.openCSLEdit "Åbn CSL-Editor"> <!ENTITY zotero.preferences.openCSLPreview "Åbn CSL-Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/da-DK/zotero/zotero.properties b/chrome/locale/da-DK/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/de/zotero/preferences.dtd b/chrome/locale/de/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "about:config öffnen"> <!ENTITY zotero.preferences.openCSLEdit "CSL Editor öffnen"> <!ENTITY zotero.preferences.openCSLPreview "CSL Vorschau öffnen"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/de/zotero/zotero.properties b/chrome/locale/de/zotero/zotero.properties @@ -751,10 +751,10 @@ sync.error.passwordNotSet=Passwort nicht definiert sync.error.invalidLogin=Ungültiger Benutzername oder Passwort sync.error.invalidLogin.text=Der Zotero Sync Server hat Ihren Benutzernamen und Ihr Passwort nicht akzeptiert \n \n Bitte überprüfen Sie, ob Sie Ihre zotero.org Anmeldeinformationen in den Einstellung zur Synchronisation von Zotero korrekt eingegeben haben. sync.error.enterPassword=Bitte geben Sie ein Passwort ein. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. +sync.error.loginManagerInaccessible=Zotero kann nicht auf ihre Login-Informationen zugreifen. +sync.error.checkMasterPassword=Wenn sie ein Master Passwort in %S verwenden, stellen sie sicher, dass sie es korrekt eingegeben haben. +sync.error.corruptedLoginManager=Es kann auch Folge einer korrupten %1$S Login-Manager Datenbank sein. Um dies zu testen, schließen sie %1$S, legen sie ein Backup an und löschen sie singons.* aus Ihrem %1$S-Profilordner. Geben Sie dann Ihre Logindaten erneut im Sync-Reiter der Zotero Einstellungen ein. +sync.error.loginManagerCorrupted1=Zotero kann nicht nicht auf Ihre Login-Informationen zugreifen, möglicherweise aufgrund einer beschädigten %S-Login-Manager-Datenbank. sync.error.loginManagerCorrupted2=Schließen Sie %S, legen Sie ein Backup an und löschen Sie signons.* aus Ihrem %S-Profilordner. Geben Sie dann Ihre Logindaten erneut im Sync-Reiter der Zotero-Einstellungen ein. sync.error.syncInProgress=Ein Sync-Vorgang läuft bereits. sync.error.syncInProgress.wait=Warten Sie, bis der aktuelle Sync-Vorgang abgeschlossen ist, oder starten Sie Firefox neu. @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Laden Sie Ihre WebDAV-URL im Browse sync.storage.error.webdav.seeCertOverrideDocumentation=Siehe die Dokumenkation zum Zertifikats-Override für weitere Informationen. sync.storage.error.webdav.loadURL=Lade WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=Möglicherweise liegt ein Problem mit Ihrem WebDAV Server vor. Eine hocgeladene Datein war nicht unmittelbar zum Download verfügbar. Es kann zu kurzen Verzögerungen kommen zwischen dem Hochladen von Dateien und ihrer Bereitstellung kommen, insbesondere, wenn Sie einen Cloud-Speicherdienst verwenden. Sollte die Synchronisation in Zotero fehlerfrei funktionieren, dann können Sie diese Meldung ignorieren. Falls aber Schwierigkeiten auftreten, posten Sie dies bitte im Zotero Forum. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Fehler in der Konfiguration des WebDAV Servers sync.storage.error.webdav.serverConfig=Ihr WebDAV Server hat einen internen Fehler gemeldet. @@ -903,7 +904,7 @@ file.accessError.cannotBe=kann nicht file.accessError.created=erstellt file.accessError.updated=aktualisiert file.accessError.deleted=gelöscht -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. +file.accessError.message.windows=Stellen Sie sicher, dass die Datei nicht verwendet wird, dass Schreibberechtigungen vorliegen und das sie einen gültigen Dateinamen hat. file.accessError.message.other=Stellen Sie sicher, dass die Datei nicht verwendet wird und dass Schreibberechtigungen vorliegen. file.accessError.restart=Ein Neustart Ihres Computers oder die Deaktivierung von Sicherheitssoftware könnte ebenfalls Abhilfe schaffen. file.accessError.showParentDir=Übergeordnetes Verzeichnis anzeigen diff --git a/chrome/locale/el-GR/zotero/preferences.dtd b/chrome/locale/el-GR/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/el-GR/zotero/zotero.properties b/chrome/locale/el-GR/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo = Load your WebDAV URL in the brows sync.storage.error.webdav.seeCertOverrideDocumentation = See the certificate override documentation for more information. sync.storage.error.webdav.loadURL = Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload = A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing = Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title = WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig = Your WebDAV server returned an internal error. diff --git a/chrome/locale/es-ES/zotero/preferences.dtd b/chrome/locale/es-ES/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Abrir about:config"> <!ENTITY zotero.preferences.openCSLEdit "Abrir editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Abrir prevista CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/es-ES/zotero/zotero.dtd b/chrome/locale/es-ES/zotero/zotero.dtd @@ -147,7 +147,7 @@ <!ENTITY zotero.tagColorChooser.color "Color:"> <!ENTITY zotero.tagColorChooser.position "Posición:"> <!ENTITY zotero.tagColorChooser.setColor "Establecer color"> -<!ENTITY zotero.tagColorChooser.removeColor "Remove Color"> +<!ENTITY zotero.tagColorChooser.removeColor "Borrar color"> <!ENTITY zotero.lookup.description "Introduce el ISBN, DOI o PMID para buscar en la caja de abajo."> <!ENTITY zotero.lookup.button.search "Buscar"> diff --git a/chrome/locale/es-ES/zotero/zotero.properties b/chrome/locale/es-ES/zotero/zotero.properties @@ -12,7 +12,7 @@ general.restartRequiredForChanges=%S debe reiniciarse para que se realicen los c general.restartNow=Reiniciar ahora general.restartLater=Reiniciar más tarde general.restartApp=Reiniciar %S -general.quitApp=Quit %S +general.quitApp=Salir de %S general.errorHasOccurred=Ha ocurrido un error. general.unknownErrorOccurred=Ha ocurrido un error desconocido. general.invalidResponseServer=Respuesta inválida del servidor. @@ -35,14 +35,14 @@ general.permissionDenied=Permiso denegado general.character.singular=carácter general.character.plural=caracteres general.create=Crear -general.delete=Delete -general.moreInformation=More Information +general.delete=Borrar +general.moreInformation=Más información general.seeForMoreInformation=Mira en %S para más información general.enable=Activar general.disable=Desactivar general.remove=Eliminar general.reset=Restablecer -general.hide=Hide +general.hide=Ocultar general.quit=Salir general.useDefault=Usar predeterminado general.openDocumentation=Abrir documentación @@ -104,7 +104,7 @@ dataDir.selectedDirNonEmpty.title=El directorio no está vacío dataDir.selectedDirNonEmpty.text=El directorio que has seleccionado no está vacío y no parece que sea un directorio de datos de Zotero.\n\n¿Deseas crear los ficheros de Zotero ahí de todas formas? dataDir.selectedDirEmpty.title=Directorio vacío dataDir.selectedDirEmpty.text=The directory you selected is empty. To move an existing Zotero data directory, you will need to manually move files from the existing data directory to the new location after %1$S has closed. -dataDir.selectedDirEmpty.useNewDir=Use the new directory? +dataDir.selectedDirEmpty.useNewDir=¿Usar el nuevo directorio? dataDir.moveFilesToNewLocation=Be sure to move files from your existing Zotero data directory to the new location before reopening %1$S. dataDir.incompatibleDbVersion.title=Versión de base de datos incompatible dataDir.incompatibleDbVersion.text=El directorio de datos seleccionado actualmente no es compatible con Zotero Standalone, que puede compartir una base de datos sólo con Zotero para Firefox 2.1b3 o posterior.\n \n Actualiza a la última versión de Zotero para Firefox antes, o selecciona un directorio de datos diferente para que lo use Zotero Standalone. @@ -138,13 +138,13 @@ date.relative.daysAgo.multiple=Hace %S días date.relative.yearsAgo.one=Hace un año date.relative.yearsAgo.multiple=Hace %S años -pane.collections.delete.title=Delete Collection +pane.collections.delete.title=Borrar colección pane.collections.delete=¿Seguro que quieres borrar la colección seleccionada? -pane.collections.delete.keepItems=Items within this collection will not be deleted. -pane.collections.deleteWithItems.title=Delete Collection and Items -pane.collections.deleteWithItems=Are you sure you want to delete the selected collection and move all items within it to the Trash? +pane.collections.delete.keepItems=No se han podido borrar los ítems de esta colección. +pane.collections.deleteWithItems.title=Borrar colección e ítems +pane.collections.deleteWithItems=¿Está seguro de que quiere borrar la colección seleccionada y mover todos sus ítems a la Papelera? -pane.collections.deleteSearch.title=Delete Search +pane.collections.deleteSearch.title=Borrar búsqueda pane.collections.deleteSearch=¿Seguro que quieres borrar la búsqueda seleccionada? pane.collections.emptyTrash=¿Seguro que quieres eliminar permanentemente los ítems de la Papelera? pane.collections.newCollection=Nueva colección @@ -161,9 +161,9 @@ pane.collections.duplicate=Ítems duplicados pane.collections.menu.rename.collection=Renombrar la colección... pane.collections.menu.edit.savedSearch=Modificar la carpeta de búsqueda -pane.collections.menu.delete.collection=Delete Collection… -pane.collections.menu.delete.collectionAndItems=Delete Collection and Items… -pane.collections.menu.delete.savedSearch=Delete Saved Search… +pane.collections.menu.delete.collection=Borrar colección... +pane.collections.menu.delete.collectionAndItems=Borrar colección e ítems... +pane.collections.menu.delete.savedSearch=Borrar búsqueda guardada... pane.collections.menu.export.collection=Exportar la colección... pane.collections.menu.export.savedSearch=Exportar la carpeta de búsqueda... pane.collections.menu.createBib.collection=Crear una bibliografía a partir de la colección... @@ -195,8 +195,8 @@ pane.items.delete=¿Seguro que quieres borrar el ítem asociado? pane.items.delete.multiple=¿Seguro que quieres borrar los ítems seleccionados? pane.items.menu.remove=Eliminar el ítem seleccionado pane.items.menu.remove.multiple=Eliminar los ítems seleccionados -pane.items.menu.moveToTrash=Move Item to Trash… -pane.items.menu.moveToTrash.multiple=Move Items to Trash… +pane.items.menu.moveToTrash=Mover ítem a la papelera... +pane.items.menu.moveToTrash.multiple=Mover ítems a la papelera... pane.items.menu.export=Exportar el ítem seleccionado... pane.items.menu.export.multiple=Exportar los ítems seleccionados... pane.items.menu.createBib=Crear una bibliografía a partir del ítem seleccionado... @@ -258,7 +258,7 @@ pane.item.attachments.count.singular=%S adjunto: pane.item.attachments.count.plural=%S adjuntos: pane.item.attachments.select=Elige un archivo pane.item.attachments.PDF.installTools.title=No están instaladas las herramientas de PDF -pane.item.attachments.PDF.installTools.text=To use this feature, you must first install the PDF tools in the Search pane of the Zotero preferences. +pane.item.attachments.PDF.installTools.text=Para usar esta característica, debe instalar primero las herramientas PDF en el panel de búsqueda de las preferencias de Zotero. pane.item.attachments.filename=Nombre de archivo pane.item.noteEditor.clickHere=pulsa aquí pane.item.tags.count.zero=%S marcas: @@ -751,7 +751,7 @@ sync.error.passwordNotSet=Contraseña no provista sync.error.invalidLogin=Nombre de usuario o contraseña inválida sync.error.invalidLogin.text=El servidor de sincronización de Zotero no ha aceptado tu usuario y contraseña.\n \n Por favor verifica que has introducido correctamente la información de inicio de sesión de zotero.org en las preferencias de sincronización de Zotero. sync.error.enterPassword=Por favor, ingrese una contraseña. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. +sync.error.loginManagerInaccessible=Zotero no puede acceder a su información de inicio de sesión. sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. @@ -769,24 +769,24 @@ sync.error.checkConnection=Error conectando con el servidor. Verifica tu conexi sync.error.emptyResponseServer=Respuesta vacía del servidor. sync.error.invalidCharsFilename=El nombre de archivo '%S' contiene caracteres no válidos.\n \n Renombra el archivo e inténtalo de nuevo. Si renombras el archivo vía sistema operativo, tendrás que volver a enlazarlo en Zotero. -sync.lastSyncWithDifferentAccount=This Zotero database was last synced with a different zotero.org account ('%1$S') from the current one ('%2$S'). -sync.localDataWillBeCombined=If you continue, local Zotero data will be combined with data from the '%S' account stored on the server. -sync.localGroupsWillBeRemoved1=Local groups, including any with changed items, will also be removed. -sync.avoidCombiningData=To avoid combining or losing data, revert to the '%S' account or use the Reset options in the Sync pane of the Zotero preferences. +sync.lastSyncWithDifferentAccount=Esta base de datos de Zotero se sincronizó la última vez con una cuenta de zotero.org ('%1$S') diferente de la actual ('%2$S'). +sync.localDataWillBeCombined=Si continúa, los datos locales de Zotero se combinarán con datos de la cuenta '%S' almacenada en el servidor. +sync.localGroupsWillBeRemoved1=Se eliminarán los grupos locales, incluyendo cualquiera que tenga ítems cambiados. +sync.avoidCombiningData=Para evitar combinar o perder datos, revierta a la cuenta '%S' o use las opciones de Restablecer en el panel de sincronización de las preferencias de Zotero. sync.localGroupsWillBeRemoved2=If you continue, local groups, including any with changed items, will be removed and replaced with groups linked to the '%1$S' account.\n\nTo avoid losing local changes to groups, be sure you have synced with the '%2$S' account before syncing with the '%1$S' account. sync.conflict.autoChange.alert=One or more locally deleted Zotero %S have been modified remotely since the last sync. sync.conflict.autoChange.log=A Zotero %S has changed both locally and remotely since the last sync: -sync.conflict.remoteVersionsKept=The remote versions have been kept. -sync.conflict.remoteVersionKept=The remote version has been kept. -sync.conflict.localVersionsKept=The local versions have been kept. -sync.conflict.localVersionKept=The local version has been kept. -sync.conflict.recentVersionsKept=The most recent versions have been kept. -sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. -sync.conflict.localVersion=Local version: %S -sync.conflict.remoteVersion=Remote version: %S -sync.conflict.deleted=[deleted] +sync.conflict.remoteVersionsKept=Se han conservado las versiones remotas. +sync.conflict.remoteVersionKept=Se ha conservado la versión remota. +sync.conflict.localVersionsKept=Se han conservado las versiones locales. +sync.conflict.localVersionKept=Se ha conservado la versión local. +sync.conflict.recentVersionsKept=Se han conservado las versiones más recientes. +sync.conflict.recentVersionKept=Se ha conservado la versión más reciente, '%S'. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. +sync.conflict.localVersion=Versión local: %S +sync.conflict.remoteVersion=Versión remota: %S +sync.conflict.deleted=[borrado] sync.conflict.collectionItemMerge.alert=One or more Zotero items have been added to and/or removed from the same collection on multiple computers since the last sync. sync.conflict.collectionItemMerge.log=Zotero items in the collection '%S' have been added and/or removed on multiple computers since the last sync. The following items have been added to the collection: sync.conflict.tagItemMerge.alert=One or more Zotero tags have been added to and/or removed from items on multiple computers since the last sync. The different sets of tags have been combined. @@ -794,10 +794,10 @@ sync.conflict.tagItemMerge.log=The Zotero tag '%S' has been added to and/or remo sync.conflict.tag.addedToRemote=It has been added to the following remote items: sync.conflict.tag.addedToLocal=It has been added to the following local items: -sync.conflict.fileChanged=The following file has been changed in multiple locations. -sync.conflict.itemChanged=The following item has been changed in multiple locations. -sync.conflict.chooseVersionToKeep=Choose the version you would like to keep, and then click %S. -sync.conflict.chooseThisVersion=Choose this version +sync.conflict.fileChanged=El siguiente archivo se ha cambiado en múltiples ubicaciones. +sync.conflict.itemChanged=El siguiente ítem se ha cambiado en múltiples ubicaciones. +sync.conflict.chooseVersionToKeep=Elija la versión que desea conservar, y entonces pulse %S. +sync.conflict.chooseThisVersion=Elegir esta versión sync.status.notYetSynced=Aún sin sincronizar sync.status.lastSync=Última sincronización: @@ -808,12 +808,12 @@ sync.status.uploadingData=Subiendo los datos al servidor de sincronización sync.status.uploadAccepted=Subida aceptada — esperando al servidor de sincronización sync.status.syncingFiles=Sincronizando ficheros -sync.storage.mbRemaining=%SMB remaining +sync.storage.mbRemaining=%SMB restantes sync.storage.kbRemaining=%SKB restantes sync.storage.filesRemaining=%1$S/%2$S archivos sync.storage.none=Ninguno -sync.storage.downloads=Downloads: -sync.storage.uploads=Uploads: +sync.storage.downloads=Descargas: +sync.storage.uploads=Subidas: sync.storage.localFile=Fichero local sync.storage.remoteFile=Fichero remoto sync.storage.savedFile=Fichero guardado @@ -828,7 +828,7 @@ sync.storage.error.permissionDeniedAtAddress=No tienes permiso para crear un dir sync.storage.error.checkFileSyncSettings=Comprueba tus ajustes de fichero de sincronización o informa al administrador de tu servidor. sync.storage.error.verificationFailed=Falló la verificación de %S. Comprueba tus ajustes de fichero de sincronización en el panel "Sincronización" de las preferencias de Zotero. sync.storage.error.fileNotCreated=El archivo '%S' no se pudo crear en el directorio 'storage' de Zotero. -sync.storage.error.encryptedFilenames=Error creating file '%S'.\n\nSee http://www.zotero.org/support/kb/encrypted_filenames for more information. +sync.storage.error.encryptedFilenames=Error creando el archivo '%S'.\n\nVea http://www.zotero.org/support/kb/encrypted_filenames para más información. sync.storage.error.fileEditingAccessLost=Ya no tienes acceso a modificar ficheros en el grupo Zotero '%S', y los ficheros que has añadido o modificado no pueden sincronizarse con el servidor. sync.storage.error.copyChangedItems=Si quieres tener la oportunidad de copiar los ítems y fichero cambiados a otro sitio, debes cancelar la sincronización ahora. sync.storage.error.fileUploadFailed=Falló la subida del fichero. @@ -838,7 +838,7 @@ sync.storage.error.createNow=¿Quieres crearlo ahora? sync.storage.error.webdav.default=A WebDAV file sync error occurred. Please try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. sync.storage.error.webdav.defaultRestart=A WebDAV file sync error occurred. Please restart %S and try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. -sync.storage.error.webdav.enterURL=Please enter a WebDAV URL. +sync.storage.error.webdav.enterURL=Por favor introduzca una URL WebDAV. sync.storage.error.webdav.invalidURL=%S no es un URL WebDAV válido. sync.storage.error.webdav.invalidLogin=El servidor WebDAV no ha aceptado el nombre y clave que has introducido. sync.storage.error.webdav.permissionDenied=No tienes permiso para acceder a %S en el servidor WebDAV. @@ -849,16 +849,17 @@ sync.storage.error.webdav.loadURLForMoreInfo=Carga tu URL WebDAV en el navegador sync.storage.error.webdav.seeCertOverrideDocumentation=Mira la documentación de sobreescritura de certificado para mayor información. sync.storage.error.webdav.loadURL=Cargar la URL del WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. -sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error -sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. +sync.storage.error.webdav.serverConfig.title=Error de configuración del servidor WebDAV +sync.storage.error.webdav.serverConfig=El servidor WebDAV devolvió un error interno. sync.storage.error.zfs.restart=A file sync error occurred. Please restart %S and/or your computer and try syncing again.\n\nIf the error persists, there may be a problem with either your computer or your network: security software, proxy server, VPN, etc. Try disabling any security/firewall software you're using or, if this is a laptop, try from a different network. -sync.storage.error.zfs.tooManyQueuedUploads=You have too many queued uploads. Please try again in %S minutes. +sync.storage.error.zfs.tooManyQueuedUploads=Tiene encoladas demasiadas subidas. Por favor inténtelo de nuevo en %S minutos. sync.storage.error.zfs.personalQuotaReached1=Has alcanzado tu cuota de almacenamiento de archivo Zotero. Algunos archivos no se cargaron. Otros datos de Zotero continuarán sincronizándose con el servidor. sync.storage.error.zfs.personalQuotaReached2=Revisa la configuración de tu cuenta en zotero.org para opciones adicionales de almacenaje. sync.storage.error.zfs.groupQuotaReached1=El grupo '%S' ha alcanzado su quota de almacenamiento de archivos Zotero. Algunos archivos no se cargaron. Otros datos de Zotero continuarán sincronizándose con el servidor. sync.storage.error.zfs.groupQuotaReached2=El propietario del grupo puede aumentar la capacidad de almacenamiento del grupo desde la sección configuración de almacenamiento en zotero.org -sync.storage.error.zfs.fileWouldExceedQuota=The file '%S' would exceed your Zotero File Storage quota +sync.storage.error.zfs.fileWouldExceedQuota=El archivo '%S' sobrepasaría su cuota de almacenamiento de Zotero sync.longTagFixer.saveTag=Guardar etiqueta sync.longTagFixer.saveTags=Guardar etiquetas @@ -885,7 +886,7 @@ recognizePDF.couldNotRead=No se puede leer texto desde el PDF. recognizePDF.noMatches=No hay referencias encontradas. recognizePDF.fileNotFound=Archivo no encontrado. recognizePDF.limit=Límite de consultas alcanzado. Reinténtalo más tarde. -recognizePDF.error=An unexpected error occurred. +recognizePDF.error=Ha ocurrido un error inesperado. recognizePDF.complete.label=Recuperación de metadatos completa. recognizePDF.close.label=Cerrar @@ -897,16 +898,16 @@ rtfScan.saveTitle=Seleccionar un lugar donde guardar el archivo con formato rtfScan.scannedFileSuffix=(Escaneado) -file.accessError.theFile=The file '%S' -file.accessError.aFile=A file -file.accessError.cannotBe=cannot be -file.accessError.created=created -file.accessError.updated=updated -file.accessError.deleted=deleted +file.accessError.theFile=El archivo '%S' +file.accessError.aFile=Un archivo +file.accessError.cannotBe=no puede ser +file.accessError.created=creado +file.accessError.updated=actualizado +file.accessError.deleted=borrado file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. -file.accessError.message.other=Check that the file is not currently in use and that its permissions allow write access. -file.accessError.restart=Restarting your computer or disabling security software may also help. -file.accessError.showParentDir=Show Parent Directory +file.accessError.message.other=Compruebe que el archivo no está actualmente en uso y que sus permisos incluyen acceso de escritura. +file.accessError.restart=Reiniciar el ordenador o deshabilitar el software de seguridad también puede ayudar. +file.accessError.showParentDir=Mostrar directorio padre lookup.failure.title=Búsqueda fallida lookup.failure.description=Zotero no puede encontrar un registro del identificador especificado. Por favor, verifica el identificador e inténtalo nuevamente. diff --git a/chrome/locale/et-EE/zotero/preferences.dtd b/chrome/locale/et-EE/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Avada about:config"> <!ENTITY zotero.preferences.openCSLEdit "Avada CSL redaktor"> <!ENTITY zotero.preferences.openCSLPreview "Avada CSL eelvaade"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/et-EE/zotero/zotero.properties b/chrome/locale/et-EE/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Edasiseks infoks laadige WebDAV URL sync.storage.error.webdav.seeCertOverrideDocumentation=Lisainfoks vaadake sertifikaadi tühistamise dokumentatsiooni. sync.storage.error.webdav.loadURL=WebDAV URL laadimine sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/eu-ES/zotero/preferences.dtd b/chrome/locale/eu-ES/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/eu-ES/zotero/zotero.properties b/chrome/locale/eu-ES/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/fa/zotero/preferences.dtd b/chrome/locale/fa/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/fa/zotero/zotero.properties b/chrome/locale/fa/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=برای اطلاعات بیشتر sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/fi-FI/zotero/preferences.dtd b/chrome/locale/fi-FI/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Avaa about:config"> <!ENTITY zotero.preferences.openCSLEdit "Avaa CSL-muokkain"> <!ENTITY zotero.preferences.openCSLPreview "Avaa CSL-esikatselu"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/fi-FI/zotero/zotero.properties b/chrome/locale/fi-FI/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Lataa WebDAV-osoite nettiselaimessa sync.storage.error.webdav.seeCertOverrideDocumentation=Katso lisätietoja sertifikaatin ohittamisen ohjeista. sync.storage.error.webdav.loadURL=Lataa WebDAV-osoite sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/fr-FR/zotero/preferences.dtd b/chrome/locale/fr-FR/zotero/preferences.dtd @@ -62,7 +62,7 @@ <!ENTITY zotero.preferences.sync.fileSyncing.groups "Synchroniser les fichiers joints dans les bibliothèques de groupe en utilisant le stockage de Zotero"> <!ENTITY zotero.preferences.sync.fileSyncing.download "Télécharger les fichiers"> <!ENTITY zotero.preferences.sync.fileSyncing.download.atSyncTime "lors de la synchronisation"> -<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "si nécessaire"> +<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "à la demande"> <!ENTITY zotero.preferences.sync.fileSyncing.tos1 "En utilisant le stockage de Zotero, vous acceptez d'être lié par ses"> <!ENTITY zotero.preferences.sync.fileSyncing.tos2 "modalités et conditions"> <!ENTITY zotero.preferences.sync.reset.warning1 "Les opérations suivantes ne sont à utiliser que dans de rares et spécifiques situations et ne doivent pas être utilisées pour un dépannage général. Dans la plupart des cas, la réinitialisation ne fera que causer des problèmes supplémentaires. Consultez "> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Ouvrir about:config"> <!ENTITY zotero.preferences.openCSLEdit "Ouvrir CSL Editor (test des styles installés)"> <!ENTITY zotero.preferences.openCSLPreview "Ouvrir CSL Preview (aperçu des styles installés)"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/fr-FR/zotero/zotero.properties b/chrome/locale/fr-FR/zotero/zotero.properties @@ -751,10 +751,10 @@ sync.error.passwordNotSet=Mot de passe non défini sync.error.invalidLogin=Identifiant ou mot de passe invalide sync.error.invalidLogin.text=Le serveur de synchronisation Zotero n'a pas accepté vos nom d'utilisateur et mot de passe.\n \n Veuillez vérifier que vous avez saisi vos identifiants zotero.org correctement dans le panneau Synchronisation des Préférences de Zotero. sync.error.enterPassword=Veuillez saisir votre mot de passe. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. +sync.error.loginManagerInaccessible=Zotero ne peut pas accéder à vos informations de connexion. +sync.error.checkMasterPassword=Si vous utilisez un mot de passe maître dans %S, assurez-vous de l'avoir saisi correctement. +sync.error.corruptedLoginManager=Ce pourrait être également causé par la corruption de la base de données du gestionnaire de connexions de %1$S. Pour vérifier, fermez %1$S, sauvegardez puis supprimez signons.* de votre profil %1, et saisissez à nouveau vos informations de connexion Zotero dans le panneau Synchronisation des Préférences de Zotero. +sync.error.loginManagerCorrupted1=Zotero ne peut pas accéder à vos informations de connexion, peut-être à cause de la corruption de la base de données du gestionnaire de connexions de %S. sync.error.loginManagerCorrupted2=Fermez %1$S, sauvegardez signons.* puis supprimez-le de votre profil %2$S, et finalement saisissez à nouveau vos informations de connexion dans le panneau Synchronisation des Préférences de Zotero. sync.error.syncInProgress=Une opération de synchronisation est déjà en cours. sync.error.syncInProgress.wait=Attendez que la synchronisation précédente soit terminée ou redémarrez %S. @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Entrez votre URL WebDAV dans votre sync.storage.error.webdav.seeCertOverrideDocumentation=Consultez la documentation relative aux exceptions de certificats auto-signés (certificate override) pour plus d'information. sync.storage.error.webdav.loadURL=Charger l'URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=Un problème potentiel a été trouvé avec votre serveur WebDAV.\n \n Un fichier téléversé sur le serveur n'était pas immédiatement accessible au téléchargement. Il peut y avoir un court délai entre le moment où vous envoyez des fichiers et celui où ils sont disponibles, particulièrement si vous utilisez un service de stockage dans le nuage.\n \n Si la synchronisation des fichiers Zotero fonctionne normalement, vous pouvez ignorer ce message. Si vous rencontrez des problèmes, veuillez poster un message sur le forum zotero.org . +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Erreur de configuration du serveur WebDAV sync.storage.error.webdav.serverConfig=Votre serveur WebDAV a retourné une erreur interne. @@ -903,7 +904,7 @@ file.accessError.cannotBe=ne peut pas être file.accessError.created=créé file.accessError.updated=mis à jour file.accessError.deleted=supprimé -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. +file.accessError.message.windows=Vérifiez que le fichier n'est pas utilisé actuellement, que ses permissions autorisent l'accès en écriture et qu'il a un nom de fichier valide. file.accessError.message.other=Vérifiez que le fichier n'est pas utilisé actuellement et que ses permissions autorisent l'accès en écriture. file.accessError.restart=Redémarrer votre ordinateur ou désactiver les logiciels de sécurité peut aussi aider. file.accessError.showParentDir=Localiser le répertoire parent diff --git a/chrome/locale/gl-ES/zotero/preferences.dtd b/chrome/locale/gl-ES/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Abrir about:config"> <!ENTITY zotero.preferences.openCSLEdit "Abrir o editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Abrir a previsualización de CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/gl-ES/zotero/zotero.properties b/chrome/locale/gl-ES/zotero/zotero.properties @@ -12,12 +12,12 @@ general.restartRequiredForChanges=Debe reiniciar %S para que os cambios teña ef general.restartNow=Produciuse un erro. general.restartLater=Reiniciar máis tarde general.restartApp=Reiniciar %S -general.quitApp=Quit %S +general.quitApp=Saír %S general.errorHasOccurred=Produciuse un erro. general.unknownErrorOccurred=Produciuse un erro descoñecido. -general.invalidResponseServer=Invalid response from server. -general.tryAgainLater=Please try again in a few minutes. -general.serverError=The server returned an error. Please try again. +general.invalidResponseServer=Resposta non válida dende o servidor. +general.tryAgainLater=Proba de novo nuns minutos. +general.serverError=O servidor devolveu un erro. Inténtao de novo. general.restartFirefox=Reinicie %S. general.restartFirefoxAndTryAgain=Reinicie %S e volva intentalo. general.checkForUpdate=Comprobar as actualizacións @@ -35,19 +35,19 @@ general.permissionDenied=Permiso denegado general.character.singular=carácter general.character.plural=caracteres general.create=Crear -general.delete=Delete -general.moreInformation=More Information +general.delete=Eliminar +general.moreInformation=Máis información general.seeForMoreInformation=Vexa %S para máis información. general.enable=Activar general.disable=Desactivar general.remove=Remove -general.reset=Reset -general.hide=Hide -general.quit=Quit -general.useDefault=Use Default +general.reset=Reiniciar +general.hide=Agochar +general.quit=Saír +general.useDefault=Usar o predefinido general.openDocumentation=Abrir a documentación general.numMore=%S máis... -general.openPreferences=Open Preferences +general.openPreferences=Abrir as preferencias general.operationInProgress=Está en marcha unha operación Zotero general.operationInProgress.waitUntilFinished=Agarde ata que teña acabado. @@ -79,22 +79,22 @@ errorReport.advanceMessage=Prema %S para enviar un informe de erros aos desenvol errorReport.stepsToReproduce=Pasos a reproducir: errorReport.expectedResult=Resultado esperado: errorReport.actualResult=Resultado real: -errorReport.noNetworkConnection=No network connection -errorReport.invalidResponseRepository=Invalid response from repository -errorReport.repoCannotBeContacted=Repository cannot be contacted - - -attachmentBasePath.selectDir=Choose Base Directory -attachmentBasePath.chooseNewPath.title=Confirm New Base Directory -attachmentBasePath.chooseNewPath.message=Linked file attachments below this directory will be saved using relative paths. -attachmentBasePath.chooseNewPath.existingAttachments.singular=One existing attachment was found within the new base directory. -attachmentBasePath.chooseNewPath.existingAttachments.plural=%S existing attachments were found within the new base directory. -attachmentBasePath.chooseNewPath.button=Change Base Directory Setting -attachmentBasePath.clearBasePath.title=Revert to Absolute Paths -attachmentBasePath.clearBasePath.message=New linked file attachments will be saved using absolute paths. -attachmentBasePath.clearBasePath.existingAttachments.singular=One existing attachment within the old base directory will be converted to use an absolute path. -attachmentBasePath.clearBasePath.existingAttachments.plural=%S existing attachments within the old base directory will be converted to use absolute paths. -attachmentBasePath.clearBasePath.button=Clear Base Directory Setting +errorReport.noNetworkConnection=Sen conexión á rede +errorReport.invalidResponseRepository=Resposta non válida dende o repositorio +errorReport.repoCannotBeContacted=Non se puido contactar co repositorio + + +attachmentBasePath.selectDir=Escoller o cartafol principal +attachmentBasePath.chooseNewPath.title=Cofirmar o novo cartafol principal +attachmentBasePath.chooseNewPath.message=Os ficheiros anexos ligados dentro deste cartagol gardaranse usando as rutas relativas. +attachmentBasePath.chooseNewPath.existingAttachments.singular=Atopouse un novo anexo dentro no novo cartafol base. +attachmentBasePath.chooseNewPath.existingAttachments.plural=Atopáronse %S anexos que existian xa dentro no novo cartafol base. +attachmentBasePath.chooseNewPath.button=Cambiar a configuración do cartafol base +attachmentBasePath.clearBasePath.title=Volver ás rutas absolutas +attachmentBasePath.clearBasePath.message=Os novos ficheiros anexos ligados gardaranse usando as rutas completas. +attachmentBasePath.clearBasePath.existingAttachments.singular=Un anexo que existia dentro do cartafol base antigo converterase a outro usando a ruta completa. +attachmentBasePath.clearBasePath.existingAttachments.plural=%S novos anexos que están dentro do antigo cartafol base vanse converter usando rutas absolutas. +attachmentBasePath.clearBasePath.button=Limpar a configuración do cartagol base dataDir.notFound=Non se atopou o directorio de datos de Zotero. dataDir.previousDir=Directorio anterior: @@ -102,12 +102,12 @@ dataDir.useProfileDir=Usar directorio de perfís de Firefox dataDir.selectDir=Seleccionar un directorio de datos de Zotero dataDir.selectedDirNonEmpty.title=Directorio non baleiro dataDir.selectedDirNonEmpty.text=O directorio que seleccionou non está baleiro e non parece ser un directorio de datos de Zotero.\n\nAinda así quere que Zotero xestione ficheiros nese directorio? -dataDir.selectedDirEmpty.title=Directory Empty +dataDir.selectedDirEmpty.title=Cartafol baleiro dataDir.selectedDirEmpty.text=The directory you selected is empty. To move an existing Zotero data directory, you will need to manually move files from the existing data directory to the new location after %1$S has closed. -dataDir.selectedDirEmpty.useNewDir=Use the new directory? +dataDir.selectedDirEmpty.useNewDir=Usar o novo cartafol? dataDir.moveFilesToNewLocation=Be sure to move files from your existing Zotero data directory to the new location before reopening %1$S. -dataDir.incompatibleDbVersion.title=Incompatible Database Version -dataDir.incompatibleDbVersion.text=The currently selected data directory is not compatible with Zotero Standalone, which can share a database only with Zotero for Firefox 2.1b3 or later.\n\nUpgrade to the latest version of Zotero for Firefox first or select a different data directory for use with Zotero Standalone. +dataDir.incompatibleDbVersion.title=Versión da base de datos incompatible +dataDir.incompatibleDbVersion.text=O cartafol de datos que está escollido agora mesmo non é compatible con Zotero Standalone, que só é quen de compartir bases de datos co Zotero para Firefox 2.1b3 ou posteriores. dataDir.standaloneMigration.title=Atopouse unha biblioteca de Zotero que xa existía dataDir.standaloneMigration.description=Semella que é a primeira vez que emprega %1%S. Quere que %1$S inporte as configuracións de %2$S e se use o directorio de datos que xa existe? dataDir.standaloneMigration.multipleProfiles=%1$S compartirá os seus directorio de datos co perfil empregado máis recementente. @@ -138,13 +138,13 @@ date.relative.daysAgo.multiple=%S días atrás date.relative.yearsAgo.one=1 año atrás date.relative.yearsAgo.multiple=%S años atrás -pane.collections.delete.title=Delete Collection +pane.collections.delete.title=Eliminar a colección pane.collections.delete=Seguro que desexa eliminar a colección seleccionada? -pane.collections.delete.keepItems=Items within this collection will not be deleted. -pane.collections.deleteWithItems.title=Delete Collection and Items +pane.collections.delete.keepItems=O elementos dentro desta colección non se eliminarán. +pane.collections.deleteWithItems.title=Eliminar colección e elementos pane.collections.deleteWithItems=Are you sure you want to delete the selected collection and move all items within it to the Trash? -pane.collections.deleteSearch.title=Delete Search +pane.collections.deleteSearch.title=Eliminar a busca pane.collections.deleteSearch=Seguro que desexa eliminar a busca seleccionada? pane.collections.emptyTrash=Seguro que quere eliminar permanentemente os elementos do lixo? pane.collections.newCollection=Nova colección @@ -153,7 +153,7 @@ pane.collections.newSavedSeach=Nova busca gardada pane.collections.savedSearchName=Introduza un nome para esta procura gardada: pane.collections.rename=Cambiar o nome da colección: pane.collections.library=A miña biblioteca -pane.collections.groupLibraries=Group Libraries +pane.collections.groupLibraries=Grupo de bibliotecas pane.collections.trash=Lixo pane.collections.untitled=Sen título pane.collections.unfiled=Elementos sen título @@ -161,9 +161,9 @@ pane.collections.duplicate=Elementos duplicados pane.collections.menu.rename.collection=Renomear a colección... pane.collections.menu.edit.savedSearch=Editar a busca gardada -pane.collections.menu.delete.collection=Delete Collection… -pane.collections.menu.delete.collectionAndItems=Delete Collection and Items… -pane.collections.menu.delete.savedSearch=Delete Saved Search… +pane.collections.menu.delete.collection=Eliminar a colección... +pane.collections.menu.delete.collectionAndItems=Eliminar a colección e os elementos... +pane.collections.menu.delete.savedSearch=Eliminar as buscas gardadas... pane.collections.menu.export.collection=Exportar a colección... pane.collections.menu.export.savedSearch=Exportar a busca gardada... pane.collections.menu.createBib.collection=Crear unha bibliografía a partir da colección... @@ -179,14 +179,14 @@ pane.tagSelector.delete.message=Seguro que desexa eliminar esta etiqueta?\n\nEli pane.tagSelector.numSelected.none=0 etiquetas seleccionadas pane.tagSelector.numSelected.singular=%S etiqueta seleccionada pane.tagSelector.numSelected.plural=%S etiquetas seleccionadas -pane.tagSelector.maxColoredTags=Only %S tags in each library can have colors assigned. +pane.tagSelector.maxColoredTags=Só %S etiquetas de cada biblioteca poden ter cores asignadas. -tagColorChooser.numberKeyInstructions=You can add this tag to selected items by pressing the $NUMBER key on the keyboard. -tagColorChooser.maxTags=Up to %S tags in each library can have colors assigned. +tagColorChooser.numberKeyInstructions=Podes engadir esta etiqueta para seleccionar elementos premento a tecla $NUMBER. +tagColorChooser.maxTags=Só ata %S etiquetas de cada biblioteca poden ter cores asignadas. pane.items.loading=Cargando a lista de elementos ... -pane.items.attach.link.uri.title=Attach Link to URI -pane.items.attach.link.uri=Enter a URI: +pane.items.attach.link.uri.title=Anexar a ligazón á URI +pane.items.attach.link.uri=Introducir unha URI: pane.items.trash.title=Mover ao lixo pane.items.trash=Seguro que quere mover o elemento seleccionado ao lixo? pane.items.trash.multiple=Seguro que quere mover os elementos seleccionados ao lixo? @@ -195,8 +195,8 @@ pane.items.delete=Seguro que quere eliminar o elemento seleccionado? pane.items.delete.multiple=Seguro que quere eliminar os elementos seleccionados? pane.items.menu.remove=Eliminar o elemento seleccionado pane.items.menu.remove.multiple=Eliminar os elementos seleccionados -pane.items.menu.moveToTrash=Move Item to Trash… -pane.items.menu.moveToTrash.multiple=Move Items to Trash… +pane.items.menu.moveToTrash=Mover os elementos ao lixo... +pane.items.menu.moveToTrash.multiple=Mover os elementos ao lixo... pane.items.menu.export=Exportar o elemento seleccionado pane.items.menu.export.multiple=Exportar os elementos seleccionados... pane.items.menu.createBib=Crear unha bibliografía a partir do elemento seleccionado... @@ -227,11 +227,11 @@ pane.item.unselected.zero=Sen elementos nesta vista pane.item.unselected.singular=%S elementos nesta vista pane.item.unselected.plural=%S elementos nesta vista -pane.item.duplicates.selectToMerge=Select items to merge -pane.item.duplicates.mergeItems=Merge %S items -pane.item.duplicates.writeAccessRequired=Library write access is required to merge items. +pane.item.duplicates.selectToMerge=Escolle os elementos a xunguir +pane.item.duplicates.mergeItems=Xunguir %S elementos +pane.item.duplicates.writeAccessRequired=Para poder xunguir os elementos precísanse permisos de escritura para a biblioteca. pane.item.duplicates.onlyTopLevel=Only top-level full items can be merged. -pane.item.duplicates.onlySameItemType=Merged items must all be of the same item type. +pane.item.duplicates.onlySameItemType=Os elementos xunguidos teén que ser todos do mesmo tipo. pane.item.changeType.title=Cambiar o tipo de elemento pane.item.changeType.text=Está seguro de que quere cambiar o tipo de elemento?\n\nPerderanse os seguintes campos: @@ -257,9 +257,9 @@ pane.item.attachments.count.zero=%S adxuntos: pane.item.attachments.count.singular=%S adxunto: pane.item.attachments.count.plural=%S adxuntos: pane.item.attachments.select=Escolla un ficheiro -pane.item.attachments.PDF.installTools.title=PDF Tools Not Installed +pane.item.attachments.PDF.installTools.title=PDF Tools non está instalado pane.item.attachments.PDF.installTools.text=To use this feature, you must first install the PDF tools in the Search pane of the Zotero preferences. -pane.item.attachments.filename=Filename +pane.item.attachments.filename=Nome de ficheiro pane.item.noteEditor.clickHere=prema aquí pane.item.tags.count.zero=%S etiquetas: pane.item.tags.count.singular=%S etiqueta: @@ -469,7 +469,7 @@ save.error.cannotAddFilesToCollection=Non pode engadir ficheiros á colección q ingester.saveToZotero=Gardar en Zotero ingester.saveToZoteroUsing=Gardar en Zotero empregando «%S» ingester.scraping=Gardando o elemento... -ingester.scrapingTo=Saving to +ingester.scrapingTo=Gardando en ingester.scrapeComplete=Gardouse o elemento ingester.scrapeError=Non se puido gardar o elemento ingester.scrapeErrorDescription=Produciuse un erro ao gardalo. Comprobe %S para obter máis información. @@ -482,7 +482,7 @@ ingester.importReferRISDialog.checkMsg=Permitir sempre para este sitio ingester.importFile.title=Importar o ficheiro ingester.importFile.text=Quere importar o ficheiro «%S»?\n\nEses elementos engadiranse a unha nova colección. -ingester.importFile.intoNewCollection=Import into new collection +ingester.importFile.intoNewCollection=Inportar na nova colección ingester.lookup.performing=Facendo unha busca… ingester.lookup.error=Aconteceu un erro ao buscar ese elemento. @@ -515,12 +515,12 @@ zotero.preferences.sync.purgeStorage.title=Purge Attachment Files on Zotero Serv zotero.preferences.sync.purgeStorage.desc=If you plan to use WebDAV for file syncing and you previously synced attachment files in My Library to the Zotero servers, you can purge those files from the Zotero servers to give you more storage space for groups.\n\nYou can purge files at any time from your account settings on zotero.org. zotero.preferences.sync.purgeStorage.confirmButton=Purge Files Now zotero.preferences.sync.purgeStorage.cancelButton=Do Not Purge -zotero.preferences.sync.reset.userInfoMissing=You must enter a username and password in the %S tab before using the reset options. +zotero.preferences.sync.reset.userInfoMissing=Tes que introducir un nome de usuario e un contrasinal na lapela %S antes de usar a opción de reiniciar. zotero.preferences.sync.reset.restoreFromServer=All data in this copy of Zotero will be erased and replaced with data belonging to user '%S' on the Zotero server. -zotero.preferences.sync.reset.replaceLocalData=Replace Local Data -zotero.preferences.sync.reset.restartToComplete=Firefox must be restarted to complete the restore process. +zotero.preferences.sync.reset.replaceLocalData=Substituír os datos locais +zotero.preferences.sync.reset.restartToComplete=Hai que reiniciar Firepor para poder completar o proceso de restauración. zotero.preferences.sync.reset.restoreToServer=All data belonging to user '%S' on the Zotero server will be erased and replaced with data from this copy of Zotero.\n\nDepending on the size of your library, there may be a delay before your data is available on the server. -zotero.preferences.sync.reset.replaceServerData=Replace Server Data +zotero.preferences.sync.reset.replaceServerData=Substituír os datos do servidor zotero.preferences.sync.reset.fileSyncHistory=All file sync history will be cleared.\n\nAny local attachment files that do not exist on the storage server will be uploaded on the next sync. zotero.preferences.search.rebuildIndex=Reconstruír o Índice @@ -561,7 +561,7 @@ zotero.preferences.advanced.resetStyles.changesLost=Perderanse todo os estilos n zotero.preferences.advanced.debug.title=Debug Output Submitted zotero.preferences.advanced.debug.sent=Debug output has been sent to the Zotero server.\n\nThe Debug ID is D%S. -zotero.preferences.advanced.debug.error=An error occurred sending debug output. +zotero.preferences.advanced.debug.error=Aconteceu un erro enviando a saída de depuración. dragAndDrop.existingFiles=Os seguintes ficheiros xa existían no directorio de destino e non se copiaron: dragAndDrop.filesNotFound=Os seguintes ficheiros non se atoparon e non se puideron copiar: @@ -572,8 +572,8 @@ fileInterface.import=Importar fileInterface.export=Exportar fileInterface.exportedItems=Elementos exportados fileInterface.imported=Importados -fileInterface.unsupportedFormat=The selected file is not in a supported format. -fileInterface.viewSupportedFormats=View Supported Formats… +fileInterface.unsupportedFormat=O ficheiro que se escolleu non ten un formato que estea soportado. +fileInterface.viewSupportedFormats=Ver os formatos soportados... fileInterface.untitledBibliography=Bibliografía sen título fileInterface.bibliographyHTMLTitle=Bibliografía fileInterface.importError=Erro ao intentar importar o ficheiro seleccionado. Asegúrese de que o ficheiro é válido e volva intentalo. @@ -582,9 +582,9 @@ fileInterface.noReferencesError=Os elementos que seleccionou non conteñen refer fileInterface.bibliographyGenerationError=Produciuse un erro ao xerar a súa bibliografía. Inténteo de novo. fileInterface.exportError=Produciuse un erro ao intentar a exportación do ficheiro seleccionado. -quickSearch.mode.titleCreatorYear=Title, Creator, Year -quickSearch.mode.fieldsAndTags=All Fields & Tags -quickSearch.mode.everything=Everything +quickSearch.mode.titleCreatorYear=Título, creador, ano +quickSearch.mode.fieldsAndTags=Todos os campos e &etiquetas +quickSearch.mode.everything=Todo advancedSearchMode=Modo de busca avanzada - pulse Enter para buscar. searchInProgress=Busca en curso - espere. @@ -690,7 +690,7 @@ integration.cited.loading=Cargando os elementos citados... integration.ibid=ibid integration.emptyCitationWarning.title=Cita en branco integration.emptyCitationWarning.body=A cita que indicou estaría baleira co estilo que está seleccionado actualmente. Seguro que desexa engadila? -integration.openInLibrary=Open in %S +integration.openInLibrary=Abrir en %S integration.error.incompatibleVersion=Esta versión do engadido o para procesador de texto de Zotero ($INTEGRATION_VERSION) é incompatible coa versión de Zotero (%1$S) que está instalada. Asegúrese de usar as últimas versións de ámbolos dous complementos. integration.error.incompatibleVersion2=Zotero %1$S require %2$S %3$S ou superior. Descargue a última versión de dende %2$S zotero.org @@ -721,8 +721,8 @@ integration.citationChanged=Modificou as citas dende que Zotero as xerou. Quere integration.citationChanged.description=Premendo «Si» evítase que Zotero actualice a cita cando se engaden outras adicionais, cando se fan cambios de estilo ou cando se modifica a referencia á que se dirixen. Premendo «Non» elimínanse os vosos cambios anteriores. integration.citationChanged.edit=Modificou a cita desde que Zotero a xerou. Unha edición borra as súas modificacións. Quere continuar?. -styles.install.title=Install Style -styles.install.unexpectedError=An unexpected error occurred while installing "%1$S" +styles.install.title=Instalar estilo +styles.install.unexpectedError=Aconteceu un erro que non se agardaba instalando «%1$S» styles.installStyle=Instalar o estilo «%1$S» desde %2$S? styles.updateStyle=Actualizar o estilo «%1$S» con «%2$S» desde %3$S? styles.installed=Instalouse correctamente o estilo «%S». @@ -732,11 +732,11 @@ styles.installSourceError=%1$S fai referencia a un ficheiro CSL que non é váli styles.deleteStyle=Seguro que desexa borrar o estilo «%1$S»? styles.deleteStyles=Seguro que desexa eliminar os estilos seleccionados? -styles.abbreviations.title=Load Abbreviations -styles.abbreviations.parseError=The abbreviations file "%1$S" is not valid JSON. -styles.abbreviations.missingInfo=The abbreviations file "%1$S" does not specify a complete info block. +styles.abbreviations.title=Cargar as abreviacións +styles.abbreviations.parseError=O ficheiro de abreviacións «1$S» non é un JSON válido. +styles.abbreviations.missingInfo=O ficheiro de abreviacións «%1$» non especifica un bloque de información completo. -sync.sync=Sync +sync.sync=Sincronizar sync.cancel=Cancelar a sincronización sync.openSyncPreferences=Abrir as preferencias de sincronización ... sync.resetGroupAndSync=Reaxustar o grupo e a sincronización @@ -764,9 +764,9 @@ sync.error.copyChangedItems=Cancele a sincronización se antes prefire copiar os sync.error.manualInterventionRequired=Unha sincronización automática produciu un conflito que require resolvelo manualmente. sync.error.clickSyncIcon=Faga clic na icona de sincronización para sincronizar a man. sync.error.invalidClock=The system clock is set to an invalid time. You will need to correct this to sync with the Zotero server. -sync.error.sslConnectionError=SSL connection error -sync.error.checkConnection=Error connecting to server. Check your Internet connection. -sync.error.emptyResponseServer=Empty response from server. +sync.error.sslConnectionError=Erro de conexión SSL +sync.error.checkConnection=Erro conectando co servidor. Comproba a conexión á internet. +sync.error.emptyResponseServer=Resposta baleira dende o servidor. sync.error.invalidCharsFilename=The filename '%S' contains invalid characters.\n\nRename the file and try again. If you rename the file via the OS, you will need to relink it in Zotero. sync.lastSyncWithDifferentAccount=This Zotero database was last synced with a different zotero.org account ('%1$S') from the current one ('%2$S'). @@ -783,10 +783,10 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. -sync.conflict.localVersion=Local version: %S -sync.conflict.remoteVersion=Remote version: %S -sync.conflict.deleted=[deleted] +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. +sync.conflict.localVersion=Versión local: %S +sync.conflict.remoteVersion=Versión remota: %S +sync.conflict.deleted=[eliminado] sync.conflict.collectionItemMerge.alert=One or more Zotero items have been added to and/or removed from the same collection on multiple computers since the last sync. sync.conflict.collectionItemMerge.log=Zotero items in the collection '%S' have been added and/or removed on multiple computers since the last sync. The following items have been added to the collection: sync.conflict.tagItemMerge.alert=One or more Zotero tags have been added to and/or removed from items on multiple computers since the last sync. The different sets of tags have been combined. @@ -797,7 +797,7 @@ sync.conflict.tag.addedToLocal=It has been added to the following local items: sync.conflict.fileChanged=The following file has been changed in multiple locations. sync.conflict.itemChanged=The following item has been changed in multiple locations. sync.conflict.chooseVersionToKeep=Choose the version you would like to keep, and then click %S. -sync.conflict.chooseThisVersion=Choose this version +sync.conflict.chooseThisVersion=Escoller esta versión sync.status.notYetSynced=Aínda non sincronizado sync.status.lastSync=Última sincronización: @@ -808,12 +808,12 @@ sync.status.uploadingData=Enviando datos ao servidor de sincronización sync.status.uploadAccepted=Carga aceptada \— esperando polo servidor de sincronización sync.status.syncingFiles=Sincronizando ficheiros -sync.storage.mbRemaining=%SMB remaining +sync.storage.mbRemaining=%SMB pendentes sync.storage.kbRemaining=%SkB restantes sync.storage.filesRemaining=ficheiros %1$S/%2$S sync.storage.none=Ningún -sync.storage.downloads=Downloads: -sync.storage.uploads=Uploads: +sync.storage.downloads=Descargas: +sync.storage.uploads=Subidas: sync.storage.localFile=Ficheiro local sync.storage.remoteFile=Ficheiro remoto sync.storage.savedFile=Ficheiro gardado @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Cargue a súa URL WebDAV no navegad sync.storage.error.webdav.seeCertOverrideDocumentation=Vexa a documentación de sobreescritura do certificado para ter máis información. sync.storage.error.webdav.loadURL=Cargar a URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. @@ -897,16 +898,16 @@ rtfScan.saveTitle=Seleccione o lugar onde desexa gardar o ficheiro formatado rtfScan.scannedFileSuffix=(Analizando) -file.accessError.theFile=The file '%S' -file.accessError.aFile=A file -file.accessError.cannotBe=cannot be -file.accessError.created=created -file.accessError.updated=updated -file.accessError.deleted=deleted +file.accessError.theFile=O ficheiro «%S» +file.accessError.aFile=Un ficheiro +file.accessError.cannotBe=non pode ser +file.accessError.created=creado +file.accessError.updated=actualizado +file.accessError.deleted=eliminado file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. file.accessError.message.other=Check that the file is not currently in use and that its permissions allow write access. file.accessError.restart=Restarting your computer or disabling security software may also help. -file.accessError.showParentDir=Show Parent Directory +file.accessError.showParentDir=Mostrar o cartafol parental lookup.failure.title=Fallou a busca lookup.failure.description=Zotero non atopou un rexistro para o identificador especificado. Verifique o identificador e ténteo de novo. diff --git a/chrome/locale/he-IL/zotero/preferences.dtd b/chrome/locale/he-IL/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/he-IL/zotero/zotero.properties b/chrome/locale/he-IL/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/hr-HR/zotero/preferences.dtd b/chrome/locale/hr-HR/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/hr-HR/zotero/zotero.properties b/chrome/locale/hr-HR/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/hu-HU/zotero/preferences.dtd b/chrome/locale/hu-HU/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/hu-HU/zotero/zotero.properties b/chrome/locale/hu-HU/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=További informáációkért tölts sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/is-IS/zotero/preferences.dtd b/chrome/locale/is-IS/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/is-IS/zotero/zotero.properties b/chrome/locale/is-IS/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/it-IT/zotero/preferences.dtd b/chrome/locale/it-IT/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Apri about:config"> <!ENTITY zotero.preferences.openCSLEdit "Apri l'editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Apri l'anteprima CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/it-IT/zotero/zotero.properties b/chrome/locale/it-IT/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Apre l'URL WebDAV nel browser per u sync.storage.error.webdav.seeCertOverrideDocumentation=Consultare la documentazione su sovrapposizione di certificato per maggiori informazioni. sync.storage.error.webdav.loadURL=Apre l'URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/ja-JP/zotero/preferences.dtd b/chrome/locale/ja-JP/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "about:config を開く"> <!ENTITY zotero.preferences.openCSLEdit "CSL エディタを開く"> <!ENTITY zotero.preferences.openCSLPreview "CSL プレビューを開く"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ja-JP/zotero/zotero.dtd b/chrome/locale/ja-JP/zotero/zotero.dtd @@ -282,4 +282,4 @@ <!ENTITY zotero.downloadManager.label "Zotero に保存する"> <!ENTITY zotero.downloadManager.saveToLibrary.description "添付ファイルは現在選択中のライブラリに保存することができません。その代わり、このアイテムはあなたのライブラリに保存されます。"> -<!ENTITY zotero.downloadManager.noPDFTools.description "この機能を利用するには、まず Zotero 環境設定で PDF ツールをインストールする必要があります。"> +<!ENTITY zotero.downloadManager.noPDFTools.description "この機能を利用するには、まず Zotero 環境設定の検索ペインで PDF ツールをインストールする必要があります。"> diff --git a/chrome/locale/ja-JP/zotero/zotero.properties b/chrome/locale/ja-JP/zotero/zotero.properties @@ -157,7 +157,7 @@ pane.collections.groupLibraries=グループのライブラリ pane.collections.trash=ゴミ箱 pane.collections.untitled=無題 pane.collections.unfiled=未整理のアイテム -pane.collections.duplicate=アイテムを複製 +pane.collections.duplicate=重複アイテム pane.collections.menu.rename.collection=コレクション名の変更... pane.collections.menu.edit.savedSearch=保存済み検索条件を編集する @@ -751,11 +751,11 @@ sync.error.passwordNotSet=パスワードが指定されていません sync.error.invalidLogin=ユーザーネームまたはパスワードが不正です sync.error.invalidLogin.text=Zotero 同期サーバーはあなたのユーザー名とパスワードを受け付けませんでした。\n \n Zotero 環境設定の同期設定において zotero.org へのログイン情報を正確に入力したかご確認下さい。 sync.error.enterPassword=パスワードを入力してください -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. -sync.error.loginManagerCorrupted2=%S を閉じて、あなたの %S プロファイルから、signons.* のバックアップを取り、このファイルを削除してください。それからあなたの Zotero ログイン情報をもう一度 Zotero 環境設定の「同期」タブに入力し直してください。 +sync.error.loginManagerInaccessible=あなたのログイン情報にアクセスできません。 +sync.error.checkMasterPassword=%Sでマスターパスワードを設定している場合、これを正しく入力したか確認してださい。 +sync.error.corruptedLoginManager=これは、%1$Sのログインマネージャーのデータベースが壊れていることが原因かもしれません。確認するには、%1$Sを閉じ、%1$Sプロファイルの signon.* をバックアップして削除した後、Zotero環境設定の「同期」タブにログイン情報を入力し直してください。 +sync.error.loginManagerCorrupted1=おそらく、%Sのログインマネージャーのデータベースが壊れているため、あなたのログイン情報にアクセスできません。 +sync.error.loginManagerCorrupted2=%1$Sを閉じ、%2$Sプロファイルの signon.* をバックアップして削除した後、Zotero環境設定の「同期」タブにログイン情報を入力し直してください。 sync.error.syncInProgress=同期処理がすでに実行中です。 sync.error.syncInProgress.wait=この前の同期が完了するのをお待ち頂くか、あるいは %S を再起動してください。 sync.error.writeAccessLost=あなたはもはや Zotero グループ '%S'に書き込みアクセス権限を持っていません。あなたが追加したり編集したファイルはサーバ側と同期させることができません。 @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=さらに詳しい情報を得る sync.storage.error.webdav.seeCertOverrideDocumentation=さらに詳しくは証明書上書きのヘルプをご覧下さい。 sync.storage.error.webdav.loadURL=WebDAV URL を読み込む。 sync.storage.error.webdav.fileMissingAfterUpload=あなたの WebDAV サーバーに潜在的な問題が見つかりました。\n\nアップロードしたファイルはすぐにダウンロード可能になるわけではありません。とくにクラウドの保存サービスをご利用の場合、アップロードしてから利用可能になるまでに少々の時間がかかることがあります。\n\nもし Zotero ファイル同期が正常に機能しているようなら、この案内を無視して下さい。もし問題がある場合は、 Zotero フォーラムに投稿してください。 +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV サーバー設定のエラー sync.storage.error.webdav.serverConfig=あなたの WebDAV サーバーが内部エラーを返しました。 @@ -903,7 +904,7 @@ file.accessError.cannotBe=できない file.accessError.created=作成できません file.accessError.updated=更新できません file.accessError.deleted=削除できません -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. +file.accessError.message.windows=ファイルが使用中でないか、ファイルのアクセス権が書き込みを許可しているか、また有効なファイル名であるかをご確認下さい。 file.accessError.message.other=ファイルが使用中でないか、またファイルのアクセス権が書き込みを許可していることをご確認下さい。 file.accessError.restart=コンピューターを再起動するか、セキュリティ・ソフトウェアを無効化するとよいかもしれません。 file.accessError.showParentDir=親ディレクトリを表示 diff --git a/chrome/locale/km/zotero/preferences.dtd b/chrome/locale/km/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "បើកអំពី:config"> <!ENTITY zotero.preferences.openCSLEdit "បើកកំណែតម្រូវស៊ីអេសអិល"> <!ENTITY zotero.preferences.openCSLPreview "បើកពិនិត្យមើលស៊ីអេសអិល"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/km/zotero/zotero.properties b/chrome/locale/km/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=ផ្ទុក WebDAV URL រប sync.storage.error.webdav.seeCertOverrideDocumentation=សូមមើលវិញ្ញាបនប័ត្រលុបចោលឯកសារសម្រាប់ព័តិមានបន្ថែម។ sync.storage.error.webdav.loadURL=ផ្ទុក WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/ko-KR/zotero/preferences.dtd b/chrome/locale/ko-KR/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "config 열기"> <!ENTITY zotero.preferences.openCSLEdit "CSL 에디터 열기"> <!ENTITY zotero.preferences.openCSLPreview "CSL 미리보기 열기"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ko-KR/zotero/zotero.properties b/chrome/locale/ko-KR/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=웹 브라우저에 귀하의 WebDA sync.storage.error.webdav.seeCertOverrideDocumentation=자세한 정보는 도움말 참고 sync.storage.error.webdav.loadURL=WebDAV URL 구동 sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/mn-MN/zotero/preferences.dtd b/chrome/locale/mn-MN/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/mn-MN/zotero/zotero.properties b/chrome/locale/mn-MN/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/nb-NO/zotero/preferences.dtd b/chrome/locale/nb-NO/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/nb-NO/zotero/zotero.properties b/chrome/locale/nb-NO/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/nl-NL/zotero/preferences.dtd b/chrome/locale/nl-NL/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "about:config openen"> <!ENTITY zotero.preferences.openCSLEdit "CSL-editor openen"> <!ENTITY zotero.preferences.openCSLPreview "CSL-voorbeeldweergave openen"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/nl-NL/zotero/zotero.properties b/chrome/locale/nl-NL/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Laad uw WebDAV-URL in uw browser vo sync.storage.error.webdav.seeCertOverrideDocumentation=Zie de "certificate override"-documentatie voor meer informatie. sync.storage.error.webdav.loadURL=WebDAV-URL laden sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/nn-NO/zotero/preferences.dtd b/chrome/locale/nn-NO/zotero/preferences.dtd @@ -29,8 +29,8 @@ <!ENTITY zotero.preferences.zoteroDotOrgVersionHeader.tooltip "If enabled, the current Zotero version will be added to HTTP requests to zotero.org."> <!ENTITY zotero.preferences.parseRISRefer "Bruk Zotero for nedlasta RIS/Refer-filer"> <!ENTITY zotero.preferences.automaticSnapshots "Ta snapshot automatisk når du genererer element frå nettsider"> -<!ENTITY zotero.preferences.downloadAssociatedFiles "Lagrar assosierte PDF-filer og andre filer når du lagrar element"> -<!ENTITY zotero.preferences.automaticTags "Legg til merke automatisk når element inneheld nøkkel- og emneord i hovudteksta"> +<!ENTITY zotero.preferences.downloadAssociatedFiles "Lagra tilknytte PDF-filer og andre filer ved lagring av element"> +<!ENTITY zotero.preferences.automaticTags "Legg til tagg automatisk frå nøkkel- og emneord i hovudteksta"> <!ENTITY zotero.preferences.trashAutoEmptyDaysPre "Fjernar automatisk element i søppelkorga sletta meir enn"> <!ENTITY zotero.preferences.trashAutoEmptyDaysPost "dagar sidan"> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/nn-NO/zotero/zotero.properties b/chrome/locale/nn-NO/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/pl-PL/zotero/preferences.dtd b/chrome/locale/pl-PL/zotero/preferences.dtd @@ -185,7 +185,7 @@ <!ENTITY zotero.preferences.attachmentBaseDir.message "Zotero will use relative paths for linked file attachments within the base directory, allowing you to access files on different computers as long as the file structure within the base directory remains the same."> <!ENTITY zotero.preferences.attachmentBaseDir.basePath "Katalog podstawowy:"> <!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "Wybierz..."> -<!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Revert to Absolute Paths…"> +<!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Przywróć absolutne ścieżki..."> <!ENTITY zotero.preferences.dbMaintenance "Konserwacja bazy danych"> <!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Sprawdź spójność bazy danych"> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Otwórz about:config"> <!ENTITY zotero.preferences.openCSLEdit "Otwórz edytor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Otwórz podgląd CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/pl-PL/zotero/searchbox.dtd b/chrome/locale/pl-PL/zotero/searchbox.dtd @@ -7,10 +7,10 @@ <!ENTITY zotero.search.recursive.label "Szukaj w podkolekcjach"> <!ENTITY zotero.search.noChildren "Wyświetl tylko elementy główne"> -<!ENTITY zotero.search.includeParentsAndChildren "Zawiera pasujące elementy główne i potomne"> +<!ENTITY zotero.search.includeParentsAndChildren "Zawiera elementy główne i potomne pasujących elementów"> <!ENTITY zotero.search.textModes.phrase "Fraza"> -<!ENTITY zotero.search.textModes.phraseBinary "Fraza (włącznie z plikami binarnymi)"> +<!ENTITY zotero.search.textModes.phraseBinary "Fraza (łącznie z plikami binarnymi)"> <!ENTITY zotero.search.textModes.regexp "Wyrażenie regularne"> <!ENTITY zotero.search.textModes.regexpCS "Wyrażenie regularne (rozróżnia wielkość liter)"> @@ -20,4 +20,4 @@ <!ENTITY zotero.search.search "Szukaj"> <!ENTITY zotero.search.clear "Wyczyść"> -<!ENTITY zotero.search.saveSearch "Zapisz wyniki wyszukiwania"> +<!ENTITY zotero.search.saveSearch "Zapisz wyszukiwanie"> diff --git a/chrome/locale/pl-PL/zotero/zotero.dtd b/chrome/locale/pl-PL/zotero/zotero.dtd @@ -13,7 +13,7 @@ <!ENTITY zotero.errorReport.postToForums "Proszę wysłać informację na forum Zotero (forums.zotero.org) z podaniem tego ID raportu, opisem problemu oraz wszystkmi krokami niezbędnymi do powtórzenia błędu."> <!ENTITY zotero.errorReport.notReviewed "Raporty błędów nie są zwykle przeglądane, jeśli nie zostaną zamieszczone na forum."> -<!ENTITY zotero.upgrade.title "Zotero Upgrade Wizard"> +<!ENTITY zotero.upgrade.title "Kreator aktualizacji Zotero"> <!ENTITY zotero.upgrade.newVersionInstalled "Nowa wersja Zotero została zainstalowana."> <!ENTITY zotero.upgrade.upgradeRequired "Baza danych Zotero musi zostać zaktualizowana, aby współpracowała z nową wersją programu."> <!ENTITY zotero.upgrade.autoBackup "Przed wprowadzeniem zmian automatycznie zostanie utworzona kopia zapasowa istniejącej bazy danych."> @@ -68,11 +68,11 @@ <!ENTITY zotero.items.issue_column "Numer"> <!ENTITY zotero.items.series_column "Seria"> <!ENTITY zotero.items.seriesTitle_column "Tytuł serii"> -<!ENTITY zotero.items.court_column "Court"> -<!ENTITY zotero.items.medium_column "Medium/Format"> -<!ENTITY zotero.items.genre_column "Genre"> +<!ENTITY zotero.items.court_column "Sąd"> +<!ENTITY zotero.items.medium_column "Nośnik/Format"> +<!ENTITY zotero.items.genre_column "Rodzaj"> <!ENTITY zotero.items.system_column "System"> -<!ENTITY zotero.items.moreColumns.label "More Columns"> +<!ENTITY zotero.items.moreColumns.label "Więcej kolumn"> <!ENTITY zotero.items.restoreColumnOrder.label "Restore Column Order"> <!ENTITY zotero.items.menu.showInLibrary "Wyświetl w bibliotece"> @@ -212,7 +212,7 @@ <!ENTITY zotero.integration.prefs.bookmarks.caption "Zakładki są zabezpieczone zarówno przez program Microsoft Word jaki i OpenOffice, ale w wyjątkowych przypadkach mogą być modyfikowane."> -<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Automatically abbreviate journal titles"> +<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Automatycznie skróć tytuły czasopism"> <!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.caption "MEDLINE journal abbreviations will be automatically generated using journal titles. The “Journal Abbr” field will be ignored."> <!ENTITY zotero.integration.prefs.storeReferences.label "Zapisz cytowania w dokumencie"> diff --git a/chrome/locale/pl-PL/zotero/zotero.properties b/chrome/locale/pl-PL/zotero/zotero.properties @@ -15,9 +15,9 @@ general.restartApp=Uruchom ponownie %S general.quitApp=Quit %S general.errorHasOccurred=Wystąpił błąd. general.unknownErrorOccurred=Wystąpił nieznany błąd. -general.invalidResponseServer=Invalid response from server. -general.tryAgainLater=Please try again in a few minutes. -general.serverError=The server returned an error. Please try again. +general.invalidResponseServer=Nieprawidłowa odpowiedź z serwera. +general.tryAgainLater=Proszę spróbować ponownie za kilka minut. +general.serverError=Błąd serwera. Proszę spróbuj ponownie. general.restartFirefox=Proszę uruchomić ponownie %S. general.restartFirefoxAndTryAgain=Proszę uruchomić ponownie %S i spróbować ponownie. general.checkForUpdate=Proszę sprawdzić dostępność aktualizacji @@ -44,10 +44,10 @@ general.remove=Usuń general.reset=Reset general.hide=Hide general.quit=Quit -general.useDefault=Use Default +general.useDefault=Użyj domyślnych general.openDocumentation=Otwórz dokumentację general.numMore=%S więcej... -general.openPreferences=Open Preferences +general.openPreferences=Otwórz ustawienia general.operationInProgress=Operacja Zotero jest aktualnie w trakcie. general.operationInProgress.waitUntilFinished=Proszę poczekać na zakończenie. @@ -79,7 +79,7 @@ errorReport.advanceMessage=Naciśnij przycisk %S, aby zgłosić błąd twórcom errorReport.stepsToReproduce=Kroki do odtworzenia: errorReport.expectedResult=Oczekiwane wyniki: errorReport.actualResult=Rzeczywisty rezultat: -errorReport.noNetworkConnection=No network connection +errorReport.noNetworkConnection=Brak połączenia sieciowego errorReport.invalidResponseRepository=Invalid response from repository errorReport.repoCannotBeContacted=Repository cannot be contacted @@ -186,7 +186,7 @@ tagColorChooser.maxTags=Up to %S tags in each library can have colors assigned. pane.items.loading=Wczytywanie listy elementów... pane.items.attach.link.uri.title=Attach Link to URI -pane.items.attach.link.uri=Enter a URI: +pane.items.attach.link.uri=Wprowadź URI: pane.items.trash.title=Przenieś do Kosza pane.items.trash=Czy na pewno przenieść zaznaczony element do Kosza? pane.items.trash.multiple=Czy na pewno przenieść zaznaczone elementy do Kosza? @@ -257,7 +257,7 @@ pane.item.attachments.count.zero=Brak załączników pane.item.attachments.count.singular=%S załącznik pane.item.attachments.count.plural=%S załączniki(ów) pane.item.attachments.select=Wybierz plik -pane.item.attachments.PDF.installTools.title=PDF Tools Not Installed +pane.item.attachments.PDF.installTools.title=Program PDF Tools nie jest zainstalowany pane.item.attachments.PDF.installTools.text=To use this feature, you must first install the PDF tools in the Search pane of the Zotero preferences. pane.item.attachments.filename=Filename pane.item.noteEditor.clickHere=kliknij tutaj @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Wczytaj swój URL WebDAV w przeglą sync.storage.error.webdav.seeCertOverrideDocumentation=Aby uzyskać więcej informacji zobacz dokumentację dotyczącą wymuszenia certyfikatu sync.storage.error.webdav.loadURL=Wczytaj URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/pt-BR/zotero/preferences.dtd b/chrome/locale/pt-BR/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Abrir about:config"> <!ENTITY zotero.preferences.openCSLEdit "Abrir editor de CSL"> <!ENTITY zotero.preferences.openCSLPreview "Abrir pré-visualização de CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/pt-BR/zotero/zotero.properties b/chrome/locale/pt-BR/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Abra seu endereço WebDAV em seu na sync.storage.error.webdav.seeCertOverrideDocumentation=Veja a documentação relativa à exceção de certificados para mais informações. sync.storage.error.webdav.loadURL=Abrir URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/pt-PT/zotero/preferences.dtd b/chrome/locale/pt-PT/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Abrir about:config"> <!ENTITY zotero.preferences.openCSLEdit "Abrir Editor CSL"> <!ENTITY zotero.preferences.openCSLPreview "Abrir Previsão CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/pt-PT/zotero/zotero.properties b/chrome/locale/pt-PT/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=A versão local foi preservada. sync.conflict.localVersionKept=A versão local foi preservada. sync.conflict.recentVersionsKept=As versões mais recentes foram mantidas. sync.conflict.recentVersionKept=A versão mais recente, «%S», será mantida. -sync.conflict.viewErrorConsole=Ver a %S Consola de Erros para uma lista completa deste tipo de alterações. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Versões locais: %S sync.conflict.remoteVersion=Versões remotas: %S sync.conflict.deleted=[removida] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Carregue o seu URL de WebDAV no nav sync.storage.error.webdav.seeCertOverrideDocumentation=Ver a documentação acerca da sobrecarga de certificados para mais informação. sync.storage.error.webdav.loadURL=Carregar URL WebDAV sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Erro de Configuração de WebDAV Server. sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/ro-RO/zotero/preferences.dtd b/chrome/locale/ro-RO/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Deschide about:config"> <!ENTITY zotero.preferences.openCSLEdit "Deschide editorul CSL"> <!ENTITY zotero.preferences.openCSLPreview "Deschide Previzualizare CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ro-RO/zotero/zotero.properties b/chrome/locale/ro-RO/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=Versiunile locale au fost păstrate. sync.conflict.localVersionKept=Versiunea locală a fost păstrată. sync.conflict.recentVersionsKept=Cele mai recente versiuni au fost păstrate. sync.conflict.recentVersionKept=Cea mai recentă versiune, '%S', a fost păstrată. -sync.conflict.viewErrorConsole=Vezi consola de erori %S pentru o listă completă a unor asemenea schimbări. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Veriunea locală: %S sync.conflict.remoteVersion=Versiunea la distanță: %S sync.conflict.deleted=[șters] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Încarcă-ți URL-ul WebDAV în bro sync.storage.error.webdav.seeCertOverrideDocumentation=Pentru mai multe informații, vezi documentația pentru suprascrierea certificatului. sync.storage.error.webdav.loadURL=Încarcă WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=O problemă potențială a fost găsită în legătură cu serverul tău WebDav.\n\nUn fișier încărcat nu a fost imediat disponibil pentru descărcare. Poate exista o scurtă întârziere între atunci când încarci fișiere și când devin valabile, în mod particular dacă folosești un serviciu de stocare cloud.\n\nDacă sincronizarea fișierelor Zotero apare ca funcționând normal, poți ignora acest mesaj. Dacă ai probleme, te rog să le postezi pe forumurile Zotero. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Eroare de configurare la serverul WebDAV sync.storage.error.webdav.serverConfig=Serverul tău WebDAV a returnat o eroare internă. diff --git a/chrome/locale/ru-RU/zotero/preferences.dtd b/chrome/locale/ru-RU/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Открыть about:config"> <!ENTITY zotero.preferences.openCSLEdit "Открыть редактор CSL"> <!ENTITY zotero.preferences.openCSLPreview "Открыть предварительный просмотр CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/ru-RU/zotero/zotero.properties b/chrome/locale/ru-RU/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Загрузите URL для WebDA sync.storage.error.webdav.seeCertOverrideDocumentation=Подробности в справке об работе с сертификатами. sync.storage.error.webdav.loadURL=Загрузить WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/sk-SK/zotero/preferences.dtd b/chrome/locale/sk-SK/zotero/preferences.dtd @@ -65,8 +65,8 @@ <!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "podľa potreby"> <!ENTITY zotero.preferences.sync.fileSyncing.tos1 "Používaním Úložiska Zotero súhlasíte s uvedenými"> <!ENTITY zotero.preferences.sync.fileSyncing.tos2 "pravidlami a podmienkami"> -<!ENTITY zotero.preferences.sync.reset.warning1 "Nasledujúce operácie treba použiť iba v zriedkavých, špecifických situáciách a nie pre všeobecné odstraňovanie chýb. V mnohých prípadoch resetovanie zapríčiní dodatočné problémy. Pozri"> -<!ENTITY zotero.preferences.sync.reset.warning2 "Možnosti resetovania synchronizácie"> +<!ENTITY zotero.preferences.sync.reset.warning1 "Nasledujúce operácie treba použiť iba v zriedkavých, špecifických situáciách a nie pre všeobecné odstraňovanie chýb. V mnohých prípadoch obnova zapríčiní dodatočné problémy. Pozri "> +<!ENTITY zotero.preferences.sync.reset.warning2 "Možnosti obnovy synchronizácie"> <!ENTITY zotero.preferences.sync.reset.warning3 "pre viac informácií."> <!ENTITY zotero.preferences.sync.reset.fullSync "Úplná synchronizácia so serverom Zotero"> <!ENTITY zotero.preferences.sync.reset.fullSync.desc "Zlúčiť lokálne dáta s dátami na serveri bez ohľadu predchádzajúce synchronizácie."> @@ -74,9 +74,9 @@ <!ENTITY zotero.preferences.sync.reset.restoreFromServer.desc "Vymazať všetky lokálne dáta a nahradiť ich dátami servera."> <!ENTITY zotero.preferences.sync.reset.restoreToServer "Nahradiť dáta na serveri Zotero"> <!ENTITY zotero.preferences.sync.reset.restoreToServer.desc "Vymazať všetky dáta na serveri a nahradiť ich lokálnymi."> -<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "Vymazať históriu synchronizácie súborov"> +<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "Obnoviť históriu synchronizácie súborov"> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "Nechať server znovu preveriť, či obsahuje všetky lokálne prílohy."> -<!ENTITY zotero.preferences.sync.reset "Vynulovať"> +<!ENTITY zotero.preferences.sync.reset "Obnova"> <!ENTITY zotero.preferences.sync.reset.button "Obnoviť..."> @@ -189,9 +189,9 @@ <!ENTITY zotero.preferences.dbMaintenance "Údržba databázy"> <!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Skontrolovať integritu databázy"> -<!ENTITY zotero.preferences.dbMaintenance.resetTranslatorsAndStyles "Obnoviť konvertory a citačné štýly..."> +<!ENTITY zotero.preferences.dbMaintenance.resetTranslatorsAndStyles "Obnoviť konvertory a štýly..."> <!ENTITY zotero.preferences.dbMaintenance.resetTranslators "Obnoviť konvertory..."> -<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Obnoviť citačné štýly..."> +<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Obnoviť štýly..."> <!ENTITY zotero.preferences.debugOutputLogging "Záznam protokolu ladenia chýb"> <!ENTITY zotero.preferences.debugOutputLogging.message "Protokol ladenia môže pomôcť vývojárom rozpoznať problémy v Zotere. Zaznamenávanie protokolu spomalí Zotero, takže túto možnosť by ste mali povoliť iba vtedy, keď si od vás protokol ladenia vyžiada niekto z vývojárskeho tímu Zotera."> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Otvoriť about:config"> <!ENTITY zotero.preferences.openCSLEdit "Otvoriť CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Otvoriť ukážku CSL "> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/sk-SK/zotero/zotero.properties b/chrome/locale/sk-SK/zotero/zotero.properties @@ -41,7 +41,7 @@ general.seeForMoreInformation=Pre viac informácií pozri %S. general.enable=Povoliť general.disable=Zakázať general.remove=Odstrániť -general.reset=Vynulovať +general.reset=Obnova general.hide=Skryť general.quit=Zatvoriť general.useDefault=Použiť predvolené @@ -515,7 +515,7 @@ zotero.preferences.sync.purgeStorage.title=Zmazať súbory príloh na serveroch zotero.preferences.sync.purgeStorage.desc=Ak plánujete použiť WebDAV pre synchronizáciu súborov a predtým ste súbory v Mojej knižnici synchronizovali na Zotero servery, môžete tieto súbory zmazať zo serverov Zotero aby ste získali viac úložného priestoru pre skupiny.\n\nSúbory môžete zmazať kedykoľvek z nastavení vášho účtu na zotero.org. zotero.preferences.sync.purgeStorage.confirmButton=Zmazať súbory teraz zotero.preferences.sync.purgeStorage.cancelButton=Nezmazať -zotero.preferences.sync.reset.userInfoMissing=Musíte zadať užívateľské meno a heslo do záložky %S pred použitím možností vynulovania. +zotero.preferences.sync.reset.userInfoMissing=Musíte zadať užívateľské meno a heslo do záložky %S pred použitím možností obnovy. zotero.preferences.sync.reset.restoreFromServer=Všetky údaje v tejto inštalácii Zotera budú zmazané a nahradené údajmi patriacimi užívateľovi '%S' na serveri Zotero. zotero.preferences.sync.reset.replaceLocalData=Nahradiť miestne údaje zotero.preferences.sync.reset.restartToComplete=Pre dokončenie procesu obnovy je potrebné reštartovať Firefox. @@ -751,10 +751,10 @@ sync.error.passwordNotSet=Heslo nie je nastavené sync.error.invalidLogin=Nesprávne meno alebo heslo sync.error.invalidLogin.text=Synchronizačný server Zotero neprijal vaše užívateľské meno a heslo.\n\nSkontrolujte prosím správne zadanie vašich prihlasovacích údajov pre zotero.org v predvoľbách synchronizácie Zotera. sync.error.enterPassword=Prosím zdajte heslo. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. +sync.error.loginManagerInaccessible=Zotero nemá prístup k vašim prihlasovacím údajom. +sync.error.checkMasterPassword=Ak používate hlavné heslo v %S, ubezpečte sa, že ste ho zadali úspešne. +sync.error.corruptedLoginManager=Môže to byť aj kvôli porušenej databáze pre správu hesiel v programe %1$S. Pre každý prípad, zatvorte %1$S, zálohujte a odstráňte signons.* z vášho profilu v %1$S a opäť zadajte vaše prihlasovacie údaje pre Zotero v paneli Synchronizácie v predvoľbách Zotera. +sync.error.loginManagerCorrupted1=Zotero nemá prístup k vašim prihlasovacím údajom, pravdepodobne kvôli poškodeniu databázy pre správu hesiel v programe %S. sync.error.loginManagerCorrupted2=Zatvorte %1$S, zálohujte a odstráňte signons.* z vášho profilu %2$S a zadajte znova prihlasovacie údaje vášho Zotera pod záložkou Synchronizácie v predvoľbách Zotera. sync.error.syncInProgress=Sychronizácia už prebieha. sync.error.syncInProgress.wait=Počkajte, kým sa predchádzajúca synchronizácia ukončí a reštartujte Firefox. @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=Zachovali sa miestne verzie. sync.conflict.localVersionKept=Zachovala sa miestna verzia. sync.conflict.recentVersionsKept=Zachovali sa najnovšie verzie. sync.conflict.recentVersionKept=Zachovala sa najnovšia verzia '%S'. -sync.conflict.viewErrorConsole=Prezrite si%S chybovú konzolu pre úplný zoznam takýchto zmien. +sync.conflict.viewErrorConsole=Prezrite si chybovú konzolu %S pre úplný zoznam takýchto zmien. sync.conflict.localVersion=Miestna verzia: sync.conflict.remoteVersion=Vzdialená verzia: %S sync.conflict.deleted=[odstránené] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Pre viac informácií otvorte URL W sync.storage.error.webdav.seeCertOverrideDocumentation=Pozrite sa do dokumentácie o obídení certifikátu pre viac informácií. sync.storage.error.webdav.loadURL=Načítať WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=Našiel sa možný problém vo vašom serveri WebDAV.\n\nNačítaný súbor nebol okamžite dostupný na stiahnutie. Medzi načítaním a dostupnosťou súborov môže byť krátke oneskorenie, najmä ak používate službu úložiska v oblaku.\n\nAk synchronizácia súborov Zotero funguje normálne, toto hlásenie môžete ignorovať. Ak narazíte na problém, obráťte sa prosím na fóra Zotero. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Chyba konfigurácie servera WebDAV sync.storage.error.webdav.serverConfig=Váš server WebDAV vykázal vnútornú chybu. @@ -903,7 +904,7 @@ file.accessError.cannotBe=nemožno file.accessError.created=vytvoriť file.accessError.updated=aktualizovať file.accessError.deleted=odstrániť -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. +file.accessError.message.windows=Skontrolujte, že súbor sa aktuálne nepoužíva, že jeho oprávnenia dovoľujú prístup zapisovať a že má platný názov. file.accessError.message.other=Skontrolujte, že súbor sa aktuálne nepoužíva a že jeho oprávnenia dovoľujú prístup zapisovať. file.accessError.restart=Reštartovanie počítača alebo vypnutie bezpečnostného softvéru môže tiež pomôcť. file.accessError.showParentDir=Zobraziť nadradený adresár diff --git a/chrome/locale/sl-SI/zotero/preferences.dtd b/chrome/locale/sl-SI/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Odpri about:config"> <!ENTITY zotero.preferences.openCSLEdit "Odpri urejevalnik CSL"> <!ENTITY zotero.preferences.openCSLPreview "Odpri predloge CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/sl-SI/zotero/zotero.properties b/chrome/locale/sl-SI/zotero/zotero.properties @@ -5,7 +5,7 @@ general.error=Napaka general.warning=Opozorilo general.dontShowWarningAgain=Tega opozorila ne kaži več. general.browserIsOffline=%S je trenutno v nepovezanem načinu. -general.locate=Prebrskaj ... +general.locate=Najdi ... general.restartRequired=Potreben je ponoven zagon general.restartRequiredForChange=Za uveljavitev sprememb je potrebno ponovno zagnati %S. general.restartRequiredForChanges=Za uveljavitev sprememb je potrebno ponovno zagnati %S. @@ -57,13 +57,13 @@ punctuation.openingQMark=» punctuation.closingQMark=« punctuation.colon=: -install.quickStartGuide=Hitri vodnik +install.quickStartGuide=Hitri vodnik Zotero install.quickStartGuide.message.welcome=Dobrodošli v Zotero! install.quickStartGuide.message.view=Oglejte si Prve korake (Quick Start Guide), ki vas naučijo zbiranja, upravljanja, navajanja in skupne rabe svojih raziskovalnih virov. install.quickStartGuide.message.thanks=Hvala, ker ste namestili Zotero. upgrade.failed.title=Posodobitev ni uspela -upgrade.failed=Posodobitev zbirke podatkov Zotero ni uspela: +upgrade.failed=Nadgradnja zbirke podatkov Zotero ni uspela: upgrade.advanceMessage=Pritisnite %S za takojšnjo posodobitev. upgrade.dbUpdateRequired=Zbirko podatkov Zotero je potrebno posodobiti. upgrade.integrityCheckFailed=Preden se lahko posodobitev nadaljuje, je potrebno vašo zbirko podatkov Zotero popraviti. @@ -86,14 +86,14 @@ errorReport.repoCannotBeContacted=S skladiščem ni mogoče stopiti v stik attachmentBasePath.selectDir=Izberite osnovno mapo attachmentBasePath.chooseNewPath.title=Potrdite novo osnovno mapo -attachmentBasePath.chooseNewPath.message=Linked file attachments below this directory will be saved using relative paths. -attachmentBasePath.chooseNewPath.existingAttachments.singular=One existing attachment was found within the new base directory. -attachmentBasePath.chooseNewPath.existingAttachments.plural=%S existing attachments were found within the new base directory. +attachmentBasePath.chooseNewPath.message=Povezane datotečne priponke pod to mapo bodo shranjene z relativnimi potmi. +attachmentBasePath.chooseNewPath.existingAttachments.singular=V tej novi osnovni mapi je najdena ena obstoječa priponka. +attachmentBasePath.chooseNewPath.existingAttachments.plural=V tej novi osnovni mapi je najdenih %S obstoječih priponk. attachmentBasePath.chooseNewPath.button=Spremeni nastavitev osnovne mape attachmentBasePath.clearBasePath.title=Povrni na absolutne poti -attachmentBasePath.clearBasePath.message=New linked file attachments will be saved using absolute paths. -attachmentBasePath.clearBasePath.existingAttachments.singular=One existing attachment within the old base directory will be converted to use an absolute path. -attachmentBasePath.clearBasePath.existingAttachments.plural=%S existing attachments within the old base directory will be converted to use absolute paths. +attachmentBasePath.clearBasePath.message=Nove povezane datotečne priponke bodo shranjene z absolutnimi potmi. +attachmentBasePath.clearBasePath.existingAttachments.singular=V tej novi osnovni mapi najdena obstoječa priponka bo pretvorjena, da bo uporabljala absolutno pot. +attachmentBasePath.clearBasePath.existingAttachments.plural=V tej novi osnovni mapi najdenih %S obstoječih priponk bo pretvorjenih, da bodo uporabljale absolutno pot. attachmentBasePath.clearBasePath.button=Počisti nastavitev osnovne mape dataDir.notFound=Podatkovne mape Zotero ni mogoče najti. @@ -103,11 +103,11 @@ dataDir.selectDir=Izberite podatkovno mapo Zotero dataDir.selectedDirNonEmpty.title=Mapa ni prazna dataDir.selectedDirNonEmpty.text=Mapa, ki ste jo izbrali, ni prazna in ni podatkovna mapa Zotero.\n\nŽelite kljub temu v tej mapi ustvariti datoteke Zotero? dataDir.selectedDirEmpty.title=Mapa je prazna -dataDir.selectedDirEmpty.text=The directory you selected is empty. To move an existing Zotero data directory, you will need to manually move files from the existing data directory to the new location after %1$S has closed. +dataDir.selectedDirEmpty.text=Mapa, ki ste jo izbrali, je prazna. Če želite premakniti obstoječo mapo podatkov Zotero, morate ročno premakniti datoteke iz obstoječe podatkovne mape na novo mesto, potem ko ste zaprli %1$S. dataDir.selectedDirEmpty.useNewDir=Želite uporabiti novo mapo? -dataDir.moveFilesToNewLocation=Be sure to move files from your existing Zotero data directory to the new location before reopening %1$S. +dataDir.moveFilesToNewLocation=Pred ponovnim opdiranjem %1$S ne pozabite premakniti obstoječe mape s podatki Zotero na novo mesto. dataDir.incompatibleDbVersion.title=Nezdružljiva različica zbirke podatkov -dataDir.incompatibleDbVersion.text=The currently selected data directory is not compatible with Zotero Standalone, which can share a database only with Zotero for Firefox 2.1b3 or later.\n\nUpgrade to the latest version of Zotero for Firefox first or select a different data directory for use with Zotero Standalone. +dataDir.incompatibleDbVersion.text=Trenutno izbrana podatkovna mapa ni združljiva s samostojnim Zoterom, ki lahko deli zbirko podatkov le z Zoterom za Firefox 2.1b3 ali novejšim.\n\nNajprej ndgradite na zadnjo različico Zotera za Firefox ali izberite drugo podatkovno mapo za delo s samostojnim Zoterom. dataDir.standaloneMigration.title=Najdena obstoječa knjižnica Zotero dataDir.standaloneMigration.description=Kaže, da prvič uporabljate %1$S. Želite, da %1$S uvozi nastavitve iz programa %2$S ter uporabi vašo obstoječo mapo s podatki? dataDir.standaloneMigration.multipleProfiles=%1$S bo mapo s podatki delil z nazadnje uporabljenim profilom.\n @@ -140,9 +140,9 @@ date.relative.yearsAgo.multiple=pred %S leti pane.collections.delete.title=Izbriši zbirko pane.collections.delete=Ste prepričani, da želite izbrisati izbrano zbirko? -pane.collections.delete.keepItems=Elementi iz te zbirke ne bodo izbrisani. -pane.collections.deleteWithItems.title=Izbriši zbirko in elemente -pane.collections.deleteWithItems=Are you sure you want to delete the selected collection and move all items within it to the Trash? +pane.collections.delete.keepItems=Vnosi iz te zbirke ne bodo izbrisani. +pane.collections.deleteWithItems.title=Izbriši zbirko in vnose +pane.collections.deleteWithItems=Ste prepričani, da želite izbrisati izbrano zbirko in premakniti vse vnose v koš? pane.collections.deleteSearch.title=Izbriši iskanje pane.collections.deleteSearch=Ste prepričani, da želite izbrisati izbrano iskanje? @@ -162,7 +162,7 @@ pane.collections.duplicate=Podvoji vnose pane.collections.menu.rename.collection=Preimenuj zbirko ... pane.collections.menu.edit.savedSearch=Uredi shranjeno iskanje pane.collections.menu.delete.collection=Izbriši zbirko ... -pane.collections.menu.delete.collectionAndItems=Izbriši zbirko in elemente ... +pane.collections.menu.delete.collectionAndItems=Izbriši zbirko in vnose ... pane.collections.menu.delete.savedSearch=Izbriši shranjeno iskanje ... pane.collections.menu.export.collection=Izvozi zbirko ... pane.collections.menu.export.savedSearch=Izvozi shranjeno iskanje ... @@ -179,10 +179,10 @@ pane.tagSelector.delete.message=Ste prepričani, da želite izbrisati to značko pane.tagSelector.numSelected.none=0 značk izbranih pane.tagSelector.numSelected.singular=%S značka izbrana pane.tagSelector.numSelected.plural=%S značk izbranih -pane.tagSelector.maxColoredTags=Only %S tags in each library can have colors assigned. +pane.tagSelector.maxColoredTags=Samo %S značk v vsaki knjižnici ima lahko dodeljeno barvo. -tagColorChooser.numberKeyInstructions=You can add this tag to selected items by pressing the $NUMBER key on the keyboard. -tagColorChooser.maxTags=Up to %S tags in each library can have colors assigned. +tagColorChooser.numberKeyInstructions=To značko lahko dodate izbranim vnosom s pritiskom tipke $NUMBER na tipkovnici. +tagColorChooser.maxTags=Največ %S značk v vsaki knjižnici ima lahko dodeljeno barvo. pane.items.loading=Nalaganje seznama vnosov ... pane.items.attach.link.uri.title=URI pripni povezavo @@ -195,8 +195,8 @@ pane.items.delete=Ste prepričani, da želite izbrisati izbrani vnos? pane.items.delete.multiple=Ste prepričani, da želite izbrisati izbrane vnose? pane.items.menu.remove=Odstrani izbrani vnos pane.items.menu.remove.multiple=Odstrani izbrane vnose -pane.items.menu.moveToTrash=Premakni element v koš ... -pane.items.menu.moveToTrash.multiple=Premakni elemente v koš ... +pane.items.menu.moveToTrash=Premakni vnos v koš ... +pane.items.menu.moveToTrash.multiple=Premakni vnose v koš ... pane.items.menu.export=Izvozi izbrani vnos ... pane.items.menu.export.multiple=Izvozi izbrane vnose ... pane.items.menu.createBib=Ustvari bibliografijo iz izbranega vnosa ... @@ -229,9 +229,9 @@ pane.item.unselected.plural=Št. vnosov v tem pogledu: %S pane.item.duplicates.selectToMerge=Izberite vnose za spajanje pane.item.duplicates.mergeItems=Spoji %S vnosov -pane.item.duplicates.writeAccessRequired=Library write access is required to merge items. -pane.item.duplicates.onlyTopLevel=Only top-level full items can be merged. -pane.item.duplicates.onlySameItemType=Merged items must all be of the same item type. +pane.item.duplicates.writeAccessRequired=Za spajanje vnosov je potreben dostop do knjižnice s pravico pisanja. +pane.item.duplicates.onlyTopLevel=Spojiti je mogoče le polne vnose na vrhnji ravni. +pane.item.duplicates.onlySameItemType=Spojeni vnosi morajo biti iste vrste. pane.item.changeType.title=Spremeni vrsto vnosa pane.item.changeType.text=Ste prepričani, da želite spremeniti vrsto vnosa?\n\nIzgubljena bodo naslednja polja: @@ -249,7 +249,7 @@ pane.item.notes.count.singular=%S opomba: pane.item.notes.count.plural=%S opomb: pane.item.attachments.rename.title=Nov naslov: pane.item.attachments.rename.renameAssociatedFile=Preimenuj pridruženo datoteko -pane.item.attachments.rename.error=Pri preimenovanju je prišlo do napake +pane.item.attachments.rename.error=Pri preimenovanju datoteke je prišlo do napake pane.item.attachments.fileNotFound.title=Datoteke ni mogoče najti pane.item.attachments.fileNotFound.text=Pripete datoteke ni mogoče najti.\n\nMorda je premaknjena ali odstranjena iz Zotera. pane.item.attachments.delete.confirm=Ste prepričani, da želite izbrisati to priponko? @@ -258,7 +258,7 @@ pane.item.attachments.count.singular=%S priponka: pane.item.attachments.count.plural=%S priponk: pane.item.attachments.select=Izberite datoteko pane.item.attachments.PDF.installTools.title=Orodja PDF niso nameščena -pane.item.attachments.PDF.installTools.text=To use this feature, you must first install the PDF tools in the Search pane of the Zotero preferences. +pane.item.attachments.PDF.installTools.text=Za to funkcionalnost morate najprej namestiti orodja PDF v iskalnem podoknu nastavitev za Zotero. pane.item.attachments.filename=Ime datoteke pane.item.noteEditor.clickHere=kliknite sem pane.item.tags.count.zero=%S značk: @@ -511,17 +511,17 @@ zotero.preferences.openurl.resolversFound.zero=Najdenih %S razločiteljev zotero.preferences.openurl.resolversFound.singular=Najden %S razločitelj zotero.preferences.openurl.resolversFound.plural=Najdenih %S razločiteljev -zotero.preferences.sync.purgeStorage.title=Purge Attachment Files on Zotero Servers? -zotero.preferences.sync.purgeStorage.desc=If you plan to use WebDAV for file syncing and you previously synced attachment files in My Library to the Zotero servers, you can purge those files from the Zotero servers to give you more storage space for groups.\n\nYou can purge files at any time from your account settings on zotero.org. -zotero.preferences.sync.purgeStorage.confirmButton=Purge Files Now -zotero.preferences.sync.purgeStorage.cancelButton=Do Not Purge -zotero.preferences.sync.reset.userInfoMissing=You must enter a username and password in the %S tab before using the reset options. -zotero.preferences.sync.reset.restoreFromServer=All data in this copy of Zotero will be erased and replaced with data belonging to user '%S' on the Zotero server. +zotero.preferences.sync.purgeStorage.title=Želite počistiti datoteke priponk na strežnikih Zotero? +zotero.preferences.sync.purgeStorage.desc=Če načrtujete uporabo WebDAV za usklajevanje datotek in ste prehodno uskladili datoteke priponk v Moji knjižnici s strežniki Zotero, lahko počistite te datoteke s strežnikov Zotero, s čimer pridobite več prostora za hrambo za skupine.\n\nDatoteke lahko počistite kadar koli prek nastavitev računa na zotero.org. +zotero.preferences.sync.purgeStorage.confirmButton=Počisti datoteke zdaj +zotero.preferences.sync.purgeStorage.cancelButton=Ne počisti +zotero.preferences.sync.reset.userInfoMissing=Uporabniško ime in geslo morate v zavihek %S vnesti pred uporabo možnosti ponastavljanja. +zotero.preferences.sync.reset.restoreFromServer=Vsi podatki v tej kopiji Zotera bodo izbrisani in zamenjani s podatki uporabnika '%S' s strežnika Zotero. zotero.preferences.sync.reset.replaceLocalData=Zamenjaj krajevne podatke zotero.preferences.sync.reset.restartToComplete=Za dokončanje postopke obnove morate ponovno zagnati Firefox. -zotero.preferences.sync.reset.restoreToServer=All data belonging to user '%S' on the Zotero server will be erased and replaced with data from this copy of Zotero.\n\nDepending on the size of your library, there may be a delay before your data is available on the server. +zotero.preferences.sync.reset.restoreToServer=Vsi podatki uporabnika '%S' na strežniku Zotero bodo izbrisani, zamenjali pa jih bodo podatki te kopije Zotera.\n\nGlede na velikost vaše knjižnice bo morda prišlo do časovnega zamika, dokler bodo vaši podatki na voljo na strežniku. zotero.preferences.sync.reset.replaceServerData=Zamenjaj strežniške podatke -zotero.preferences.sync.reset.fileSyncHistory=All file sync history will be cleared.\n\nAny local attachment files that do not exist on the storage server will be uploaded on the next sync. +zotero.preferences.sync.reset.fileSyncHistory=Zgodovina vseh uskladitev bo izbrisana.\n\nVse krajevne datoteke priponk, ki jih ni na strežniku hrambe, bodo naložene na strežnik ob naslednji uskladitvi. zotero.preferences.search.rebuildIndex=Ponovno izdelaj kazalo zotero.preferences.search.rebuildWarning=Želite ponovno izdelati celotno kazalo? To je lahko zamudno.\n\nZa indeksiranje samo tistih vnosov, ki niso bili v kazalu, uporabite %S. @@ -560,7 +560,7 @@ zotero.preferences.advanced.resetStyles=Ponastavi sloge zotero.preferences.advanced.resetStyles.changesLost=Vsi novi ali spremenjeni slogi bodo izgubljeni. zotero.preferences.advanced.debug.title=Izhod razhroščevanja odposlan -zotero.preferences.advanced.debug.sent=Debug output has been sent to the Zotero server.\n\nThe Debug ID is D%S. +zotero.preferences.advanced.debug.sent=Izhod razhroščevanja je bil poslan strežniku Zotero.\n\nID razhroščevanja je D%S. zotero.preferences.advanced.debug.error=Pri pošiljanju izhoda razhroščevanja je prišlo do napake. dragAndDrop.existingFiles=Naslednje datoteke so že obstajale v ciljni mapi in niso bile kopirane: @@ -727,14 +727,14 @@ styles.installStyle=Želite namestiti slog »%1$S« iz %2$S? styles.updateStyle=Želite posodobiti obstoječi slog »%1$S« z »%2$S« iz %3$S? styles.installed=Slog »%S« je bil uspešno nameščen. styles.installError=%S ni videti veljavna slogovna datoteka. -styles.validationWarning="%S" is not a valid CSL 1.0.1 style file, and may not work properly with Zotero.\n\nAre you sure you want to continue? +styles.validationWarning="%S" ni veljavna slogovna datoteka CSL 1.0.1 in morda ne bo delovala pravilno s programom Zotero.\n\nSte prepričani, da želite nadaljevati? styles.installSourceError=$1$S se sklicuje na neveljavno ali neobstoječo datoteko CSL v %2$S kot njenem viru. styles.deleteStyle=Ste prepričani, da želite izbrisati slog »%1$S«? styles.deleteStyles=Ste prepričani, da želite izbrisati izbrane sloge? styles.abbreviations.title=Naloži okrajšave styles.abbreviations.parseError=Datoteka okrajšav "%1$S" ni veljaven JSON. -styles.abbreviations.missingInfo=The abbreviations file "%1$S" does not specify a complete info block. +styles.abbreviations.missingInfo=Datoteka okrajšav "%1$S" ne navaja popolnega podatkovnega bloka. sync.sync=Uskladi sync.cancel=Prekliči usklajevanje @@ -746,15 +746,15 @@ sync.remoteObject=Oddaljeni predmet sync.mergedObject=Spojeni predmet sync.error.usernameNotSet=Uporabniško ime ni določeno -sync.error.usernameNotSet.text=You must enter your zotero.org username and password in the Zotero preferences to sync with the Zotero server. +sync.error.usernameNotSet.text=Za usklajevanje s strežnikom Zotero morate v nastavitvah Zotero vnesti svoje uporabniško ime in geslo za zotero.org. sync.error.passwordNotSet=Geslo ni določeno sync.error.invalidLogin=Neveljavno uporabniško ime ali geslo -sync.error.invalidLogin.text=The Zotero sync server did not accept your username and password.\n\nPlease check that you have entered your zotero.org login information correctly in the Zotero sync preferences. +sync.error.invalidLogin.text=Strežnik za usklajevanje Zotero ni sprejel vašega uporabniškega imena in gesla.\n\nPreverite, da ste v nastavitvah usklajevanja Zotero vnesli pravilne prijavne podatke za zotero.org. sync.error.enterPassword=Vnesite geslo. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. +sync.error.loginManagerInaccessible=Zotero ne more dostopati do vaših prijavnih podatkov. +sync.error.checkMasterPassword=Če v %S uporabljate glavno geslo, se prepričajte, da ste ga vnesli pravilno. +sync.error.corruptedLoginManager=Vzrok je lahko tudi okvarjena zbirka podatkov upravitelja prijav %1$S. Zaprite %1$S, naredite varnostno kopijo in izbrišite signons.* iz svojega profila %1$S, nato ponovno vnesite prijavne podatke Zotero v podoknu Usklajevanje v nastavitvah Zotera. +sync.error.loginManagerCorrupted1=Zotero ne more dostopati do vaših prijavnih podatkov, najverjetneje je zbirka podatkov upravitelja prijav programa %S okvarjena. sync.error.loginManagerCorrupted2=Zaprite %1$S, naredite varnostno kopijo in izbrišite signons.* iz svojega profila %2$S, nato ponovno vnesite prijavne podatke Zotero v podoknu Usklajevanje v nastavitvah Zotera. sync.error.syncInProgress=Usklajevanje je že v teku. sync.error.syncInProgress.wait=Počakajte, da se prejšnje usklajevanje dokonča ali ponovno zaženite %S. @@ -763,40 +763,40 @@ sync.error.groupWillBeReset=Če nadaljujete bo kopija skupine ponastavljena na n sync.error.copyChangedItems=Če bi radi kopirali svoje spremembe drugam ali od skrbnika skupine zahtevali pravice za pisanje, takoj prekinite usklajevanje. sync.error.manualInterventionRequired=Samodejno usklajevanje je povzročilo spor, ki zahteva ročno posredovanje. sync.error.clickSyncIcon=Kliknite ikono usklajevanja, če želite ročno usklajevanje. -sync.error.invalidClock=The system clock is set to an invalid time. You will need to correct this to sync with the Zotero server. +sync.error.invalidClock=Sistemska ura je nastavljena na neveljaven čas. Za usklajevanje s strežnikom Zotero boste morali napako odpraviti. sync.error.sslConnectionError=Napaka povezave SSL -sync.error.checkConnection=Error connecting to server. Check your Internet connection. +sync.error.checkConnection=Napaka pri povezovanju s strežnikom. Preverite svojo povezavo z internetom. sync.error.emptyResponseServer=Prazen odgovor strežnika. -sync.error.invalidCharsFilename=The filename '%S' contains invalid characters.\n\nRename the file and try again. If you rename the file via the OS, you will need to relink it in Zotero. +sync.error.invalidCharsFilename=Datoteka '%S' vsebuje neveljavne znake.\n\nPreimenujte datoteko in poskusite znova. Če ste datoteko preimenovali prek operacijskega sistema, jo morate znova povezati v Zoteru. -sync.lastSyncWithDifferentAccount=This Zotero database was last synced with a different zotero.org account ('%1$S') from the current one ('%2$S'). -sync.localDataWillBeCombined=If you continue, local Zotero data will be combined with data from the '%S' account stored on the server. -sync.localGroupsWillBeRemoved1=Local groups, including any with changed items, will also be removed. -sync.avoidCombiningData=To avoid combining or losing data, revert to the '%S' account or use the Reset options in the Sync pane of the Zotero preferences. -sync.localGroupsWillBeRemoved2=If you continue, local groups, including any with changed items, will be removed and replaced with groups linked to the '%1$S' account.\n\nTo avoid losing local changes to groups, be sure you have synced with the '%2$S' account before syncing with the '%1$S' account. +sync.lastSyncWithDifferentAccount=Ta zbirka podatkov Zotero je bila nazadnje usklajena z drugim računom zotero.org ('%1$S'), kot je trenutni ('%2$S'). +sync.localDataWillBeCombined=Če nadaljujete, bodo krajevni podatki Zotero združeni s podatki z računa '%S', ki je shranjen na strežniku. +sync.localGroupsWillBeRemoved1=Krajevne skupine, vključno z vsemi spremenjenimi elmenti, bodo prav tako odstranjene. +sync.avoidCombiningData=Da se izognete združevanju ali izgubi podatkov, se povrnite v račun '%S' ali uporabite možnost Ponastavi v podoknu Uskladu nastavitev Zotera. +sync.localGroupsWillBeRemoved2=Če nadaljujete, bodo krajevne skupine skupaj s spremenjenimi vnosi odstranjene in jih bo zamenjale skupine, povezane z računom '%1$S'.\n\nČe se želite izogniti izgubi krajevnih sprememb skupin, preverite, da ste usklajeni z računom '%2$S', preden se uskladite z računom '%1$S'. -sync.conflict.autoChange.alert=One or more locally deleted Zotero %S have been modified remotely since the last sync. -sync.conflict.autoChange.log=A Zotero %S has changed both locally and remotely since the last sync: +sync.conflict.autoChange.alert=Eden ali več krajevno izbrisanih Zotero %S je bilo od zadnje uskladitve spremenjenih oddaljeno. +sync.conflict.autoChange.log=Zotero %S se je od zadnje uskladitve spremenil tako krajevno kot oddaljeno: sync.conflict.remoteVersionsKept=Oddaljene različice so ohranjene. sync.conflict.remoteVersionKept=Oddaljena različica je ohranjena. sync.conflict.localVersionsKept=Krajevne različice so ohranjene. -sync.conflict.localVersionKept=The local version has been kept. -sync.conflict.recentVersionsKept=The most recent versions have been kept. -sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.localVersionKept=Ohranjena je krajevna različica. +sync.conflict.recentVersionsKept=Ohranjene so različice z novejšim datumom. +sync.conflict.recentVersionKept=Ohranjena je najnovejša različica, '%S'. +sync.conflict.viewErrorConsole=Oglejte si konzolo napak %S, kjer vidite poln seznam takšnih sprememb. sync.conflict.localVersion=Krajevna različica: %S sync.conflict.remoteVersion=Oddaljena različica: %S sync.conflict.deleted=[izbrisano] -sync.conflict.collectionItemMerge.alert=One or more Zotero items have been added to and/or removed from the same collection on multiple computers since the last sync. -sync.conflict.collectionItemMerge.log=Zotero items in the collection '%S' have been added and/or removed on multiple computers since the last sync. The following items have been added to the collection: -sync.conflict.tagItemMerge.alert=One or more Zotero tags have been added to and/or removed from items on multiple computers since the last sync. The different sets of tags have been combined. -sync.conflict.tagItemMerge.log=The Zotero tag '%S' has been added to and/or removed from items on multiple computers since the last sync. -sync.conflict.tag.addedToRemote=It has been added to the following remote items: -sync.conflict.tag.addedToLocal=It has been added to the following local items: - -sync.conflict.fileChanged=The following file has been changed in multiple locations. -sync.conflict.itemChanged=The following item has been changed in multiple locations. -sync.conflict.chooseVersionToKeep=Choose the version you would like to keep, and then click %S. +sync.conflict.collectionItemMerge.alert=Od zadnje uskladitve je bil eden ali več vnosov Zotero dodanih in/ali odstranjenih iz iste zbirke na več računalnikih. +sync.conflict.collectionItemMerge.log=Od zadnje uskladitve je bil eden ali več vnosov Zotero v zbirki '%S' dodanih in/ali odstranjenih na več računalnikih. Naslednji vnosi so bili zbirki dodani: +sync.conflict.tagItemMerge.alert=Ena ali več značk Zotero je bilo odstranjenih in/ali dodanih vnosom na več računalnikih od zadnjega usklajevanja. Različni nabori značk so bili združeni. +sync.conflict.tagItemMerge.log=Značka Zotero '%S' je bila od zadnje uskladitve dodana in/ali odstranjena z vnosov na več računalnikih. +sync.conflict.tag.addedToRemote=Dodano je bilo naslednjim oddaljenim vnosom: +sync.conflict.tag.addedToLocal=Dodano je bilo naslednjim krajevnim vnosom: + +sync.conflict.fileChanged=Naslednja datoteka je bila spremenjena na več mestih. +sync.conflict.itemChanged=Naslednji vnos je bil spremenjen na več mestih. +sync.conflict.chooseVersionToKeep=Izberite različico, ki jo želite ohraniti, nato kliknite %S. sync.conflict.chooseThisVersion=Izberite to različico sync.status.notYetSynced=Še ni usklajeno @@ -821,14 +821,14 @@ sync.storage.serverConfigurationVerified=Prilagoditev strežnika preverjena sync.storage.fileSyncSetUp=Usklajevanje datotek je uspešno nastavljeno. sync.storage.openAccountSettings=Odpri nastavitve računa -sync.storage.error.default=A file sync error occurred. Please try syncing again.\n\nIf you receive this message repeatedly, restart %S and/or your computer and try again. If you continue to receive the message, submit an error report and post the Report ID to a new thread in the Zotero Forums. -sync.storage.error.defaultRestart=A file sync error occurred. Please restart %S and/or your computer and try syncing again.\n\nIf you receive this message repeatedly, submit an error report and post the Report ID to a new thread in the Zotero Forums. +sync.storage.error.default=Prišlo je do napake pri usklajevanju datotek. Pokusite znova.\n\nČe to sporočilo prejemate zaporedoma, ponovno zaženite %S in/ali vaš računalnik ter poskusite znova. Če še naprej prejemate to sporočilo, poročajte o napaki in objavite ID poročila v novi niti na forumih Zotero. +sync.storage.error.defaultRestart=Prišlo je do napake pri usklajevanju datotek. Ponovno zaženite %S in/ali vaš računalnik ter poskusite znova.\n\nČe še naprej prejemate to sporočilo, poročajte o napaki in objavite ID poročila v novi niti na forumih Zotero. sync.storage.error.serverCouldNotBeReached=Strežnika %S ni mogoče doseči. sync.storage.error.permissionDeniedAtAddress=Nimate pravic za ustvarjanje mape Zotero na naslednjem naslovu: sync.storage.error.checkFileSyncSettings=Preverite svoje nastavitve usklajevanja ali povprašajte svojega sistemskega skrbnika. sync.storage.error.verificationFailed=Overjanje $S ni uspelo. Preverite nastavitve usklajevanja datotek v podoknu Usklajevanje v nastavitvah Zotera. sync.storage.error.fileNotCreated=Datoteke »%S« ni mogoče ustvariti v mapi »shrambe« (»storage«) Zotero. -sync.storage.error.encryptedFilenames=Error creating file '%S'.\n\nSee http://www.zotero.org/support/kb/encrypted_filenames for more information. +sync.storage.error.encryptedFilenames=Napaka pri ustvarjanju datoteke '%S'.\n\nPodrobnosti najdete na naslovu: http://www.zotero.org/support/kb/encrypted_filenames sync.storage.error.fileEditingAccessLost=V skupini Zotero »%S« nimate več pravic urejanja in datotek, ki ste jih dodali ali uredili, ni več mogoče usklajevati s strežnikom. sync.storage.error.copyChangedItems=Če želite kopirati spremenjene vnose drugam, takoj prekinite usklajevanje. sync.storage.error.fileUploadFailed=Prenos datoteke na strežnik ni uspel. @@ -836,8 +836,8 @@ sync.storage.error.directoryNotFound=Mape ni mogoče najti sync.storage.error.doesNotExist=%S ne obstaja. sync.storage.error.createNow=Ga želite ustvariti zdaj? -sync.storage.error.webdav.default=A WebDAV file sync error occurred. Please try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. -sync.storage.error.webdav.defaultRestart=A WebDAV file sync error occurred. Please restart %S and try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. +sync.storage.error.webdav.default=Prišlo je do napake usklajevanja datotek WebDAV. Poskusite ponovno z usklajevanjem.\n\nČe to sporočilo prejemate zaporedoma, preverite nastavitve svojega strežnika WebDAV v podoknu Usklajevanje v nastavitvah Zotera. +sync.storage.error.webdav.defaultRestart=Prišlo je do napake usklajevanja datotek WebDAV. Ponovno zaženite %S in poskusite ponovno z usklajevanjem.\n\nČe to sporočilo prejemate zaporedoma, preverite nastavitve svojega strežnika WebDAV v podoknu Usklajevanje v nastavitvah Zotera. sync.storage.error.webdav.enterURL=Vnesite URL za WebDAV. sync.storage.error.webdav.invalidURL=%S ni veljaven URL za WebDAV. sync.storage.error.webdav.invalidLogin=Strežnik WebDAV ni sprejel uporabniškega imena in gesla, ki ste ju vnesli. @@ -848,17 +848,18 @@ sync.storage.error.webdav.sslConnectionError=Napaka povezave SSL pri povezovanju sync.storage.error.webdav.loadURLForMoreInfo=Naložite URL svojega WebDAV v brskalniku, če želite več informacij. sync.storage.error.webdav.seeCertOverrideDocumentation=Če vas zanima več o preglasitvi potrdil, si oglejte dokumentacijo. sync.storage.error.webdav.loadURL=Naloži URL WebDAV -sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.fileMissingAfterUpload=Pri vašem strežniku WebDAV je zaznana potencialna težava.\n\nNa strežnik prenesena datoteka ni bila takoj na voljo za prenos. Med oddajo datoteke in njeno dosegljivostjo je lahko krajša zamuda, še posebej če uporabljate hrambeno storitev v oblaku.\n\nČe se delovanje usklajevanja datotek Zotero zdi navadno, lahko to sporočilo prezrete. Če imate težave, jih objavite na forumih Zotero. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=Napaka prilagoditve strežnika WebDAV sync.storage.error.webdav.serverConfig=Vaš strežnik WebDAV je vrnil notranjo napako. -sync.storage.error.zfs.restart=A file sync error occurred. Please restart %S and/or your computer and try syncing again.\n\nIf the error persists, there may be a problem with either your computer or your network: security software, proxy server, VPN, etc. Try disabling any security/firewall software you're using or, if this is a laptop, try from a different network. -sync.storage.error.zfs.tooManyQueuedUploads=You have too many queued uploads. Please try again in %S minutes. +sync.storage.error.zfs.restart=Prišlo je do napake pri usklajevanju datotek. Ponovno zaženite %S in/ali vaš računalnik ter poskusite znova.\n\nČe še naprej prejemate to sporočilo, imate lahko težave z računalnikom ali omrežjem: varnostno programje, posredovalni strežnik, VPN itn. Poskusite onemogočiti varnostno/požarno-zidno programje, če pa uporabljate prenosnik, poskusite prek drugega omrežja. +sync.storage.error.zfs.tooManyQueuedUploads=V vrsti imate preveč prenosov na strežnik. Poskusite znova čez %S minut. sync.storage.error.zfs.personalQuotaReached1=Dosegli ste mejno kvoto hrambe datotek Zotero. Nekatere datoteke niso bile prenesene na strežnik. Drugi podatki Zotero se bodo še naprej usklajevali s strežnikom. sync.storage.error.zfs.personalQuotaReached2=Oglejte si nastavitve svojega računa zotero.org, kjer najdete dodatne možnosti hrambe. sync.storage.error.zfs.groupQuotaReached1=Skupina »%S« je dosegla svojo mejno kvoto hrambe datotek Zotero. Nekatere datoteke niso bile prenesene na strežnik. Drugi podatki Zotero se bodo še naprej usklajevali s strežnikom. sync.storage.error.zfs.groupQuotaReached2=Lastnik skupine lahko poveča kapaciteto shrambe skupine v odseku nastavitev shrambe na zotero.org. -sync.storage.error.zfs.fileWouldExceedQuota=The file '%S' would exceed your Zotero File Storage quota +sync.storage.error.zfs.fileWouldExceedQuota=Datoteka '%S' bi presegla vašo kvoto shrambe datotek Zotero sync.longTagFixer.saveTag=Shrani značko sync.longTagFixer.saveTags=Shrani značke @@ -899,18 +900,18 @@ rtfScan.scannedFileSuffix=(pregledano) file.accessError.theFile=Datoteka '%S' file.accessError.aFile=Datoteka -file.accessError.cannotBe=cannot be +file.accessError.cannotBe=ni mogoče file.accessError.created=ustvarjena file.accessError.updated=posodobljena file.accessError.deleted=izbrisana -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. -file.accessError.message.other=Check that the file is not currently in use and that its permissions allow write access. -file.accessError.restart=Restarting your computer or disabling security software may also help. +file.accessError.message.windows=Preverite, da datoteka trenutno ni v uporabi, da dovoljuje dostop s pisanjem in da ima veljavno ime datoteke. +file.accessError.message.other=Preverite, da datoteka trenutno ni v uporabi in da dovoljuje dostop s pisanjem. +file.accessError.restart=Pomaga lahko tudi ponoven zagon vašega sistema ali izklop varnostnega programja. file.accessError.showParentDir=Pokaži nadrejeno mapo lookup.failure.title=Poizvedba ni uspela lookup.failure.description=Zotero ne more najti zapisa za navedeni identifikator. Preverite identifikator in poskusite znova. -lookup.failureToID.description=Zotero could not find any identifiers in your input. Please verify your input and try again. +lookup.failureToID.description=Zotero ne najde identifikatorjev za vaš vnos. Preverite svoj vnos in poskusite znova. locate.online.label=Pokaži na spletu locate.online.tooltip=Oglej si ta vnos na spletu diff --git a/chrome/locale/sr-RS/zotero/preferences.dtd b/chrome/locale/sr-RS/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/sr-RS/zotero/zotero.properties b/chrome/locale/sr-RS/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/sv-SE/zotero/about.dtd b/chrome/locale/sv-SE/zotero/about.dtd @@ -10,4 +10,4 @@ <!ENTITY zotero.thanks "Särskilt tack:"> <!ENTITY zotero.about.close "Stäng"> <!ENTITY zotero.moreCreditsAndAcknowledgements "Vi vill också tacka..."> -<!ENTITY zotero.citationProcessing "Citation & Bibliography Processing"> +<!ENTITY zotero.citationProcessing "Citering och källförteckningsbearbetning"> diff --git a/chrome/locale/sv-SE/zotero/preferences.dtd b/chrome/locale/sv-SE/zotero/preferences.dtd @@ -3,7 +3,7 @@ <!ENTITY zotero.preferences.default "Standardvärde:"> <!ENTITY zotero.preferences.items "Källor"> <!ENTITY zotero.preferences.period "."> -<!ENTITY zotero.preferences.settings "Settings"> +<!ENTITY zotero.preferences.settings "Inställningar"> <!ENTITY zotero.preferences.prefpane.general "Allmänt"> @@ -60,14 +60,14 @@ <!ENTITY zotero.preferences.sync.fileSyncing.url "URL:"> <!ENTITY zotero.preferences.sync.fileSyncing.myLibrary "Synkronisera bifogade filer i mitt bibliotek med:"> <!ENTITY zotero.preferences.sync.fileSyncing.groups "Synkronisera bifogade filer i gruppens bibliotek med Zotero Storage"> -<!ENTITY zotero.preferences.sync.fileSyncing.download "Download files"> -<!ENTITY zotero.preferences.sync.fileSyncing.download.atSyncTime "at sync time"> -<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "as needed"> +<!ENTITY zotero.preferences.sync.fileSyncing.download "Ladda ner filer"> +<!ENTITY zotero.preferences.sync.fileSyncing.download.atSyncTime "vid synkronisering"> +<!ENTITY zotero.preferences.sync.fileSyncing.download.onDemand "efter behov"> <!ENTITY zotero.preferences.sync.fileSyncing.tos1 "Genom att använda Zotero Storage går du med på deras"> <!ENTITY zotero.preferences.sync.fileSyncing.tos2 "avtalsvillkor"> -<!ENTITY zotero.preferences.sync.reset.warning1 "The following operations are for use only in rare, specific situations and should not be used for general troubleshooting. In many cases, resetting will cause additional problems. See "> -<!ENTITY zotero.preferences.sync.reset.warning2 "Sync Reset Options"> -<!ENTITY zotero.preferences.sync.reset.warning3 " for more information."> +<!ENTITY zotero.preferences.sync.reset.warning1 "Följande åtgärder är endast till för sällsynta, särskilda situationer och ska inte användas för vanlig felsökning. I många fall kan återställning istället ge upphov till nya problem. Se"> +<!ENTITY zotero.preferences.sync.reset.warning2 "Återställningsalternativ för synkronisering"> +<!ENTITY zotero.preferences.sync.reset.warning3 "för mer information."> <!ENTITY zotero.preferences.sync.reset.fullSync "Komplett synkronisering med Zotero Server"> <!ENTITY zotero.preferences.sync.reset.fullSync.desc "Sammanfoga lokala Zoterodata med data från synkroniseringsservern, utan att ta hänsyn till historik."> <!ENTITY zotero.preferences.sync.reset.restoreFromServer "Återställ från Zotero Server"> @@ -76,7 +76,7 @@ <!ENTITY zotero.preferences.sync.reset.restoreToServer.desc "Byt ut allt innehåll på Zotero Server mot lokala Zoterodata."> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "Återställ filsynkroniseringshistorik"> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "Tvinga Zotero Server att säkerhetskontrollera alla lokala bifogade filer."> -<!ENTITY zotero.preferences.sync.reset "Reset"> +<!ENTITY zotero.preferences.sync.reset "Återställ"> <!ENTITY zotero.preferences.sync.reset.button "Återställ..."> @@ -161,7 +161,7 @@ <!ENTITY zotero.preferences.proxies.a_variable "%a - Vilken sträng som helst"> <!ENTITY zotero.preferences.prefpane.advanced "Avancerat"> -<!ENTITY zotero.preferences.advanced.filesAndFolders "Files and Folders"> +<!ENTITY zotero.preferences.advanced.filesAndFolders "Filer och kataloger"> <!ENTITY zotero.preferences.prefpane.locate "Hitta"> <!ENTITY zotero.preferences.locate.locateEngineManager "Hantera söktjänst för artiklar"> @@ -181,11 +181,11 @@ <!ENTITY zotero.preferences.dataDir.choose "Välj..."> <!ENTITY zotero.preferences.dataDir.reveal "Visa datakatalog"> -<!ENTITY zotero.preferences.attachmentBaseDir.caption "Linked Attachment Base Directory"> -<!ENTITY zotero.preferences.attachmentBaseDir.message "Zotero will use relative paths for linked file attachments within the base directory, allowing you to access files on different computers as long as the file structure within the base directory remains the same."> -<!ENTITY zotero.preferences.attachmentBaseDir.basePath "Base directory:"> -<!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "Choose…"> -<!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Revert to Absolute Paths…"> +<!ENTITY zotero.preferences.attachmentBaseDir.caption "Baskatalog för länkande bilagor"> +<!ENTITY zotero.preferences.attachmentBaseDir.message "Zotero använder relativa sökvägar för länkade filbilagor inom baskatalogen, vilket gör att du kan använda nå filerna på olika datorer så länge filstrukturen inom baskatalogen är densamma."> +<!ENTITY zotero.preferences.attachmentBaseDir.basePath "Baskatalog:"> +<!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "Välj..."> +<!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Återgå till absoluta sökvägar…"> <!ENTITY zotero.preferences.dbMaintenance "Databasunderhåll"> <!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Undersök om databasen är oskadd"> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Öppna about:config"> <!ENTITY zotero.preferences.openCSLEdit "Öppna CSL-redigerare"> <!ENTITY zotero.preferences.openCSLPreview "Öppna CSL-förhandsvisning"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/sv-SE/zotero/zotero.dtd b/chrome/locale/sv-SE/zotero/zotero.dtd @@ -212,8 +212,8 @@ <!ENTITY zotero.integration.prefs.bookmarks.caption "Bokmärken sparas i Microsoft Word och OpenOffice, men kan ändras av misstag."> -<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Automatically abbreviate journal titles"> -<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.caption "MEDLINE journal abbreviations will be automatically generated using journal titles. The “Journal Abbr” field will be ignored."> +<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Förkorta tidskriftstitlar automatiskt"> +<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.caption "MEDLINE-tidskriftsförkortningar genereras automatiskt från tidskriftstitlarna. Tidskriftsförkortningsfältet ignoreras."> <!ENTITY zotero.integration.prefs.storeReferences.label "Lagra referenserna i dokumentet"> <!ENTITY zotero.integration.prefs.storeReferences.caption "När du lagerar referenserna i dokument ökar filstorleken något, men det ger dig möjligheten att dela dokumentet till andra utan att använda en Zotero-grupp. Zotero 3.0 eller senare krävs för att redigera dokument som skapats med detta tillval."> diff --git a/chrome/locale/sv-SE/zotero/zotero.properties b/chrome/locale/sv-SE/zotero/zotero.properties @@ -12,7 +12,7 @@ general.restartRequiredForChanges=%S måste startas om för att ändringarna ska general.restartNow=Starta om nu general.restartLater=Starta om senare general.restartApp=Starta om %S -general.quitApp=Quit %S +general.quitApp=Avsluta %S general.errorHasOccurred=Ett fel har uppstått general.unknownErrorOccurred=Ett okänt fel har uppstått general.invalidResponseServer=Ogiltigt svar från server. @@ -35,14 +35,14 @@ general.permissionDenied=Tillåts inte komma åt general.character.singular=tecken general.character.plural=tecken general.create=Skapa -general.delete=Delete -general.moreInformation=More Information +general.delete=Radera +general.moreInformation=Mer information general.seeForMoreInformation=Se %S för mer information. general.enable=Sätt på general.disable=Stäng av general.remove=Ta bort general.reset=Återställ -general.hide=Hide +general.hide=Göm general.quit=Avsluta general.useDefault=Använd standard general.openDocumentation=Öppna dokumentation @@ -86,14 +86,14 @@ errorReport.repoCannotBeContacted=Nätarkivet kunde inte nås attachmentBasePath.selectDir=Välj baskatalog attachmentBasePath.chooseNewPath.title=Bekräfta ny baskatalog -attachmentBasePath.chooseNewPath.message=Linked file attachments below this directory will be saved using relative paths. -attachmentBasePath.chooseNewPath.existingAttachments.singular=One existing attachment was found within the new base directory. -attachmentBasePath.chooseNewPath.existingAttachments.plural=%S existing attachments were found within the new base directory. +attachmentBasePath.chooseNewPath.message=Länkade filbilagor under denna katalog kommer att sparas med relativa sökvägar. +attachmentBasePath.chooseNewPath.existingAttachments.singular=En befintlig bilaga kunde finnas i den nya baskatalogen. +attachmentBasePath.chooseNewPath.existingAttachments.plural=%S befintliga bilagor hittades i den nya baskatalogen. attachmentBasePath.chooseNewPath.button=Ändra baskatalog attachmentBasePath.clearBasePath.title=Återgå till absoluta sökvägar -attachmentBasePath.clearBasePath.message=New linked file attachments will be saved using absolute paths. -attachmentBasePath.clearBasePath.existingAttachments.singular=One existing attachment within the old base directory will be converted to use an absolute path. -attachmentBasePath.clearBasePath.existingAttachments.plural=%S existing attachments within the old base directory will be converted to use absolute paths. +attachmentBasePath.clearBasePath.message=Nya länkade filbilagor kommer att sparas med relativa sökvägar. +attachmentBasePath.clearBasePath.existingAttachments.singular=En befintlig bilaga inom den gamla baskatalogen konverteras för att därefter använda absolut sökväg. +attachmentBasePath.clearBasePath.existingAttachments.plural=%S befintliga bilagor inom den gamla baskatalogen konverteras för att därefter använda absolut sökväg. attachmentBasePath.clearBasePath.button=Återställ inställning för baskatalog dataDir.notFound=Datakatalogen för Zotero kunde inte hittas. @@ -104,10 +104,10 @@ dataDir.selectedDirNonEmpty.title=Katalogen är inte tom dataDir.selectedDirNonEmpty.text=Katalogen du valt är inte tom eller verkar inte vara en datakatalog för Zotero.\n\nSkapa Zotero-filer i den här katalogen ändå? dataDir.selectedDirEmpty.title=Katalogen är tom dataDir.selectedDirEmpty.text=The directory you selected is empty. To move an existing Zotero data directory, you will need to manually move files from the existing data directory to the new location after %1$S has closed. -dataDir.selectedDirEmpty.useNewDir=Use the new directory? +dataDir.selectedDirEmpty.useNewDir=Använd ny katalog dataDir.moveFilesToNewLocation=Be sure to move files from your existing Zotero data directory to the new location before reopening %1$S. -dataDir.incompatibleDbVersion.title=Incompatible Database Version -dataDir.incompatibleDbVersion.text=The currently selected data directory is not compatible with Zotero Standalone, which can share a database only with Zotero for Firefox 2.1b3 or later.\n\nUpgrade to the latest version of Zotero for Firefox first or select a different data directory for use with Zotero Standalone. +dataDir.incompatibleDbVersion.title=Inkompatibel databasversion +dataDir.incompatibleDbVersion.text=Den valda datafoldern är inte kompatibel med Zotero Standalone, som bara kan dela databas med Zotero for Firefox 2.1b3 or later.\n\n\n\nUppgradera till den senaste versionen av Zotero för Firefox först eller välj en annan datafolder för att använda med Zotero Standalone. dataDir.standaloneMigration.title=Ett befintligt Zotero-bibliotek hittades dataDir.standaloneMigration.description=Detta verkar vara första gången du använder %1$S. Vill du att %1$S ska hämta inställningarna från %2$S och använda din befintliga källkatalog? dataDir.standaloneMigration.multipleProfiles=%1$S kommer att dela sin källkatalog med den senast använda profilen. @@ -138,13 +138,13 @@ date.relative.daysAgo.multiple=%S dagar sen date.relative.yearsAgo.one=1 år sen date.relative.yearsAgo.multiple=%S år sen -pane.collections.delete.title=Delete Collection +pane.collections.delete.title=Radera samling pane.collections.delete=Är du säker på att du vill ta bort den valda samlingen? -pane.collections.delete.keepItems=Items within this collection will not be deleted. -pane.collections.deleteWithItems.title=Delete Collection and Items -pane.collections.deleteWithItems=Are you sure you want to delete the selected collection and move all items within it to the Trash? +pane.collections.delete.keepItems=Källor i denna samling kommer inte att raderas +pane.collections.deleteWithItems.title=Radera samling och källor +pane.collections.deleteWithItems=Är du säker på att du vill radera de valda samlingarna och flytta alla källor i dem till papperskorgen? -pane.collections.deleteSearch.title=Delete Search +pane.collections.deleteSearch.title=Radera sökning pane.collections.deleteSearch=Är du säker på att du vill ta bort den valda sökningen? pane.collections.emptyTrash=Är du säker på att du vill ta bort papperskorgens innehåll för alltid? pane.collections.newCollection=Ny samling @@ -161,9 +161,9 @@ pane.collections.duplicate=Källdubbletter pane.collections.menu.rename.collection=Ändra namn på samling... pane.collections.menu.edit.savedSearch=Redigera sparad sökning -pane.collections.menu.delete.collection=Delete Collection… -pane.collections.menu.delete.collectionAndItems=Delete Collection and Items… -pane.collections.menu.delete.savedSearch=Delete Saved Search… +pane.collections.menu.delete.collection=Radera samling… +pane.collections.menu.delete.collectionAndItems=Radera samling och källor… +pane.collections.menu.delete.savedSearch=Radera sparad sökning… pane.collections.menu.export.collection=Exportera samling... pane.collections.menu.export.savedSearch=Exportera sparad sökning... pane.collections.menu.createBib.collection=Skapa källförteckning från samling... @@ -185,8 +185,8 @@ tagColorChooser.numberKeyInstructions=Du kan lägga till denna etikett till vald tagColorChooser.maxTags=Upp till %S etiketter i varje katalog kan förses med en färg. pane.items.loading=Laddar lista med källor... -pane.items.attach.link.uri.title=Attach Link to URI -pane.items.attach.link.uri=Enter a URI: +pane.items.attach.link.uri.title=Bifoga länk till URI +pane.items.attach.link.uri=Ange en URI: pane.items.trash.title=Flytta till papperskorgen pane.items.trash=Är du säker på att du vill flytta den valda källan till papperskorgen? pane.items.trash.multiple=Är du säker på att du vill flytta de valda källorna till papperskorgen? @@ -195,8 +195,8 @@ pane.items.delete=Är du säker på att du vill ta bort den valda källan? pane.items.delete.multiple=Är du säker på att du vill ta bort de valda källorna? pane.items.menu.remove=Ta bort vald källa pane.items.menu.remove.multiple=Ta bort valda källor -pane.items.menu.moveToTrash=Move Item to Trash… -pane.items.menu.moveToTrash.multiple=Move Items to Trash… +pane.items.menu.moveToTrash=Flytta källa till papperskorgen… +pane.items.menu.moveToTrash.multiple=Flytta källor till papperskorgen… pane.items.menu.export=Exportera vald källa... pane.items.menu.export.multiple=Exportera valda källor... pane.items.menu.createBib=Skapa källförteckning av vald källa... @@ -227,11 +227,11 @@ pane.item.unselected.zero=Inga källor i denna vy pane.item.unselected.singular=%S källa i denna vy pane.item.unselected.plural=%S källor i denna vy -pane.item.duplicates.selectToMerge=Select items to merge +pane.item.duplicates.selectToMerge=Välj källor att sammanfoga pane.item.duplicates.mergeItems=Sammanfoga %S källor pane.item.duplicates.writeAccessRequired=Skrivbehörighet till biblioteket är nödvändigt för att sammanfoga källor. -pane.item.duplicates.onlyTopLevel=Only top-level full items can be merged. -pane.item.duplicates.onlySameItemType=Merged items must all be of the same item type. +pane.item.duplicates.onlyTopLevel=Endast fullständiga källor på toppnivå kan sammanfogas. +pane.item.duplicates.onlySameItemType=Alla sammanfogade källor måste vara av samma källtyp. pane.item.changeType.title=Ändra källtyp pane.item.changeType.text=Är du säker på att du vill ändra källtyp?\n\nFöljande fält kommer att försvinna: @@ -560,8 +560,8 @@ zotero.preferences.advanced.resetStyles=Återställ referensstilar zotero.preferences.advanced.resetStyles.changesLost=Alla nya eller ändrade referensstilar kommer att förloras. zotero.preferences.advanced.debug.title=Debug-utdata har skickats -zotero.preferences.advanced.debug.sent=Debug output has been sent to the Zotero server.\n\nThe Debug ID is D%S. -zotero.preferences.advanced.debug.error=An error occurred sending debug output. +zotero.preferences.advanced.debug.sent=Debuguppgifter har skickats till Zoteros server.\n\n\n\nDebug ID är D%S. +zotero.preferences.advanced.debug.error=Ett fel uppstod när debuguppgifterna skulle skickas. dragAndDrop.existingFiles=Följande filer fanns redan i målkatalogen och kopierades inte: dragAndDrop.filesNotFound=Följande filer hittades inte och kunde inte kopieras: @@ -572,7 +572,7 @@ fileInterface.import=Importera fileInterface.export=Exportera fileInterface.exportedItems=Exporterade källor fileInterface.imported=Importerat -fileInterface.unsupportedFormat=The selected file is not in a supported format. +fileInterface.unsupportedFormat=Det saknas stöd för filformatet i den valda filen. fileInterface.viewSupportedFormats=Visa stödda format… fileInterface.untitledBibliography=Källförteckning utan titel fileInterface.bibliographyHTMLTitle=Källförteckning @@ -722,7 +722,7 @@ integration.citationChanged.description=Om du klickar "Ja" så förhindras Zoter integration.citationChanged.edit=Du har ändrat den här källhänvisningen sedan den skapades av Zotero. Om du redigerar den tas dina ändringar bort. Vill du fortsätta? styles.install.title=Installera stil -styles.install.unexpectedError=An unexpected error occurred while installing "%1$S" +styles.install.unexpectedError=Ett oväntat fel uppstod vid installation av "%1$S" styles.installStyle=Installera referensstil "%1$S" från %2$S? styles.updateStyle=Uppdatera existerande referensstil "%1$S" med "%2$S" från %3$S? styles.installed=Referensstilen "%S" importerades med lyckat resultat. @@ -732,11 +732,11 @@ styles.installSourceError=%1$S refererar till en ogiltig eller saknad CSL-file m styles.deleteStyle=Är du säker på att du vill ta bort referensstilen "%1$S"? styles.deleteStyles=Är du säker på att du vill ta bort de valda referensstilarna? -styles.abbreviations.title=Load Abbreviations -styles.abbreviations.parseError=The abbreviations file "%1$S" is not valid JSON. -styles.abbreviations.missingInfo=The abbreviations file "%1$S" does not specify a complete info block. +styles.abbreviations.title=Ladda förkortningar +styles.abbreviations.parseError=Förkortningsfilen "%1$S" är inte giltig JSON. +styles.abbreviations.missingInfo=Förkortningsfilen "%1$S" anger inte ett komplett informationsblock. -sync.sync=Sync +sync.sync=Synkronisera sync.cancel=Avbryt synkronisering sync.openSyncPreferences=Öppna synkroniseringsval... sync.resetGroupAndSync=Återställ grupp och synkronisering @@ -746,15 +746,15 @@ sync.remoteObject=Fjärrobjekt sync.mergedObject=Ihopsatt objekt sync.error.usernameNotSet=Användarnamn är inte valt -sync.error.usernameNotSet.text=You must enter your zotero.org username and password in the Zotero preferences to sync with the Zotero server. +sync.error.usernameNotSet.text=Du måste ange ditt zotero.org-användarnamn och lösenord i Zoteros egenskaper för att synkronisera med Zotero-servern. sync.error.passwordNotSet=Lösenord är inte valt sync.error.invalidLogin=Ogiltigt användarnamn eller lösenord sync.error.invalidLogin.text=The Zotero sync server did not accept your username and password.\n\nPlease check that you have entered your zotero.org login information correctly in the Zotero sync preferences. sync.error.enterPassword=Skriv ett lösenord. -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. +sync.error.loginManagerInaccessible=Zotero kan inte nå din inloggningsinformation. +sync.error.checkMasterPassword=Om du använder ett huvudlösenord i %S, kontrollera att du har skrivit in rätt lösenord. sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. +sync.error.loginManagerCorrupted1=Zotero kan inte komma åt din inloggningsinformation, antagligen på grund av en en trasig %S-loginhanterardatabas. sync.error.loginManagerCorrupted2=Stäng %1$S, gör en backup och radera signons.* från din %2$S-profil. Skriv in dina inloggningsuppgifter i synkroniseringsrutan under Zotero-val. sync.error.syncInProgress=En synkroniseringsprocess är redan igång. sync.error.syncInProgress.wait=Vänta till den förra synkroniseringen är klar eller starta om %S. @@ -764,9 +764,9 @@ sync.error.copyChangedItems=Om du vill kopiera dina ändringar någon annanstans sync.error.manualInterventionRequired=En automatisk synkronisering ledde till en konflikt som måste åtgärdas manuellt. sync.error.clickSyncIcon=Klicka på synkroniseringsikonen för att synkronisera manuellt. sync.error.invalidClock=The system clock is set to an invalid time. You will need to correct this to sync with the Zotero server. -sync.error.sslConnectionError=SSL connection error -sync.error.checkConnection=Error connecting to server. Check your Internet connection. -sync.error.emptyResponseServer=Empty response from server. +sync.error.sslConnectionError=SSL-anslutningsfel +sync.error.checkConnection=Fel vid anslutning till server. Kontrollera din internetuppkoppling. +sync.error.emptyResponseServer=Tomt svar från server. sync.error.invalidCharsFilename=The filename '%S' contains invalid characters.\n\nRename the file and try again. If you rename the file via the OS, you will need to relink it in Zotero. sync.lastSyncWithDifferentAccount=This Zotero database was last synced with a different zotero.org account ('%1$S') from the current one ('%2$S'). @@ -775,29 +775,29 @@ sync.localGroupsWillBeRemoved1=Local groups, including any with changed items, w sync.avoidCombiningData=To avoid combining or losing data, revert to the '%S' account or use the Reset options in the Sync pane of the Zotero preferences. sync.localGroupsWillBeRemoved2=If you continue, local groups, including any with changed items, will be removed and replaced with groups linked to the '%1$S' account.\n\nTo avoid losing local changes to groups, be sure you have synced with the '%2$S' account before syncing with the '%1$S' account. -sync.conflict.autoChange.alert=One or more locally deleted Zotero %S have been modified remotely since the last sync. -sync.conflict.autoChange.log=A Zotero %S has changed both locally and remotely since the last sync: -sync.conflict.remoteVersionsKept=The remote versions have been kept. -sync.conflict.remoteVersionKept=The remote version has been kept. -sync.conflict.localVersionsKept=The local versions have been kept. -sync.conflict.localVersionKept=The local version has been kept. -sync.conflict.recentVersionsKept=The most recent versions have been kept. -sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. -sync.conflict.localVersion=Local version: %S -sync.conflict.remoteVersion=Remote version: %S -sync.conflict.deleted=[deleted] +sync.conflict.autoChange.alert=En eller fler raderade Zotero %S har ändrats både lokalt och från annat håll sedan senaste synkroniseringen: +sync.conflict.autoChange.log=En Zotero %S har ändrats både lokalt och från annat håll sedan senaste synkroniseringen: +sync.conflict.remoteVersionsKept=Fjärrversionerna har behållits. +sync.conflict.remoteVersionKept=Fjärrversionen har behållits. +sync.conflict.localVersionsKept=De senaste lokala versionerna har behållits. +sync.conflict.localVersionKept=Den senaste lokala versionen har behållits. +sync.conflict.recentVersionsKept=De senaste versionerna har behållits. +sync.conflict.recentVersionKept=Den senaste versionen, '%S', har behållits. +sync.conflict.viewErrorConsole=Visa %S felkonsolen för en fullständig lista av sådana ändringar. +sync.conflict.localVersion=Lokal version: %S +sync.conflict.remoteVersion=Fjärrversion: %S +sync.conflict.deleted=[raderad] sync.conflict.collectionItemMerge.alert=One or more Zotero items have been added to and/or removed from the same collection on multiple computers since the last sync. sync.conflict.collectionItemMerge.log=Zotero items in the collection '%S' have been added and/or removed on multiple computers since the last sync. The following items have been added to the collection: sync.conflict.tagItemMerge.alert=One or more Zotero tags have been added to and/or removed from items on multiple computers since the last sync. The different sets of tags have been combined. sync.conflict.tagItemMerge.log=The Zotero tag '%S' has been added to and/or removed from items on multiple computers since the last sync. -sync.conflict.tag.addedToRemote=It has been added to the following remote items: -sync.conflict.tag.addedToLocal=It has been added to the following local items: +sync.conflict.tag.addedToRemote=Det har lagts till i följande fjärrkällor: +sync.conflict.tag.addedToLocal=Det har lagts till i följande lokala källor: -sync.conflict.fileChanged=The following file has been changed in multiple locations. -sync.conflict.itemChanged=The following item has been changed in multiple locations. -sync.conflict.chooseVersionToKeep=Choose the version you would like to keep, and then click %S. -sync.conflict.chooseThisVersion=Choose this version +sync.conflict.fileChanged=Följande fil har ändrats på flera platser. +sync.conflict.itemChanged=Följande källa har ändrats på flera platser. +sync.conflict.chooseVersionToKeep=Välj den version du vill behålla, klicka sedan %S. +sync.conflict.chooseThisVersion=Välj denna version sync.status.notYetSynced=Ännu inte synkroniserad sync.status.lastSync=Senaste synkronisering: @@ -808,12 +808,12 @@ sync.status.uploadingData=Laddar upp data till synkroniseringsservern sync.status.uploadAccepted=Uppladdningen accepterades \u2014 väntar på synkroniseringsservern sync.status.syncingFiles=Synkroniserar filer -sync.storage.mbRemaining=%SMB remaining +sync.storage.mbRemaining=%SMB återstår sync.storage.kbRemaining=%SKB återstår sync.storage.filesRemaining=%1$S/%2$S filer sync.storage.none=Inga -sync.storage.downloads=Downloads: -sync.storage.uploads=Uploads: +sync.storage.downloads=Nedladdningar: +sync.storage.uploads=Uppladdningar: sync.storage.localFile=Lokal fil sync.storage.remoteFile=Fjärrfil sync.storage.savedFile=Sparad fil @@ -838,7 +838,7 @@ sync.storage.error.createNow=Vill du skapa den nu? sync.storage.error.webdav.default=A WebDAV file sync error occurred. Please try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. sync.storage.error.webdav.defaultRestart=A WebDAV file sync error occurred. Please restart %S and try syncing again.\n\nIf you receive this message repeatedly, check your WebDAV server settings in the Sync pane of the Zotero preferences. -sync.storage.error.webdav.enterURL=Please enter a WebDAV URL. +sync.storage.error.webdav.enterURL=Skriv in adressen till en WebDAV. sync.storage.error.webdav.invalidURL=%S är inte en giltig WebDAV-adress. sync.storage.error.webdav.invalidLogin=WebDAV-servern accepterar inte ditt användarnamn och lösenord. sync.storage.error.webdav.permissionDenied=Du har inte behörighet att komma åt %S på WebDAV-servern. @@ -849,8 +849,9 @@ sync.storage.error.webdav.loadURLForMoreInfo=Surfa till din WebDAV-adress för m sync.storage.error.webdav.seeCertOverrideDocumentation=Se dokumentationen för mer information om åsidosättande av certifikat. sync.storage.error.webdav.loadURL=Ladda WebDAV-adress sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. -sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error -sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. +sync.storage.error.webdav.serverConfig.title=Felaktig konfiguration för WebDAV-server +sync.storage.error.webdav.serverConfig=Din WebDAV-server svarade med ett internt fel. sync.storage.error.zfs.restart=A file sync error occurred. Please restart %S and/or your computer and try syncing again.\n\nIf the error persists, there may be a problem with either your computer or your network: security software, proxy server, VPN, etc. Try disabling any security/firewall software you're using or, if this is a laptop, try from a different network. sync.storage.error.zfs.tooManyQueuedUploads=You have too many queued uploads. Please try again in %S minutes. @@ -885,7 +886,7 @@ recognizePDF.couldNotRead=Kunde inte läsa text från PDF. recognizePDF.noMatches=Ingen passande källa hittades. recognizePDF.fileNotFound=Filen hittades inte. recognizePDF.limit=Du har gjort för många sökningar. Försök igen om en stund. -recognizePDF.error=An unexpected error occurred. +recognizePDF.error=Ett oväntat fel har uppstått. recognizePDF.complete.label=Inläsningen av metadata är färdig. recognizePDF.close.label=Stäng @@ -897,16 +898,16 @@ rtfScan.saveTitle=Välj ett ställe där den formaterade filen kan sparas rtfScan.scannedFileSuffix=(Scannad) -file.accessError.theFile=The file '%S' -file.accessError.aFile=A file -file.accessError.cannotBe=cannot be -file.accessError.created=created -file.accessError.updated=updated -file.accessError.deleted=deleted -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. -file.accessError.message.other=Check that the file is not currently in use and that its permissions allow write access. -file.accessError.restart=Restarting your computer or disabling security software may also help. -file.accessError.showParentDir=Show Parent Directory +file.accessError.theFile=Filen '%S' +file.accessError.aFile=En fil +file.accessError.cannotBe=får inte vara +file.accessError.created=skapad +file.accessError.updated=ändrad +file.accessError.deleted=raderad +file.accessError.message.windows=Kontrollera att filen inte används, att skrivbehörighet finns och att filnamnet är giltigt. +file.accessError.message.other=Kontrollera att filen inte används och att skrivbehörighet finns. +file.accessError.restart=En omstart av datorn eller att säkerhetsprogramvaran avaktiveras kan hjälpa. +file.accessError.showParentDir=Visa överordnad katalog lookup.failure.title=Kontrollen misslyckades lookup.failure.description=Zotero kunde inte hitta något som passade detta registreringsnummer. Kolla registreringsnummret och försök igen. diff --git a/chrome/locale/th-TH/zotero/preferences.dtd b/chrome/locale/th-TH/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "เปิด about:config"> <!ENTITY zotero.preferences.openCSLEdit "เปิดตัวจัดการ CSL"> <!ENTITY zotero.preferences.openCSLPreview "เปิดดูตัวอย่าง CSL"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/th-TH/zotero/zotero.properties b/chrome/locale/th-TH/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=บรรจุ WebDAV URL ขอ sync.storage.error.webdav.seeCertOverrideDocumentation=สำหรับข้อมูลเพิ่มเติมดูใบรับรองยกเลิกเอกสาร sync.storage.error.webdav.loadURL=บรรจุ WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/tr-TR/zotero/about.dtd b/chrome/locale/tr-TR/zotero/about.dtd @@ -10,4 +10,4 @@ <!ENTITY zotero.thanks "Özel teşekkürler:"> <!ENTITY zotero.about.close "Kapat"> <!ENTITY zotero.moreCreditsAndAcknowledgements "Diğer Katılımcılar ve Teşekkürler"> -<!ENTITY zotero.citationProcessing "Citation & Bibliography Processing"> +<!ENTITY zotero.citationProcessing "Alıntı ve Kaynakça İşlemleri"> diff --git a/chrome/locale/tr-TR/zotero/preferences.dtd b/chrome/locale/tr-TR/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "about:config'i Aç"> <!ENTITY zotero.preferences.openCSLEdit "CSL Düzenleyicisini Aç"> <!ENTITY zotero.preferences.openCSLPreview "CSL Ön İzlemesini Aç"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/tr-TR/zotero/searchbox.dtd b/chrome/locale/tr-TR/zotero/searchbox.dtd @@ -12,7 +12,7 @@ <!ENTITY zotero.search.textModes.phrase "Sözcük öbeği"> <!ENTITY zotero.search.textModes.phraseBinary "Sözcük öbeği (ikili dosyalar içerir)"> <!ENTITY zotero.search.textModes.regexp "AraBul"> -<!ENTITY zotero.search.textModes.regexpCS "AraBul (harf duyarlı)"> +<!ENTITY zotero.search.textModes.regexpCS "AraBul (büyük/küçük harf duyarlı)"> <!ENTITY zotero.search.date.units.days "gün"> <!ENTITY zotero.search.date.units.months "ay"> diff --git a/chrome/locale/tr-TR/zotero/zotero.dtd b/chrome/locale/tr-TR/zotero/zotero.dtd @@ -149,7 +149,7 @@ <!ENTITY zotero.tagColorChooser.setColor "Set Color"> <!ENTITY zotero.tagColorChooser.removeColor "Remove Color"> -<!ENTITY zotero.lookup.description "ISBN, DOI veya PMID'yi girerek aşağıdaki kutuda ara."> +<!ENTITY zotero.lookup.description "ISBN, DOI veya PMID numarasını girerek aşağıdaki kutuda ara."> <!ENTITY zotero.lookup.button.search "Ara"> <!ENTITY zotero.selectitems.title "Eser Seç"> @@ -159,9 +159,9 @@ <!ENTITY zotero.bibliography.title "Bibliyografya Oluştur"> <!ENTITY zotero.bibliography.style.label "Kaynakça Biçimi:"> -<!ENTITY zotero.bibliography.outputMode "Output Mode:"> +<!ENTITY zotero.bibliography.outputMode "Çıktı Biçimi"> <!ENTITY zotero.bibliography.bibliography "Bibliyografya"> -<!ENTITY zotero.bibliography.outputMethod "Output Method:"> +<!ENTITY zotero.bibliography.outputMethod "Çıktı Metodu"> <!ENTITY zotero.bibliography.saveAsRTF.label "RTF olarak Kaydet"> <!ENTITY zotero.bibliography.saveAsHTML.label "HTML olarak Kaydet"> <!ENTITY zotero.bibliography.copyToClipboard.label "Pano'ya Kopyala"> diff --git a/chrome/locale/tr-TR/zotero/zotero.properties b/chrome/locale/tr-TR/zotero/zotero.properties @@ -35,7 +35,7 @@ general.permissionDenied=İzin Verilmez general.character.singular=karakter general.character.plural=karakter general.create=Oluştur -general.delete=Delete +general.delete=Sil general.moreInformation=More Information general.seeForMoreInformation=Daha fazla bilgi için bakınız: %S general.enable=Seçilir Kıl: @@ -138,13 +138,13 @@ date.relative.daysAgo.multiple=%S gün önce date.relative.yearsAgo.one=1 yıl önce date.relative.yearsAgo.multiple=%S yıl önce -pane.collections.delete.title=Delete Collection +pane.collections.delete.title=Dermeyi Sil pane.collections.delete=Seçili dermeyi silmek istediğinize emin misiniz? -pane.collections.delete.keepItems=Items within this collection will not be deleted. -pane.collections.deleteWithItems.title=Delete Collection and Items -pane.collections.deleteWithItems=Are you sure you want to delete the selected collection and move all items within it to the Trash? +pane.collections.delete.keepItems=Derme içerisindeki eserler silinmeyecektir. +pane.collections.deleteWithItems.title=Dermeyi ve Eserleri Sil +pane.collections.deleteWithItems=Seçili derme ile birlikte tüm eserleri silmek istediğinizden emin misiniz? -pane.collections.deleteSearch.title=Delete Search +pane.collections.deleteSearch.title=Aramayı Sil pane.collections.deleteSearch=Seçili aramayı silmek istediğinize emin misiniz? pane.collections.emptyTrash=Çöp kutusundaki tüm eserleri kalıcı olarak silmek istediğinize emin misiniz? pane.collections.newCollection=Yeni Derme @@ -161,9 +161,9 @@ pane.collections.duplicate=Yinelenen Öğeler pane.collections.menu.rename.collection=Dermeyi yeniden adlandır... pane.collections.menu.edit.savedSearch=Kaydedilen Aramayı Düzenle -pane.collections.menu.delete.collection=Delete Collection… -pane.collections.menu.delete.collectionAndItems=Delete Collection and Items… -pane.collections.menu.delete.savedSearch=Delete Saved Search… +pane.collections.menu.delete.collection=Dermeyi Sil +pane.collections.menu.delete.collectionAndItems=Dermeyi ve Eserleri Sil +pane.collections.menu.delete.savedSearch=Kaydedilmiş Aramayı Sil... pane.collections.menu.export.collection=Dermeyi Dışarı Aktar... pane.collections.menu.export.savedSearch=Kaydedilen Aramayı Dışarı Aktar... pane.collections.menu.createBib.collection=Dermeden Bibliyografya Oluştur... @@ -193,10 +193,10 @@ pane.items.trash.multiple=Seçili eserleri çöpe göndermeyi istediğinize emin pane.items.delete.title=Sil pane.items.delete=Seçili olan bu eseri silmek istediğinize emin misiniz? pane.items.delete.multiple=Seçili olan bu eserleri silmek istediğinize emin misiniz? -pane.items.menu.remove=Seçili Eseri Sil -pane.items.menu.remove.multiple=Seçili Eserleri Sil -pane.items.menu.moveToTrash=Move Item to Trash… -pane.items.menu.moveToTrash.multiple=Move Items to Trash… +pane.items.menu.remove=Eseri dermeden sil +pane.items.menu.remove.multiple=Eserleri Dermeden Sil +pane.items.menu.moveToTrash=Eseri sil... +pane.items.menu.moveToTrash.multiple=Eserleri sil pane.items.menu.export=Seçili Eseri Dışarı Aktar... pane.items.menu.export.multiple=Seçili Eserleri Dışarı Aktar... pane.items.menu.createBib=Seçili Eserden Bibliyografya Yarat... @@ -783,10 +783,10 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S -sync.conflict.deleted=[deleted] +sync.conflict.deleted=[Silindi] sync.conflict.collectionItemMerge.alert=One or more Zotero items have been added to and/or removed from the same collection on multiple computers since the last sync. sync.conflict.collectionItemMerge.log=Zotero items in the collection '%S' have been added and/or removed on multiple computers since the last sync. The following items have been added to the collection: sync.conflict.tagItemMerge.alert=One or more Zotero tags have been added to and/or removed from items on multiple computers since the last sync. The different sets of tags have been combined. @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Daha fazla bilgi için WebDAV URL'n sync.storage.error.webdav.seeCertOverrideDocumentation=Daha çok bilgi için sertifika geçersiz kılma belgelemesini görünüz. sync.storage.error.webdav.loadURL=WebDAV URLsini Yükle sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. @@ -902,7 +903,7 @@ file.accessError.aFile=A file file.accessError.cannotBe=cannot be file.accessError.created=created file.accessError.updated=updated -file.accessError.deleted=deleted +file.accessError.deleted=Silindi file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. file.accessError.message.other=Check that the file is not currently in use and that its permissions allow write access. file.accessError.restart=Restarting your computer or disabling security software may also help. diff --git a/chrome/locale/vi-VN/zotero/preferences.dtd b/chrome/locale/vi-VN/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "Open about:config"> <!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor"> <!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/vi-VN/zotero/zotero.properties b/chrome/locale/vi-VN/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=Load your WebDAV URL in the browser sync.storage.error.webdav.seeCertOverrideDocumentation=See the certificate override documentation for more information. sync.storage.error.webdav.loadURL=Load WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/chrome/locale/zh-CN/zotero/preferences.dtd b/chrome/locale/zh-CN/zotero/preferences.dtd @@ -26,13 +26,13 @@ <!ENTITY zotero.preferences.updateNow "立刻更新"> <!ENTITY zotero.preferences.reportTranslationFailure "报告失效的网站转换器"> <!ENTITY zotero.preferences.zoteroDotOrgVersionHeader "允许 zotero.org 根据当前 Zotero 版本定制内容"> -<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader.tooltip "如果启用, 当前 Zotero 版本会添加到发送至 zotero.org 的HTTP请求中."> +<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader.tooltip "如果启用, 当前 Zotero 的版本号会添加到发送至 zotero.org 的HTTP请求中."> <!ENTITY zotero.preferences.parseRISRefer "使用 Zotero 来处理下载的 RIS/Refer 文件"> <!ENTITY zotero.preferences.automaticSnapshots "从 Web 页面创建条目时自动生成快照"> -<!ENTITY zotero.preferences.downloadAssociatedFiles "保存条目时自动附加相关 PDF 及其它文件"> +<!ENTITY zotero.preferences.downloadAssociatedFiles "保存条目时自动附加相关的 PDF 文档及其它文件"> <!ENTITY zotero.preferences.automaticTags "使用关键词和标题自动给条目添加标签"> <!ENTITY zotero.preferences.trashAutoEmptyDaysPre "自动删除回收站内时间超过"> -<!ENTITY zotero.preferences.trashAutoEmptyDaysPost "天的条目"> +<!ENTITY zotero.preferences.trashAutoEmptyDaysPost "天前的条目"> <!ENTITY zotero.preferences.groups "群组"> <!ENTITY zotero.preferences.groups.whenCopyingInclude "跨文献库复制条目时, 包括:"> @@ -72,7 +72,7 @@ <!ENTITY zotero.preferences.sync.reset.fullSync.desc "将本地数据与同步服务器合并, 并忽略同步历史."> <!ENTITY zotero.preferences.sync.reset.restoreFromServer "从 Zotero 服务器恢复"> <!ENTITY zotero.preferences.sync.reset.restoreFromServer.desc "删除本地所有 Zotero 数据并从同步服务器恢复."> -<!ENTITY zotero.preferences.sync.reset.restoreToServer "恢复到到 Zotero 服务器"> +<!ENTITY zotero.preferences.sync.reset.restoreToServer "恢复到 Zotero 服务器"> <!ENTITY zotero.preferences.sync.reset.restoreToServer.desc "删除服务器所有数据并用本地数据覆盖."> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "重置文件同步历史"> <!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "强制检查本地所有附件的存储服务器"> @@ -80,7 +80,7 @@ <!ENTITY zotero.preferences.sync.reset.button "重置..."> -<!ENTITY zotero.preferences.prefpane.search "检索"> +<!ENTITY zotero.preferences.prefpane.search "搜索"> <!ENTITY zotero.preferences.search.fulltextCache "全文缓存"> <!ENTITY zotero.preferences.search.pdfIndexing "PDF 索引"> <!ENTITY zotero.preferences.search.indexStats "索引统计"> @@ -99,7 +99,7 @@ <!ENTITY zotero.preferences.export.citePaperJournalArticleURL "在参考文献里包含文章 URL 链接"> <!ENTITY zotero.preferences.export.citePaperJournalArticleURL.description "禁用此项后, Zotero 引用期刊, 杂志和报纸文章时仅当这些文章没有指定页码范围时才会包含 URL 链接."> -<!ENTITY zotero.preferences.quickCopy.caption "快速复制"> +<!ENTITY zotero.preferences.quickCopy.caption "便捷复制"> <!ENTITY zotero.preferences.quickCopy.defaultOutputFormat "默认输出格式:"> <!ENTITY zotero.preferences.quickCopy.copyAsHTML "复制为 HTML"> <!ENTITY zotero.preferences.quickCopy.macWarning "提示: 在Mac OS X 下富文本格式将丢失."> @@ -107,21 +107,21 @@ <!ENTITY zotero.preferences.quickCopy.siteEditor.domainPath "域/路径"> <!ENTITY zotero.preferences.quickCopy.siteEditor.domainPath.example "(例如 wikipedia.org)"> <!ENTITY zotero.preferences.quickCopy.siteEditor.outputFormat "输出格式"> -<!ENTITY zotero.preferences.quickCopy.dragLimit "禁用快速复制, 当拖动项超过"> +<!ENTITY zotero.preferences.quickCopy.dragLimit "禁用便捷复制, 当拖动项超过"> <!ENTITY zotero.preferences.prefpane.cite "引用"> <!ENTITY zotero.preferences.cite.styles "样式"> <!ENTITY zotero.preferences.cite.wordProcessors "文字处理软件"> -<!ENTITY zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled "尚未安装文字处理软件的插件"> +<!ENTITY zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled "当前尚未安装文字处理软件的插件."> <!ENTITY zotero.preferences.cite.wordProcessors.getPlugins "获取文字处理软件的插件..."> <!ENTITY zotero.preferences.cite.wordProcessors.getPlugins.url "http://www.zotero.org/support/word_processor_plugin_installation_for_zotero_2.1"> <!ENTITY zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog "使用添加引用的经典对话框"> <!ENTITY zotero.preferences.cite.styles.styleManager "样式管理器"> <!ENTITY zotero.preferences.cite.styles.styleManager.title "标题"> -<!ENTITY zotero.preferences.cite.styles.styleManager.updated "更新于"> +<!ENTITY zotero.preferences.cite.styles.styleManager.updated "最后更新"> <!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL"> -<!ENTITY zotero.preferences.export.getAdditionalStyles "获取更多样式..."> +<!ENTITY zotero.preferences.export.getAdditionalStyles "获取其它样式..."> <!ENTITY zotero.preferences.prefpane.keys "快捷键"> @@ -155,7 +155,7 @@ <!ENTITY zotero.preferences.proxies.autoAssociate "自动关联新域名"> <!ENTITY zotero.preferences.proxies.variables "代理规则中, 您可以使用以下变量:"> <!ENTITY zotero.preferences.proxies.h_variable "%h - 代理站点域名 (如 www.zotero.org)"> -<!ENTITY zotero.preferences.proxies.p_variable "%p - 代理页面的路径, 不包含开头的斜杆 (如 about/index.html)"> +<!ENTITY zotero.preferences.proxies.p_variable "%p - 代理页面的路径, 不包含开头的斜杆 (如 about/index.html)"> <!ENTITY zotero.preferences.proxies.d_variable "%d - 目录路径 (如 about/ )"> <!ENTITY zotero.preferences.proxies.f_variable "%f - 文件名 (如 index.html)"> <!ENTITY zotero.preferences.proxies.a_variable "%a - 任意字符串"> @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "打开配置编辑器"> <!ENTITY zotero.preferences.openCSLEdit "打开 CSL 编辑器"> <!ENTITY zotero.preferences.openCSLPreview "打开 CSL 预览"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/zh-CN/zotero/standalone.dtd b/chrome/locale/zh-CN/zotero/standalone.dtd @@ -44,7 +44,7 @@ <!ENTITY copyCmd.key "C"> <!ENTITY copyCmd.accesskey "C"> <!ENTITY copyCitationCmd.label "复制引文"> -<!ENTITY copyBibliographyCmd.label "复制文献目录"> +<!ENTITY copyBibliographyCmd.label "复制引文目录"> <!ENTITY pasteCmd.label "粘贴"> <!ENTITY pasteCmd.key "V"> <!ENTITY pasteCmd.accesskey "P"> @@ -90,7 +90,7 @@ <!ENTITY aboutProduct.label "关于&brandShortName;"> <!ENTITY aboutProduct.accesskey "A"> <!ENTITY productHelp.label "支持与文档"> -<!ENTITY productHelp.accesskey "H"> +<!ENTITY productHelp.accesskey "D"> <!ENTITY helpTroubleshootingInfo.label "故障排除信息"> <!ENTITY helpTroubleshootingInfo.accesskey "T"> <!ENTITY helpFeedbackPage.label "提交反馈…"> diff --git a/chrome/locale/zh-CN/zotero/timeline.properties b/chrome/locale/zh-CN/zotero/timeline.properties @@ -3,9 +3,9 @@ general.filter=过滤: general.highlight=高亮: general.clearAll=全部清除 general.jumpToYear=跳至年: -general.firstBand=甲带: -general.secondBand=乙带: -general.thirdBand=丙带: +general.firstBand=第一带: +general.secondBand=第二带: +general.thirdBand=第三带: general.dateType=日期类型: general.timelineHeight=时间轴高度: general.fitToScreen=适合屏幕 diff --git a/chrome/locale/zh-CN/zotero/zotero.dtd b/chrome/locale/zh-CN/zotero/zotero.dtd @@ -6,38 +6,38 @@ <!ENTITY zotero.general.delete "删除"> <!ENTITY zotero.errorReport.title "Zotero 错误报告"> -<!ENTITY zotero.errorReport.unrelatedMessages "错误日志里可能会包含一些与Zotero无关的信息."> -<!ENTITY zotero.errorReport.submissionInProgress "正在提交错误报告, 请等待."> +<!ENTITY zotero.errorReport.unrelatedMessages "错误日志里可能会包含一些与 Zotero 无关的信息."> +<!ENTITY zotero.errorReport.submissionInProgress "正在提交错误报告, 请稍候."> <!ENTITY zotero.errorReport.submitted "错误报告已经提交."> <!ENTITY zotero.errorReport.reportID "报告ID:"> <!ENTITY zotero.errorReport.postToForums "请到Zotero论坛(forums.zotero.org)发布新帖, 内容包括: 报告ID, 问题描述以任何必要的步骤以重现该问题."> <!ENTITY zotero.errorReport.notReviewed "除非在此论坛中提交,错误报告一般不会被看到."> <!ENTITY zotero.upgrade.title "Zotero 升级向导"> -<!ENTITY zotero.upgrade.newVersionInstalled "您已经安装了一个新版本的Zotero."> -<!ENTITY zotero.upgrade.upgradeRequired "为了使用这个新版本您必须升级您的数据库."> -<!ENTITY zotero.upgrade.autoBackup "在任何实质性的改动前, 您已有的数据库会被自动备份."> +<!ENTITY zotero.upgrade.newVersionInstalled "您已经安装了一套新版的Zotero."> +<!ENTITY zotero.upgrade.upgradeRequired "为了使用这个新版本您必须升级您的 Zotero 数据库."> +<!ENTITY zotero.upgrade.autoBackup "在发生任何更改之前, 将自动备份您现有的数据库."> <!ENTITY zotero.upgrade.majorUpgrade "这是主版本更新."> -<!ENTITY zotero.upgrade.majorUpgradeBeforeLink "请确认您已查看了"> -<!ENTITY zotero.upgrade.majorUpgradeLink "更新说明"> +<!ENTITY zotero.upgrade.majorUpgradeBeforeLink "请确保您已经查阅了"> +<!ENTITY zotero.upgrade.majorUpgradeLink "升级说明"> <!ENTITY zotero.upgrade.majorUpgradeAfterLink "在继续之前."> -<!ENTITY zotero.upgrade.upgradeInProgress "请耐心等待升级过程结束. 这可能要花上几分钟了."> -<!ENTITY zotero.upgrade.upgradeSucceeded "您的Zotero数据库已被成功升级."> -<!ENTITY zotero.upgrade.changeLogBeforeLink "请查看"> +<!ENTITY zotero.upgrade.upgradeInProgress "请耐心等待升级过程结束. 这可能要花上几分钟."> +<!ENTITY zotero.upgrade.upgradeSucceeded "您的 Zotero 数据库已成功升级."> +<!ENTITY zotero.upgrade.changeLogBeforeLink "请查阅"> <!ENTITY zotero.upgrade.changeLogLink "变更日志"> <!ENTITY zotero.upgrade.changeLogAfterLink "以了解有哪些新的改动."> <!ENTITY zotero.contextMenu.addTextToCurrentNote "将所选内容添加到 Zotero 笔记"> <!ENTITY zotero.contextMenu.addTextToNewNote "由所选内容创建 Zotero 条目及笔记"> -<!ENTITY zotero.contextMenu.saveLinkAsItem "保存链接为Zotero条目"> -<!ENTITY zotero.contextMenu.saveImageAsItem "保存图片为Zotero条目"> +<!ENTITY zotero.contextMenu.saveLinkAsItem "将链接保存为 Zotero 条目"> +<!ENTITY zotero.contextMenu.saveImageAsItem "将图片保存为 Zotero 条目"> <!ENTITY zotero.tabs.info.label "信息"> <!ENTITY zotero.tabs.notes.label "笔记"> <!ENTITY zotero.tabs.attachments.label "附件"> <!ENTITY zotero.tabs.tags.label "标签"> <!ENTITY zotero.tabs.related.label "关联文献"> -<!ENTITY zotero.notes.separate "浮动编辑窗口"> +<!ENTITY zotero.notes.separate "打开浮动编辑窗口"> <!ENTITY zotero.toolbar.duplicate.label "显示重复条目"> <!ENTITY zotero.collections.showUnfiledItems "显示未分类条目"> @@ -80,12 +80,12 @@ <!ENTITY zotero.items.menu.attach "添加附件"> <!ENTITY zotero.items.menu.attach.snapshot "附加当前页的快照"> <!ENTITY zotero.items.menu.attach.link "附加当前页的链接"> -<!ENTITY zotero.items.menu.attach.link.uri "附加指向URI的链接"> -<!ENTITY zotero.items.menu.attach.file "附加存储的文件副本..."> -<!ENTITY zotero.items.menu.attach.fileLink "附加指向文件的链接..."> +<!ENTITY zotero.items.menu.attach.link.uri "附加URI的链接…"> +<!ENTITY zotero.items.menu.attach.file "附加文件副本..."> +<!ENTITY zotero.items.menu.attach.fileLink "附加文件链接..."> <!ENTITY zotero.items.menu.restoreToLibrary "还原到文献库中"> -<!ENTITY zotero.items.menu.duplicateItem "复制选中的条目"> +<!ENTITY zotero.items.menu.duplicateItem "复制条目"> <!ENTITY zotero.items.menu.mergeItems "合并条目…"> <!ENTITY zotero.duplicatesMerge.versionSelect "选择作为主条目的条目版本."> @@ -93,7 +93,7 @@ <!ENTITY zotero.toolbar.newItem.label "新建条目"> <!ENTITY zotero.toolbar.moreItemTypes.label "更多"> -<!ENTITY zotero.toolbar.newItemFromPage.label "从当前页新建条目"> +<!ENTITY zotero.toolbar.newItemFromPage.label "从当前页创建网页条目"> <!ENTITY zotero.toolbar.lookup.label "通过标识符添加条目"> <!ENTITY zotero.toolbar.removeItem.label "移除条目..."> <!ENTITY zotero.toolbar.newCollection.label "新建分类..."> @@ -109,7 +109,7 @@ <!ENTITY zotero.toolbar.rtfScan.label "RTF 扫描..."> <!ENTITY zotero.toolbar.timeline.label "创建时间轴"> <!ENTITY zotero.toolbar.preferences.label "首选项..."> -<!ENTITY zotero.toolbar.supportAndDocumentation "支持与技术文档"> +<!ENTITY zotero.toolbar.supportAndDocumentation "支持与文档"> <!ENTITY zotero.toolbar.about.label "关于 Zotero"> <!ENTITY zotero.toolbar.advancedSearch "高级搜索"> <!ENTITY zotero.toolbar.tab.tooltip "切换标签模式"> @@ -117,7 +117,7 @@ <!ENTITY zotero.toolbar.openURL.tooltip "在本地文献库里查找"> <!ENTITY zotero.item.add "添加"> -<!ENTITY zotero.item.attachment.file.show "打开文件位置"> +<!ENTITY zotero.item.attachment.file.show "打开文件目录"> <!ENTITY zotero.item.textTransform "格式变换"> <!ENTITY zotero.item.textTransform.titlecase "标题大写"> <!ENTITY zotero.item.textTransform.sentencecase "句首大写"> @@ -135,8 +135,8 @@ <!ENTITY zotero.tagSelector.noTagsToDisplay "无标签可显示"> <!ENTITY zotero.tagSelector.filter "过滤:"> <!ENTITY zotero.tagSelector.showAutomatic "自动显示"> -<!ENTITY zotero.tagSelector.displayAllInLibrary "显示文献库的所有标签"> -<!ENTITY zotero.tagSelector.selectVisible "选择可见的"> +<!ENTITY zotero.tagSelector.displayAllInLibrary "显示文献库里的所有标签"> +<!ENTITY zotero.tagSelector.selectVisible "选择可见"> <!ENTITY zotero.tagSelector.clearVisible "取消可见的选择"> <!ENTITY zotero.tagSelector.clearAll "取消全部选择"> <!ENTITY zotero.tagSelector.assignColor "指派颜色…"> @@ -149,18 +149,18 @@ <!ENTITY zotero.tagColorChooser.setColor "设置颜色"> <!ENTITY zotero.tagColorChooser.removeColor "移除颜色"> -<!ENTITY zotero.lookup.description "在下面方框中输入ISBN, DOI或PMID来检索文献"> +<!ENTITY zotero.lookup.description "在下面方框中输入ISBN, DOI或PMID来检索文献."> <!ENTITY zotero.lookup.button.search "搜索"> <!ENTITY zotero.selectitems.title "选择条目"> -<!ENTITY zotero.selectitems.intro.label "选择要添加至文献库的条目"> +<!ENTITY zotero.selectitems.intro.label "选择您要添加到文献库的条目"> <!ENTITY zotero.selectitems.cancel.label "取消"> <!ENTITY zotero.selectitems.select.label "确定"> -<!ENTITY zotero.bibliography.title "创建文献目录"> +<!ENTITY zotero.bibliography.title "创建引文目录"> <!ENTITY zotero.bibliography.style.label "引文样式:"> <!ENTITY zotero.bibliography.outputMode "输出模式:"> -<!ENTITY zotero.bibliography.bibliography "文献目录"> +<!ENTITY zotero.bibliography.bibliography "引文目录"> <!ENTITY zotero.bibliography.outputMethod "输出方法:"> <!ENTITY zotero.bibliography.saveAsRTF.label "另存为 RTF"> <!ENTITY zotero.bibliography.saveAsHTML.label "另存为 HTML"> @@ -169,7 +169,7 @@ <!ENTITY zotero.integration.docPrefs.title "文档首选项"> <!ENTITY zotero.integration.addEditCitation.title "添加/编辑引文"> -<!ENTITY zotero.integration.editBibliography.title "编辑文献目录"> +<!ENTITY zotero.integration.editBibliography.title "编辑引文目录"> <!ENTITY zotero.integration.quickFormatDialog.title "快速格式化引文"> <!ENTITY zotero.progress.title "进度"> @@ -186,7 +186,7 @@ <!ENTITY zotero.citation.page "页"> <!ENTITY zotero.citation.paragraph "段"> <!ENTITY zotero.citation.line "行"> -<!ENTITY zotero.citation.suppressAuthor.label "简略作者"> +<!ENTITY zotero.citation.suppressAuthor.label "略去作者"> <!ENTITY zotero.citation.prefix.label "前缀:"> <!ENTITY zotero.citation.suffix.label "后缀:"> <!ENTITY zotero.citation.editorWarning.label "警告: 如果你在编辑器中编辑引文, 引文将无法与数据库或引文样式同步更新."> @@ -201,27 +201,27 @@ <!ENTITY zotero.annotate.toolbar.collapse.label "折叠所有标注"> <!ENTITY zotero.annotate.toolbar.expand.label "展开所有标注"> <!ENTITY zotero.annotate.toolbar.highlight.label "高亮文本"> -<!ENTITY zotero.annotate.toolbar.unhighlight.label "去高亮文本"> +<!ENTITY zotero.annotate.toolbar.unhighlight.label "取消文本高亮"> -<!ENTITY zotero.integration.prefs.displayAs.label "显示引文为:"> +<!ENTITY zotero.integration.prefs.displayAs.label "引文显示为:"> <!ENTITY zotero.integration.prefs.footnotes.label "脚注"> <!ENTITY zotero.integration.prefs.endnotes.label "尾注"> <!ENTITY zotero.integration.prefs.formatUsing.label "格式化为:"> <!ENTITY zotero.integration.prefs.bookmarks.label "书签"> -<!ENTITY zotero.integration.prefs.bookmarks.caption "书签会在Microsoft Word和OpenOffice中保留, 但偶尔也会变动.由于 
 兼容性问题, 如果选中此项,引文将不能插入到脚注或尾注中."> +<!ENTITY zotero.integration.prefs.bookmarks.caption "书签会在Microsoft Word和OpenOffice中保留, 但偶尔也会发生变动.由于 
 兼容性问题, 若选中此项,引文将不能插入到脚注或尾注中."> <!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "自动缩写期刊名"> <!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.caption "MEDLINE的期刊名缩写将根据期刊标题自动生成."期刊缩写"域将被忽略."> -<!ENTITY zotero.integration.prefs.storeReferences.label "在文档中储存参考文献"> +<!ENTITY zotero.integration.prefs.storeReferences.label "在文档中保存参考文献"> <!ENTITY zotero.integration.prefs.storeReferences.caption "在文档中储存参考文献会稍微增加文档的大小, 但这样可以和没有使用 Zotero v群组的其它用户共享您的文档. 要使用该功能, Zotero 必须升级到3.0或更高版本."> <!ENTITY zotero.integration.showEditor.label "显示编辑器"> <!ENTITY zotero.integration.classicView.label "经典视图"> -<!ENTITY zotero.integration.references.label "文献目录中的参考文献"> +<!ENTITY zotero.integration.references.label "引文目录中的参考文献"> <!ENTITY zotero.sync.button "与 Zotero 服务器同步"> <!ENTITY zotero.sync.error "同步错误"> @@ -229,14 +229,14 @@ <!ENTITY zotero.sync.storage.downloads "下载:"> <!ENTITY zotero.sync.storage.uploads "上传:"> -<!ENTITY zotero.sync.longTagFixer.followingTagTooLong "下列标签太长不能与服务器同步."> +<!ENTITY zotero.sync.longTagFixer.followingTagTooLong "下列标签太长不能与服务器同步:"> <!ENTITY zotero.sync.longTagFixer.syncedTagSizeLimit "同步标签的长度必须少于256个字符."> <!ENTITY zotero.sync.longTagFixer.splitEditDelete "您可以将标签分割为多个标签, 手动编辑缩短标签长度或删除标签."> <!ENTITY zotero.sync.longTagFixer.split "分割"> <!ENTITY zotero.sync.longTagFixer.splitAtThe "分割在"> <!ENTITY zotero.sync.longTagFixer.character "字符"> <!ENTITY zotero.sync.longTagFixer.characters "字符串"> -<!ENTITY zotero.sync.longTagFixer.uncheckedTagsNotSaved "未勾选的标签将不会被保存."> +<!ENTITY zotero.sync.longTagFixer.uncheckedTagsNotSaved "未勾选的标签不会被保存."> <!ENTITY zotero.sync.longTagFixer.tagWillBeDeleted "所有条目中的标签将被删除."> <!ENTITY zotero.merge.title "冲突解决"> @@ -246,25 +246,25 @@ <!ENTITY zotero.proxy.recognized.title "代理确认"> <!ENTITY zotero.proxy.recognized.warning "仅添加来自您的图书馆, 学校或公司的链接的代理"> <!ENTITY zotero.proxy.recognized.warning.secondary "添加其他代理将增加恶意网站伪装成您信任的站点的风险."> -<!ENTITY zotero.proxy.recognized.disable.label "不允许通过已确认的代理自动重定向请求."> +<!ENTITY zotero.proxy.recognized.disable.label "请不要通过之前确认过的代理自动转接."> <!ENTITY zotero.proxy.recognized.ignore.label "忽略"> <!ENTITY zotero.recognizePDF.recognizing.label "重新抓取元数据..."> <!ENTITY zotero.recognizePDF.cancel.label "取消"> -<!ENTITY zotero.recognizePDF.pdfName.label "PDF名"> -<!ENTITY zotero.recognizePDF.itemName.label "条目名"> +<!ENTITY zotero.recognizePDF.pdfName.label "PDF 名称"> +<!ENTITY zotero.recognizePDF.itemName.label "条目名称"> <!ENTITY zotero.recognizePDF.captcha.label "键入下面的文字继续抓取元数据."> <!ENTITY zotero.rtfScan.title "RTF 扫描"> <!ENTITY zotero.rtfScan.cancel.label "取消"> <!ENTITY zotero.rtfScan.citation.label "引文"> -<!ENTITY zotero.rtfScan.itemName.label "条目名"> +<!ENTITY zotero.rtfScan.itemName.label "条目名称"> <!ENTITY zotero.rtfScan.unmappedCitations.label "未映射引文"> <!ENTITY zotero.rtfScan.ambiguousCitations.label "含糊的引文"> -<!ENTITY zotero.rtfScan.mappedCitations.label "已映射引文"> +<!ENTITY zotero.rtfScan.mappedCitations.label "已映射的引文"> <!ENTITY zotero.rtfScan.introPage.label "介绍"> -<!ENTITY zotero.rtfScan.introPage.description "Zotero 可以自动提取, 格式化引文并将文献目录插入到 RTF 文件中. RTF 扫描功能目前支持下列格式的引文变量:"> -<!ENTITY zotero.rtfScan.introPage.description2 "要启动,请选择 RTF 输入文件和输出文件:"> +<!ENTITY zotero.rtfScan.introPage.description "Zotero 可以自动提取, 格式化引文并将引文目录插入到 RTF 文件中. RTF 扫描功能目前支持下列格式的引文变量:"> +<!ENTITY zotero.rtfScan.introPage.description2 "要启动, 请选择 RTF 输入文件和输出文件:"> <!ENTITY zotero.rtfScan.scanPage.label "扫描引文"> <!ENTITY zotero.rtfScan.scanPage.description "Zotero 正在扫描引文, 请耐心等待."> <!ENTITY zotero.rtfScan.citationsPage.label "校验已引用的条目"> @@ -282,4 +282,4 @@ <!ENTITY zotero.downloadManager.label "保存到 Zotero"> <!ENTITY zotero.downloadManager.saveToLibrary.description "附件无法保存到当前选中的文献库. 不过, 该条目将被保存到您的文献库中."> -<!ENTITY zotero.downloadManager.noPDFTools.description "要使用该功能, 您必须在 Zotero 首选项中的搜索面板里安装 PDF 工具."> +<!ENTITY zotero.downloadManager.noPDFTools.description "要使用该功能, 您必须在 Zotero 首选项中的搜索选项卡里安装 PDF 工具."> diff --git a/chrome/locale/zh-CN/zotero/zotero.properties b/chrome/locale/zh-CN/zotero/zotero.properties @@ -7,13 +7,13 @@ general.dontShowWarningAgain=不再显示此警告. general.browserIsOffline=%S 现处于离线模式. general.locate=定位... general.restartRequired=需要重新启动 -general.restartRequiredForChange=%S必须重启才能使变更生效. -general.restartRequiredForChanges=%S必须重启才能使变更生效. +general.restartRequiredForChange=%S 必须重启才能使变更生效. +general.restartRequiredForChanges=%S 必须重启才能使变更生效. general.restartNow=立即重启 general.restartLater=稍后重启 general.restartApp=重启 %S general.quitApp=退出 %S -general.errorHasOccurred=发生了一个错误. +general.errorHasOccurred=出错了. general.unknownErrorOccurred=发生未知错误. general.invalidResponseServer=服务器返回无效响应. general.tryAgainLater=请稍后再试. @@ -37,7 +37,7 @@ general.character.plural=字符串 general.create=创建 general.delete=删除 general.moreInformation=更多信息 -general.seeForMoreInformation=查看%S获取更多信息. +general.seeForMoreInformation=查阅 %S 获取更多信息. general.enable=启用 general.disable=禁用 general.remove=移除 @@ -59,22 +59,22 @@ punctuation.colon=: install.quickStartGuide=Zotero 快速入门指南 install.quickStartGuide.message.welcome=欢迎使用 Zotero! -install.quickStartGuide.message.view=查阅快速入门指南学习如何收集, 管理, 引用和分享你的研究资源. +install.quickStartGuide.message.view=查阅快速入门指南学习如何收集, 管理, 引用和分享您的研究资源. install.quickStartGuide.message.thanks=感谢安装 Zotero. upgrade.failed.title=升级失败 upgrade.failed=Zotero 数据库升级失败: -upgrade.advanceMessage=按 %S 开始升级. +upgrade.advanceMessage=按 %S 立即开始升级. upgrade.dbUpdateRequired=需要更新 Zotero 数据库. upgrade.integrityCheckFailed=继续升级前, Zotero 数据库需要修复. -upgrade.loadDBRepairTool=加载数据库修复工具 -upgrade.couldNotMigrate=Zotero 无法迁移所有的文件.\n请关闭所有打开的附件并重启%S以尝试再次升级. -upgrade.couldNotMigrate.restart=如果您继续收到此讯息, 请重新启动您的计算机. +upgrade.loadDBRepairTool=下载数据库修复工具 +upgrade.couldNotMigrate=Zotero 无法移所有必要的文件.\n请关闭所有打开的附件并重启 %S 并尝试再次升级. +upgrade.couldNotMigrate.restart=如果您持续收到此讯息, 请重新启动计算机. -errorReport.reportError=错误报告... +errorReport.reportError=汇报错误... errorReport.reportErrors=汇报错误... errorReport.reportInstructions=您可以通过选择操作(齿轮)菜单的 "%S" 来汇报此错误. -errorReport.followingErrors=自启动%S, 发生了下列错误: +errorReport.followingErrors=自打开 %S 以来, 发生了下列错误: errorReport.advanceMessage=按 %S 给 Zotero 开发人员发送错误报告. errorReport.stepsToReproduce=用于重现的步骤: errorReport.expectedResult=预期结果: @@ -98,7 +98,7 @@ attachmentBasePath.clearBasePath.button=清除根目录设置 dataDir.notFound=无法找到 Zotero 数据目录. dataDir.previousDir=上一目录: -dataDir.useProfileDir=使用 Firefox 配置目录 +dataDir.useProfileDir=使用 %S 配置目录 dataDir.selectDir=选择 Zotero 数据目录 dataDir.selectedDirNonEmpty.title=目录非空 dataDir.selectedDirNonEmpty.text=您所选的目录非空, 且它并非 Zotero 数据目录.\n\n无论如何要在此目录里创建 Zotero 文件吗? @@ -109,19 +109,19 @@ dataDir.moveFilesToNewLocation=在重新打开 %1$S 之前, 请确保将您已 dataDir.incompatibleDbVersion.title=数据库版本不兼容 dataDir.incompatibleDbVersion.text=当前选择的数据目录与 Zotero 独立版不兼容, 只能使用 Firefox 2.1b3 或之后版本的 Zotero 插件.\n\n请升级到最新版的 Firefox 的 Zotero 插件或者使用另外的数据目录供 Zotero 独立版使用. dataDir.standaloneMigration.title=发现既有的 Zotero 库 -dataDir.standaloneMigration.description=这是您第一次使用%1$S. 您希望%1$S从%2$S导入设置并使用您已有的数据目录吗? +dataDir.standaloneMigration.description=这是您第一次使用 %1$S. 您希望 %1$S 从 %2$S 导入设置并使用您已有的数据目录吗? dataDir.standaloneMigration.multipleProfiles=%1$S将与最近使用的配置共享数据目录. -dataDir.standaloneMigration.selectCustom=自定义数据目录…… +dataDir.standaloneMigration.selectCustom=自定义数据目录… app.standalone=Zotero 独立版 app.firefox=Firefox 版 Zotero -startupError=Zotero启动时遇到一个错误. +startupError=Zotero启动时出错. startupError.databaseInUse=您的 Zotero 数据库正在使用中. 当前, 使用相同数据库的 Zotero 只能同时打开一个实例. startupError.closeStandalone=如果 Zotero 独立版正在运行, 请关闭它, 然后重启 Firefox. startupError.closeFirefox=如果安装有 Zotero 插件的Firefox正在运行, 请关闭它, 然后重启 Zotero 独立版. startupError.databaseCannotBeOpened=无法打开 Zotero 数据库. -startupError.checkPermissions=请确保您拥有 Zotero 数据目录的读写权限. +startupError.checkPermissions=请确保您拥有 Zotero 数据目录下所有文件的读写权限. startupError.zoteroVersionIsOlder=当前的 Zotero 版本比最后一次使用数据库的 Zotero 版本低. startupError.zoteroVersionIsOlder.upgrade=请到 zotero.org 升级到最新版. startupError.zoteroVersionIsOlder.current=当前版本: %S @@ -145,19 +145,19 @@ pane.collections.deleteWithItems.title=删除分类及条目 pane.collections.deleteWithItems=您确定要删除选中的分类并将所有的条目移动到回收站中吗? pane.collections.deleteSearch.title=删除搜索 -pane.collections.deleteSearch=您确实要删除选中的检索结果? +pane.collections.deleteSearch=您确定要删除选中的搜索结果? pane.collections.emptyTrash=您确定要永久删除回收站里的条目吗? pane.collections.newCollection=新建分类 pane.collections.name=输入分类名: pane.collections.newSavedSeach=新建搜索 -pane.collections.savedSearchName=输入检索结果的名称: +pane.collections.savedSearchName=输入搜索结果的名称: pane.collections.rename=重命名分类: pane.collections.library=我的文献库 pane.collections.groupLibraries=群组文献库 pane.collections.trash=回收站 pane.collections.untitled=未命名 pane.collections.unfiled=未分类条目 -pane.collections.duplicate=重复的条目 +pane.collections.duplicate=重复条目 pane.collections.menu.rename.collection=重命名分类... pane.collections.menu.edit.savedSearch=编辑搜索结果 @@ -166,19 +166,19 @@ pane.collections.menu.delete.collectionAndItems=删除分类及条目… pane.collections.menu.delete.savedSearch=删除搜索结果... pane.collections.menu.export.collection=导出分类... pane.collections.menu.export.savedSearch=导出搜索结果... -pane.collections.menu.createBib.collection=由分类创建文献目录... -pane.collections.menu.createBib.savedSearch=由搜索结果创建文献目录... +pane.collections.menu.createBib.collection=由分类创建引文目录... +pane.collections.menu.createBib.savedSearch=由搜索结果创建引文目录... pane.collections.menu.generateReport.collection=由分类生成报告... pane.collections.menu.generateReport.savedSearch=由搜索结果生成报告... pane.tagSelector.rename.title=重命名标签 -pane.tagSelector.rename.message=请为此标签输入一个新的名字.\n\n所有相关条目里的该标签都将改变. +pane.tagSelector.rename.message=请为此标签输入一个新的名字.\n所有相关条目里的该标签都将改变. pane.tagSelector.delete.title=删除标签 -pane.tagSelector.delete.message=您确定删除此标签吗?\n\n此标签将从所有条目中移除. -pane.tagSelector.numSelected.none=选中 0 个标签 -pane.tagSelector.numSelected.singular=选中 %S 个标签 -pane.tagSelector.numSelected.plural=选中 %S 个标签 +pane.tagSelector.delete.message=您确定删除此标签吗?\n\n此标签将从所有条目中移除? +pane.tagSelector.numSelected.none=0 个选中的标签 +pane.tagSelector.numSelected.singular=%S 个选中的标签 +pane.tagSelector.numSelected.plural=%S 个选中的标签 pane.tagSelector.maxColoredTags=每个库只允许为%S个标签标记颜色 tagColorChooser.numberKeyInstructions=你可以通过按下$NUMBER 为选定的条目添加标签 @@ -193,39 +193,39 @@ pane.items.trash.multiple=您确定要将选中的条目移动到回收站吗? pane.items.delete.title=删除 pane.items.delete=您确定要删除所选的条目吗? pane.items.delete.multiple=您确定要删除所选的条目吗? -pane.items.menu.remove=移除所选条目 -pane.items.menu.remove.multiple=移除所选条目 +pane.items.menu.remove=从分类中移除条目 +pane.items.menu.remove.multiple=从分类中移除条目 pane.items.menu.moveToTrash=将条目移动到回收站中… pane.items.menu.moveToTrash.multiple=将条目移动到回收站中… -pane.items.menu.export=导出所选条目... -pane.items.menu.export.multiple=导出所选条目... -pane.items.menu.createBib=由所选条目创建文献目录... -pane.items.menu.createBib.multiple=由所选条目创建文献目录... -pane.items.menu.generateReport=由所选条目生成报告... -pane.items.menu.generateReport.multiple=由所选条目生成报告... +pane.items.menu.export=导出条目... +pane.items.menu.export.multiple=导出条目... +pane.items.menu.createBib=由所选条目创建引文目录... +pane.items.menu.createBib.multiple=由所选条目创建引文目录... +pane.items.menu.generateReport=由条目生成报告... +pane.items.menu.generateReport.multiple=由条目生成报告... pane.items.menu.reindexItem=重建条目索引 pane.items.menu.reindexItem.multiple=重建条目索引 -pane.items.menu.recognizePDF=抓取 PDF 的元数据 -pane.items.menu.recognizePDF.multiple=抓取 PDF 的元数据 -pane.items.menu.createParent=从选定条目创建父条目 -pane.items.menu.createParent.multiple=从选定条目创建父条目 -pane.items.menu.renameAttachments=从父级元数据重命名文件 -pane.items.menu.renameAttachments.multiple=从父级元数据重命名文件 +pane.items.menu.recognizePDF=重新抓取 PDF 的元数据 +pane.items.menu.recognizePDF.multiple=重新抓取 PDF 的元数据 +pane.items.menu.createParent=创建父条目 +pane.items.menu.createParent.multiple=创建父条目 +pane.items.menu.renameAttachments=根据父级元数据重命名文件 +pane.items.menu.renameAttachments.multiple=根据父级元数据重命名文件 pane.items.letter.oneParticipant=函至 %S -pane.items.letter.twoParticipants=函至 %S和%S -pane.items.letter.threeParticipants=函至 %S,%S和%S +pane.items.letter.twoParticipants=函至 %S 和 %S +pane.items.letter.threeParticipants=函至 %S,%S 和 %S pane.items.letter.manyParticipants=函至 %S 等. pane.items.interview.oneParticipant=采访人 %S -pane.items.interview.twoParticipants=采访人 %S和%S +pane.items.interview.twoParticipants=采访人 %S 和 %S pane.items.interview.threeParticipants=采访人 %S, %S, 和%S pane.items.interview.manyParticipants=采访人 %S 等. -pane.item.selected.zero=无选中的条目 -pane.item.selected.multiple=%S 条目被选中 +pane.item.selected.zero=未选择任何条目 +pane.item.selected.multiple=选中 %S 个条目 pane.item.unselected.zero=当前预览下无可用条目 -pane.item.unselected.singular=当前预览下有 %S 条目 -pane.item.unselected.plural=当前预览下有 %S 条目 +pane.item.unselected.singular=当前预览下有 %S 个条目 +pane.item.unselected.plural=当前预览下有 %S 个条目 pane.item.duplicates.selectToMerge=选择要合并的项 pane.item.duplicates.mergeItems=合并 %S 项条目 @@ -234,10 +234,10 @@ pane.item.duplicates.onlyTopLevel=只有顶级条目才能被合并 pane.item.duplicates.onlySameItemType=合并的项必须是相同类型 pane.item.changeType.title=更改条目类型 -pane.item.changeType.text=您确定要更改条目类型吗?\n\n如下字段将丢失: +pane.item.changeType.text=您确定要更改条目类型吗?\n\n下列字段将丢失: pane.item.defaultFirstName=名 pane.item.defaultLastName=姓 -pane.item.defaultFullName=全名 +pane.item.defaultFullName=全称 pane.item.switchFieldMode.one=显示一个输入框 pane.item.switchFieldMode.two=显示两个输入框 pane.item.creator.moveUp=上移 @@ -251,14 +251,14 @@ pane.item.attachments.rename.title=新标题: pane.item.attachments.rename.renameAssociatedFile=重命名相关文件 pane.item.attachments.rename.error=重命名文件时出错. pane.item.attachments.fileNotFound.title=找不到文件 -pane.item.attachments.fileNotFound.text=找不到附件.\n\n可能在 Zotero 外被挪动或删除. +pane.item.attachments.fileNotFound.text=找不到附件.\n\n它可能在 Zotero之 外被挪动或删除. pane.item.attachments.delete.confirm=您确实要删除此附件吗? pane.item.attachments.count.zero=%S 个附件: pane.item.attachments.count.singular=%S 个附件: pane.item.attachments.count.plural=%S 个附件: pane.item.attachments.select=选择文件 pane.item.attachments.PDF.installTools.title=未安装PDF工具 -pane.item.attachments.PDF.installTools.text=要使用这项特性, 您必须在 Zotero 首选项的搜索面板里安装 PDF 工具. +pane.item.attachments.PDF.installTools.text=要使用这项特性, 您必须在 Zotero 首选项的搜索选项卡里安装 PDF 工具. pane.item.attachments.filename=文件名 pane.item.noteEditor.clickHere=点击此处 pane.item.tags.count.zero=%S 个标签: @@ -266,8 +266,8 @@ pane.item.tags.count.singular=%S 个标签: pane.item.tags.count.plural=%S 个标签: pane.item.tags.icon.user=用户添加的标签 pane.item.tags.icon.automatic=自动添加的标签 -pane.item.related.count.zero=%S 个相关的: -pane.item.related.count.singular=%S 个相关的: +pane.item.related.count.zero=%S 条相关的: +pane.item.related.count.singular=%S 条相关的: pane.item.related.count.plural=%S 个相关的: pane.item.parentItem=父条目: @@ -279,8 +279,8 @@ itemTypes.book=书籍 itemTypes.bookSection=图书章节 itemTypes.journalArticle=期刊文章 itemTypes.magazineArticle=杂志文章 -itemTypes.newspaperArticle=新闻文章 -itemTypes.thesis=论文 +itemTypes.newspaperArticle=报纸文章 +itemTypes.thesis=学位论文 itemTypes.letter=信件 itemTypes.manuscript=手稿 itemTypes.interview=采访稿 @@ -302,7 +302,7 @@ itemTypes.audioRecording=音频剪辑 itemTypes.presentation=演示文档 itemTypes.videoRecording=视频剪辑 itemTypes.tvBroadcast=TV 广播 -itemTypes.radioBroadcast=无线广播 +itemTypes.radioBroadcast=电台广播 itemTypes.podcast=播客 itemTypes.computerProgram=计算机程序 itemTypes.conferencePaper=会议论文 @@ -310,7 +310,7 @@ itemTypes.document=文档 itemTypes.encyclopediaArticle=百科全书文章 itemTypes.dictionaryEntry=词条 -itemFields.itemType=类别 +itemFields.itemType=类型 itemFields.title=标题 itemFields.dateAdded=添加日期 itemFields.dateModified=修改日期 @@ -324,7 +324,7 @@ itemFields.rights=版权 itemFields.series=系列 itemFields.volume=卷 itemFields.issue=期 -itemFields.edition=版 +itemFields.edition=版本 itemFields.place=地点 itemFields.publisher=出版社 itemFields.pages=页码 @@ -335,7 +335,7 @@ itemFields.date=日期 itemFields.section=章节 itemFields.callNumber=引用次数 itemFields.archiveLocation=存档位置 -itemFields.distributor=分发人 +itemFields.distributor=分发者 itemFields.extra=其它 itemFields.journalAbbreviation=期刊缩写 itemFields.DOI=DOI @@ -351,7 +351,7 @@ itemFields.legislativeBody=立法机构 itemFields.history=历史 itemFields.reporter=报告人 itemFields.court=法庭 -itemFields.numberOfVolumes=# 卷 +itemFields.numberOfVolumes=总卷数 itemFields.committee=委员会 itemFields.assignee=受托人 itemFields.patentNumber=专利号 @@ -362,7 +362,7 @@ itemFields.legalStatus=法律地位 itemFields.codeNumber=区号 itemFields.artworkMedium=艺术品媒介 itemFields.number=号码 -itemFields.artworkSize=艺术品大小 +itemFields.artworkSize=艺术品尺寸 itemFields.libraryCatalog=馆藏目录 itemFields.videoRecordingFormat=视频格式 itemFields.interviewMedium=采访媒体 @@ -374,7 +374,7 @@ itemFields.thesisType=论文类型 itemFields.websiteType=网站类型 itemFields.audioRecordingFormat=音频格式 itemFields.label=标记 -itemFields.presentationType=演示文档类型 +itemFields.presentationType=演稿类型 itemFields.meetingName=会议名称 itemFields.studio=工作室 itemFields.runningTime=时长 @@ -389,7 +389,7 @@ itemFields.encyclopediaTitle=百科全书标题 itemFields.dictionaryTitle=词典标题 itemFields.language=语言 itemFields.programmingLanguage=编程语言 -itemFields.university=学校 +itemFields.university=大学 itemFields.abstractNote=摘要 itemFields.websiteTitle=网站标题 itemFields.reportNumber=报告编号 @@ -400,7 +400,7 @@ itemFields.dateDecided=确认日期 itemFields.reporterVolume=报告卷 itemFields.firstPage=首页 itemFields.documentNumber=文档编号 -itemFields.dateEnacted=发布日期 +itemFields.dateEnacted=制定日期 itemFields.publicLawNumber=国际公法号 itemFields.country=国家 itemFields.applicationNumber=申请号 @@ -415,18 +415,18 @@ itemFields.proceedingsTitle=投递标题 itemFields.bookTitle=书名 itemFields.shortTitle=短标题 itemFields.docketNumber=案卷号 -itemFields.numPages=# 页数 +itemFields.numPages=总页数 itemFields.programTitle=节目名称 itemFields.issuingAuthority=颁发机构 itemFields.filingDate=申请日期 -itemFields.genre=类型 +itemFields.genre=流派 itemFields.archive=档案 creatorTypes.author=作者 creatorTypes.contributor=贡献者 -creatorTypes.editor=编者 +creatorTypes.editor=编辑 creatorTypes.translator=译者 -creatorTypes.seriesEditor=丛书编者 +creatorTypes.seriesEditor=丛书编辑 creatorTypes.interviewee=采访对象 creatorTypes.interviewer=采访者 creatorTypes.director=导演 @@ -463,39 +463,39 @@ fileTypes.document=文档 save.attachment=保存快照... save.link=保存链接... save.link.error=保存链接时发生错误 -save.error.cannotMakeChangesToCollection=您无法变更当前选中的分类 -save.error.cannotAddFilesToCollection=您无法在当前选中的分类中添加文件 +save.error.cannotMakeChangesToCollection=您无法变更当前选中的分类. +save.error.cannotAddFilesToCollection=您无法在当前选中的分类中添加文件. ingester.saveToZotero=保存到Zotero ingester.saveToZoteroUsing=使用"%S"保存到 Zotero ingester.scraping=保存条目... ingester.scrapingTo=保存到 -ingester.scrapeComplete=条目已存. +ingester.scrapeComplete=条目已保存 ingester.scrapeError=无法保存条目 ingester.scrapeErrorDescription=保存此条目时出错. 查看%S以获取更多信息. ingester.scrapeErrorDescription.linkText=已知的转换器问题 -ingester.scrapeErrorDescription.previousError=由于上一个 Zotero 的错误, 存储失败. +ingester.scrapeErrorDescription.previousError=由于上一个 Zotero 的错误, 保存失败. ingester.importReferRISDialog.title=Zotero RIS/Refer 导入 -ingester.importReferRISDialog.text=你要从 "%1$S" 将条目导入到Zotero吗?\n\n你可以在 Zotero 首选项中禁用自动导入RIS/Refer格式. +ingester.importReferRISDialog.text=您要从 "%1$S" 中将条目导入到Zotero吗?\n\n您可以在 Zotero 首选项中禁用 RIS/Refer 自动导入. ingester.importReferRISDialog.checkMsg=总是允许该网址 ingester.importFile.title=导入文件 -ingester.importFile.text=你要导入"%S"文件吗?\n\n条目将加入新的群组中. +ingester.importFile.text=您要导入文件 "%S" 吗? ingester.importFile.intoNewCollection=导入到新收藏 ingester.lookup.performing=执行检索... ingester.lookup.error=检索本条目时发生错误. db.dbCorrupted=Zotero数据库 '%S' 似乎已损坏. -db.dbCorrupted.restart=请重启 %S 以尝试自动从上一备份还原. -db.dbCorruptedNoBackup=Zotero 数据库 '%S' 似乎已损坏, 而且无可用的自动备份.\n\n已建立一新的数据库. 损坏的文件存在您的 Zotero 目录. -db.dbRestored=Zotero 数据库'%1$S'似乎已损坏.\n\n您的数据已经从最新的自动备份里恢复, 所使用的备份建立于%3$S 位于 %2$S. 损坏的文件已保存到您的 Zotero 目录中. -db.dbRestoreFailed=Zotero 数据库 '%S'似乎已损坏. 试图从最新的自动备份里恢复时失败. \n\n已创建一新的数据库. 损坏的文件已保存到您的 Zotero 目录中. +db.dbCorrupted.restart=请重启 %S 以尝试自动还原到最近的一次备份. +db.dbCorruptedNoBackup=Zotero 数据库 '%S' 似乎已损坏, 而且无可用的自动备份.\n\n已建立一新的数据库. 损坏的文件保存在您的 Zotero 目录中. +db.dbRestored=Zotero 数据库'%1$S'似乎已损坏.\n\n您的数据已经恢复到最近一次的自动备份, 该备份在 %3$S 创建于 %2$S. 损坏的文件已保存在您的 Zotero 目录中. +db.dbRestoreFailed=Zotero 数据库 '%S'似乎已损坏. 试图恢复到最近一次的自动备份时失败.\n\n已创建一个新的数据库. 损坏的文件已保存到您的 Zotero 目录中. db.integrityCheck.passed=没有在此数据库中发现错误. -db.integrityCheck.failed=在 Zotero 数据库中发现错误! -db.integrityCheck.dbRepairTool=你可以使用数据库修复工具来修复这些错误 http://zotero.org/utils/dbfix . +db.integrityCheck.failed=在 Zotero 数据库中发现错误. +db.integrityCheck.dbRepairTool=您可以使用位于 http://zotero.org/utils/dbfi 的数据库修复工具来修复这些错误 x . db.integrityCheck.repairAttempt=Zotero能够尝试更正这些错误. db.integrityCheck.appRestartNeeded=%S 需要重启. db.integrityCheck.fixAndRestart=修正错误并重启%S @@ -524,47 +524,47 @@ zotero.preferences.sync.reset.replaceServerData=替换服务器上的数据 zotero.preferences.sync.reset.fileSyncHistory=将删除所有文件的同步记录.\n\n所有未存储在云服务器上的本地附件将在下一次同步时上传. zotero.preferences.search.rebuildIndex=重建索引 -zotero.preferences.search.rebuildWarning=是要重建整个索引吗? 这可能会花上一些时间.\n\n如果仅索引未索引的条目, 请用 %S. +zotero.preferences.search.rebuildWarning=要重建整个索引吗? 这可能会花上一些时间.\n\n如果只想索引未索引的条目, 请用 %S. zotero.preferences.search.clearIndex=清除索引 zotero.preferences.search.clearWarning=一旦清除索引, 附件内容将可搜索.\n\n网页链接形式的附件不会被重新索引, 除非重新访问网页. 要保留网页链接的索引, 请选择 %S. -zotero.preferences.search.clearNonLinkedURLs=清除全部但不包括网页链接 +zotero.preferences.search.clearNonLinkedURLs=清除除网页以外的所有链接 zotero.preferences.search.indexUnindexed=索引尚未索引的条目 zotero.preferences.search.pdf.toolRegistered=%S 已安装 zotero.preferences.search.pdf.toolNotRegistered=%S 尚未安装 zotero.preferences.search.pdf.toolsRequired=索引 PDF 需要 %3$S 项目的 %1$S 和 %2$S 工具. -zotero.preferences.search.pdf.automaticInstall=Zotero 能自动从 zotero.org 网站下载并安装特定平台的这些程序. +zotero.preferences.search.pdf.automaticInstall=Zotero 能自动从 zotero.org 网站下载并安装特定操作平台的程序. zotero.preferences.search.pdf.advancedUsers=高级用户可以查看 %S 里的手动安装说明. zotero.preferences.search.pdf.documentationLink=文档 zotero.preferences.search.pdf.checkForInstaller=检查安装文件 zotero.preferences.search.pdf.downloading=下载中... zotero.preferences.search.pdf.toolDownloadsNotAvailable=zotero.org上尚没有适用于您的平台的 %S 工具. -zotero.preferences.search.pdf.viewManualInstructions=查看手动安装说明文档. -zotero.preferences.search.pdf.availableDownloads=%2$S 上可下载的 %1$S : -zotero.preferences.search.pdf.availableUpdates=%2$S 上可更新的 %1$S: +zotero.preferences.search.pdf.viewManualInstructions=查看手动安装说明. +zotero.preferences.search.pdf.availableDownloads=%2$S 上 %1$S 的可用下载: +zotero.preferences.search.pdf.availableUpdates=%2$S 上 %1$S 的可用更新: zotero.preferences.search.pdf.toolVersionPlatform=%1$S 版本 %2$S zotero.preferences.search.pdf.zoteroCanInstallVersion=Zotero 能自动将它安装到 Zotero 数据目录. zotero.preferences.search.pdf.zoteroCanInstallVersions=Zotero 能自动将这些程序安装到 Zotero 数据目录. zotero.preferences.search.pdf.toolsDownloadError=从 zotero.org 下载 %S 工具时发生错误. zotero.preferences.search.pdf.tryAgainOrViewManualInstructions=请稍后再试, 或参考手动安装说明文档 -zotero.preferences.export.quickCopy.bibStyles=文献目录样式 +zotero.preferences.export.quickCopy.bibStyles=引文目录样式 zotero.preferences.export.quickCopy.exportFormats=导出格式 -zotero.preferences.export.quickCopy.instructions=快速复制是通过快捷键%S将所选的条目复制到剪切板上或通过鼠标拖放将条目复制到网页上的文本框. +zotero.preferences.export.quickCopy.instructions=便捷复制是通过快捷键 %S 将所选的条目复制到剪贴板上或通过鼠标拖放将条目粘贴到网页上的文本框中. zotero.preferences.export.quickCopy.citationInstructions=要复制文献的引用样式, 在复制引文或脚注前按快捷键%S或按住Shift键然后拖放条目. zotero.preferences.styles.addStyle=添加样式 zotero.preferences.advanced.resetTranslatorsAndStyles=转换器和样式重置 -zotero.preferences.advanced.resetTranslatorsAndStyles.changesLost=所有新增的或修改过的转换器和样式将丢失. +zotero.preferences.advanced.resetTranslatorsAndStyles.changesLost=所有新增的或修改过的转换器或样式将丢失. zotero.preferences.advanced.resetTranslators=转换器重置 zotero.preferences.advanced.resetTranslators.changesLost=所有新增的或修改过的转换器将丢失. -zotero.preferences.advanced.resetStyles=重设样式 +zotero.preferences.advanced.resetStyles=样式重置 zotero.preferences.advanced.resetStyles.changesLost=所有新增的或修改过的样式都将丢失. zotero.preferences.advanced.debug.title=调试输出记录已提交 zotero.preferences.advanced.debug.sent=调试输出记录已提交到Zotero服务器.\n\n调试记录的ID为 D%S. zotero.preferences.advanced.debug.error=提交调试输出记录是发生错误. -dragAndDrop.existingFiles=下列文件因已在目标文件夹中, 所以不会被复制: -dragAndDrop.filesNotFound=未找到下列文件, 无法复制. +dragAndDrop.existingFiles=下列文件已经在目标文件夹中, 它们不会被复制: +dragAndDrop.filesNotFound=无法找到下列文件, 它们不能被复制: fileInterface.itemsImported=导入条目... fileInterface.itemsExported=导出条目... @@ -574,19 +574,19 @@ fileInterface.exportedItems=导出的条目 fileInterface.imported=导入 fileInterface.unsupportedFormat=不支持所选的文件的格式. fileInterface.viewSupportedFormats=浏览支持的格式… -fileInterface.untitledBibliography=未命名文献目录 -fileInterface.bibliographyHTMLTitle=文献目录 +fileInterface.untitledBibliography=未命名引文目录 +fileInterface.bibliographyHTMLTitle=引文目录 fileInterface.importError=试图导入所选文件时发生错误. 请确保此文件有效, 然后再试一次. fileInterface.importClipboardNoDataError=剪贴板中没有可导入的数据. fileInterface.noReferencesError=所选条目中不包含任何文献. 请选择一个或更多文献, 然后再试一次. -fileInterface.bibliographyGenerationError=生成文献目录时出错. 请重试. +fileInterface.bibliographyGenerationError=生成引文目录时出错. 请重试. fileInterface.exportError=试图导出所选文件出错. quickSearch.mode.titleCreatorYear=标题, 创建者, 年 quickSearch.mode.fieldsAndTags=所有域 & 标签 quickSearch.mode.everything=所有内容 -advancedSearchMode=高级检索模式 — 按回车键开始搜索. +advancedSearchMode=高级搜索模式 — 按回车键开始搜索. searchInProgress=正在搜索 — 请稍候. searchOperator.is=是 @@ -594,7 +594,7 @@ searchOperator.isNot=不是 searchOperator.beginsWith=开头为 searchOperator.contains=包含 searchOperator.doesNotContain=不包含 -searchOperator.isLessThan=少于 +searchOperator.isLessThan=小于 searchOperator.isGreaterThan=大于 searchOperator.isBefore=早于 searchOperator.isAfter=晚于 @@ -602,7 +602,7 @@ searchOperator.isInTheLast=在最近 searchConditions.tooltip.fields=字段: searchConditions.collection=分类 -searchConditions.savedSearch=保存搜索结果 +searchConditions.savedSearch=保存的搜索 searchConditions.itemTypeID=条目类型 searchConditions.tag=标签 searchConditions.note=笔记 @@ -617,7 +617,7 @@ searchConditions.audioRecordingFormat=音频剪辑格式 searchConditions.letterType=信件类型 searchConditions.interviewMedium=采访媒体 searchConditions.manuscriptType=手稿类型 -searchConditions.presentationType=演示文档类型 +searchConditions.presentationType=演稿类型 searchConditions.mapType=地图类型 searchConditions.medium=媒体 searchConditions.artworkMedium=艺术品媒介 @@ -658,7 +658,7 @@ report.notes=笔记: report.tags=标签: annotations.confirmClose.title=您确定要关闭此标注? -annotations.confirmClose.body=所有文本将丢失. +annotations.confirmClose.body=将丢失所有文本. annotations.close.tooltip=删除标注 annotations.move.tooltip=移动标注 annotations.collapse.tooltip=折叠标注 @@ -668,57 +668,57 @@ annotations.oneWindowWarning=快照的标注只能在一个浏览窗口中同时 integration.fields.label=字段 integration.referenceMarks.label=引用标记 integration.fields.caption=Microsoft Word域极少情况下会被意外修改, 但不能与OpenOffice共用. -integration.fields.fileFormatNotice=文档必须以.doc或.docx的格式保存 +integration.fields.fileFormatNotice=文档必须以 .doc 的格式保存 integration.referenceMarks.caption=OpenOffice引用标记极少情况下会被意外修改, 但不能与Microsoft Word共用. -integration.referenceMarks.fileFormatNotice=文档必须以.odt的格式保存. +integration.referenceMarks.fileFormatNotice=文档必须以 .odt 的格式保存. integration.regenerate.title=要重新生成引文吗? -integration.regenerate.body=你在引文编辑器里所作的修改将要丢失. +integration.regenerate.body=您在引文编辑器里所作的修改将要丢失. integration.regenerate.saveBehavior=始终采用该选项. -integration.revertAll.title=你要撤消对文献目录的所有编辑么? -integration.revertAll.body=如果继续, 文章中的引文将以原始的文本形式列于文献目录中, 其间手动添加的所有参考文献将从文献目录中移除. +integration.revertAll.title=你要撤消对引文目录的所有编辑么? +integration.revertAll.body=如果继续, 文章中的引文将以原始的文本形式列于引文目录中, 其间手动添加的所有参考文献将从引文目录中移除. integration.revertAll.button=全部撤消 -integration.revert.title=你要撤消本次编辑吗? -integration.revert.body=如果继续, 文献目录中选中的条目的文本将被指定的样式覆盖. +integration.revert.title=您要撤消该编辑吗? +integration.revert.body=如果继续, 引文目录中选中的条目的文本将被指定的样式覆盖. integration.revert.button=撤消 -integration.removeBibEntry.title=选中的参考文献被您的文档所引用. -integration.removeBibEntry.body=你确定要在你的文献目录中排除此项? +integration.removeBibEntry.title=选中的参考文献已经被您的文档所引用. +integration.removeBibEntry.body=您确定要在引文目录中排除此项? integration.cited=引用 integration.cited.loading=正在加载引用的条目... integration.ibid=同上 integration.emptyCitationWarning.title=空白引用 -integration.emptyCitationWarning.body=你指定的引文在当前的样式下为空白, 您确定要添加吗? +integration.emptyCitationWarning.body=您指定的引文在当前的样式下为空白, 您确定要添加吗? integration.openInLibrary=在 %S 中打开 integration.error.incompatibleVersion=此版本的 Zotero word 插件 ($INTEGRATION_VERSION) 与当前安装的 Zotero Firefox 扩展 (%1$S)不兼容. 请确保您所使用的两个组件均为最新版本. -integration.error.incompatibleVersion2=Zotero %1$S 要求 %2$S %3$S 或更新. 请从 zotero.org 下载最新的版本的%2$S. +integration.error.incompatibleVersion2=Zotero %1$S 要求 %2$S %3$S 或更新. 请从 zotero.org 下载最新的 %2$S. integration.error.title=Zotero 整合错误 -integration.error.notInstalled=Firefox无法加载与文字处理软件通讯所需要的组件. 请确保 Firefox 安装了恰当的扩展, 然后重试. -integration.error.generic=Zotero 在更新你的文档时遇到错误. +integration.error.notInstalled=Zotero 无法加载与文字处理软件通讯所需要的组件. 请确保您安装了正确的扩展, 然后重试. +integration.error.generic=Zotero 在更新文档时出错. integration.error.mustInsertCitation=执行本操作前您需要插入引文. -integration.error.mustInsertBibliography=执行本操作前您需要插入文献目录. +integration.error.mustInsertBibliography=执行本操作前, 请先插入引文目录. integration.error.cannotInsertHere=此处无法插入 Zotero 域. -integration.error.notInCitation=你需要将光标放在 Zotero 引文上才能进行编辑. -integration.error.noBibliography=当前的文献目录样式没有定义文献目录. 如果您希望插入一个文献目录, 请选择另外一个样式. +integration.error.notInCitation=您需要将光标放在 Zotero 引文上才能进行编辑. +integration.error.noBibliography=当前的引文样式并未定义引文目录. 如果您希望插入一个引文目录, 请选择其它样式. integration.error.deletePipe=Zotero 与文字处理程序的通讯管道无法初始化. 您希望 Zotero 尝试修复此错误吗? 您将按提示输入密码. -integration.error.invalidStyle=你选择的样式看起来是无效的. 如果此样式是你本人创建的, 请确保它可以通过 http://zotero.org/support/dev/citation_styles 里所描述的验证. 否则, 请选择其它样式. +integration.error.invalidStyle=你选择的样式看起来是无效的. 如果此样式是您本人创建的, 请确保它可以通过 https://github.com/citation-style-language/styles/wiki/Validation 里所描述的验证. 否则, 请选择其它样式. integration.error.fieldTypeMismatch=由于此文档是由其它文字处理程序创建的, 并且它的域代码是不兼容的, Zotero 无法更新此文档. 为确保文档兼容于 Word 以及OpenOffice.org/LibreOffice/NeoOffice, 请用创建此文档的文字处理程序打开文档, 并在 Zotero 文档首选项中将域代码转换为书签. -integration.replace=要替换 Zotero 域代码吗? -integration.missingItem.single=Zotero 文献库中找不到此条目. 你想要选择一个替代的条目吗? -integration.missingItem.multiple=Zotero 文献库中找不到条目 %1$S. 你想要选择一个替代的条目吗? -integration.missingItem.description=点击“取消”将删除包含此条目的引文的域代码, 保留引用文本并从文献目录中删除. -integration.removeCodesWarning=移除域代码将使 Zotero 无法更新本文档的引文及文献目录, 您确定要继续吗? -integration.upgradeWarning=为使您的文档可以在 Zotero 2.1 或更新的版本中工作, 我们需要您永久升级您的文档. 在继续进行前, 建议您做一个备份. 您确定要继续吗? +integration.replace=要替换该 Zotero 域代码吗? +integration.missingItem.single=高亮的引文已经不在您的Zotero 文献库中了. 您想要选择一个替代的条目吗? +integration.missingItem.multiple=高亮的引文中的条目 %1$S 已经不在您的 Zotero 文献库中了. 您想要选择一个替代的条目吗? +integration.missingItem.description=点击“取消”将删除包含此条目的引文的域代码, 保留引用文本并从引文目录中删除. +integration.removeCodesWarning=移除域代码将使 Zotero 无法更新本文档的引文及引文目录, 您确定要继续吗? +integration.upgradeWarning=为使您的文档可以在 Zotero 2.1 或更新的版本中工作, 我们需要您永久升级您的文档. 在继续进行前, 我们建议您做一个备份. 您确定要继续吗? integration.error.newerDocumentVersion=创建本文档的 Zotero 版本 (%1$S) 比当前安装的 Zotero 版本 (%1$S)新. 编辑本文档前, 请先升级 Zotero. integration.corruptField=本引文的域代码--负责通知 Zotero 本引文在文献库里所指向的条目--已经损坏. 您要重新选择该条目吗? -integration.corruptField.description=点击“取消”将删除包含此条目的引文的域代码, 保留引用文本, 但可能将它从您的文献目录中删除. -integration.corruptBibliography=文献目录的 Zotero 域代码已经损坏, 要 Zotero 清理域代码并重新生成文献目录吗? -integration.corruptBibliography.description=文中引用的所有条目将出现在新的文献目录中, 不过您在“编辑文献目录”对话框中所做的修改将丢失. +integration.corruptField.description=点击“取消”将删除包含此条目的引文的域代码, 保留引用文本, 但可能将它从您的引文目录中删除. +integration.corruptBibliography=引文目录的 Zotero 域代码已经损坏, 要 Zotero 清理域代码并重新生成引文目录吗? +integration.corruptBibliography.description=文中引用的所有条目将出现在新的引文目录中, 不过您在“引文目录编辑”对话框中所做的修改将丢失. integration.citationChanged=在 Zotero 创建此引文后, 您做了修改. 您要保留修改并防止 Zotero 未来更新它吗? -integration.citationChanged.description=点击“确定”将在您添加了其它的引文,更换样式或修改了它所指向的参考文献时, 防止 Zotero 更新该引文, 点击“取消”将删除你的变更. +integration.citationChanged.description=点击“确定”将在您添加其它的引文,更换样式或修改了它所指向的参考文献时, 防止 Zotero 更新该引文, 点击“取消”将删除你的变更. integration.citationChanged.edit=在 Zotero 创建此引文后, 您做了修改. 编辑操作将清除您的变更. 您确定要继续吗? styles.install.title=安装样式 @@ -726,7 +726,7 @@ styles.install.unexpectedError=安装 "%1$S" 时发生未可预知的错误 styles.installStyle=要从%2$S安装样式"%1$S"吗? styles.updateStyle=要从 %3$S用"%2$S"更新现有的样式 "%1$S"吗? styles.installed=样式"%S"已成功安装. -styles.installError=%S 不是有效的样式文件. +styles.installError="%S" 不是有效的样式文件. styles.validationWarning="%S" 不是有效的 CSL 1.0.1 样式文件, 它可能不能在 Zotero 正常工作.\n\n您确定要继续吗? styles.installSourceError=%1$S 在%2$S中引用了无效的或不存在的CSL文件作为它的代码. styles.deleteStyle=您确定要删除样式"%1$S"吗? @@ -738,31 +738,31 @@ styles.abbreviations.missingInfo=期刊缩写文件 "%1$S" 未定义完整的信 sync.sync=同步 sync.cancel=取消同步 -sync.openSyncPreferences=打开同步首选项... -sync.resetGroupAndSync=重新设置群组和同步 +sync.openSyncPreferences=打开同步选项 +sync.resetGroupAndSync=重置群组和同步 sync.removeGroupsAndSync=移除群组和同步 sync.localObject=本地对象 sync.remoteObject=远程对象 sync.mergedObject=合并的对象 -sync.error.usernameNotSet=用户名未设置 +sync.error.usernameNotSet=未设置用户名 sync.error.usernameNotSet.text=要与Zotero服务器同步, 您需要在Zotero首选项面板中输入zotero.org的用户名及密码. -sync.error.passwordNotSet=密码未设置 +sync.error.passwordNotSet=未设置密码 sync.error.invalidLogin=无效的用户名或密码 sync.error.invalidLogin.text=Zotero同步服务器拒绝了您的用户名及密码.\n\n请在Zotero同步选项里检查zotero.org的登录信息是否正确. -sync.error.enterPassword=请输入密码 -sync.error.loginManagerInaccessible=Zotero cannot access your login information. -sync.error.checkMasterPassword=If you are using a master password in %S, make sure you have entered it successfully. -sync.error.corruptedLoginManager=This could also be due to a corrupted %1$S login manager database. To check, close %1$S, back up and delete signons.* from your %1$S profile, and re-enter your Zotero login information in the Sync pane of the Zotero preferences. -sync.error.loginManagerCorrupted1=Zotero cannot access your login information, possibly due to a corrupted %S login manager database. -sync.error.loginManagerCorrupted2=关闭%S, 备份并从%S配置文件中删除signons.*, 然后在 Zotero 首选项的同步面板中重新输入登录信息. -sync.error.syncInProgress=已经启用了一个同步进程 +sync.error.enterPassword=请输入密码. +sync.error.loginManagerInaccessible=Zotero 无法获取您的登录信息. +sync.error.checkMasterPassword=如果您在 %S 中使用了主密码, 请确保您已经设置成功. +sync.error.corruptedLoginManager=这也可能是由于 %1$S 登录管理数据库损坏引起的. 要解决这个问题, 请关闭 %1$S, 备份并从您的 %1$S 配置文件中删除 signons.* , 之后请在 Zotero 首选项的同步选项卡里重新键入登录信息. +sync.error.loginManagerCorrupted1=Zotero 无法获取您的登录信息, 这可能是由于%S 登录管理数据库损坏引起的. +sync.error.loginManagerCorrupted2=关闭 %1$S , 备份并从 %2$S 配置文件中删除signons.*, 然后在 Zotero 首选项的同步选项卡中重新输入登录信息. +sync.error.syncInProgress=已经启用了一个同步进程. sync.error.syncInProgress.wait=等待上一次的同步完成或重启%S. sync.error.writeAccessLost=您没有Zotero群组 '%S'的写入权限, 您新增的或编辑过的文件将无法同步到服务器. sync.error.groupWillBeReset=如果您继续, 您所拥有的该群组的副本将被服务器上的群组重置, 本地修改的条目及文件将丢失. sync.error.copyChangedItems=如果您想要将您的变更拷贝到其它地方或请求群组管理员授予您写入权限, 请现在取消同步. -sync.error.manualInterventionRequired=自动同步遇到冲突, 需要手动干预. -sync.error.clickSyncIcon=点击同步图标进行手动同步 +sync.error.manualInterventionRequired=冲突导致自动同步挂起. +sync.error.clickSyncIcon=点击同步图标来解决. sync.error.invalidClock=系统时间错误. 您必须修正此项错误才能与Zotero服务器同步. sync.error.sslConnectionError=SSL 链接错误 sync.error.checkConnection=连接至服务器时发生错误. 请检查网络连接. @@ -772,7 +772,7 @@ sync.error.invalidCharsFilename=文件名 '%S' 包含无效的字符.\n\n重新 sync.lastSyncWithDifferentAccount=Zotero数据库上一次同步使用的zotero.org用户('%1$S') 与当前的同步用户 ('%2$S') 不同. sync.localDataWillBeCombined=如果您选择继续, Zotero本地数据将与'%S' 帐户的数据合并存储在服务器上. sync.localGroupsWillBeRemoved1=本地群组, 包括那些条目发生变动的群组, 将被移除. -sync.avoidCombiningData=为避免合并或丢失数据, 请返回到 '%S' 帐号或在Zotero首选项的同步面板中使用重置选项. +sync.avoidCombiningData=为避免合并或丢失数据, 请返回到 '%S' 帐号或在Zotero首选项的同步选项卡中使用重置选项. sync.localGroupsWillBeRemoved2=如果您选择继续, 本地群组, 包括那些条目发生变动的群组, 将被移除并替换为链接至 '%1$S' 帐号的群组.\n\n为避免丢失群组在本地所作的变更, 请在与 '%1$S' 帐号同步前与 '%2$S' 帐号同步. sync.conflict.autoChange.alert=自上次同步以来, 一条或多条在本地删除的Zotero %S 在远程发生过变动. @@ -800,16 +800,16 @@ sync.conflict.chooseVersionToKeep=选择您要保留的版本, 然后点击 %S. sync.conflict.chooseThisVersion=选择此版本 sync.status.notYetSynced=尚未同步 -sync.status.lastSync=上一次同步 +sync.status.lastSync=上一次同步: sync.status.loggingIn=登录到同步服务器 sync.status.gettingUpdatedData=从同步服务器上更新数据 sync.status.processingUpdatedData=正在从同步服务器上更新数据 sync.status.uploadingData=正在上传数据到同步服务器 -sync.status.uploadAccepted=等待同步服务器接受上传 \u2014 +sync.status.uploadAccepted=接受上传 — 等待同步服务器 sync.status.syncingFiles=正在同步文件 sync.storage.mbRemaining=%SMB 剩余 -sync.storage.kbRemaining=还剩%SKB +sync.storage.kbRemaining=剩余 %SKB sync.storage.filesRemaining=%1$S/%2$S 个文件 sync.storage.none=无 sync.storage.downloads=下载: @@ -818,26 +818,26 @@ sync.storage.localFile=本地文件 sync.storage.remoteFile=远程文件 sync.storage.savedFile=保存的文件 sync.storage.serverConfigurationVerified=服务器设置验证通过 -sync.storage.fileSyncSetUp=文件同步设定成功 +sync.storage.fileSyncSetUp=文件同步设定成功. sync.storage.openAccountSettings=打开帐户设置 sync.storage.error.default=文件同步发生错误. 请尝试重新同步.\n\n如果您反复收到此条信息, 重启 %S 和/或电脑, 然后重试. 如果您继续收到此条信息, 请在Zotero论坛中发帖, 并提交错误报告及报告ID. sync.storage.error.defaultRestart=文件同步发生错误. 请重启 %S 和/或电脑, 然后尝试重新同步.\n\n如果您反复收到此条信息, 请在Zotero论坛中发帖, 并提交错误报告及报告ID. sync.storage.error.serverCouldNotBeReached=无法连接服务器%S sync.storage.error.permissionDeniedAtAddress=您没有权限在下列地址创建 Zotero 目录: -sync.storage.error.checkFileSyncSettings=请检查文件同步设置或联系您的服务器管理员. +sync.storage.error.checkFileSyncSettings=请检查文件同步设置或联系您的 WebDAV 服务器管理员. sync.storage.error.verificationFailed=%S 验证失败. 检查 Zotero 首选项中同步选项卡里的文件同步设置. -sync.storage.error.fileNotCreated=不能在 'storage' 文件夹中创建 '%S' 文件. +sync.storage.error.fileNotCreated=不能在Zotero 'storage' 文件夹中创建 '%S' 文件. sync.storage.error.encryptedFilenames=创建文件 '%S' 时发生错误.\n\n浏览 http://www.zotero.org/support/kb/encrypted_filenames 以获取帮助信息. sync.storage.error.fileEditingAccessLost=您在 Zotero '%S' 群组中的文件编辑权限已被吊销; 您新增或编辑过的文件不能同步到服务器上. sync.storage.error.copyChangedItems=如果您要将变更的条目及文件拷贝到其它地方, 请现在取消同步. sync.storage.error.fileUploadFailed=文件上传失败. -sync.storage.error.directoryNotFound=目录未找到 +sync.storage.error.directoryNotFound=未找到目录 sync.storage.error.doesNotExist=%S 不存在. -sync.storage.error.createNow=你现在要创建吗? +sync.storage.error.createNow=您要现在创建吗? -sync.storage.error.webdav.default=WebDAV 文件同步时发生错误. 请尝试重新同步.\n\n如果您反复收到此条信息, 请在Zotero首选项的同步面板中检查 WebDAV 服务器设置. -sync.storage.error.webdav.defaultRestart=WebDAV 文件同步时发生错误. 请重启 %S , 然后尝试重新同步.\n\n如果您反复收到此条信息, 请在Zotero首选项的同步面板中检查 WebDAV 服务器设置. +sync.storage.error.webdav.default=WebDAV 文件同步时发生错误. 请尝试重新同步.\n\n如果您反复收到此条信息, 请在Zotero首选项的同步选项卡中检查 WebDAV 服务器设置. +sync.storage.error.webdav.defaultRestart=WebDAV 文件同步时发生错误. 请重启 %S , 然后尝试重新同步.\n\n如果您反复收到此条信息, 请在Zotero首选项的同步选项卡中检查 WebDAV 服务器设置. sync.storage.error.webdav.enterURL=请输入一个 WebDAV URL地址. sync.storage.error.webdav.invalidURL=%S 不是有效的 WebDAV URL 地址. sync.storage.error.webdav.invalidLogin=WebDAV 服务器不接受您输入的用户名及密码. @@ -846,9 +846,10 @@ sync.storage.error.webdav.insufficientSpace=WebDAV 服务器上没有足够的 sync.storage.error.webdav.sslCertificateError=连接至%S的SSL证书错误 sync.storage.error.webdav.sslConnectionError=连接至%S的SSL连接错误 sync.storage.error.webdav.loadURLForMoreInfo=在浏览中加载 WebDAV URL 获取更多的信息 -sync.storage.error.webdav.seeCertOverrideDocumentation=浏览证书重载文档以获取更多的信息 +sync.storage.error.webdav.seeCertOverrideDocumentation=浏览 证书重载 文档以获取更多的信息. sync.storage.error.webdav.loadURL=加载 WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=在您的 WebDAV 服务器上发现了一个潜在的问题.\n\n上传的文件将不能立即下载. 在您上传文件直至这些文件在服务器上可用之间有短暂的延迟, 特别是当您使用云存储服务时.\n\n如果Zotero文件同步正常工作, 您可以忽略些条信息. 如果您有问题, 请在Zotero论坛中发帖. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV 服务器配置错误 sync.storage.error.webdav.serverConfig=您的 WebDAV 服务器返回一个内部错误. @@ -903,7 +904,7 @@ file.accessError.cannotBe=不能是 file.accessError.created=已创建 file.accessError.updated=已更新 file.accessError.deleted=已删除 -file.accessError.message.windows=Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename. +file.accessError.message.windows=请确保文件没有被占用, 并且具有写入的权限及有效的文件名. file.accessError.message.other=确保文件没有被占用, 并且具有写入的权限. file.accessError.restart=重启电脑或禁用安全软件也可能解决问题. file.accessError.showParentDir=显示上一级目录 @@ -917,7 +918,7 @@ locate.online.tooltip=在线查看该条目 locate.pdf.label=查看 PDF locate.pdf.tooltip=用选择的浏览器打开 PDF locate.snapshot.label=浏览快照 -locate.snapshot.tooltip=查看该条目的快照 +locate.snapshot.tooltip=查看并标注该条目的快照 locate.file.label=浏览文件 locate.file.tooltip=用选择的程序打开 locate.externalViewer.label=用外部程序打开 @@ -927,7 +928,7 @@ locate.internalViewer.tooltip=在本程序中打开文件 locate.showFile.label=打开文件位置 locate.showFile.tooltip=打开文件所在的目录 locate.libraryLookup.label=文献库检索 -locate.libraryLookup.tooltip=用选择的OpenURL解析器打开此条目 +locate.libraryLookup.tooltip=用选中的OpenURL解析器检索此条目 locate.manageLocateEngines=管理检索引擎... standalone.corruptInstallation=由于自动更新失败, Zotero 独立版安装已经损坏. Zotero可能仍然可以运行, 不过为了避免可能的问题, 请尽快从 http://zotero.org/support/standalone 上下载最新的版本. @@ -938,6 +939,6 @@ connector.error.title=Zotero连接器错误 connector.standaloneOpen=由于 Zotero 独立版正在运行, 您无法对数据库进行操作. 请在Zotero 独立版中浏览您的条目. firstRunGuidance.saveIcon=Zotero 可以识别该页面中的参考文献. 在地址栏点击该图标, 将参考文献保存在Zotero文献库中. -firstRunGuidance.authorMenu=Zotero 允许您指定编者及译者. 您可以从该菜单选择变更编者或译者 +firstRunGuidance.authorMenu=Zotero 允许您指定编辑及译者. 您可以从该菜单选择变更编辑或译者 firstRunGuidance.quickFormat=键入一个标题或作者搜索特定的参考文献.\n\n一旦选中, 点击气泡或按下 Ctrl-↓ 添加页码, 前缀或后缀. 您也可以将页码直接包含在你的搜索条目中, 然后直接添加.\n\n您可以在文字处理程序中直接编辑引文. firstRunGuidance.quickFormatMac=键入一个标题或作者搜索特定的参考文献.\n\n一旦选中, 点击气泡或按下 Cmd-↓ 添加页码, 前缀或后缀.您也可以将页码直接包含在你的搜索条目中, 然后直接添加.\n\n您可以在文字处理程序中直接编辑引文. diff --git a/chrome/locale/zh-TW/zotero/preferences.dtd b/chrome/locale/zh-TW/zotero/preferences.dtd @@ -204,3 +204,4 @@ <!ENTITY zotero.preferences.openAboutConfig "開啟 about:config"> <!ENTITY zotero.preferences.openCSLEdit "開啟 CSL 編輯器"> <!ENTITY zotero.preferences.openCSLPreview "開啟 CSL 預覽"> +<!ENTITY zotero.preferences.openAboutMemory "Open about:memory"> diff --git a/chrome/locale/zh-TW/zotero/zotero.properties b/chrome/locale/zh-TW/zotero/zotero.properties @@ -783,7 +783,7 @@ sync.conflict.localVersionsKept=The local versions have been kept. sync.conflict.localVersionKept=The local version has been kept. sync.conflict.recentVersionsKept=The most recent versions have been kept. sync.conflict.recentVersionKept=The most recent version, '%S', has been kept. -sync.conflict.viewErrorConsole=View the%S Error Console for the full list of such changes. +sync.conflict.viewErrorConsole=View the %S Error Console for the full list of such changes. sync.conflict.localVersion=Local version: %S sync.conflict.remoteVersion=Remote version: %S sync.conflict.deleted=[deleted] @@ -849,6 +849,7 @@ sync.storage.error.webdav.loadURLForMoreInfo=用瀏覽器載入你的 WebDAV 網 sync.storage.error.webdav.seeCertOverrideDocumentation=見抑制安全憑證文件以獲更多資訊。 sync.storage.error.webdav.loadURL=載入 WebDAV URL sync.storage.error.webdav.fileMissingAfterUpload=A potential problem was found with your WebDAV server.\n\nAn uploaded file was not immediately available for download. There may be a short delay between when you upload files and when they become available, particularly if you are using a cloud storage service.\n\nIf Zotero file syncing appears to work normally, you can ignore this message. If you have trouble, please post to the Zotero Forums. +sync.storage.error.webdav.nonexistentFileNotMissing=Your WebDAV server is claiming that a nonexistent file exists. Contact your WebDAV server administrator for assistance. sync.storage.error.webdav.serverConfig.title=WebDAV Server Configuration Error sync.storage.error.webdav.serverConfig=Your WebDAV server returned an internal error. diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js @@ -21,6 +21,7 @@ pref("extensions.zotero.debug.level",5); pref("extensions.zotero.debug.time", false); pref("extensions.zotero.automaticScraperUpdates",true); pref("extensions.zotero.zoteroDotOrgVersionHeader", true); +pref("extensions.zotero.triggerProxyAuthentication", true); pref("extensions.zotero.cacheTranslatorData",true); pref("extensions.zotero.showIn", 1); pref("extensions.zotero.statusBarIcon", 2); @@ -166,3 +167,9 @@ pref("extensions.zotero.connector.repo.lastCheck.repoTime", 0); // File/URL opening executable if launch() fails pref("extensions.zotero.fallbackLauncher.unix", "/usr/bin/xdg-open"); pref("extensions.zotero.fallbackLauncher.windows", ""); + +//Translators +pref("extensions.zotero.translators.attachSupplementary", false); +pref("extensions.zotero.translators.supplementaryAsLink", false); +pref("extensions.zotero.translators.RIS.import.ignoreUnknown", false); +pref("extensions.zotero.translators.RIS.import.keepID", false); diff --git a/resource/schema/renamed-styles.json b/resource/schema/renamed-styles.json @@ -23,6 +23,7 @@ "annual-reviews-by-appearance": "annual-reviews", "apa5th": "apa-5th-edition", "apsa": "american-political-science-association", + "archives-of-dermatology": "jama-dermatology", "asa": "american-sociological-association", "bba-biochimica-et-biophysica-acta": "biochimica-et-biophysica-acta", "bio-medical-reviews": "biomedical-reviews", @@ -83,6 +84,7 @@ "ices-jms": "ices-journal-of-marine-science", "ieee-w-url": "ieee-with-url", "institute-of-electronics-information-and-communication-engineers": "the-institute-of-electronics-information-and-communication-engineers", + "international-archives-of-allergy-and-applied-immunology": "international-archives-of-allergy-and-immunology", "international-journal-cross-cultural-management": "international-journal-of-cross-cultural-management", "international-journal-of-psychiatry-in-medicine": "the-international-journal-of-psychiatry-in-medicine", "international-journal-of-psychoanalysis": "the-international-journal-of-psychoanalysis", @@ -108,6 +110,7 @@ "journal-of-juristic-papyrology": "the-journal-of-juristic-papyrology", "journal-of-medieval-and-early-modern-studies": "the-journal-of-medieval-and-early-modern-studies", "journal-of-modern-history": "the-journal-of-modern-history", + "journal-of-neuro-interventional-surgery": "journal-of-neurointerventional-surgery", "journal-of-nuclear-medicine": "the-journal-of-nuclear-medicine", "journal-of-organic-chemistry": "the-journal-of-organic-chemistry", "journal-of-pediatrics": "the-journal-of-pediatrics", @@ -118,6 +121,7 @@ "journal-of-the-american-academy-of-physician-assistants": "jaapa", "journal-of-the-american-dental-association": "the-journal-of-the-american-dental-association", "journal-of-the-american-medical-association": "jama", + "journal-of-the-american-medical-informatics-association": "jamia", "journal-of-the-american-osteopathic-association": "the-journal-of-the-american-osteopathic-association", "journal-of-the-indian-society-of-pedodontics-and-preventative-dentistry": "journal-of-the-indian-society-of-pedodontics-and-preventive-dentistry", "journal-of-the-institute-of-medicine": "journal-of-institute-of-medicine", @@ -130,6 +134,7 @@ "lancet-neurology": "the-lancet-neurology", "lancet-oncology": "the-lancet-oncology", "lancet": "the-lancet", + "law1-de": "juristische-zitierweise", "lichenologist": "the-lichenologist", "lncs": "springer-lecture-notes-in-computer-science", "lncs2": "springer-lecture-notes-in-computer-science-alphabetical", @@ -146,17 +151,53 @@ "mla-url": "modern-language-association-with-url", "mla": "modern-language-association", "molecular-biochemical-parasitology": "molecular-and-biochemical-parasitology", + "national-library-of-medicine-grant": "national-library-of-medicine-grant-proposals", + "nature-neuroscience-brief-communication": "nature-neuroscience-brief-communications", "netherlands-journal-of-medicine": "the-netherlands-journal-of-medicine", "neumologica-y-cirugia-de-torax-neurofibromatosis": "neumologia-y-cirugia-de-torax", + "new-england-journal-of-medicine": "the-new-england-journal-of-medicine", "new-iraqi-journal-of-medicine": "the-new-iraqi-journal-of-medicine", "new-zealand-journal-of-medical-laboratory-technology": "new-zealand-journal-of-medical-laboratory-science", "new-zealand-medical-journal": "the-new-zealand-medical-journal", "nlm": "national-library-of-medicine", + "north-west-university-harvard": "harvard-north-west-university", + "ophthalmic-surgery-lasers-and-imaging": "ophthalmic-surgery-lasers-and-imaging-retina", + "optical-society-of-america": "the-optical-society", + "oxford-brookes-university-faculty-of-health-and-life-sciences": "harvard-oxford-brookes-university-faculty-of-health-and-life-sciences", + "oxford-university-new-south-wales": "oxford-the-university-of-new-south-wales", "physiological-biochemical-zoology": "physiological-and-biochemical-zoology", + "plant-cell": "the-plant-cell", + "polish-botanical-society": "acta-societatis-botanicorum-poloniae", "quaderni-avogadro-colloquia": "quaderni-degli-avogadro-colloquia", + "review-of-financial-studies": "the-review-of-financial-studies", + "revista-brasileira-de-botanica": "brazilian-journal-of-botany", + "rockefeller-university-press": "the-rockefeller-university-press", + "sbl-fullnote-bibliography": "society-of-biblical-literature-fullnote-bibliography", + "scandinavian-journal-of-clinical-and-laboratory-investigation": "the-scandinavian-journal-of-clinical-and-laboratory-investigation", + "science-without-title": "science-without-titles", + "small-wiley": "small", + "soil-biology-biochemistry": "soil-biology-and-biochemistry", + "springer-plasmonics": "plasmonics", + "springer-protocols": "springerprotocols", + "tah-gkw": "geistes-und-kulturwissenschaften-teilmann", + "tah-soz": "sozialwissenschaften-teilmann", "taylor-and-francis-reference-style-f": "taylor-and-francis-chicago-f", + "the-academy-of-management-review": "academy-of-management-review", + "trends-journal": "trends-journals", + "tu-wien-dissertation": "technische-universitat-wien", "ulster-medical-journal": "the-ulster-medical-journal", + "un-eclac-cepal-english": "economic-commission-for-latin-america-and-the-caribbean", + "un-eclac-cepal-spanish": "comision-economica-para-america-latina-y-el-caribe", + "unctad-english": "united-nations-conference-on-trade-and-development", "uni-freiburg-geschichte-autor-jahr": "universitat-freiburg-geschichte", + "unisa-harvard": "harvard-university-of-south-australia", + "unisa-harvard3": "harvard-university-of-south-australia", + "universite-laval-com": "universite-laval-departement-dinformation-et-de-communication", + "university-of-melbourne": "harvard-the-university-of-melbourne", + "harvard-university-of-south-africa": "harvard-university-of-south-australia", "uqam-universite-du-quebec-a-montreal": "universite-du-quebec-a-montreal", - "world-health-organization-journals": "world-health-organization" -} -\ No newline at end of file + "user-modeling-and-useradapted-interaction": "user-modeling-and-user-adapted-interaction", + "wceam2010": "world-congress-on-engineering-asset-management", + "world-health-organization-journals": "world-health-organization", + "world-journal-of-biological-psychiatry": "the-world-journal-of-biological-psychiatry" +} diff --git a/resource/schema/repotime.txt b/resource/schema/repotime.txt @@ -1 +1 @@ -2013-04-15 18:15:00 +2013-04-30 21:35:00 diff --git a/resource/schema/userdata.sql b/resource/schema/userdata.sql @@ -1,4 +1,4 @@ --- 77 +-- 78 -- Copyright (c) 2009 Center for History and New Media -- George Mason University, Fairfax, Virginia, USA @@ -162,6 +162,7 @@ CREATE TABLE creatorData ( fieldMode INT, birthYear INT ); +CREATE INDEX creatorData_name ON creatorData(lastName, firstName); CREATE TABLE itemCreators ( itemID INT,