Merge branch '4.0' into api_syncing
This commit is contained in:
commit
bdd69d0a53
331 changed files with 6214 additions and 2627 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -7,3 +7,9 @@
|
|||
[submodule "styles"]
|
||||
path = styles
|
||||
url = git://github.com/zotero/bundled-styles.git
|
||||
[submodule "test/resource/chai"]
|
||||
path = test/resource/chai
|
||||
url = https://github.com/chaijs/chai.git
|
||||
[submodule "test/resource/mocha"]
|
||||
path = test/resource/mocha
|
||||
url = https://github.com/mochajs/mocha.git
|
||||
|
|
16
.travis.yml
Normal file
16
.travis.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
env:
|
||||
matrix:
|
||||
- FIREFOXVERSION="36.0.1"
|
||||
- FIREFOXVERSION="31.5.0esr"
|
||||
notifications:
|
||||
email: false
|
||||
before_install:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- wget http://ftp.mozilla.org/pub/firefox/releases/${FIREFOXVERSION}/linux-x86_64/en-US/firefox-${FIREFOXVERSION}.tar.bz2
|
||||
- tar -xjf firefox-${FIREFOXVERSION}.tar.bz2
|
||||
script:
|
||||
- test/runtests.sh -x firefox/firefox
|
|
@ -1,5 +1,6 @@
|
|||
Zotero
|
||||
======
|
||||
[](https://travis-ci.org/zotero/zotero)
|
||||
|
||||
Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
|
||||
|
||||
|
|
|
@ -1,3 +1,94 @@
|
|||
/*
|
||||
As of Fx36, the built-in Mac styles don't properly handle a menu-button within a combined
|
||||
button, so we need this ungodly mess.
|
||||
*/
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator,
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"]:not(:hover) > .toolbarbutton-menubutton-dropmarker::before,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] {
|
||||
margin-top: 3px !important;
|
||||
margin-bottom: 3px !important;
|
||||
border-right: 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] {
|
||||
margin-right: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
padding-right: 2px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: -1px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-left: 0 solid transparent;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button {
|
||||
min-width: 26px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: var(--toolbarbutton-hover-bordercolor) !important;
|
||||
box-shadow: var(--toolbarbutton-hover-boxshadow) !important;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button {
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker {
|
||||
border-left: 1px solid transparent;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker:hover {
|
||||
background: var(--toolbarbutton-hover-background);
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] {
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover {
|
||||
border-left: 0 solid transparent;
|
||||
}
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button {
|
||||
border-left: 1px solid transparent;
|
||||
}
|
||||
|
||||
/* Necessary in Fx36 to keep 32px icons from being rendered at full size */
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] > .toolbarbutton-icon,
|
||||
#zotero-toolbar-main-button-single[cui-areatype="toolbar"] > .toolbarbutton-icon,
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#zotero-toolbar-save-button-single[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
|
||||
width: 16px;
|
||||
}
|
||||
/* End toolbar icons */
|
||||
|
||||
#zotero-splitter
|
||||
{
|
||||
border-top: none;
|
||||
|
@ -255,10 +346,8 @@
|
|||
background-color: #8b8b8b !important;
|
||||
}
|
||||
|
||||
#zotero-collections-splitter[state=collapsed], #zotero-items-splitter[state=collapsed]
|
||||
{
|
||||
border-right: 1px;
|
||||
border-color: #A5A5A5;
|
||||
#zotero-collections-splitter[state=collapsed], #zotero-items-splitter[state=collapsed] {
|
||||
border: 0 solid #d6d6d6 !important;
|
||||
max-width: 8px !important;
|
||||
min-width: 8px !important;
|
||||
width: 8px !important;
|
||||
|
@ -267,6 +356,14 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#zotero-collections-splitter[state=collapsed] {
|
||||
border-right-width: 1px !important;
|
||||
}
|
||||
|
||||
#zotero-items-splitter[state=collapsed] {
|
||||
border-left-width: 1px !important;
|
||||
}
|
||||
|
||||
#zotero-collections-splitter[state=collapsed] > grippy, #zotero-items-splitter[state=collapsed] > grippy
|
||||
{
|
||||
-moz-appearance: none;
|
||||
|
|
|
@ -1,3 +1,98 @@
|
|||
/*
|
||||
As of Fx36, the built-in styles don't properly handle a menu-button within combined buttons.
|
||||
*/
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
width: 28px !important;
|
||||
margin-left: 2px;
|
||||
margin-right: -3px;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button .toolbarbutton-icon {
|
||||
padding-left: 6px !important;
|
||||
padding-right: 6px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
padding-left: 14px !important;
|
||||
padding-right: 3px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon,
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"][open] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator {
|
||||
/* Copied from .toolbarbutton-menubutton-dropmarker::before */
|
||||
display: -moz-box;
|
||||
width: 1px;
|
||||
height: 18px;
|
||||
-moz-margin-end: -1px;
|
||||
background-image: var(--toolbarbutton-combined-backgroundimage);
|
||||
background-clip: padding-box;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1px 18px;
|
||||
box-shadow: var(--toolbarbutton-combined-boxshadow);
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .dropmarker-icon {
|
||||
border-color: var(--toolbarbutton-hover-bordercolor) !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover:not(:active) > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"]:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-button:hover:not(:active) > .toolbarbutton-icon,
|
||||
/* This selector doesn't work, so the dropmarker doesn't get a hover effect. :hover doesn't seem
|
||||
to have an effect on either part of the dropmarker */
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker:hover > .dropmarker-icon {
|
||||
background: var(--toolbarbutton-hover-background) !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
background: var(--toolbarbutton-active-background);
|
||||
border-color: var(--toolbarbutton-active-bordercolor);
|
||||
box-shadow: var(--toolbarbutton-active-boxshadow);
|
||||
transition-duration: 10ms;
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button-single[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
width: 32px;
|
||||
}
|
||||
/* End toolbar buttons */
|
||||
|
||||
|
||||
.zotero-tb-button:not([type=menu]) {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,105 @@
|
|||
/*
|
||||
As of Fx36, the built-in styles don't properly handle a menu-button within combined buttons.
|
||||
*/
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] {
|
||||
margin-right: -1px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
width: 28px;
|
||||
margin-left: 2px;
|
||||
margin-right: -1px;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
padding-left: 6px !important;
|
||||
padding-right: 6px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
padding-left: 5px !important;
|
||||
padding-right: 4px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] .toolbarbutton-menubutton-button {
|
||||
margin-left: -2px !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button > .toolbarbutton-menubutton-dropmarker::before {
|
||||
width: 1px;
|
||||
-moz-margin-end: -1px;
|
||||
background-image: var(--toolbarbutton-combined-backgroundimage);
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > separator {
|
||||
margin-top: 11px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > separator,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) > .toolbarbutton-menubutton-dropmarker::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button:not([disabled]) .dropmarker-icon {
|
||||
border-color: var(--toolbarbutton-hover-bordercolor) !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-main-button:not(:active) .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover:not([disabled]) > #zotero-toolbar-save-button:not(:active) .dropmarker-icon {
|
||||
background: var(--toolbarbutton-hover-background);
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"]:hover > #zotero-toolbar-save-button .dropmarker-icon {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
There are two hover effects: when the toolbaritem is hovered over, and when the button is hovered over.
|
||||
This applies the latter (and may not be right on different versions of Windows).
|
||||
*/
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-main-button:hover:not(:active):not([disabled]) > .toolbarbutton-icon,
|
||||
/*
|
||||
The dropmarker doesn't honor :hover, so instead of showing the hover effect for each segment individually, do the
|
||||
menu-button parts together, which at least looks like a choice.
|
||||
*/
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover .toolbarbutton-menubutton-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not(:active):not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
background-color: hsla(210,48%,96%,.75) !important;
|
||||
}
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-main-button:hover > .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4) !important;
|
||||
box-shadow: 0 0 1px hsla(210,54%,20%,.03),
|
||||
0 0 2px hsla(210,54%,20%,.1) !important;
|
||||
}
|
||||
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover:active:not([open]):not([disabled]) .toolbarbutton-menubutton-button .toolbarbutton-icon,
|
||||
#zotero-toolbar-buttons[cui-areatype="toolbar"] > #zotero-toolbar-save-button:hover[open]:not([disabled]) .toolbarbutton-menubutton-dropmarker .dropmarker-icon {
|
||||
background: var(--toolbarbutton-active-background);
|
||||
border-color: var(--toolbarbutton-active-bordercolor);
|
||||
box-shadow: var(--toolbarbutton-active-boxshadow);
|
||||
transition-duration: 10ms;
|
||||
}
|
||||
|
||||
#zotero-toolbar-save-button[cui-areatype="toolbar"] > menupopup {
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
#zotero-toolbar-main-button-single[cui-areatype="toolbar"] .toolbarbutton-icon {
|
||||
width: 32px;
|
||||
}
|
||||
/* End toolbar buttons */
|
||||
|
||||
#zotero-tb-search-menu-button {
|
||||
margin: 0 -1px 0 -4px;
|
||||
border: 0;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
>
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="AttachLink.js"/>
|
||||
<script src="attachLink.js"/>
|
||||
|
||||
<vbox id="zotero-attach-uri-container">
|
||||
<hbox>
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
<body>
|
||||
<![CDATA[
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
if(!Zotero.Prefs.get("firstRunGuidance")) return;
|
||||
|
||||
var about = this.getAttribute("about"),
|
||||
pref = "firstRunGuidanceShown."+about,
|
||||
|
|
|
@ -1036,6 +1036,9 @@
|
|||
<body>
|
||||
<![CDATA[
|
||||
var sbo = document.getAnonymousNodes(this)[0].boxObject;
|
||||
if (Zotero.platformMajorVersion < 36) {
|
||||
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
||||
}
|
||||
sbo.ensureElementIsVisible(elem);
|
||||
]]>
|
||||
</body>
|
||||
|
|
|
@ -1028,6 +1028,9 @@
|
|||
<body>
|
||||
<![CDATA[
|
||||
var sbo = document.getAnonymousNodes(this)[0].boxObject;
|
||||
if (Zotero.platformMajorVersion < 36) {
|
||||
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
||||
}
|
||||
sbo.ensureElementIsVisible(elem);
|
||||
]]>
|
||||
</body>
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
|
||||
var Zotero_Browser = new function() {
|
||||
this.init = init;
|
||||
this.scrapeThisPage = scrapeThisPage;
|
||||
this.annotatePage = annotatePage;
|
||||
this.toggleMode = toggleMode;
|
||||
this.toggleCollapsed = toggleCollapsed;
|
||||
|
@ -54,7 +53,6 @@ var Zotero_Browser = new function() {
|
|||
|
||||
this.tabbrowser = null;
|
||||
this.appcontent = null;
|
||||
this.statusImage = null;
|
||||
this.isScraping = false;
|
||||
|
||||
var _browserData = new Object();
|
||||
|
@ -154,13 +152,25 @@ var Zotero_Browser = new function() {
|
|||
* Scrapes a page (called when the capture icon is clicked
|
||||
* @return void
|
||||
*/
|
||||
function scrapeThisPage(translator) {
|
||||
this.scrapeThisPage = function (translator, event) {
|
||||
// Perform translation
|
||||
var tab = _getTabObject(Zotero_Browser.tabbrowser.selectedBrowser);
|
||||
if(tab.page.translators && tab.page.translators.length) {
|
||||
tab.page.translate.setTranslator(translator || tab.page.translators[0]);
|
||||
Zotero_Browser.performTranslation(tab.page.translate); // TODO: async
|
||||
}
|
||||
else {
|
||||
// Keep in sync with cmd_zotero_newItemFromCurrentPage
|
||||
//
|
||||
// DEBUG: Possible to just trigger command directly with event? Assigning it to the
|
||||
// command property of the icon doesn't seem to work, and neither does goDoCommand()
|
||||
// from chrome://global/content/globalOverlay.js. Getting the command by id and
|
||||
// running doCommand() works but doesn't pass the event.
|
||||
ZoteroPane.addItemFromPage(
|
||||
'temporaryPDFHack',
|
||||
(event && event.shiftKey) ? !Zotero.Prefs.get('automaticSnapshots') : null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -223,7 +233,6 @@ var Zotero_Browser = new function() {
|
|||
function chromeLoad() {
|
||||
this.tabbrowser = gBrowser;
|
||||
this.appcontent = document.getElementById("appcontent");
|
||||
this.statusImage = document.getElementById("zotero-status-image");
|
||||
|
||||
// this gives us onLocationChange, for updating when tabs are switched/created
|
||||
gBrowser.tabContainer.addEventListener("TabClose",
|
||||
|
@ -270,6 +279,7 @@ var Zotero_Browser = new function() {
|
|||
function(e) { Zotero_Browser.resize(e) }, false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* An event handler called when a new document is loaded. Creates a new document
|
||||
* object, and updates the status of the capture icon
|
||||
|
@ -415,19 +425,34 @@ var Zotero_Browser = new function() {
|
|||
* thereof of the current page
|
||||
*/
|
||||
function updateStatus() {
|
||||
if (!Zotero_Browser.tabbrowser) return;
|
||||
var tab = _getTabObject(Zotero_Browser.tabbrowser.selectedBrowser);
|
||||
|
||||
var captureIcon = tab.getCaptureIcon();
|
||||
if(captureIcon) {
|
||||
Zotero_Browser.statusImage.src = captureIcon;
|
||||
Zotero_Browser.statusImage.tooltipText = tab.getCaptureTooltip();
|
||||
Zotero_Browser.statusImage.hidden = false;
|
||||
|
||||
Zotero_Browser.statusImage.addEventListener("load", function() {
|
||||
document.getElementById("zotero-status-image-guidance").show();
|
||||
}, false);
|
||||
} else {
|
||||
Zotero_Browser.statusImage.hidden = true;
|
||||
Components.utils.import("resource:///modules/CustomizableUI.jsm");
|
||||
var buttons = getSaveButtons();
|
||||
if (buttons.length) {
|
||||
let state = tab.getCaptureState();
|
||||
let tooltiptext = tab.getCaptureTooltip();
|
||||
for (let { button, placement } of buttons) {
|
||||
let inToolbar = placement.area == CustomizableUI.AREA_NAVBAR;
|
||||
button.image = tab.getCaptureIcon(Zotero.hiDPI || !inToolbar);
|
||||
button.tooltipText = tooltiptext;
|
||||
if (state == tab.CAPTURE_STATE_TRANSLATABLE) {
|
||||
button.classList.add('translate');
|
||||
|
||||
// Show guidance panel if necessary
|
||||
if (inToolbar) {
|
||||
button.addEventListener("load", function() {
|
||||
document.getElementById("zotero-status-image-guidance").show();
|
||||
});
|
||||
}
|
||||
// TODO: Different guidance for web pages?
|
||||
}
|
||||
else {
|
||||
button.classList.remove('translate');
|
||||
}
|
||||
button.removeAttribute('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
// set annotation bar status
|
||||
|
@ -439,6 +464,35 @@ var Zotero_Browser = new function() {
|
|||
}
|
||||
}
|
||||
|
||||
function getSaveButtons() {
|
||||
Components.utils.import("resource:///modules/CustomizableUI.jsm");
|
||||
var buttons = [];
|
||||
|
||||
var placement = CustomizableUI.getPlacementOfWidget("zotero-toolbar-buttons");
|
||||
if (placement) {
|
||||
let button = document.getElementById("zotero-toolbar-save-button");
|
||||
if (button) {
|
||||
buttons.push({
|
||||
button: button,
|
||||
placement: placement
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
placement = CustomizableUI.getPlacementOfWidget("zotero-toolbar-save-button-single");
|
||||
if (placement) {
|
||||
let button = document.getElementById("zotero-toolbar-save-button-single");
|
||||
if (button) {
|
||||
buttons.push({
|
||||
button: button,
|
||||
placement: placement
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when status bar icon is right-clicked
|
||||
*/
|
||||
|
@ -447,45 +501,79 @@ var Zotero_Browser = new function() {
|
|||
while(popup.hasChildNodes()) popup.removeChild(popup.lastChild);
|
||||
|
||||
var tab = _getTabObject(this.tabbrowser.selectedBrowser);
|
||||
var translators = tab.page.translators;
|
||||
for(var i=0, n=translators.length; i<n; i++) {
|
||||
let translator = translators[i];
|
||||
|
||||
if (tab.getCaptureState() == tab.CAPTURE_STATE_TRANSLATABLE) {
|
||||
let translators = tab.page.translators;
|
||||
for (var i=0, n = translators.length; i < n; i++) {
|
||||
let translator = translators[i];
|
||||
|
||||
let menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label",
|
||||
Zotero.getString("ingester.saveToZoteroUsing", translator.label));
|
||||
menuitem.setAttribute("image", (translator.itemType === "multiple"
|
||||
? "chrome://zotero/skin/treesource-collection.png"
|
||||
: Zotero.ItemTypes.getImageSrc(translator.itemType)));
|
||||
menuitem.setAttribute("class", "menuitem-iconic");
|
||||
menuitem.addEventListener("command", function(e) {
|
||||
Zotero_Browser.scrapeThisPage(translator, e);
|
||||
e.stopPropagation();
|
||||
}, false);
|
||||
popup.appendChild(menuitem);
|
||||
}
|
||||
|
||||
var menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label",
|
||||
Zotero.getString("ingester.saveToZoteroUsing", translator.label));
|
||||
menuitem.setAttribute("image", (translator.itemType === "multiple"
|
||||
? "chrome://zotero/skin/treesource-collection.png"
|
||||
: Zotero.ItemTypes.getImageSrc(translator.itemType)));
|
||||
popup.appendChild(document.createElement("menuseparator"));
|
||||
|
||||
let menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", Zotero.getString("locate.libraryLookup.label"));
|
||||
menuitem.setAttribute("tooltiptext", Zotero.getString("locate.libraryLookup.tooltip"));
|
||||
menuitem.setAttribute("image", "chrome://zotero/skin/locate-library-lookup.png");
|
||||
menuitem.setAttribute("class", "menuitem-iconic");
|
||||
menuitem.addEventListener("command", function(e) {
|
||||
scrapeThisPage(translator);
|
||||
}, false);
|
||||
menuitem.addEventListener("command", _constructLookupFunction(tab, function(event, obj) {
|
||||
var urls = [];
|
||||
for each(var item in obj.newItems) {
|
||||
var url = Zotero.OpenURL.resolve(item);
|
||||
if(url) urls.push(url);
|
||||
}
|
||||
ZoteroPane.loadURI(urls, event);
|
||||
}), false);
|
||||
popup.appendChild(menuitem);
|
||||
|
||||
var locateEngines = Zotero.LocateManager.getVisibleEngines();
|
||||
Zotero_LocateMenu.addLocateEngines(popup, locateEngines,
|
||||
_constructLookupFunction(tab, function(e, obj) {
|
||||
Zotero_LocateMenu.locateItem(e, obj.newItems);
|
||||
}), true);
|
||||
}
|
||||
else {
|
||||
let webPageIcon = tab.getCaptureIcon(Zotero.hiDPI);
|
||||
let automaticSnapshots = Zotero.Prefs.get('automaticSnapshots');
|
||||
let snapshotEvent = {
|
||||
shiftKey: !automaticSnapshots
|
||||
};
|
||||
let noSnapshotEvent = {
|
||||
shiftKey: automaticSnapshots
|
||||
};
|
||||
|
||||
let menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", "Save to Zotero as Web Page (with snapshot)");
|
||||
menuitem.setAttribute("image", webPageIcon);
|
||||
menuitem.setAttribute("class", "menuitem-iconic");
|
||||
menuitem.addEventListener("command", function (event) {
|
||||
Zotero_Browser.scrapeThisPage(null, snapshotEvent);
|
||||
event.stopPropagation();
|
||||
});
|
||||
popup.appendChild(menuitem);
|
||||
|
||||
menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", "Save to Zotero as Web Page (without snapshot)");
|
||||
menuitem.setAttribute("image", webPageIcon);
|
||||
menuitem.setAttribute("class", "menuitem-iconic");
|
||||
menuitem.addEventListener("command", function (event) {
|
||||
Zotero_Browser.scrapeThisPage(null, noSnapshotEvent);
|
||||
event.stopPropagation();
|
||||
});
|
||||
popup.appendChild(menuitem);
|
||||
}
|
||||
|
||||
popup.appendChild(document.createElement("menuseparator"));
|
||||
|
||||
var menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", Zotero.getString("locate.libraryLookup.label"));
|
||||
menuitem.setAttribute("tooltiptext", Zotero.getString("locate.libraryLookup.tooltip"));
|
||||
menuitem.setAttribute("image", "chrome://zotero/skin/locate-library-lookup.png");
|
||||
menuitem.setAttribute("class", "menuitem-iconic");
|
||||
menuitem.addEventListener("command", _constructLookupFunction(tab, function(event, obj) {
|
||||
var urls = [];
|
||||
for each(var item in obj.newItems) {
|
||||
var url = Zotero.OpenURL.resolve(item);
|
||||
if(url) urls.push(url);
|
||||
}
|
||||
ZoteroPane.loadURI(urls, event);
|
||||
}), false);
|
||||
popup.appendChild(menuitem);
|
||||
|
||||
var locateEngines = Zotero.LocateManager.getVisibleEngines();
|
||||
Zotero_LocateMenu.addLocateEngines(popup, locateEngines,
|
||||
_constructLookupFunction(tab, function(e, obj) {
|
||||
Zotero_LocateMenu.locateItem(e, obj.newItems);
|
||||
}), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -698,6 +786,10 @@ Zotero_Browser.Tab = function(browser) {
|
|||
this.page = new Object();
|
||||
}
|
||||
|
||||
Zotero_Browser.Tab.prototype.CAPTURE_STATE_DISABLED = 0;
|
||||
Zotero_Browser.Tab.prototype.CAPTURE_STATE_GENERIC = 1;
|
||||
Zotero_Browser.Tab.prototype.CAPTURE_STATE_TRANSLATABLE = 2;
|
||||
|
||||
/*
|
||||
* clears page-specific information
|
||||
*/
|
||||
|
@ -709,8 +801,13 @@ Zotero_Browser.Tab.prototype.clear = function() {
|
|||
/*
|
||||
* detects translators for this browser object
|
||||
*/
|
||||
Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) {
|
||||
if(doc instanceof HTMLDocument && doc.documentURI.substr(0, 6) != "about:") {
|
||||
Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) {
|
||||
if (doc instanceof HTMLDocument) {
|
||||
if (doc.documentURI.startsWith("about:")) {
|
||||
this.page.saveEnabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// get translators
|
||||
var me = this;
|
||||
|
||||
|
@ -776,31 +873,78 @@ Zotero_Browser.Tab.prototype._attemptLocalFileImport = function(doc) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Zotero_Browser.Tab.prototype.getCaptureState = function () {
|
||||
if (!this.page.saveEnabled) {
|
||||
return this.CAPTURE_STATE_DISABLED;
|
||||
}
|
||||
if (this.page.translators && this.page.translators.length) {
|
||||
return this.CAPTURE_STATE_TRANSLATABLE;
|
||||
}
|
||||
return this.CAPTURE_STATE_GENERIC;
|
||||
}
|
||||
|
||||
/*
|
||||
* returns the URL of the image representing the translator to be called on the
|
||||
* current page, or false if the page cannot be scraped
|
||||
*/
|
||||
Zotero_Browser.Tab.prototype.getCaptureIcon = function() {
|
||||
if(this.page.translators && this.page.translators.length) {
|
||||
Zotero_Browser.Tab.prototype.getCaptureIcon = function (hiDPI) {
|
||||
var suffix = hiDPI ? "@2x" : "";
|
||||
|
||||
switch (this.getCaptureState()) {
|
||||
case this.CAPTURE_STATE_TRANSLATABLE:
|
||||
var itemType = this.page.translators[0].itemType;
|
||||
return (itemType === "multiple"
|
||||
? "chrome://zotero/skin/treesource-collection.png"
|
||||
: Zotero.ItemTypes.getImageSrc(itemType));
|
||||
}
|
||||
|
||||
return false;
|
||||
// TODO: Show icons for images, PDFs, etc.?
|
||||
default:
|
||||
return "chrome://zotero/skin/treeitem-webpage" + suffix + ".png";
|
||||
}
|
||||
}
|
||||
|
||||
Zotero_Browser.Tab.prototype.getCaptureTooltip = function() {
|
||||
if (this.page.translators && this.page.translators.length) {
|
||||
var arr = [Zotero.getString('ingester.saveToZotero')];
|
||||
switch (this.getCaptureState()) {
|
||||
case this.CAPTURE_STATE_DISABLED:
|
||||
var text = Zotero.getString('ingester.saveToZotero');
|
||||
break;
|
||||
|
||||
case this.CAPTURE_STATE_TRANSLATABLE:
|
||||
var text = Zotero.getString('ingester.saveToZotero');
|
||||
if (this.page.translators[0].itemType == 'multiple') {
|
||||
arr.push('...');
|
||||
text += '…';
|
||||
}
|
||||
arr.push (' ' , '(' + this.page.translators[0].label + ')');
|
||||
return Zotero.localeJoin(arr, '');
|
||||
text += ' (' + this.page.translators[0].label + ')';
|
||||
break;
|
||||
|
||||
// TODO: Different captions for images, PDFs, etc.?
|
||||
default:
|
||||
var text = Zotero.getString('ingester.saveToZotero')
|
||||
+ " (" + Zotero.getString('itemTypes.webpage') + ")";
|
||||
}
|
||||
|
||||
var key = Zotero.Keys.getKeyForCommand('saveToZotero');
|
||||
if (key) {
|
||||
// Add RLE mark in RTL mode to make shortcut render the right way
|
||||
text += (Zotero.rtl ? ' \u202B' : ' ') + '('
|
||||
+ (Zotero.isMac ? '⇧⌘' : Zotero.getString('general.keys.ctrlShift'))
|
||||
+ key
|
||||
+ ')';
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
Zotero_Browser.Tab.prototype.getCaptureCommand = function () {
|
||||
switch (this.getCaptureState()) {
|
||||
case this.CAPTURE_STATE_DISABLED:
|
||||
return '';
|
||||
case this.CAPTURE_STATE_TRANSLATABLE:
|
||||
return '';
|
||||
default:
|
||||
return 'cmd_zotero_newItemFromCurrentPage';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
@ -826,6 +970,8 @@ Zotero_Browser.Tab.prototype._selectItems = function(obj, itemList, callback) {
|
|||
* called when translators are available
|
||||
*/
|
||||
Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, translators) {
|
||||
this.page.saveEnabled = true;
|
||||
|
||||
if(translators && translators.length) {
|
||||
//see if we should keep the previous set of translators
|
||||
if(//we already have a translator for part of this page
|
||||
|
@ -850,6 +996,7 @@ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, transla
|
|||
return; //keep what we had
|
||||
} else {
|
||||
this.clear(); //clear URL bar icon
|
||||
this.page.saveEnabled = true;
|
||||
}
|
||||
|
||||
Zotero.debug("Translate: found translators for page\n"
|
||||
|
|
291
chrome/content/zotero/icon.js
Normal file
291
chrome/content/zotero/icon.js
Normal file
|
@ -0,0 +1,291 @@
|
|||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2015 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
Components.utils.import("resource:///modules/CustomizableUI.jsm");
|
||||
|
||||
var comboButtonsID = 'zotero-toolbar-buttons';
|
||||
|
||||
CustomizableUI.addListener({
|
||||
onWidgetAdded: function (id, area, position) {
|
||||
if (id == comboButtonsID) {
|
||||
// When dropping combo button into panel, add two independent buttons instead
|
||||
if (area == CustomizableUI.AREA_PANEL) {
|
||||
let mainID = getSingleID('main');
|
||||
let saveID = getSingleID('save');
|
||||
CustomizableUI.removeWidgetFromArea(id);
|
||||
// Remove independent main and save buttons first if they're already in panel
|
||||
CustomizableUI.removeWidgetFromArea(mainID);
|
||||
CustomizableUI.removeWidgetFromArea(saveID);
|
||||
CustomizableUI.addWidgetToArea(mainID, area, position);
|
||||
let placement = CustomizableUI.getPlacementOfWidget(mainID)
|
||||
let mainPos = placement.position;
|
||||
CustomizableUI.addWidgetToArea(saveID, area, mainPos + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
var item = document.getElementById(id);
|
||||
// Element may not exist yet if it was added to the panel
|
||||
if (item) {
|
||||
updateItemForArea(item, area);
|
||||
}
|
||||
|
||||
var isUpgrade = false;
|
||||
try {
|
||||
isUpgrade = Zotero.Prefs.get("firstRunGuidanceShown.saveIcon");
|
||||
} catch(e) {}
|
||||
var property = "firstRunGuidance.toolbarButton." + (isUpgrade ? "upgrade" : "new");
|
||||
var shortcut = Zotero.getString(
|
||||
Zotero.isMac ? "general.keys.cmdShift" : "general.keys.ctrlShift"
|
||||
) + Zotero.Prefs.get("keys.openZotero");
|
||||
document.getElementById("zotero-toolbar-button-guidance").show(
|
||||
null, Zotero.getString(property, shortcut)
|
||||
);
|
||||
}
|
||||
else if (id == getSingleID('save')) {
|
||||
Zotero_Browser.updateStatus();
|
||||
}
|
||||
},
|
||||
|
||||
onWidgetRemoved: function (id, area) {
|
||||
if (id == comboButtonsID) {
|
||||
var item = document.getElementById(id);
|
||||
updateItemForArea(item, null);
|
||||
}
|
||||
// Clear dynamic image from save icon and revert to CSS
|
||||
else if (id == getSingleID('save')) {
|
||||
let button = document.getElementById(id);
|
||||
button.image = "";
|
||||
}
|
||||
},
|
||||
|
||||
// Save icon in panel isn't in DOM until menu is shown once and therefore isn't updated
|
||||
// on page loads, so update the icon status when the panel is first shown so that it
|
||||
// doesn't remain disabled
|
||||
onAreaNodeRegistered: function (area, node) {
|
||||
if (area == CustomizableUI.AREA_PANEL) {
|
||||
var placement = CustomizableUI.getPlacementOfWidget(comboButtonsID)
|
||||
var update = false;
|
||||
if (placement && placement.area == CustomizableUI.AREA_PANEL) {
|
||||
update = true;
|
||||
}
|
||||
else {
|
||||
placement = CustomizableUI.getPlacementOfWidget(getSingleID('save'));
|
||||
if (placement && placement.area == CustomizableUI.AREA_PANEL) {
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
if (update) {
|
||||
Zotero_Browser.updateStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Create the combo buttons, which go in the toolbar by default
|
||||
CustomizableUI.createWidget({
|
||||
id: comboButtonsID,
|
||||
type: 'custom',
|
||||
label: 'Zotero',
|
||||
tooltiptext: "Zotero",
|
||||
defaultArea: CustomizableUI.AREA_NAVBAR,
|
||||
onBuild: function (document) {
|
||||
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
var item = document.createElementNS(kNSXUL, "toolbaritem");
|
||||
item.setAttribute("id", comboButtonsID);
|
||||
item.setAttribute("label", "Zotero (Combo)"); // TODO: localize
|
||||
// Set this as an attribute in addition to the property to make sure we can style correctly.
|
||||
item.setAttribute("removable", "true");
|
||||
item.classList.add("chromeclass-toolbar-additional");
|
||||
|
||||
['main', 'save'].map(button => {
|
||||
return {
|
||||
name: button,
|
||||
id: getID(button),
|
||||
tooltiptext: getTooltipText(button),
|
||||
oncommand: getCommand(button)
|
||||
};
|
||||
}).forEach(function(attribs, index) {
|
||||
if (index != 0) {
|
||||
item.appendChild(document.createElementNS(kNSXUL, "separator"));
|
||||
}
|
||||
let button = document.createElementNS(kNSXUL, "toolbarbutton");
|
||||
if (attribs.name == 'save') {
|
||||
button.setAttribute('disabled', 'true');
|
||||
button.setAttribute('type', 'menu-button');
|
||||
let menupopup = document.createElementNS(kNSXUL, "menupopup");
|
||||
menupopup.setAttribute('onpopupshowing', "Zotero_Browser.onStatusPopupShowing(event)");
|
||||
button.appendChild(menupopup);
|
||||
}
|
||||
delete attribs.name;
|
||||
setAttributes(button, attribs);
|
||||
item.appendChild(button);
|
||||
});
|
||||
|
||||
updateItemForArea(item, this.currentArea)
|
||||
|
||||
return item;
|
||||
}
|
||||
});
|
||||
|
||||
// Create the independent Z button, which isn't shown by default
|
||||
CustomizableUI.createWidget({
|
||||
id: getSingleID('main'),
|
||||
label: Zotero.clientName,
|
||||
tooltiptext: getTooltipText('main'),
|
||||
defaultArea: false,
|
||||
onCommand: function (event) {
|
||||
ZoteroOverlay.toggleDisplay();
|
||||
}
|
||||
});
|
||||
|
||||
// Create the independent save button, which isn't shown by default
|
||||
CustomizableUI.createWidget({
|
||||
id: getSingleID('save'),
|
||||
label: Zotero.getString('ingester.saveToZotero'),
|
||||
tooltiptext: getTooltipText('save'),
|
||||
defaultArea: false,
|
||||
onCommand: function (event) {
|
||||
Zotero_Browser.scrapeThisPage(null, event);
|
||||
},
|
||||
onCreated: function (button) {
|
||||
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
button.setAttribute('disabled', 'true');
|
||||
button.setAttribute('type', 'menu-button');
|
||||
let menupopup = document.createElementNS(kNSXUL, "menupopup");
|
||||
menupopup.setAttribute('onpopupshowing', "Zotero_Browser.onStatusPopupShowing(event)");
|
||||
button.appendChild(menupopup);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getID(button) {
|
||||
switch (button) {
|
||||
case 'main':
|
||||
return "zotero-toolbar-main-button";
|
||||
|
||||
case 'save':
|
||||
return "zotero-toolbar-save-button";
|
||||
}
|
||||
}
|
||||
|
||||
function getSingleID(button) {
|
||||
return getID(button) + '-single';
|
||||
}
|
||||
|
||||
function getCommand(button) {
|
||||
switch (button) {
|
||||
case 'main':
|
||||
return "ZoteroOverlay.toggleDisplay()";
|
||||
|
||||
case 'save':
|
||||
return "Zotero_Browser.scrapeThisPage(null, event)";
|
||||
}
|
||||
}
|
||||
|
||||
function getTooltipText(button) {
|
||||
var text;
|
||||
switch (button) {
|
||||
case 'main':
|
||||
if (Zotero && Zotero.initialized) {
|
||||
text = Zotero.clientName;
|
||||
let key = Zotero.Keys.getKeyForCommand('openZotero');
|
||||
if (key) {
|
||||
// Add RLE mark in RTL mode to make shortcut render the right way
|
||||
text += (Zotero.rtl ? ' \u202B' : ' ') + '('
|
||||
+ (Zotero.isMac ? '⇧⌘' : Zotero.getString('general.keys.ctrlShift'))
|
||||
+ key
|
||||
+ ')';
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (Zotero) {
|
||||
text = Zotero.startupError;
|
||||
}
|
||||
|
||||
// Use defaults if necessary
|
||||
if (!text) {
|
||||
// Get the stringbundle manually
|
||||
let src = 'chrome://zotero/locale/zotero.properties';
|
||||
let localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1']
|
||||
.getService(Components.interfaces.nsILocaleService);
|
||||
let appLocale = localeService.getApplicationLocale();
|
||||
let stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||
.getService(Components.interfaces.nsIStringBundleService);
|
||||
let stringBundle = stringBundleService.createBundle(src, appLocale);
|
||||
text = stringBundle.GetStringFromName('startupError');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
text = Zotero.getString('ingester.saveToZotero');
|
||||
break;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set various attributes that allow treeitem and subelements to be styled properly
|
||||
* in the different areas
|
||||
*/
|
||||
function updateItemForArea(item, area) {
|
||||
if (area) {
|
||||
var areaType = CustomizableUI.getAreaType(area);
|
||||
var inPanel = area == CustomizableUI.AREA_PANEL;
|
||||
var classes = inPanel ? "panel-combined-button" : "toolbarbutton-1 toolbarbutton-combined";
|
||||
item.setAttribute("cui-areatype", areaType);
|
||||
item.classList.add("toolbaritem-combined-buttons");
|
||||
if (inPanel) {
|
||||
item.classList.add("panel-wide-item");
|
||||
}
|
||||
var buttons = item.getElementsByTagName('toolbarbutton');
|
||||
for (let i = 0; i < buttons.length; i++) {
|
||||
let button = buttons[i];
|
||||
button.setAttribute("class", classes);
|
||||
button.setAttribute("cui-areatype", areaType);
|
||||
}
|
||||
}
|
||||
// In customization palette pretend it's a single icon
|
||||
else {
|
||||
item.classList.remove("toolbaritem-combined-buttons");
|
||||
item.classList.remove("panel-wide-item");
|
||||
var buttons = item.getElementsByTagName('toolbarbutton');
|
||||
for (let i = 0; i < buttons.length; i++) {
|
||||
let button = buttons[i];
|
||||
button.setAttribute("class", "toolbarbutton-1");
|
||||
button.removeAttribute("cui-areatype");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setAttributes(elem, attrs) {
|
||||
for (let i in attrs) {
|
||||
elem.setAttribute(i, attrs[i]);
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 23920d2cea52e12f2c3caac097266c13757e5acf
|
||||
Subproject commit d2b612f8a6f764cbd66e67238636fac3888a7736
|
|
@ -39,24 +39,6 @@ var ZoteroOverlay = new function()
|
|||
zoteroPane = document.getElementById('zotero-pane-stack');
|
||||
zoteroSplitter = document.getElementById('zotero-splitter');
|
||||
|
||||
// Make Zotero icon visible, if requested
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService)
|
||||
.getBranch('extensions.zotero.');
|
||||
var addonBar = document.getElementById('addon-bar');
|
||||
var iconPref = prefBranch.getIntPref('statusBarIcon');
|
||||
// If this is the first run, add icon to add-on bar if not
|
||||
// in the window already and not hidden by the Zotero prefs
|
||||
if (!document.getElementById("zotero-toolbar-button") && iconPref != 0) {
|
||||
addonBar.insertItem("zotero-toolbar-button");
|
||||
addonBar.setAttribute("currentset", addonBar.currentSet);
|
||||
document.persist(addonBar.id, "currentset");
|
||||
addonBar.setAttribute("collapsed", false);
|
||||
document.persist(addonBar.id, "collapsed");
|
||||
}
|
||||
|
||||
var icon = document.getElementById('zotero-toolbar-button');
|
||||
|
||||
var self = this;
|
||||
|
||||
Zotero.Promise.try(function () {
|
||||
|
@ -104,49 +86,17 @@ var ZoteroOverlay = new function()
|
|||
// Set a flag for hi-res displays
|
||||
Zotero.hiDPI = window.devicePixelRatio > 1;
|
||||
|
||||
// Add a listener for toolbar change events
|
||||
window.addEventListener("customizationchange", onToolbarChange, false);
|
||||
// Clear old Zotero icon pref
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService)
|
||||
.getBranch('extensions.zotero.');
|
||||
prefBranch.clearUserPref('statusBarIcon');
|
||||
|
||||
// Add toolbar icon
|
||||
Services.scriptloader.loadSubScript("chrome://zotero/content/icon.js", {}, "UTF-8");
|
||||
|
||||
// TODO: Add only when progress window is open
|
||||
document.getElementById('appcontent').addEventListener('mousemove', Zotero.ProgressWindowSet.updateTimers, false);
|
||||
if (icon) {
|
||||
// TODO: move to strings
|
||||
let str = 'Zotero';
|
||||
let key = Zotero.Keys.getKeyForCommand('openZotero');
|
||||
if (key) {
|
||||
str += ' ('
|
||||
+ (Zotero.isMac ? '⇧⌘' : Zotero.getString('general.keys.ctrlShift'))
|
||||
+ key
|
||||
+ ')';
|
||||
}
|
||||
icon.setAttribute('tooltiptext', str);
|
||||
|
||||
if (iconPref == 1) {
|
||||
icon.setAttribute('compact', true);
|
||||
}
|
||||
// If hidden in prefs, remove from add-on bar
|
||||
else if (iconPref == 0) {
|
||||
var toolbar = icon.parentNode;
|
||||
if (toolbar.id == 'addon-bar') {
|
||||
var palette = document.getElementById("navigator-toolbox").palette;
|
||||
palette.appendChild(icon);
|
||||
toolbar.setAttribute("currentset", toolbar.currentSet);
|
||||
document.persist(toolbar.id, "currentset");
|
||||
}
|
||||
}
|
||||
|
||||
if (icon.getAttribute("cui-areatype") == "toolbar") {
|
||||
window.setTimeout(function() {
|
||||
var isUpgrade = false;
|
||||
try {
|
||||
isUpgrade = Zotero.Prefs.get("firstRunGuidanceShown.saveIcon");
|
||||
} catch(e) {}
|
||||
var property = "firstRunGuidance.toolbarButton."+(isUpgrade ? "upgrade" : "new");
|
||||
var shortcut = Zotero.getString(Zotero.isMac ? "general.keys.cmdShift" : "general.keys.ctrlShift")+
|
||||
Zotero.Prefs.get("keys.openZotero");
|
||||
document.getElementById("zotero-toolbar-button-guidance").show(null, Zotero.getString(property, shortcut));
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Used for loading pages from upgrade wizard
|
||||
if (Zotero.initialURL) {
|
||||
|
@ -179,52 +129,12 @@ var ZoteroOverlay = new function()
|
|||
})
|
||||
.catch(function (e) {
|
||||
Zotero.debug(e, 1);
|
||||
Components.utils.reportError(e);
|
||||
var errMsg = Zotero ? Zotero.startupError : null;
|
||||
// Use defaults if necessary
|
||||
if (!errMsg) {
|
||||
// Get the stringbundle manually
|
||||
var src = 'chrome://zotero/locale/zotero.properties';
|
||||
var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1']
|
||||
.getService(Components.interfaces.nsILocaleService);
|
||||
var appLocale = localeService.getApplicationLocale();
|
||||
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||
.getService(Components.interfaces.nsIStringBundleService);
|
||||
var stringBundle = stringBundleService.createBundle(src, appLocale);
|
||||
|
||||
errMsg = stringBundle.GetStringFromName('startupError');
|
||||
}
|
||||
icon.setAttribute('tooltiptext', errMsg);
|
||||
icon.setAttribute('error', 'true');
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function onToolbarChange(e) {
|
||||
// e.target seems to be navigator-toolbox in all cases,
|
||||
// so check the addon-bar directly
|
||||
var addonBar = document.getElementById("addon-bar");
|
||||
var icon = document.getElementById("zotero-toolbar-button");
|
||||
if (icon) {
|
||||
// If dragged to add-on bar
|
||||
if (addonBar.getElementsByAttribute("id", "zotero-toolbar-button").length) {
|
||||
var statusBarPref = Zotero.Prefs.get("statusBarIcon");
|
||||
// If pref set to hide, force to full
|
||||
if (statusBarPref == 0) {
|
||||
Zotero.Prefs.set("statusBarIcon", 2)
|
||||
}
|
||||
else if (statusBarPref == 1) {
|
||||
icon.setAttribute("compact", true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
Zotero.Prefs.set("statusBarIcon", 0);
|
||||
}
|
||||
|
||||
|
||||
this.onUnload = function() {
|
||||
window.removeEventListener("customizationchange", onToolbarChange, false);
|
||||
ZoteroPane.destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
-->
|
||||
|
||||
|
||||
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero-platform/content/overlay.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://zotero/content/zoteroPane.xul"?>
|
||||
<?xul-overlay href="chrome://zotero/content/itemPane.xul"?>
|
||||
|
||||
|
@ -42,12 +40,6 @@
|
|||
|
||||
<popup id="contentAreaContextMenu"/>
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
<toolbarbutton id="zotero-toolbar-button" class="toolbarbutton-1"
|
||||
label="Zotero"
|
||||
oncommand="ZoteroOverlay.toggleDisplay();"/>
|
||||
</toolbarpalette>
|
||||
|
||||
<toolbar id="zotero-toolbar" nowindowdrag="true"/>
|
||||
|
||||
<vbox id="appcontent">
|
||||
|
@ -57,7 +49,9 @@
|
|||
|
||||
<stack id="zotero-pane-stack" persist="savedHeight" savedHeight="300" hidden="true"/>
|
||||
|
||||
<zoteroguidancepanel id="zotero-toolbar-button-guidance" about="toolbarButton" for="zotero-toolbar-button" position="bottomcenter topleft" delay="2000" foregroundonly="true" hidden="true"/>
|
||||
<zoteroguidancepanel id="zotero-toolbar-button-guidance" about="toolbarButton" for="zotero-toolbar-main-button"
|
||||
position="bottomcenter topleft" delay="2000" foregroundonly="true"/>
|
||||
<zoteroguidancepanel id="zotero-status-image-guidance" about="saveIcon" for="zotero-toolbar-save-button" x="17"/>
|
||||
|
||||
<!-- Annotation Toolbar -->
|
||||
<toolbar id="zotero-annotate-tb" crop="end" insertbefore="content" hidden="true">
|
||||
|
@ -70,17 +64,6 @@
|
|||
</vbox>
|
||||
|
||||
|
||||
<!-- Scrape Code -->
|
||||
<hbox id="urlbar-icons">
|
||||
<popupset>
|
||||
<menupopup id="zotero-status-image-context" onpopupshowing="Zotero_Browser.onStatusPopupShowing(event)"/>
|
||||
</popupset>
|
||||
<image src="chrome://zotero/skin/treeitem-book.png" id="zotero-status-image"
|
||||
onclick="if(event.button === 0) Zotero_Browser.scrapeThisPage()" context="zotero-status-image-context"
|
||||
position="1" hidden="true"/>
|
||||
<zoteroguidancepanel id="zotero-status-image-guidance" about="saveIcon" for="zotero-status-image" x="8"/>
|
||||
</hbox>
|
||||
|
||||
<menupopup id="menu_ToolsPopup">
|
||||
<menuseparator id="zoteroSeparator" insertbefore="devToolsSeparator"/>
|
||||
<menuitem id="tools-zotero" insertbefore="devToolsSeparator"
|
||||
|
|
|
@ -68,11 +68,6 @@
|
|||
image="chrome://zotero/skin/prefs-styles.png"
|
||||
src="chrome://zotero/content/preferences/preferences_cite.xul"/>
|
||||
|
||||
<prefpane id="zotero-prefpane-keys"
|
||||
label="&zotero.preferences.prefpane.keys;"
|
||||
image="chrome://zotero/skin/prefs-keys.png"
|
||||
src="chrome://zotero/content/preferences/preferences_keys.xul"/>
|
||||
|
||||
<prefpane id="zotero-prefpane-advanced"
|
||||
label="&zotero.preferences.prefpane.advanced;"
|
||||
image="chrome://zotero/skin/prefs-advanced.png"
|
||||
|
|
|
@ -31,6 +31,7 @@ Zotero_Preferences.Advanced = {
|
|||
|
||||
init: function () {
|
||||
Zotero_Preferences.Debug_Output.init();
|
||||
Zotero_Preferences.Keys.init();
|
||||
},
|
||||
|
||||
revealDataDirectory: function () {
|
||||
|
@ -817,3 +818,33 @@ Zotero_Preferences.Debug_Output = {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Zotero_Preferences.Keys = {
|
||||
init: function () {
|
||||
var rows = document.getElementById('zotero-prefpane-advanced-keys-tab').getElementsByTagName('row');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
// Display the appropriate modifier keys for the platform
|
||||
rows[i].firstChild.nextSibling.value = Zotero.isMac ? Zotero.getString('general.keys.cmdShift') : Zotero.getString('general.keys.ctrlShift');
|
||||
}
|
||||
|
||||
var textboxes = document.getElementById('zotero-keys-rows').getElementsByTagName('textbox');
|
||||
for (let i=0; i<textboxes.length; i++) {
|
||||
let textbox = textboxes[i];
|
||||
textbox.value = textbox.value.toUpperCase();
|
||||
// .value takes care of the initial value, and this takes care of direct pref changes
|
||||
// while the window is open
|
||||
textbox.setAttribute('onsyncfrompreference', 'return Zotero_Preferences.Keys.capitalizePref(this.id)');
|
||||
textbox.setAttribute('oninput', 'this.value = this.value.toUpperCase()');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
capitalizePref: function (id) {
|
||||
var elem = document.getElementById(id);
|
||||
var pref = document.getElementById(elem.getAttribute('preference'));
|
||||
if (pref.value) {
|
||||
return pref.value.toUpperCase();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,12 +38,24 @@
|
|||
<preference id="pref-debug-output-enableAfterRestart" name="extensions.zotero.debug.store" type="bool"/>
|
||||
<preference id="pref-openURL-resolver" name="extensions.zotero.openURL.resolver" type="string"/>
|
||||
<preference id="pref-openURL-version" name="extensions.zotero.openURL.version" type="string"/>
|
||||
<preference id="pref-keys-openZotero" name="extensions.zotero.keys.openZotero" type="string"/>
|
||||
<preference id="pref-keys-saveToZotero" name="extensions.zotero.keys.saveToZotero" type="string"/>
|
||||
<preference id="pref-keys-toggleFullscreen" name="extensions.zotero.keys.toggleFullscreen" type="string"/>
|
||||
<preference id="pref-keys-library" name="extensions.zotero.keys.library" type="string"/>
|
||||
<preference id="pref-keys-quicksearch" name="extensions.zotero.keys.quicksearch" type="string"/>
|
||||
<preference id="pref-keys-toggleTagSelector" name="extensions.zotero.keys.toggleTagSelector" type="string"/>
|
||||
<preference id="pref-keys-newItem" name="extensions.zotero.keys.newItem" type="string"/>
|
||||
<preference id="pref-keys-newNote" name="extensions.zotero.keys.newNote" type="string"/>
|
||||
<preference id="pref-keys-importFromClipboard" name="extensions.zotero.keys.importFromClipboard" type="string"/>
|
||||
<preference id="pref-keys-copySelectedItemCitationsToClipboard" name="extensions.zotero.keys.copySelectedItemCitationsToClipboard" type="string"/>
|
||||
<preference id="pref-keys-copySelectedItemsToClipboard" name="extensions.zotero.keys.copySelectedItemsToClipboard" type="string"/>
|
||||
</preferences>
|
||||
|
||||
<tabbox id="zotero-prefpane-advanced-tabs">
|
||||
<tabs>
|
||||
<tab label="&zotero.preferences.prefpane.general;"/>
|
||||
<tab label="&zotero.preferences.advanced.filesAndFolders;"/>
|
||||
<tab label="&zotero.preferences.advanced.keys;"/>
|
||||
</tabs>
|
||||
|
||||
<tabpanels id="zotero-prefpane-advanced-tabpanels">
|
||||
|
@ -194,6 +206,75 @@
|
|||
</hbox>
|
||||
</groupbox>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel id="zotero-prefpane-advanced-keys-tab" orient="vertical">
|
||||
|
||||
<grid id="zotero-keys-grid">
|
||||
<columns>
|
||||
<column flex="1"/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
|
||||
<rows id="zotero-keys-rows">
|
||||
<row id="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.newItem;" control="textbox-newItem"/>
|
||||
<label/>
|
||||
<textbox id="textbox-newItem" maxlength="1" size="1" preference="pref-keys-newItem"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.newNote;" control="textbox-newNote"/>
|
||||
<label/>
|
||||
<textbox id="textbox-newNote" maxlength="1" size="1" preference="pref-keys-newNote"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.importFromClipboard;" control="textbox-importFromClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-importFromClipboard" maxlength="1" size="1" preference="pref-keys-importFromClipboard"/>
|
||||
</row>
|
||||
|
||||
<row id="zotero-keys-focus-libraries-pane">
|
||||
<label value="&zotero.preferences.keys.focusLibrariesPane;" control="textbox-library"/>
|
||||
<label/>
|
||||
<textbox id="textbox-library" maxlength="1" size="1" preference="pref-keys-library"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.quicksearch;" control="textbox-quicksearch"/>
|
||||
<label/>
|
||||
<textbox id="textbox-quicksearch" maxlength="1" size="1" preference="pref-keys-quicksearch"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.copySelectedItemCitationsToClipboard;" control="textbox-copySelectedItemCitationsToClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-copySelectedItemCitationsToClipboard" maxlength="1" size="1"
|
||||
preference="pref-keys-copySelectedItemCitationsToClipboard"
|
||||
onchange="if (Zotero_Preferences.Export) { Zotero_Preferences.Export.updateQuickCopyInstructions(); }"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.copySelectedItemsToClipboard;" control="textbox-copySelectedItemsToClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-copySelectedItemsToClipboard" maxlength="1" size="1"
|
||||
preference="pref-keys-copySelectedItemsToClipboard"
|
||||
onchange="if (Zotero_Preferences.Export) { Zotero_Preferences.Export.updateQuickCopyInstructions(); }"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.toggleTagSelector;" control="textbox-toggleTagSelector"/>
|
||||
<label/>
|
||||
<textbox id="textbox-toggleTagSelector" maxlength="1" size="1" preference="pref-keys-toggleTagSelector"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<label class="statusLine" value="&zotero.preferences.keys.changesTakeEffect;"/>
|
||||
|
||||
<separator/>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
|
|
|
@ -45,6 +45,30 @@
|
|||
insertbefore="zotero-prefpane-advanced-openbuttons"/>
|
||||
</groupbox>
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel id="zotero-prefpane-advanced-keys-tab">
|
||||
<grid id="zotero-keys-grid">
|
||||
<rows id="zotero-keys-rows">
|
||||
<row insertbefore="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.openZotero;" control="key-textbox-openZotero"/>
|
||||
<label/>
|
||||
<textbox id="textbox-openZotero" maxlength="1" size="1" preference="pref-keys-openZotero"/>
|
||||
</row>
|
||||
|
||||
<row insertbefore="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.toggleFullscreen;" control="textbox-toggleFullscreen"/>
|
||||
<label/>
|
||||
<textbox id="textbox-toggleFullscreen" maxlength="1" size="1" preference="pref-keys-toggleFullscreen"/>
|
||||
</row>
|
||||
|
||||
<row insertbefore="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.saveToZotero;" control="key-textbox-saveToZotero"/>
|
||||
<label/>
|
||||
<textbox id="textbox-saveToZotero" maxlength="1" size="1" preference="pref-keys-saveToZotero"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</prefpane>
|
||||
|
|
|
@ -35,32 +35,9 @@ Zotero_Preferences.General = {
|
|||
);
|
||||
}
|
||||
|
||||
// Only show icon options for Firefox <29
|
||||
if (Zotero.platformMajorVersion < 29) {
|
||||
let statusBarRow = document.getElementById('zotero-prefpane-general-statusBarIcon-row');
|
||||
if (statusBarRow) {
|
||||
statusBarRow.hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('noteFontSize').value = Zotero.Prefs.get('note.fontSize');
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets "Status bar icon" to "None" if Zotero is set to load in separate tab
|
||||
*/
|
||||
handleShowInPreferenceChange: function () {
|
||||
var showInSeparateTab = document.getElementById("zotero-prefpane-general-showIn-separateTab");
|
||||
var showInAppTab = document.getElementById("zotero-prefpane-general-showIn-appTab");
|
||||
if(showInAppTab.selected) {
|
||||
document.getElementById('statusBarIcon').selectedItem = document.getElementById('statusBarIcon-none');
|
||||
Zotero.Prefs.set("statusBarIcon", 0);
|
||||
} else {
|
||||
document.getElementById('statusBarIcon').selectedItem = document.getElementById('statusBarIcon-full');
|
||||
Zotero.Prefs.set("statusBarIcon", 2);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
updateTranslators: function () {
|
||||
Zotero.Schema.updateFromRepository(true)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<prefpane id="zotero-prefpane-general">
|
||||
<preferences id="zotero-prefpane-general-preferences">
|
||||
<preference id="pref-showIn" name="extensions.zotero.showIn" type="int"/>
|
||||
<preference id="pref-statusBarIcon" name="extensions.zotero.statusBarIcon" type="int"/>
|
||||
<preference id="pref-launchNonNativeFiles" name="extensions.zotero.launchNonNativeFiles" type="bool"/>
|
||||
<preference id="pref-parseEndNoteMIMETypes"
|
||||
name="extensions.zotero.parseEndNoteMIMETypes"
|
||||
|
@ -42,22 +41,12 @@
|
|||
<hbox align="center">
|
||||
<label value="&zotero.preferences.showIn;" control="showAs"/>
|
||||
</hbox>
|
||||
<radiogroup id="showIn" orient="horizontal" preference="pref-showIn" oncommand="Zotero_Preferences.General.handleShowInPreferenceChange()">
|
||||
<radiogroup id="showIn" orient="horizontal" preference="pref-showIn">
|
||||
<radio id="zotero-prefpane-general-showIn-browserPane" label="&zotero.preferences.showIn.browserPane;" value="1"/>
|
||||
<radio id="zotero-prefpane-general-showIn-separateTab" label="&zotero.preferences.showIn.separateTab;" value="2"/>
|
||||
<radio id="zotero-prefpane-general-showIn-appTab" label="&zotero.preferences.showIn.appTab;" value="3"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row position="2" id="zotero-prefpane-general-statusBarIcon-row" hidden="true">
|
||||
<hbox align="center">
|
||||
<label id="statusBarIcon-label" value="&zotero.preferences.statusBarIcon;" control="statusBarIcon"/>
|
||||
</hbox>
|
||||
<radiogroup id="statusBarIcon" orient="horizontal" preference="pref-statusBarIcon">
|
||||
<radio id="statusBarIcon-full" src="chrome://zotero/skin/zotero_status_bar.png" value="2"/>
|
||||
<radio id="statusBarIcon-compact" src="chrome://zotero/skin/zotero_status_bar_compact.png" value="1"/>
|
||||
<radio id="statusBarIcon-none" label="&zotero.preferences.statusBarIcon.none;" value="0"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2006–2013 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
Zotero_Preferences.Keys = {
|
||||
init: function () {
|
||||
var rows = document.getElementById('zotero-prefpane-keys').getElementsByTagName('row');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
// Display the appropriate modifier keys for the platform
|
||||
rows[i].firstChild.nextSibling.value = Zotero.isMac ? Zotero.getString('general.keys.cmdShift') : Zotero.getString('general.keys.ctrlShift');
|
||||
}
|
||||
|
||||
var textboxes = document.getElementById('zotero-keys-rows').getElementsByTagName('textbox');
|
||||
for (let i=0; i<textboxes.length; i++) {
|
||||
let textbox = textboxes[i];
|
||||
textbox.value = textbox.value.toUpperCase();
|
||||
// .value takes care of the initial value, and this takes care of direct pref changes
|
||||
// while the window is open
|
||||
textbox.setAttribute('onsyncfrompreference', 'return Zotero_Preferences.Keys.capitalizePref(this.id)');
|
||||
textbox.setAttribute('oninput', 'this.value = this.value.toUpperCase()');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
capitalizePref: function (id) {
|
||||
var elem = document.getElementById(id);
|
||||
var pref = document.getElementById(elem.getAttribute('preference'));
|
||||
if (pref.value) {
|
||||
return pref.value.toUpperCase();
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,114 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2006–2013 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
-->
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://zotero/locale/preferences.dtd">
|
||||
|
||||
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<prefpane id="zotero-prefpane-keys"
|
||||
onpaneload="Zotero_Preferences.Keys.init()"
|
||||
helpTopic="shortcut_keys">
|
||||
<preferences>
|
||||
<preference id="pref-keys-openZotero" name="extensions.zotero.keys.openZotero" type="string"/>
|
||||
<preference id="pref-keys-saveToZotero" name="extensions.zotero.keys.saveToZotero" type="string"/>
|
||||
<preference id="pref-keys-toggleFullscreen" name="extensions.zotero.keys.toggleFullscreen" type="string"/>
|
||||
<preference id="pref-keys-library" name="extensions.zotero.keys.library" type="string"/>
|
||||
<preference id="pref-keys-quicksearch" name="extensions.zotero.keys.quicksearch" type="string"/>
|
||||
<preference id="pref-keys-toggleTagSelector" name="extensions.zotero.keys.toggleTagSelector" type="string"/>
|
||||
<preference id="pref-keys-newItem" name="extensions.zotero.keys.newItem" type="string"/>
|
||||
<preference id="pref-keys-newNote" name="extensions.zotero.keys.newNote" type="string"/>
|
||||
<preference id="pref-keys-importFromClipboard" name="extensions.zotero.keys.importFromClipboard" type="string"/>
|
||||
<preference id="pref-keys-copySelectedItemCitationsToClipboard" name="extensions.zotero.keys.copySelectedItemCitationsToClipboard" type="string"/>
|
||||
<preference id="pref-keys-copySelectedItemsToClipboard" name="extensions.zotero.keys.copySelectedItemsToClipboard" type="string"/>
|
||||
</preferences>
|
||||
|
||||
<grid id="zotero-keys-grid">
|
||||
<columns>
|
||||
<column flex="1"/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
|
||||
<rows id="zotero-keys-rows">
|
||||
<row id="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.newItem;" control="textbox-newItem"/>
|
||||
<label/>
|
||||
<textbox id="textbox-newItem" maxlength="1" size="1" preference="pref-keys-newItem"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.newNote;" control="textbox-newNote"/>
|
||||
<label/>
|
||||
<textbox id="textbox-newNote" maxlength="1" size="1" preference="pref-keys-newNote"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.importFromClipboard;" control="textbox-importFromClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-importFromClipboard" maxlength="1" size="1" preference="pref-keys-importFromClipboard"/>
|
||||
</row>
|
||||
|
||||
<row id="zotero-keys-focus-libraries-pane">
|
||||
<label value="&zotero.preferences.keys.focusLibrariesPane;" control="textbox-library"/>
|
||||
<label/>
|
||||
<textbox id="textbox-library" maxlength="1" size="1" preference="pref-keys-library"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.quicksearch;" control="textbox-quicksearch"/>
|
||||
<label/>
|
||||
<textbox id="textbox-quicksearch" maxlength="1" size="1" preference="pref-keys-quicksearch"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.copySelectedItemCitationsToClipboard;" control="textbox-copySelectedItemCitationsToClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-copySelectedItemCitationsToClipboard" maxlength="1" size="1"
|
||||
preference="pref-keys-copySelectedItemCitationsToClipboard"
|
||||
onchange="if (Zotero_Preferences.Export) { Zotero_Preferences.Export.updateQuickCopyInstructions(); }"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.copySelectedItemsToClipboard;" control="textbox-copySelectedItemsToClipboard"/>
|
||||
<label/>
|
||||
<textbox id="textbox-copySelectedItemsToClipboard" maxlength="1" size="1"
|
||||
preference="pref-keys-copySelectedItemsToClipboard"
|
||||
onchange="if (Zotero_Preferences.Export) { Zotero_Preferences.Export.updateQuickCopyInstructions(); }"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="&zotero.preferences.keys.toggleTagSelector;" control="textbox-toggleTagSelector"/>
|
||||
<label/>
|
||||
<textbox id="textbox-toggleTagSelector" maxlength="1" size="1" preference="pref-keys-toggleTagSelector"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<label class="statusLine" value="&zotero.preferences.keys.changesTakeEffect;"/>
|
||||
|
||||
<separator/>
|
||||
</prefpane>
|
||||
|
||||
<script src="preferences_keys.js" type="application/javascript;version=1.8"/>
|
||||
</overlay>
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2006–2013 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
-->
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://zotero/locale/preferences.dtd">
|
||||
|
||||
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<prefpane id="zotero-prefpane-keys">
|
||||
<grid id="zotero-keys-grid">
|
||||
<rows id="zotero-keys-rows">
|
||||
<row position="1">
|
||||
<label value="&zotero.preferences.keys.openZotero;" control="key-textbox-openZotero"/>
|
||||
<label/>
|
||||
<textbox id="textbox-openZotero" maxlength="1" size="1" preference="pref-keys-openZotero"/>
|
||||
</row>
|
||||
|
||||
<row position="2">
|
||||
<label value="&zotero.preferences.keys.toggleFullscreen;" control="textbox-toggleFullscreen"/>
|
||||
<label/>
|
||||
<textbox id="textbox-toggleFullscreen" maxlength="1" size="1" preference="pref-keys-toggleFullscreen"/>
|
||||
</row>
|
||||
|
||||
<row insertbefore="zotero-keys-new-item">
|
||||
<label value="&zotero.preferences.keys.saveToZotero;" control="key-textbox-saveToZotero"/>
|
||||
<label/>
|
||||
<textbox id="textbox-saveToZotero" maxlength="1" size="1" preference="pref-keys-saveToZotero"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</prefpane>
|
||||
</overlay>
|
|
@ -392,13 +392,7 @@ Zotero_Preferences.Search = {
|
|||
|
||||
wbp.progressListener = progressListener;
|
||||
Zotero.debug("Saving " + uri.spec + " to " + fileURL.spec);
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, fileURL);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, fileURL, null);
|
||||
}
|
||||
Zotero.Utilities.Internal.saveURI(wbp, uri, fileURL);
|
||||
},
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ var Zotero_RecognizePDF = new function() {
|
|||
* @return {Promise} A promise resolved when PDF metadata has been retrieved
|
||||
*/
|
||||
this.recognize = function(file, libraryID, stopCheckCallback) {
|
||||
const MAX_PAGES = 7;
|
||||
const MAX_PAGES = 15;
|
||||
var me = this;
|
||||
|
||||
return _extractText(file, MAX_PAGES).then(function(lines) {
|
||||
|
|
209
chrome/content/zotero/tools/csledit.js
Normal file
209
chrome/content/zotero/tools/csledit.js
Normal file
|
@ -0,0 +1,209 @@
|
|||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2009 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
var Zotero_CSL_Editor = new function() {
|
||||
this.init = init;
|
||||
this.handleKeyPress = handleKeyPress;
|
||||
this.loadCSL = loadCSL;
|
||||
this.generateBibliography = generateBibliography;
|
||||
this.refresh = refresh;
|
||||
function init() {
|
||||
var cslList = document.getElementById('zotero-csl-list');
|
||||
if (cslList.getAttribute('initialized') == 'true') {
|
||||
if (currentStyle) {
|
||||
loadCSL(currentStyle);
|
||||
refresh();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var rawDefaultStyle = Zotero.Prefs.get('export.quickCopy.setting');
|
||||
var defaultStyle = Zotero.QuickCopy.stripContentType(rawDefaultStyle);
|
||||
|
||||
var styles = Zotero.Styles.getAll();
|
||||
var currentStyle = null;
|
||||
var listPos = 0;
|
||||
for each(var style in styles) {
|
||||
if (style.source) {
|
||||
continue;
|
||||
}
|
||||
var item = cslList.appendItem(style.title, style.styleID);
|
||||
if (!currentStyle || defaultStyle == ('bibliography=' + style.styleID)) {
|
||||
currentStyle = style.styleID;
|
||||
cslList.selectedIndex = listPos;
|
||||
}
|
||||
listPos += 1;
|
||||
}
|
||||
if (currentStyle) {
|
||||
loadCSL(currentStyle);
|
||||
refresh();
|
||||
}
|
||||
var pageList = document.getElementById('zotero-csl-page-type');
|
||||
var locators = Zotero.Cite.labels;
|
||||
for each(var type in locators) {
|
||||
var locator = type;
|
||||
locator = locator[0].toUpperCase()+locator.substr(1);
|
||||
pageList.appendItem(locator, type);
|
||||
}
|
||||
|
||||
pageList.selectedIndex = 0;
|
||||
cslList.setAttribute('initialized', true);
|
||||
}
|
||||
function refresh() {
|
||||
var editor = document.getElementById('zotero-csl-editor');
|
||||
generateBibliography(editor.value);
|
||||
|
||||
}
|
||||
this.save = function() {
|
||||
var editor = document.getElementById('zotero-csl-editor');
|
||||
var style = editor.value;
|
||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
||||
.createInstance(nsIFilePicker);
|
||||
fp.init(window, Zotero.getString('styles.editor.save'), nsIFilePicker.modeSave);
|
||||
fp.appendFilter("Citation Style Language", "*.csl");
|
||||
//get the filename from the id; we could consider doing even more here like creating the id from filename.
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(style, 'text/xml');
|
||||
var filename = doc.getElementsByTagName("id");
|
||||
if (filename) {
|
||||
filename = filename[0].textContent;
|
||||
fp.defaultString = filename.replace(/.+\//, "") + ".csl";
|
||||
}
|
||||
else {
|
||||
fp.defaultString = "untitled.csl";
|
||||
}
|
||||
var rv = fp.show();
|
||||
if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
|
||||
var outputFile = fp.file;
|
||||
Zotero.File.putContents(outputFile, style);
|
||||
}
|
||||
};
|
||||
|
||||
function handleKeyPress(event) {
|
||||
if (event.keyCode == 9 &&
|
||||
(!event.shiftKey && !event.metaKey && !event.altKey && !event.ctrlKey)) {
|
||||
_insertText("\t");
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadCSL(cslID) {
|
||||
var editor = document.getElementById('zotero-csl-editor');
|
||||
var style = Zotero.Styles.get(cslID);
|
||||
editor.value = Zotero.File.getContents(style.file);
|
||||
editor.cslID = cslID;
|
||||
editor.doCommand();
|
||||
document.getElementById('zotero-csl-list').value = cslID;
|
||||
}
|
||||
|
||||
|
||||
function generateBibliography(str) {
|
||||
var editor = document.getElementById('zotero-csl-editor')
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length == 0) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">' + Zotero.getString('styles.editor.warning.noItems') + '</p></body></html>';
|
||||
return;
|
||||
}
|
||||
var styleObject, styleEngine;
|
||||
try {
|
||||
styleObject = new Zotero.Style(str);
|
||||
styleEngine = styleObject.getCiteProc();
|
||||
} catch(e) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<div>' + Zotero.getString('styles.editor.warning.parseError') + '</div><div>'+e+'</div>';
|
||||
throw e;
|
||||
}
|
||||
|
||||
var itemIds = [items[i].id for (i in items)];
|
||||
|
||||
styleEngine.updateItems(itemIds);
|
||||
|
||||
// Generate multiple citations
|
||||
var citation = {};
|
||||
citation.citationItems = [];
|
||||
citation.properties = {};
|
||||
citation.properties.noteIndex = 1;
|
||||
for (var i = 0, ilen = items.length; i < ilen; i += 1) {
|
||||
citation.citationItems.push({id:itemIds[i]});
|
||||
}
|
||||
|
||||
// Generate single citations
|
||||
var author = document.getElementById("preview-suppress-author").checked;
|
||||
var search = document.getElementById('preview-pages');
|
||||
var loc = document.getElementById('zotero-csl-page-type');
|
||||
var pos = document.getElementById('zotero-ref-position').selectedItem.value;
|
||||
var citations = '<h3>' + Zotero.getString('styles.editor.output.individualCitations') + '</h3>';
|
||||
for (var i=0; i<citation.citationItems.length; i++) {
|
||||
citation.citationItems[i]['suppress-author'] = author;
|
||||
if (search.value !== '') {
|
||||
citation.citationItems[i].locator = search.value;
|
||||
citation.citationItems[i].label = loc.selectedItem.value;
|
||||
}
|
||||
if (pos == 4) {
|
||||
//near note is a subsequent citation with near note set to true;
|
||||
citation.citationItems[i].position = 1;
|
||||
citation.citationItems[i]["near-note"] = true;
|
||||
}
|
||||
else {
|
||||
citation.citationItems[i].position = parseInt(pos, 10);
|
||||
}
|
||||
var subcitation = [citation.citationItems[i]];
|
||||
citations += styleEngine.makeCitationCluster(subcitation) + '<br />';
|
||||
}
|
||||
|
||||
try {
|
||||
var multCitations = '<hr><h3>' + Zotero.getString('styles.editor.output.singleCitation') + '</h3>' +
|
||||
styleEngine.previewCitationCluster(citation, [], [], "html");
|
||||
|
||||
// Generate bibliography
|
||||
styleEngine.updateItems(itemIds);
|
||||
var bibliography = '<hr/><h3>' + Zotero.getString('styles.bibliography') + '</h3>' +
|
||||
Zotero.Cite.makeFormattedBibliography(styleEngine, "html");
|
||||
|
||||
iframe.contentDocument.documentElement.innerHTML =
|
||||
'<div>' + citations + multCitations + bibliography + '</div>';
|
||||
} catch(e) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<div>' + Zotero.getString('styles.editor.warning.renderError') + '</div><div>'+e+'</div>';
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// From http://kb.mozillazine.org/Inserting_text_at_cursor
|
||||
function _insertText(text) {
|
||||
var command = "cmd_insertText";
|
||||
var controller = document.commandDispatcher.getControllerForCommand(command);
|
||||
if (controller && controller.isCommandEnabled(command)) {
|
||||
controller = controller.QueryInterface(Components.interfaces.nsICommandController);
|
||||
var params = Components.classes["@mozilla.org/embedcomp/command-params;1"];
|
||||
params = params.createInstance(Components.interfaces.nsICommandParams);
|
||||
params.setStringValue("state_data", "\t");
|
||||
controller.doCommandWithParams(command, params);
|
||||
}
|
||||
}
|
||||
}();
|
|
@ -26,241 +26,47 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/global.css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % csleditDTD SYSTEM "chrome://zotero/locale/csledit.dtd"> %csleditDTD;
|
||||
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
|
||||
]>
|
||||
|
||||
<window
|
||||
id="csl-edit"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="Zotero_CSL_Editor.init();"
|
||||
title="Zotero Reference Test pane">
|
||||
title="&styles.editor;">
|
||||
|
||||
<script src="chrome://zotero/content/include.js"/>
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
var Zotero_CSL_Editor = new function() {
|
||||
this.init = init;
|
||||
this.handleKeyPress = handleKeyPress;
|
||||
this.loadCSL = loadCSL;
|
||||
this.generateBibliography = generateBibliography;
|
||||
this.refresh = refresh;
|
||||
function init() {
|
||||
var cslList = document.getElementById('zotero-csl-list');
|
||||
if (cslList.getAttribute('initialized') == 'true') {
|
||||
if (currentStyle) {
|
||||
loadCSL(currentStyle);
|
||||
refresh();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var rawDefaultStyle = Zotero.Prefs.get('export.quickCopy.setting');
|
||||
var defaultStyle = Zotero.QuickCopy.stripContentType(rawDefaultStyle);
|
||||
|
||||
var styles = Zotero.Styles.getAll();
|
||||
var currentStyle = null;
|
||||
var listPos = 0;
|
||||
for each(var style in styles) {
|
||||
if (style.source) {
|
||||
continue;
|
||||
}
|
||||
var item = cslList.appendItem(style.title, style.styleID);
|
||||
if (!currentStyle || defaultStyle == ('bibliography=' + style.styleID)) {
|
||||
currentStyle = style.styleID;
|
||||
cslList.selectedIndex = listPos;
|
||||
}
|
||||
listPos += 1;
|
||||
}
|
||||
if (currentStyle) {
|
||||
loadCSL(currentStyle);
|
||||
refresh();
|
||||
}
|
||||
var pageList = document.getElementById('zotero-csl-page-type');
|
||||
var locators = Zotero.Cite.labels;
|
||||
for each(var type in locators) {
|
||||
var locator = type;
|
||||
locator = locator[0].toUpperCase()+locator.substr(1);
|
||||
pageList.appendItem(locator, type);
|
||||
}
|
||||
|
||||
pageList.selectedIndex = 0;
|
||||
cslList.setAttribute('initialized', true)
|
||||
}
|
||||
function refresh() {
|
||||
var editor = document.getElementById('zotero-csl-editor')
|
||||
generateBibliography(editor.value);
|
||||
|
||||
}
|
||||
this.save = function() {
|
||||
var editor = document.getElementById('zotero-csl-editor')
|
||||
var style = editor.value;
|
||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
||||
.createInstance(nsIFilePicker);
|
||||
fp.init(window, "Save Citation Style", nsIFilePicker.modeSave);
|
||||
fp.appendFilter("Citation Style Language", "*.csl");
|
||||
//get the filename from the id; we could consider doing even more here like creating the id from filename.
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(style, 'text/xml');
|
||||
var filename = doc.getElementsByTagName("id");
|
||||
if (filename) {
|
||||
filename = filename[0].textContent;
|
||||
fp.defaultString = filename.replace(/.+\//, "") + ".csl";
|
||||
}
|
||||
else {
|
||||
fp.defaultString = "untitled.csl";
|
||||
}
|
||||
var rv = fp.show();
|
||||
if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
|
||||
var outputFile = fp.file;
|
||||
Zotero.File.putContents(outputFile, style);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyPress(event) {
|
||||
if (event.keyCode == 9 &&
|
||||
(!event.shiftKey && !event.metaKey && !event.altKey && !event.ctrlKey)) {
|
||||
_insertText("\t");
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadCSL(cslID) {
|
||||
var editor = document.getElementById('zotero-csl-editor')
|
||||
var style = Zotero.Styles.get(cslID);
|
||||
editor.value = Zotero.File.getContents(style.file);
|
||||
editor.cslID = cslID;
|
||||
editor.doCommand();
|
||||
document.getElementById('zotero-csl-list').value = cslID;
|
||||
}
|
||||
|
||||
|
||||
function generateBibliography(str) {
|
||||
var editor = document.getElementById('zotero-csl-editor')
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length == 0) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">No references selected in Zotero.</p></body></html>';
|
||||
return;
|
||||
}
|
||||
var styleObject, styleEngine;
|
||||
if (str.indexOf("<defaults") != -1) {
|
||||
iframe.contentDocument.documentElement.innerHTML =
|
||||
'<div>'
|
||||
+ "Old-style CSLs are no longer supported."
|
||||
+ '</div>';
|
||||
return;
|
||||
}
|
||||
else {
|
||||
try {
|
||||
styleObject = new Zotero.Style(str);
|
||||
styleEngine = styleObject.getCiteProc();
|
||||
} catch(e) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<div>Error parsing '+
|
||||
'style: </div><div>'+e+'</div>';
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
var itemIds = [items[i].id for (i in items)];
|
||||
|
||||
styleEngine.updateItems(itemIds);
|
||||
|
||||
// Generate multiple citations
|
||||
var citation = {};
|
||||
citation.citationItems = [];
|
||||
citation.properties = {};
|
||||
citation.properties.noteIndex = 1;
|
||||
for (var i = 0, ilen = items.length; i < ilen; i += 1) {
|
||||
citation.citationItems.push({id:itemIds[i]});
|
||||
}
|
||||
|
||||
// Generate single citations
|
||||
var author = document.getElementById("preview-suppress-author").checked;
|
||||
var search = document.getElementById('preview-pages');
|
||||
var loc = document.getElementById('zotero-csl-page-type');
|
||||
var pos = document.getElementById('zotero-ref-position').selectedItem.value;
|
||||
var citations = '<h1>Single Citations</h1>';
|
||||
for (var i=0; i<citation.citationItems.length; i++) {
|
||||
citation.citationItems[i]['suppress-author'] = author;
|
||||
if (search.value != '') {
|
||||
citation.citationItems[i].locator = search.value;
|
||||
citation.citationItems[i].label = loc.selectedItem.value;
|
||||
}
|
||||
if (pos == 4) {
|
||||
//near note is a subsequent citation with near note set to true;
|
||||
citation.citationItems[i].position = 1;
|
||||
citation.citationItems[i]["near-note"] = true;
|
||||
}
|
||||
else {
|
||||
citation.citationItems[i].position = parseInt(pos, 10);
|
||||
}
|
||||
var subcitation = [citation.citationItems[i]];
|
||||
citations += styleEngine.makeCitationCluster(subcitation) + '<br />';
|
||||
}
|
||||
|
||||
try {
|
||||
var multCitations = '<hr><h1>Multi Citations <span style="font-size:smaller;">(all with position "first")</span></h1>' +
|
||||
styleEngine.previewCitationCluster(citation, [], [], "html");
|
||||
|
||||
// Generate bibliography
|
||||
styleEngine.updateItems(itemIds);
|
||||
var bibliography = '<hr/><h1>Bibliography</h1>' +
|
||||
Zotero.Cite.makeFormattedBibliography(styleEngine, "html");
|
||||
|
||||
iframe.contentDocument.documentElement.innerHTML =
|
||||
'<div style="white-space: pre-wrap">'
|
||||
+ citations + multCitations + bibliography
|
||||
+ '</div>';
|
||||
} catch(e) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<div>Error generating citations '+
|
||||
'and bibliography: </div><div>'+e+'</div>';
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// From http://kb.mozillazine.org/Inserting_text_at_cursor
|
||||
function _insertText(text) {
|
||||
var command = "cmd_insertText";
|
||||
var controller = document.commandDispatcher.getControllerForCommand(command);
|
||||
if (controller && controller.isCommandEnabled(command)) {
|
||||
controller = controller.QueryInterface(Components.interfaces.nsICommandController);
|
||||
var params = Components.classes["@mozilla.org/embedcomp/command-params;1"];
|
||||
params = params.createInstance(Components.interfaces.nsICommandParams);
|
||||
params.setStringValue("state_data", "\t");
|
||||
controller.doCommandWithParams(command, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
<script src="csledit.js"/>
|
||||
|
||||
<vbox flex="1">
|
||||
<hbox align="center">
|
||||
<button id="preview-refresh-button" label="Refresh" oncommand="Zotero_CSL_Editor.refresh()"/>
|
||||
<button id="zotero-csl-save" label="Save" oncommand="Zotero_CSL_Editor.save()"/>
|
||||
<menulist id="zotero-csl-page-type" style="min-height: 1.6em; min-width: 50px" oncommand="Zotero_CSL_Editor.refresh()" />
|
||||
<label value=":" />
|
||||
<textbox size="5" id="preview-pages" type="timed" timeout="250" oncommand="Zotero_CSL_Editor.refresh()"/>
|
||||
<checkbox oncommand="Zotero_CSL_Editor.refresh()" id="preview-suppress-author" label="Suppress author" />
|
||||
<label value="Citation is:" />
|
||||
<menulist id="zotero-ref-position" oncommand="Zotero_CSL_Editor.refresh()">
|
||||
<menupopup>
|
||||
<menuitem label="First" value="0"/>
|
||||
<menuitem label="Subsequent" value="1"/>
|
||||
<menuitem label="Ibid" value="2"/>
|
||||
<menuitem label="Ibid+Locator" value="3"/>
|
||||
<menuitem label="Near Note" value="4"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<menulist id="zotero-csl-list" style="min-height: 1.6em; min-width: 100px" initialized="false" flex="1" oncommand="Zotero_CSL_Editor.loadCSL(this.selectedItem.value)"/>
|
||||
<button id="preview-refresh-button" label="&zotero.general.refresh;" oncommand="Zotero_CSL_Editor.refresh()"/>
|
||||
<button id="zotero-csl-save" label="&zotero.general.saveAs;" oncommand="Zotero_CSL_Editor.save()"/>
|
||||
<menulist id="zotero-csl-page-type" style="min-height: 1.6em; min-width: 50px" oncommand="Zotero_CSL_Editor.refresh()" />
|
||||
<label value=":" />
|
||||
<textbox size="5" id="preview-pages" type="timed" timeout="250" oncommand="Zotero_CSL_Editor.refresh()"/>
|
||||
<checkbox oncommand="Zotero_CSL_Editor.refresh()" id="preview-suppress-author" label="&styles.editor.suppressAuthor;" />
|
||||
<label value="&styles.editor.citePosition;" />
|
||||
<menulist id="zotero-ref-position" oncommand="Zotero_CSL_Editor.refresh()">
|
||||
<menupopup>
|
||||
<menuitem label="first" value="0"/>
|
||||
<menuitem label="subsequent" value="1"/>
|
||||
<menuitem label="ibid" value="2"/>
|
||||
<menuitem label="ibid-with-locator" value="3"/>
|
||||
<menuitem label="near-note" value="4"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<menulist id="zotero-csl-list" style="min-height: 1.6em; min-width: 100px" initialized="false" flex="1" oncommand="Zotero_CSL_Editor.loadCSL(this.selectedItem.value)"/>
|
||||
</hbox>
|
||||
<textbox id="zotero-csl-editor" type="timed" timeout="250" multiline="true"
|
||||
flex="1"
|
||||
onkeypress="Zotero_CSL_Editor.handleKeyPress(event)"
|
||||
oncommand="document.getElementById('zotero-csl-list').selectedIndex = -1; Zotero_CSL_Editor.generateBibliography(this.value)"/>
|
||||
<splitter/>
|
||||
<splitter id="csledit-splitter" collapse="before" persist="state">
|
||||
<grippy/>
|
||||
</splitter>
|
||||
<iframe id="zotero-csl-preview-box" flex="1" style="padding: 0 1em;background:white" overflow="auto" type="content"/>
|
||||
</vbox>
|
||||
|
||||
|
|
107
chrome/content/zotero/tools/cslpreview.js
Normal file
107
chrome/content/zotero/tools/cslpreview.js
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
|
||||
Copyright © 2009 Center for History and New Media
|
||||
George Mason University, Fairfax, Virginia, USA
|
||||
http://zotero.org
|
||||
|
||||
This file is part of Zotero.
|
||||
|
||||
Zotero is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Zotero is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
Contributed by Julian Onions
|
||||
*/
|
||||
|
||||
var Zotero_CSL_Preview = new function() {
|
||||
this.init = init;
|
||||
this.refresh = refresh;
|
||||
this.generateBibliography = generateBibliography;
|
||||
|
||||
function init() {
|
||||
//refresh();
|
||||
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p>' + Zotero.getString('styles.preview.instructions') + '</p></body></html>';
|
||||
}
|
||||
function refresh() {
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length === 0) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">' + Zotero.getString('styles.editor.warning.noItems') + '</p></body></html>';
|
||||
return;
|
||||
}
|
||||
var progressWin = new Zotero.ProgressWindow();
|
||||
// XXX needs its own string really!
|
||||
progressWin.changeHeadline(Zotero.getString("pane.items.menu.createBib.multiple"));
|
||||
var icon = 'chrome://zotero/skin/treeitem-attachment-file.png';
|
||||
progressWin.addLines(document.title, icon);
|
||||
progressWin.show();
|
||||
progressWin.startCloseTimer();
|
||||
var f = function() {
|
||||
var styles = Zotero.Styles.getAll();
|
||||
// XXX needs its own string really for the title!
|
||||
var str = '<html><head><title></title></head><body>';
|
||||
for each(var style in styles) {
|
||||
if (style.source) {
|
||||
continue;
|
||||
}
|
||||
Zotero.debug("Generate Bib for " + style.title);
|
||||
var cite = generateBibliography(style);
|
||||
if (cite) {
|
||||
str += '<h3>' + style.title + '</h3>';
|
||||
str += cite;
|
||||
str += '<hr>';
|
||||
}
|
||||
}
|
||||
|
||||
str += '</body></html>';
|
||||
iframe.contentDocument.documentElement.innerHTML = str;
|
||||
};
|
||||
// Give progress window time to appear
|
||||
setTimeout(f, 100);
|
||||
}
|
||||
|
||||
function generateBibliography(style) {
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var citationFormat = document.getElementById("citation-format").selectedItem.value;
|
||||
if (citationFormat != "all" && citationFormat != style.categories) {
|
||||
Zotero.debug("CSL IGNORE: citation format is " + style.categories);
|
||||
return '';
|
||||
}
|
||||
var styleEngine = style.getCiteProc();
|
||||
|
||||
// Generate multiple citations
|
||||
var citations = styleEngine.previewCitationCluster(
|
||||
{"citationItems":[{"id":item.id} for each(item in items)], "properties":{}},
|
||||
[], [], "html");
|
||||
|
||||
// Generate bibliography
|
||||
var bibliography = '';
|
||||
if(style.hasBibliography) {
|
||||
styleEngine.updateItems([item.id for each(item in items)]);
|
||||
bibliography = Zotero.Cite.makeFormattedBibliography(styleEngine, "html");
|
||||
}
|
||||
|
||||
return '<p>' + citations + '</p>' + bibliography;
|
||||
}
|
||||
|
||||
|
||||
}();
|
|
@ -27,120 +27,37 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/global.css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % cslpreviewDTD SYSTEM "chrome://zotero/locale/cslpreview.dtd"> %cslpreviewDTD;
|
||||
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
|
||||
]>
|
||||
|
||||
<window
|
||||
id="csl-preview"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="Zotero_CSL_Preview.init();"
|
||||
title="Zotero Preview pane">
|
||||
title="&styles.preview;">
|
||||
|
||||
<script src="chrome://zotero/content/include.js"/>
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
var Zotero_CSL_Preview = new function() {
|
||||
this.init = init;
|
||||
this.refresh = refresh;
|
||||
this.generateBibliography = generateBibliography;
|
||||
<script src="cslpreview.js"/>
|
||||
|
||||
function init() {
|
||||
//refresh();
|
||||
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p>Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.</p></body></html>';
|
||||
}
|
||||
function refresh() {
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length === 0) {
|
||||
iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">No items selected in Zotero.</p></body></html>';
|
||||
return;
|
||||
}
|
||||
var progressWin = new Zotero.ProgressWindow();
|
||||
// XXX needs its own string really!
|
||||
progressWin.changeHeadline(Zotero.getString("pane.items.menu.createBib.multiple"));
|
||||
var icon = 'chrome://zotero/skin/treeitem-attachment-file.png';
|
||||
progressWin.addLines(document.title, icon);
|
||||
progressWin.show();
|
||||
progressWin.startCloseTimer();
|
||||
var f = function() {
|
||||
var styles = Zotero.Styles.getAll();
|
||||
// XXX needs its own string really for the title!
|
||||
var str = '<html><head><title></title></head><body>';
|
||||
for each(var style in styles) {
|
||||
if (style.source) {
|
||||
continue;
|
||||
}
|
||||
Zotero.debug("Generate Bib for " + style.title);
|
||||
var cite = generateBibliography(style);
|
||||
if (cite) {
|
||||
str += '<h3>' + style.title + '</h3>';
|
||||
str += cite;
|
||||
str += '<hr>';
|
||||
}
|
||||
}
|
||||
|
||||
str += '</body></html>';
|
||||
iframe.contentDocument.documentElement.innerHTML = str;
|
||||
};
|
||||
// Give progress window time to appear
|
||||
setTimeout(f, 100);
|
||||
}
|
||||
|
||||
function generateBibliography(style) {
|
||||
var iframe = document.getElementById('zotero-csl-preview-box');
|
||||
|
||||
var items = Zotero.getActiveZoteroPane().getSelectedItems();
|
||||
if (items.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var citationFormat = document.getElementById("citation-format").selectedItem.value;
|
||||
if (citationFormat != "all" && citationFormat != style.categories) {
|
||||
Zotero.debug("CSL IGNORE: citation format is " + style.categories);
|
||||
return '';
|
||||
}
|
||||
var styleEngine = style.getCiteProc();
|
||||
|
||||
// Generate multiple citations
|
||||
var citations = styleEngine.previewCitationCluster(
|
||||
{"citationItems":[{"id":item.id} for each(item in items)], "properties":{}},
|
||||
[], [], "html");
|
||||
|
||||
// Generate bibliography
|
||||
var bibliography = '';
|
||||
if(style.hasBibliography) {
|
||||
styleEngine.updateItems([item.id for each(item in items)]);
|
||||
bibliography = Zotero.Cite.makeFormattedBibliography(styleEngine, "html");
|
||||
}
|
||||
|
||||
return '<p>' + citations + '</p>' + bibliography;
|
||||
}
|
||||
|
||||
|
||||
}();
|
||||
]]>
|
||||
</script>
|
||||
<!-- NEEDS LOCALISING -->
|
||||
<vbox flex="1">
|
||||
<hbox >
|
||||
<hbox align="center">
|
||||
<button id="preview-refresh-button" label="Refresh" oncommand="Zotero_CSL_Preview.refresh()"/>
|
||||
<groupbox orient="horizontal" align="center">
|
||||
<label value="Citation format:" />
|
||||
<menulist id="citation-format" oncommand="Zotero_CSL_Preview.refresh()">
|
||||
<menupopup>
|
||||
<menuitem label="all" value="all"/>
|
||||
<menuitem label="author" value="author"/>
|
||||
<menuitem label="author-date" value="author-date"/>
|
||||
<menuitem label="label" value="label"/>
|
||||
<menuitem label="note" value="note"/>
|
||||
<menuitem label="numeric" value="numeric"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</groupbox>
|
||||
<button id="preview-refresh-button" label="&zotero.general.refresh;" oncommand="Zotero_CSL_Preview.refresh()"/>
|
||||
|
||||
<label value="&styles.preview.citationFormat;" />
|
||||
<menulist id="citation-format" oncommand="Zotero_CSL_Preview.refresh()">
|
||||
<menupopup>
|
||||
<menuitem value="all" label="&styles.preview.citationFormat.all;"/>
|
||||
<menuitem value="author" label="&styles.preview.citationFormat.author;"/>
|
||||
<menuitem value="author-date" label="&styles.preview.citationFormat.authorDate;"/>
|
||||
<menuitem value="label" label="&styles.preview.citationFormat.label;"/>
|
||||
<menuitem value="note" label="&styles.preview.citationFormat.note;"/>
|
||||
<menuitem value="numeric" label="&styles.preview.citationFormat.numeric;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<iframe id="zotero-csl-preview-box" flex="1" style="padding: 0 1em; background:white;" overflow="auto" type="content"/>
|
||||
<iframe id="zotero-csl-preview-box" flex="1" style="padding: 0 1em; background:white;" overflow="auto" type="content"/>
|
||||
</vbox>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -196,6 +196,8 @@ Zotero_TranslatorTester = function(translator, type, debugCallback) {
|
|||
}
|
||||
};
|
||||
|
||||
Zotero_TranslatorTester.DEFER_DELAY = 30000; // Delay for deferred tests
|
||||
|
||||
/**
|
||||
* Removes document objects, which contain cyclic references, and other fields to be ignored from items
|
||||
* @param {Object} Item, in the format returned by Zotero.Item.serialize()
|
||||
|
@ -258,7 +260,9 @@ Zotero_TranslatorTester._sanitizeItem = function(item, testItem, keepValidFields
|
|||
if(!keepValidFields && "accessDate" in item) delete item.accessDate;
|
||||
|
||||
//sort tags, if they're still there
|
||||
if(item.tags && typeof item.tags === "object" && "sort" in item.tags) item.tags.sort();
|
||||
if(item.tags && typeof item.tags === "object" && "sort" in item.tags) {
|
||||
item.tags = Zotero.Utilities.arrayUnique(item.tags).sort();
|
||||
}
|
||||
|
||||
return item;
|
||||
};
|
||||
|
@ -318,7 +322,7 @@ Zotero_TranslatorTester.prototype._runTestsRecursively = function(testDoneCallba
|
|||
var testNumber = this.tests.length-this.pending.length;
|
||||
var me = this;
|
||||
|
||||
this._debug(this, "\nTranslatorTester: Running "+this.translator.label+" Test "+testNumber);
|
||||
this._debug(this, "TranslatorTester: Running "+this.translator.label+" Test "+testNumber);
|
||||
|
||||
var executedCallback = false;
|
||||
var callback = function(obj, test, status, message) {
|
||||
|
@ -375,7 +379,14 @@ Zotero_TranslatorTester.prototype.fetchPageAndRunTest = function(test, testDoneC
|
|||
var hiddenBrowser = Zotero.HTTP.processDocuments(test.url,
|
||||
function(doc) {
|
||||
if(test.defer) {
|
||||
Zotero.setTimeout(function() { runTest(doc) }, 30000, true);
|
||||
me._debug(this, "TranslatorTesting: Waiting "
|
||||
+ (Zotero_TranslatorTester.DEFER_DELAY/1000)
|
||||
+ " second(s) for page content to settle"
|
||||
);
|
||||
Zotero.setTimeout(
|
||||
function() {runTest(hiddenBrowser.contentDocument) },
|
||||
Zotero_TranslatorTester.DEFER_DELAY, true
|
||||
);
|
||||
} else {
|
||||
runTest(doc);
|
||||
}
|
||||
|
@ -386,6 +397,8 @@ Zotero_TranslatorTester.prototype.fetchPageAndRunTest = function(test, testDoneC
|
|||
},
|
||||
true
|
||||
);
|
||||
|
||||
hiddenBrowser.docShell.allowMetaRedirects = true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -310,8 +310,10 @@ var wpdCommon = {
|
|||
},
|
||||
|
||||
// add a line to the error list (displays a maximum of 15 errors)
|
||||
addError: function (aError) {
|
||||
Zotero.debug('ERROR: ' + aError);
|
||||
addError: function (errorMsg, errorObj) {
|
||||
if (errorMsg) Zotero.debug(errorMsg);
|
||||
if (errorObj) Zotero.debug(errorObj);
|
||||
/*
|
||||
if (this.errCount < WPD_MAXUIERRORCOUNT) {
|
||||
if (this.errList.indexOf(aError) > -1) return; // is the same
|
||||
this.errList = this.errList + aError + "\n";
|
||||
|
@ -319,6 +321,7 @@ var wpdCommon = {
|
|||
this.errList = this.errList + '...';
|
||||
}
|
||||
this.errCount++;
|
||||
*/
|
||||
},
|
||||
|
||||
saveWebPage: function (aDestFile) {
|
||||
|
@ -505,7 +508,7 @@ var wpdCommon = {
|
|||
var aBaseURLObj = this.convertURLToObject(aBaseURL);
|
||||
return aBaseURLObj.resolve(aRelURL);
|
||||
} catch (ex) {
|
||||
this.addError("[wpdCommon.resolveURL]:\n -> aBaseURL: " + aBaseURL + "\n -> aRelURL: " + aRelURL + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.resolveURL]:\n -> aBaseURL: " + aBaseURL + "\n -> aRelURL: " + aRelURL, ex);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
@ -516,7 +519,7 @@ var wpdCommon = {
|
|||
aURLObj.spec = aURL
|
||||
return aURLObj.asciiHost;
|
||||
} catch (ex) {
|
||||
this.addError("[wpdCommon.getHostName]:\n -> aURL: " + aURL + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.getHostName]:\n -> aURL: " + aURL, ex);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
@ -527,7 +530,7 @@ var wpdCommon = {
|
|||
aURLObj.spec = aURL
|
||||
return aURLObj.asciiSpec;
|
||||
} catch (ex) {
|
||||
this.addError("[wpdCommon.getHostName]:\n -> aURL: " + aURL + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.getHostName]:\n -> aURL: " + aURL, ex);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
@ -577,7 +580,7 @@ var wpdCommon = {
|
|||
if (text) output = output.split(/\n/g);
|
||||
return output;
|
||||
} catch (ex) {
|
||||
this.addError("[wpdCommon.readFile]:\n -> str_Filename: " + str_Filename + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.readFile]:\n -> str_Filename: " + str_Filename, ex);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
@ -621,7 +624,7 @@ var wpdCommon = {
|
|||
obj_Transport.close();
|
||||
return true;
|
||||
} catch (ex) {
|
||||
this.addError("[wpdCommon.writeFile]:\n -> str_Filename: " + str_Filename + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.writeFile]:\n -> str_Filename: " + str_Filename, ex);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -651,10 +654,13 @@ var wpdCommon = {
|
|||
if (MODE_SIMULATE) return true;
|
||||
try {
|
||||
//new obj_URI object
|
||||
var obj_URI = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI(aSourceURL, null, null);
|
||||
var obj_URI = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(aSourceURL, null, null);
|
||||
|
||||
//new file object
|
||||
var obj_TargetFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||
var obj_TargetFile = Components.classes["@mozilla.org/file/local;1"]
|
||||
.createInstance(Components.interfaces.nsILocalFile);
|
||||
//set file with path
|
||||
// NOTE: This function has a known bug on the macintosh and other OSes
|
||||
// which do not represent file locations as paths. If you do use this
|
||||
|
@ -662,29 +668,25 @@ var wpdCommon = {
|
|||
obj_TargetFile.initWithPath(aTargetFilename);
|
||||
|
||||
//new persistence object
|
||||
var obj_Persist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Components.interfaces.nsIWebBrowserPersist);
|
||||
var obj_Persist = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
|
||||
.createInstance(Components.interfaces.nsIWebBrowserPersist);
|
||||
|
||||
// set flags
|
||||
const nsIWBP = Components.interfaces.nsIWebBrowserPersist;
|
||||
var flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES | nsIWBP.PERSIST_FLAGS_FROM_CACHE;
|
||||
var flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES
|
||||
| nsIWBP.PERSIST_FLAGS_FROM_CACHE;
|
||||
//nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
|
||||
obj_Persist.persistFlags = flags;
|
||||
|
||||
// has the url the same filetype like the file extension?
|
||||
//save file to target
|
||||
try {
|
||||
obj_Persist.saveURI(obj_URI, null, null, null, null, obj_TargetFile);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
obj_Persist.saveURI(obj_URI, null, null, null, null, obj_TargetFile, null);
|
||||
}
|
||||
Zotero.Utilities.Internal.saveURI(obj_Persist, obj_URI, obj_TargetFile);
|
||||
|
||||
return true;
|
||||
|
||||
} catch (ex) {
|
||||
aSourceURL = this.removeGETFromURL(aSourceURL);
|
||||
this.addError("[wpdCommon.downloadFile]:\n -> aSourceURL: " + aSourceURL.substring(aSourceURL.length - 60) + "\n -> aTargetFilename: " + aTargetFilename + "\n -> " + ex);
|
||||
this.addError("[wpdCommon.downloadFile]:\n -> aSourceURL: " + aSourceURL.substring(aSourceURL.length - 60) + "\n -> aTargetFilename: " + aTargetFilename, ex);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
|
@ -503,7 +503,7 @@ var wpdDOMSaver = {
|
|||
aNode.setAttribute("src", this.relativeLinkFix(newFileName));
|
||||
}
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdCommon.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName + "\n -> " + ex);
|
||||
wpdCommon.addError("[wpdCommon.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName, ex);
|
||||
}
|
||||
break;
|
||||
case "xmp":
|
||||
|
@ -525,7 +525,7 @@ var wpdDOMSaver = {
|
|||
aNode.removeAttribute("onload");
|
||||
}
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName + "\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName, ex);
|
||||
}
|
||||
return aNode;
|
||||
},
|
||||
|
@ -750,7 +750,7 @@ var wpdDOMSaver = {
|
|||
}
|
||||
return newFileName;
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.download]\n -> aURLSpec: " + aURLSpec + "\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.download]\n -> aURLSpec: " + aURLSpec, ex);
|
||||
return "";
|
||||
}
|
||||
},
|
||||
|
@ -784,7 +784,7 @@ var wpdDOMSaver = {
|
|||
|
||||
rootNode.insertBefore(aDocument.createTextNode("\n"), rootNode.firstChild);
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.createDocTypeNode]\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.createDocTypeNode]", ex);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -795,7 +795,7 @@ var wpdDOMSaver = {
|
|||
try {
|
||||
return aHTMLText.replace("<wpd_doctype></wpd_doctype>", this.getDocType(aDocument));
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.replaceDocType]\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.replaceDocType]", ex);
|
||||
}
|
||||
return aHTMLText;
|
||||
},
|
||||
|
@ -857,7 +857,7 @@ var wpdDOMSaver = {
|
|||
|
||||
rootNode.firstChild.insertBefore(aDocument.createTextNode("\n"), rootNode.firstChild.firstChild);
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.createMetaCharsetNode]\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.createMetaCharsetNode]", ex);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -872,7 +872,7 @@ var wpdDOMSaver = {
|
|||
rootNode.firstChild.insertBefore(aDocument.createTextNode("\n"), rootNode.firstChild.firstChild);
|
||||
rootNode.firstChild.insertBefore(metaNode, rootNode.firstChild.firstChild);
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.createMetaNameNode]\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.createMetaNameNode]", ex);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -981,7 +981,7 @@ var wpdDOMSaver = {
|
|||
Zotero.debug("[wpdDOMSaver.saveDocumentCSS]: " + this.currentDir + aFileName);
|
||||
// write css file
|
||||
var CSSFile = this.currentDir + aFileName;
|
||||
if (!wpdCommon.writeFile(CSSText, CSSFile)) wpdCommon.addError("[wpdDOMSaver.saveDocumentCSS]: could not write CSS File\n");
|
||||
if (!wpdCommon.writeFile(CSSText, CSSFile)) wpdCommon.addError("[wpdDOMSaver.saveDocumentCSS]: could not write CSS File");
|
||||
return aFileName;
|
||||
}
|
||||
}
|
||||
|
@ -1051,7 +1051,7 @@ var wpdDOMSaver = {
|
|||
|
||||
// and write the file...
|
||||
var HTMLFile = this.currentDir + aFileName;
|
||||
if (!wpdCommon.writeFile(HTMLText, HTMLFile)) wpdCommon.addError("[wpdDOMSaver.saveDocumentHTML]: could not write HTML File\n");
|
||||
if (!wpdCommon.writeFile(HTMLText, HTMLFile)) wpdCommon.addError("[wpdDOMSaver.saveDocumentHTML]: could not write HTML File");
|
||||
|
||||
return aFileName;
|
||||
},
|
||||
|
@ -1083,7 +1083,7 @@ var wpdDOMSaver = {
|
|||
try {
|
||||
return this.saveDocumentEx(this.document, this.name);
|
||||
} catch (ex) {
|
||||
wpdCommon.addError("[wpdDOMSaver.saveHTMLDocument]\n -> " + ex);
|
||||
wpdCommon.addError("[wpdDOMSaver.saveHTMLDocument]", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ Zotero.Attachments = new function(){
|
|||
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
|
||||
.createInstance(Components.interfaces.nsIURL);
|
||||
nsIURL.spec = url;
|
||||
wbp.saveURI(nsIURL, null, null, null, null, tmpFile, null);
|
||||
Zotero.Utilities.Internal.saveURI(wbp, nsIURL, tmpFile);
|
||||
yield deferred.promise;
|
||||
|
||||
// Create DB item
|
||||
|
@ -452,7 +452,8 @@ Zotero.Attachments = new function(){
|
|||
title = dir[dir.length - 2];
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (!title) {
|
||||
title = url;
|
||||
}
|
||||
}
|
||||
|
@ -613,7 +614,7 @@ Zotero.Attachments = new function(){
|
|||
wbp.progressListener = new Zotero.WebProgressFinishListener(function () {
|
||||
deferred.resolve();
|
||||
});
|
||||
wbp.saveURI(nsIURL, null, null, null, null, file, null);
|
||||
Zotero.Utilities.Internal.saveURI(wbp, nsIURL, file);
|
||||
yield deferred.promise;
|
||||
}
|
||||
|
||||
|
|
|
@ -522,100 +522,20 @@ Zotero.Cite.System.prototype = {
|
|||
throw "Zotero.Cite.System.retrieveItem called on non-item "+item;
|
||||
}
|
||||
|
||||
// don't return URL or accessed information for journal articles if a
|
||||
// pages field exists
|
||||
var itemType = Zotero.ItemTypes.getName(zoteroItem.itemTypeID);
|
||||
var cslType = CSL_TYPE_MAPPINGS[itemType];
|
||||
if(!cslType) cslType = "article";
|
||||
var ignoreURL = ((zoteroItem.getField("accessDate", true, true) || zoteroItem.getField("url", true, true)) &&
|
||||
["journalArticle", "newspaperArticle", "magazineArticle"].indexOf(itemType) !== -1
|
||||
var cslItem = Zotero.Utilities.itemToCSLJSON(zoteroItem);
|
||||
|
||||
if (!Zotero.Prefs.get("export.citePaperJournalArticleURL")) {
|
||||
var itemType = Zotero.ItemTypes.getName(zoteroItem.itemTypeID);
|
||||
// don't return URL or accessed information for journal articles if a
|
||||
// pages field exists
|
||||
if (["journalArticle", "newspaperArticle", "magazineArticle"].indexOf(itemType) !== -1
|
||||
&& zoteroItem.getField("pages")
|
||||
&& !Zotero.Prefs.get("export.citePaperJournalArticleURL"));
|
||||
|
||||
var cslItem = {
|
||||
'id':zoteroItem.id,
|
||||
'type':cslType
|
||||
};
|
||||
|
||||
// get all text variables (there must be a better way)
|
||||
// TODO: does citeproc-js permit short forms?
|
||||
for(var variable in CSL_TEXT_MAPPINGS) {
|
||||
var fields = CSL_TEXT_MAPPINGS[variable];
|
||||
if(variable == "URL" && ignoreURL) continue;
|
||||
for each(var field in fields) {
|
||||
var value = zoteroItem.getField(field, false, true).toString();
|
||||
if(value != "") {
|
||||
// Strip enclosing quotes
|
||||
if(value.match(/^".+"$/)) {
|
||||
value = value.substr(1, value.length-2);
|
||||
}
|
||||
cslItem[variable] = value;
|
||||
break;
|
||||
}
|
||||
) {
|
||||
delete cslItem.URL;
|
||||
delete cslItem.accessed;
|
||||
}
|
||||
}
|
||||
|
||||
// separate name variables
|
||||
var authorID = Zotero.CreatorTypes.getPrimaryIDForType(zoteroItem.itemTypeID);
|
||||
var creators = zoteroItem.getCreators();
|
||||
for each(var creator in creators) {
|
||||
if(creator.creatorTypeID == authorID) {
|
||||
var creatorType = "author";
|
||||
} else {
|
||||
var creatorType = Zotero.CreatorTypes.getName(creator.creatorTypeID);
|
||||
}
|
||||
|
||||
var creatorType = CSL_NAMES_MAPPINGS[creatorType];
|
||||
if(!creatorType) continue;
|
||||
|
||||
var nameObj = {'family':creator.ref.lastName, 'given':creator.ref.firstName};
|
||||
|
||||
if(cslItem[creatorType]) {
|
||||
cslItem[creatorType].push(nameObj);
|
||||
} else {
|
||||
cslItem[creatorType] = [nameObj];
|
||||
}
|
||||
}
|
||||
|
||||
// get date variables
|
||||
for(var variable in CSL_DATE_MAPPINGS) {
|
||||
var date = zoteroItem.getField(CSL_DATE_MAPPINGS[variable], false, true);
|
||||
if(date) {
|
||||
var dateObj = Zotero.Date.strToDate(date);
|
||||
// otherwise, use date-parts
|
||||
var dateParts = [];
|
||||
if(dateObj.year) {
|
||||
// add year, month, and day, if they exist
|
||||
dateParts.push(dateObj.year);
|
||||
if(dateObj.month !== undefined) {
|
||||
dateParts.push(dateObj.month+1);
|
||||
if(dateObj.day) {
|
||||
dateParts.push(dateObj.day);
|
||||
}
|
||||
}
|
||||
cslItem[variable] = {"date-parts":[dateParts]};
|
||||
|
||||
// if no month, use season as month
|
||||
if(dateObj.part && !dateObj.month) {
|
||||
cslItem[variable].season = dateObj.part;
|
||||
}
|
||||
} else {
|
||||
// if no year, pass date literally
|
||||
cslItem[variable] = {"literal":date};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// extract PMID
|
||||
var extra = zoteroItem.getField("extra", false, true);
|
||||
if(typeof extra === "string") {
|
||||
var m = /(?:^|\n)PMID:\s*([0-9]+)/.exec(extra);
|
||||
if(m) cslItem.PMID = m[1];
|
||||
m = /(?:^|\n)PMCID:\s*((?:PMC)?[0-9]+)/.exec(extra);
|
||||
if(m) cslItem.PMCID = m[1];
|
||||
}
|
||||
|
||||
//this._cache[zoteroItem.id] = cslItem;
|
||||
return cslItem;
|
||||
},
|
||||
|
||||
|
|
|
@ -87,6 +87,8 @@ Zotero.CollectionTreeView.prototype.setTree = Zotero.Promise.coroutine(function*
|
|||
// Add a keypress listener for expand/collapse
|
||||
var tree = this._treebox.treeBody.parentNode;
|
||||
tree.addEventListener('keypress', function(event) {
|
||||
if (tree.editingRow != -1) return; // In-line editing active
|
||||
|
||||
var key = String.fromCharCode(event.which);
|
||||
|
||||
if (key == '+' && !(event.ctrlKey || event.altKey || event.metaKey)) {
|
||||
|
@ -774,6 +776,54 @@ Zotero.CollectionTreeView.prototype.selectLibrary = Zotero.Promise.coroutine(fun
|
|||
});
|
||||
|
||||
|
||||
Zotero.CollectionTreeView.prototype.selectTrash = function (libraryID) {
|
||||
if (Zotero.suppressUIUpdates) {
|
||||
Zotero.debug("UI updates suppressed -- not changing library selection");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if trash is already selected
|
||||
if (this.selection.currentIndex != -1) {
|
||||
let itemGroup = this._getItemAtRow(this.selection.currentIndex);
|
||||
if (itemGroup.isTrash() && itemGroup.ref.libraryID == libraryID) {
|
||||
this._treebox.ensureRowIsVisible(this.selection.currentIndex);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// If in My Library and it's collapsed, open it
|
||||
if (!libraryID && !this.isContainerOpen(0)) {
|
||||
this.toggleOpenState(0);
|
||||
}
|
||||
|
||||
// Find library trash
|
||||
for (let i = 0; i < this.rowCount; i++) {
|
||||
let itemGroup = this._getItemAtRow(i);
|
||||
|
||||
// If group header is closed, open it
|
||||
if (itemGroup.isHeader() && itemGroup.ref.id == 'group-libraries-header'
|
||||
&& !this.isContainerOpen(i)) {
|
||||
this.toggleOpenState(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itemGroup.isLibrary(true) && itemGroup.ref.libraryID == libraryID
|
||||
&& !this.isContainerOpen(i)) {
|
||||
this.toggleOpenState(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itemGroup.isTrash() && itemGroup.ref.libraryID == libraryID) {
|
||||
this._treebox.ensureRowIsVisible(i);
|
||||
this.selection.select(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Select the last-viewed source
|
||||
*/
|
||||
|
@ -1826,8 +1876,12 @@ Zotero.CollectionTreeView.prototype.drop = Zotero.Promise.coroutine(function* (r
|
|||
|
||||
// Add items to target collection
|
||||
if (targetCollectionID) {
|
||||
let ids = newIDs.filter(function (itemID) {
|
||||
var item = Zotero.Items.get(itemID);
|
||||
return !item.getSource();
|
||||
});
|
||||
var collection = yield Zotero.Collections.getAsync(targetCollectionID);
|
||||
yield collection.addItems(newIDs);
|
||||
yield collection.addItems(ids);
|
||||
}
|
||||
|
||||
// If moving, remove items from source collection
|
||||
|
|
|
@ -87,7 +87,7 @@ Zotero.Connector_Types = new function() {
|
|||
} else if(Zotero.isChrome) {
|
||||
return chrome.extension.getURL("images/"+icon);
|
||||
} else if(Zotero.isSafari) {
|
||||
return safari.extension.baseURI+"images/itemTypes/"+icon;
|
||||
return safari.extension.baseURI+"images/"+icon;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ Zotero.Connector = new function() {
|
|||
* @param {Object} data RPC data. See documentation above.
|
||||
* @param {Function} callback Function to be called when requests complete.
|
||||
*/
|
||||
this.callMethod = function(method, data, callback) {
|
||||
this.callMethod = function(method, data, callback, tab) {
|
||||
// Don't bother trying if not online in bookmarklet
|
||||
if(Zotero.isBookmarklet && this.isOnline === false) {
|
||||
callback(false, 0);
|
||||
|
@ -211,6 +211,57 @@ Zotero.Connector = new function() {
|
|||
"X-Zotero-Connector-API-Version":CONNECTOR_API_VERSION
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds detailed cookies to the data before sending "saveItems" request to
|
||||
* the server/Standalone
|
||||
*
|
||||
* @param {Object} data RPC data. See documentation above.
|
||||
* @param {Function} callback Function to be called when requests complete.
|
||||
*/
|
||||
this.setCookiesThenSaveItems = function(data, callback, tab) {
|
||||
if(Zotero.isFx && !Zotero.isBookmarklet && data.uri) {
|
||||
var host = Services.ios.newURI(data.uri, null, null).host;
|
||||
var cookieEnum = Services.cookies.getCookiesFromHost(host);
|
||||
var cookieHeader = '';
|
||||
while(cookieEnum.hasMoreElements()) {
|
||||
var cookie = cookieEnum.getNext().QueryInterface(Components.interfaces.nsICookie2);
|
||||
cookieHeader += '\n' + cookie.name + '=' + cookie.value
|
||||
+ ';Domain=' + cookie.host
|
||||
+ (cookie.path ? ';Path=' + cookie.path : '')
|
||||
+ (!cookie.isDomain ? ';hostOnly' : '') //not a legit flag, but we have to use it internally
|
||||
+ (cookie.isSecure ? ';secure' : '');
|
||||
}
|
||||
|
||||
if(cookieHeader) {
|
||||
data.detailedCookies = cookieHeader.substr(1);
|
||||
}
|
||||
|
||||
this.callMethod("saveItems", data, callback, tab);
|
||||
return;
|
||||
} else if(Zotero.isChrome && !Zotero.isBookmarklet) {
|
||||
var self = this;
|
||||
chrome.cookies.getAll({url: tab.url}, function(cookies) {
|
||||
var cookieHeader = '';
|
||||
for(var i=0, n=cookies.length; i<n; i++) {
|
||||
cookieHeader += '\n' + cookies[i].name + '=' + cookies[i].value
|
||||
+ ';Domain=' + cookies[i].domain
|
||||
+ (cookies[i].path ? ';Path=' + cookies[i].path : '')
|
||||
+ (cookies[i].hostOnly ? ';hostOnly' : '') //not a legit flag, but we have to use it internally
|
||||
+ (cookies[i].secure ? ';secure' : '');
|
||||
}
|
||||
|
||||
if(cookieHeader) {
|
||||
data.detailedCookies = cookieHeader.substr(1);
|
||||
}
|
||||
|
||||
self.callMethod("saveItems", data, callback, tab);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.callMethod("saveItems", data, callback, tab);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
payload.uri = this._uri;
|
||||
payload.cookie = this._cookie;
|
||||
}
|
||||
|
||||
Zotero.Connector.callMethod("saveItems", payload, function(data, status) {
|
||||
Zotero.Connector.setCookiesThenSaveItems(payload, function(data, status) {
|
||||
if(data !== false) {
|
||||
Zotero.debug("Translate: Save via Standalone succeeded");
|
||||
var haveAttachments = false;
|
||||
|
|
|
@ -203,7 +203,7 @@ Zotero.Translators = new function() {
|
|||
} else {
|
||||
// in Firefox, push the converterFunction
|
||||
converterFunctions.push(new function() {
|
||||
var re = new RegExp('^https?://(?:[^/]\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1]), "gi");
|
||||
var re = new RegExp('^https?://(?:[^/]\\.)?'+Zotero.Utilities.quotemeta(properHosts[j-1])+'/', "gi");
|
||||
var proxyHost = proxyHosts[j-1].replace(/\$/g, "$$$$");
|
||||
return function(uri) { return uri.replace(re, "$&."+proxyHost) };
|
||||
});
|
||||
|
|
|
@ -47,11 +47,9 @@ Zotero.CookieSandbox = function(browser, uri, cookieData, userAgent) {
|
|||
|
||||
this._cookies = {};
|
||||
if(cookieData) {
|
||||
var splitCookies = cookieData.split(/; ?/);
|
||||
var splitCookies = cookieData.split(/;\s*/);
|
||||
for each(var cookie in splitCookies) {
|
||||
var key = cookie.substr(0, cookie.indexOf("="));
|
||||
var value = cookie.substr(cookie.indexOf("=")+1);
|
||||
this._cookies[key] = value;
|
||||
this.setCookie(cookie, this.URI.host);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,29 +61,93 @@ Zotero.CookieSandbox = function(browser, uri, cookieData, userAgent) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes the host string: lower-case, remove leading period, some more cleanup
|
||||
* @param {String} host;
|
||||
*/
|
||||
Zotero.CookieSandbox.normalizeHost = function(host) {
|
||||
return host.trim().toLowerCase().replace(/^\.+|[:\/].*/g, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes the path string
|
||||
* @param {String} path;
|
||||
*/
|
||||
Zotero.CookieSandbox.normalizePath = function(path) {
|
||||
return '/' + path.trim().replace(/^\/+|[?#].*/g, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a semicolon-separated string of cookie values from a list of cookies
|
||||
* @param {Object} cookies Object containing key: value cookie pairs
|
||||
*/
|
||||
Zotero.CookieSandbox.generateCookieString = function(cookies) {
|
||||
var str = '';
|
||||
for(var key in cookies) {
|
||||
str += '; ' + key + '=' + cookies[key];
|
||||
}
|
||||
|
||||
return str ? str.substr(2) : '';
|
||||
}
|
||||
|
||||
Zotero.CookieSandbox.prototype = {
|
||||
/**
|
||||
* Adds cookies to this CookieSandbox based on a cookie header
|
||||
* @param {String} cookieString;
|
||||
* @param {nsIURI} [uri] URI of the header origin.
|
||||
Used to verify same origin. If omitted validation is not performed
|
||||
*/
|
||||
"addCookiesFromHeader":function(cookieString) {
|
||||
"addCookiesFromHeader":function(cookieString, uri) {
|
||||
var cookies = cookieString.split("\n");
|
||||
if(uri) {
|
||||
var validDomain = '.' + Zotero.CookieSandbox.normalizeHost(uri.host);
|
||||
}
|
||||
|
||||
for(var i=0, n=cookies.length; i<n; i++) {
|
||||
var cookieInfo = cookies[i].split(/; ?/);
|
||||
var secure = false;
|
||||
var cookieInfo = cookies[i].split(/;\s*/);
|
||||
var secure = false, path = '', domain = '', hostOnly = false;
|
||||
|
||||
for(var j=1, m=cookieInfo.length; j<m; j++) {
|
||||
if(cookieInfo[j].substr(0, cookieInfo[j].indexOf("=")).toLowerCase() === "secure") {
|
||||
secure = true;
|
||||
break;
|
||||
var pair = cookieInfo[j].split(/\s*=\s*/);
|
||||
switch(pair[0].trim().toLowerCase()) {
|
||||
case 'secure':
|
||||
secure = true;
|
||||
break;
|
||||
case 'domain':
|
||||
domain = pair[1];
|
||||
break;
|
||||
case 'path':
|
||||
path = pair[1];
|
||||
break;
|
||||
case 'hostonly':
|
||||
hostOnly = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(secure && domain && path && hostOnly) break;
|
||||
}
|
||||
|
||||
// Domain must be a suffix of the host setting the cookie
|
||||
if(validDomain && domain) {
|
||||
var normalizedDomain = Zotero.CookieSandbox.normalizeHost(domain);
|
||||
var substrMatch = validDomain.lastIndexOf(normalizedDomain);
|
||||
var publicSuffix;
|
||||
try { publicSuffix = Services.eTLD.getPublicSuffix(uri) } catch(e) {}
|
||||
if(substrMatch == -1 || !publicSuffix || publicSuffix == normalizedDomain
|
||||
|| (substrMatch + normalizedDomain.length != validDomain.length)
|
||||
|| (validDomain.charAt(substrMatch-1) != '.')) {
|
||||
Zotero.debug("CookieSandbox: Ignoring attempt to set a cookie for different host");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!secure) {
|
||||
var key = cookieInfo[0].substr(0, cookieInfo[0].indexOf("="));
|
||||
var value = cookieInfo[0].substr(cookieInfo[0].indexOf("=")+1);
|
||||
this._cookies[key] = value;
|
||||
// When no domain is set, use requestor's host (hostOnly cookie)
|
||||
if(validDomain && !domain) {
|
||||
domain = validDomain.substr(1);
|
||||
hostOnly = true;
|
||||
}
|
||||
|
||||
this.setCookie(cookieInfo[0], domain, path, secure, hostOnly);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -104,13 +166,112 @@ Zotero.CookieSandbox.prototype = {
|
|||
"attachToInterfaceRequestor": function(ir) {
|
||||
Zotero.CookieSandbox.Observer.trackedInterfaceRequestors.push(Components.utils.getWeakReference(ir.QueryInterface(Components.interfaces.nsIInterfaceRequestor)));
|
||||
Zotero.CookieSandbox.Observer.trackedInterfaceRequestorSandboxes.push(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Set a cookie for a specified host
|
||||
* @param {String} cookiePair A single cookie pair in the form key=value
|
||||
* @param {String} [host] Host to bind the cookie to.
|
||||
* Defaults to the host set on this.URI
|
||||
* @param {String} [path]
|
||||
* @param {Boolean} [secure] Whether the cookie has the secure attribute set
|
||||
* @param {Boolean} [hostOnly] Whether the cookie is a host-only cookie
|
||||
*/
|
||||
"setCookie": function(cookiePair, host, path, secure, hostOnly) {
|
||||
var splitAt = cookiePair.indexOf('=');
|
||||
if(splitAt === -1) {
|
||||
Zotero.debug("CookieSandbox: Not setting invalid cookie.");
|
||||
return;
|
||||
}
|
||||
var pair = [cookiePair.substring(0,splitAt), cookiePair.substring(splitAt+1)];
|
||||
var name = pair[0].trim();
|
||||
var value = pair[1].trim();
|
||||
if(!name) {
|
||||
Zotero.debug("CookieSandbox: Ignoring attempt to set cookie with no name");
|
||||
return;
|
||||
}
|
||||
|
||||
host = '.' + Zotero.CookieSandbox.normalizeHost(host);
|
||||
|
||||
if(!path) path = '/';
|
||||
path = Zotero.CookieSandbox.normalizePath(path);
|
||||
|
||||
if(!this._cookies[host]) {
|
||||
this._cookies[host] = {};
|
||||
}
|
||||
|
||||
if(!this._cookies[host][path]) {
|
||||
this._cookies[host][path] = {};
|
||||
}
|
||||
|
||||
/*Zotero.debug("CookieSandbox: adding cookie " + name + '='
|
||||
+ value + ' for host ' + host + ' and path ' + path
|
||||
+ '[' + (hostOnly?'hostOnly,':'') + (secure?'secure':'') + ']');*/
|
||||
|
||||
this._cookies[host][path][name] = {
|
||||
value: value,
|
||||
secure: !!secure,
|
||||
hostOnly: !!hostOnly
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a list of cookies that should be sent to the given URI
|
||||
* @param {nsIURI} uri
|
||||
*/
|
||||
"getCookiesForURI": function(uri) {
|
||||
var hostParts = Zotero.CookieSandbox.normalizeHost(uri.host).split('.'),
|
||||
pathParts = Zotero.CookieSandbox.normalizePath(uri.path).split('/'),
|
||||
cookies = {}, found = false, secure = uri.scheme.toUpperCase() == 'HTTPS';
|
||||
|
||||
// Fetch cookies starting from the highest level domain
|
||||
var cookieHost = '.' + hostParts[hostParts.length-1];
|
||||
for(var i=hostParts.length-2; i>=0; i--) {
|
||||
cookieHost = '.' + hostParts[i] + cookieHost;
|
||||
if(this._cookies[cookieHost]) {
|
||||
found = this._getCookiesForPath(cookies, this._cookies[cookieHost], pathParts, secure, i==0) || found;
|
||||
}
|
||||
}
|
||||
|
||||
//Zotero.debug("CookieSandbox: returning cookies:");
|
||||
//Zotero.debug(cookies);
|
||||
|
||||
return found ? cookies : null;
|
||||
},
|
||||
|
||||
"_getCookiesForPath": function(cookies, cookiePaths, pathParts, secure, isHost) {
|
||||
var found = false;
|
||||
var path = '';
|
||||
for(var i=0, n=pathParts.length; i<n; i++) {
|
||||
path += pathParts[i];
|
||||
var cookiesForPath = cookiePaths[path];
|
||||
if(cookiesForPath) {
|
||||
for(var key in cookiesForPath) {
|
||||
if(cookiesForPath[key].secure && !secure) continue;
|
||||
if(cookiesForPath[key].hostOnly && !isHost) continue;
|
||||
|
||||
found = true;
|
||||
cookies[key] = cookiesForPath[key].value;
|
||||
}
|
||||
}
|
||||
|
||||
// Also check paths with trailing / (but not for last part)
|
||||
path += '/';
|
||||
cookiesForPath = cookiePaths[path];
|
||||
if(cookiesForPath && i != n-1) {
|
||||
for(var key in cookiesForPath) {
|
||||
if(cookiesForPath[key].secure && !secure) continue;
|
||||
if(cookiesForPath[key].hostOnly && !isHost) continue;
|
||||
|
||||
found = true;
|
||||
cookies[key] = cookiesForPath[key].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
Zotero.CookieSandbox.prototype.__defineGetter__("cookieString", function() {
|
||||
return [key+"="+this._cookies[key] for(key in this._cookies)].join("; ");
|
||||
});
|
||||
|
||||
/**
|
||||
* nsIObserver implementation for adding, clearing, and slurping cookies
|
||||
*/
|
||||
|
@ -218,8 +379,12 @@ Zotero.CookieSandbox.Observer = new function() {
|
|||
}
|
||||
|
||||
if(topic == "http-on-modify-request") {
|
||||
// clear cookies to be sent to other domains
|
||||
if(!trackedBy || channel.URI.host != trackedBy.URI.host) {
|
||||
// Clear cookies to be sent to other domains if we're not explicitly managing them
|
||||
if(trackedBy) {
|
||||
var cookiesForURI = trackedBy.getCookiesForURI(channel.URI);
|
||||
}
|
||||
|
||||
if(!trackedBy || !cookiesForURI) {
|
||||
channel.setRequestHeader("Cookie", "", false);
|
||||
channel.setRequestHeader("Cookie2", "", false);
|
||||
Zotero.debug("CookieSandbox: Cleared cookies to be sent to "+channelURI, 5);
|
||||
|
@ -231,26 +396,27 @@ Zotero.CookieSandbox.Observer = new function() {
|
|||
}
|
||||
|
||||
// add cookies to be sent to this domain
|
||||
channel.setRequestHeader("Cookie", trackedBy.cookieString, false);
|
||||
channel.setRequestHeader("Cookie", Zotero.CookieSandbox.generateCookieString(cookiesForURI), false);
|
||||
Zotero.debug("CookieSandbox: Added cookies for request to "+channelURI, 5);
|
||||
} else if(topic == "http-on-examine-response") {
|
||||
// clear cookies being received
|
||||
try {
|
||||
var cookieHeader = channel.getResponseHeader("Set-Cookie");
|
||||
} catch(e) {
|
||||
Zotero.debug("CookieSandbox: No Set-Cookie header received for "+channelURI, 5);
|
||||
return;
|
||||
}
|
||||
|
||||
channel.setResponseHeader("Set-Cookie", "", false);
|
||||
channel.setResponseHeader("Set-Cookie2", "", false);
|
||||
|
||||
// don't process further if these cookies are for another set of domains
|
||||
if(!trackedBy || channel.URI.host != trackedBy.URI.host) {
|
||||
Zotero.debug("CookieSandbox: Rejected cookies from "+channelURI, 5);
|
||||
if(!cookieHeader || !trackedBy) {
|
||||
Zotero.debug("CookieSandbox: Not tracking received cookies for "+channelURI, 5);
|
||||
return;
|
||||
}
|
||||
|
||||
// put new cookies into our sandbox
|
||||
if(cookieHeader) trackedBy.addCookiesFromHeader(cookieHeader);
|
||||
// Put new cookies into our sandbox
|
||||
trackedBy.addCookiesFromHeader(cookieHeader, channel.URI);
|
||||
|
||||
Zotero.debug("CookieSandbox: Slurped cookies from "+channelURI, 5);
|
||||
}
|
||||
|
|
|
@ -815,6 +815,24 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) {
|
|||
value = value.replace(/[\r\n]+/g, " ");;
|
||||
}
|
||||
|
||||
if (fieldID == Zotero.ItemFields.getID('ISBN')) {
|
||||
// Hyphenate ISBNs, but only if everything is in expected format and valid
|
||||
let isbns = ('' + value).trim().split(/\s*[,;]\s*|\s+/),
|
||||
newISBNs = '',
|
||||
failed = false;
|
||||
for (let i=0; i<isbns.length; i++) {
|
||||
let isbn = Zotero.Utilities.Internal.hyphenateISBN(isbns[i]);
|
||||
if (!isbn) {
|
||||
failed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
newISBNs += ' ' + isbn;
|
||||
}
|
||||
|
||||
if (!failed) value = newISBNs.substr(1);
|
||||
}
|
||||
|
||||
if (!loadIn) {
|
||||
// Save date field as multipart date
|
||||
// TEMP - filingDate
|
||||
|
@ -2320,7 +2338,10 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* (ski
|
|||
// accidentally use the parent dir. Syncing to OS X, which doesn't
|
||||
// exhibit this bug, will properly correct such filenames in
|
||||
// storage.js and propagate the change
|
||||
if (Zotero.isWin) {
|
||||
//
|
||||
// The one exception on other platforms is '/', which is interpreted
|
||||
// as a directory by setRelativeDescriptor, so strip in that case too.
|
||||
if (Zotero.isWin || path.indexOf('/') != -1) {
|
||||
path = Zotero.File.getValidFileName(path, true);
|
||||
}
|
||||
var file = Zotero.Attachments.getStorageDirectory(this);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
Zotero.Error = function (message, error, data) {
|
||||
this.name = "ZOTERO_ERROR";
|
||||
this.name = "Zotero Error";
|
||||
this.message = message;
|
||||
this.data = data;
|
||||
if (parseInt(error) == error) {
|
||||
|
@ -35,6 +35,8 @@ Zotero.Error = function (message, error, data) {
|
|||
this.error = Zotero.Error["ERROR_" + error] ? Zotero.Error["ERROR_" + error] : 0;
|
||||
}
|
||||
}
|
||||
Zotero.Error.prototype = new Error;
|
||||
|
||||
|
||||
Zotero.Error.ERROR_UNKNOWN = 0;
|
||||
Zotero.Error.ERROR_MISSING_OBJECT = 1;
|
||||
|
|
11
chrome/content/zotero/xpcom/isbn.js
Normal file
11
chrome/content/zotero/xpcom/isbn.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -1616,6 +1616,12 @@ Zotero.ItemTreeView.prototype.selectItem = Zotero.Promise.coroutine(function* (i
|
|||
// Get the row of the parent, if there is one
|
||||
var parentRow = null;
|
||||
var item = yield Zotero.Items.getAsync(id);
|
||||
|
||||
// Can't select a deleted item if we're not in the trash
|
||||
if (item.deleted && !this.collectionTreeRow.isTrash()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var parent = item.parentItemID;
|
||||
if (parent && this._itemRowMap[parent] != undefined) {
|
||||
parentRow = this._itemRowMap[parent];
|
||||
|
|
|
@ -55,30 +55,50 @@ Zotero.MIMETypeHandler = new function () {
|
|||
_observers = [];
|
||||
|
||||
if(Zotero.Prefs.get("parseEndNoteMIMETypes")) {
|
||||
this.addHandler("application/x-endnote-refer", _importHandler, true);
|
||||
this.addHandler("application/x-research-info-systems", _importHandler, true);
|
||||
this.addHandler("application/x-inst-for-scientific-info", _importHandler, true);
|
||||
|
||||
this.addHandler("text/x-bibtex", _importHandler, true);
|
||||
this.addHandler("application/x-bibtex", _importHandler, true);
|
||||
|
||||
//
|
||||
// And some non-standard ones
|
||||
//
|
||||
this.addHandler("text/x-research-info-systems", _importHandler, true);
|
||||
// Nature uses this one
|
||||
this.addHandler("text/application/x-research-info-systems", _importHandler, true);
|
||||
// Cell uses this one
|
||||
this.addHandler("text/ris", _importHandler, true);
|
||||
// Not even trying
|
||||
this.addHandler("ris", _importHandler, true);
|
||||
this.registerMetadataHandlers();
|
||||
}
|
||||
Zotero.Prefs.registerObserver("parseEndNoteMIMETypes", function(val) {
|
||||
if (val) this.registerMetadataHandlers();
|
||||
else this.unregisterMetadataHandlers();
|
||||
}.bind(this));
|
||||
|
||||
this.addHandler("application/vnd.citationstyles.style+xml", function(a1, a2) { Zotero.Styles.install(a1, a2) });
|
||||
this.addHandler("text/x-csl", function(a1, a2) { Zotero.Styles.install(a1, a2) }); // deprecated
|
||||
this.addHandler("application/x-zotero-schema", Zotero.Schema.importSchema);
|
||||
this.addHandler("application/x-zotero-settings", Zotero.Prefs.importSettings);
|
||||
}
|
||||
|
||||
// MIME types that Zotero should handle when parseEndNoteMIMETypes preference
|
||||
// is enabled
|
||||
var metadataMIMETypes = [
|
||||
"application/x-endnote-refer", "application/x-research-info-systems",
|
||||
"application/x-inst-for-scientific-info",
|
||||
"text/x-bibtex", "application/x-bibtex",
|
||||
// Non-standard
|
||||
"text/x-research-info-systems",
|
||||
"text/application/x-research-info-systems", // Nature serves this
|
||||
"text/ris", // Cell serves this
|
||||
"ris" // Not even trying
|
||||
];
|
||||
|
||||
/**
|
||||
* Registers MIME types for parseEndNoteMIMETypes preference
|
||||
*/
|
||||
this.registerMetadataHandlers = function() {
|
||||
for (var i=0; i<metadataMIMETypes.length; i++) {
|
||||
this.addHandler(metadataMIMETypes[i], _importHandler, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters MIME types for parseEndNoteMIMETypes preference
|
||||
*/
|
||||
this.unregisterMetadataHandlers = function() {
|
||||
for (var i=0; i<metadataMIMETypes.length; i++) {
|
||||
this.removeHandler(metadataMIMETypes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a handler to handle a specific MIME type
|
||||
* @param {String} type MIME type to handle
|
||||
|
@ -92,6 +112,18 @@ Zotero.MIMETypeHandler = new function () {
|
|||
_ignoreContentDispositionTypes.push(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a handler for a specific MIME type
|
||||
* @param {String} type MIME type to handle
|
||||
*/
|
||||
this.removeHandler = function(type) {
|
||||
delete _typeHandlers[type];
|
||||
var i = _ignoreContentDispositionTypes.indexOf(type);
|
||||
if (i != -1) {
|
||||
_ignoreContentDispositionTypes.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an observer to inspect and possibly modify page headers
|
||||
*/
|
||||
|
@ -107,7 +139,10 @@ Zotero.MIMETypeHandler = new function () {
|
|||
*/
|
||||
function _importHandler(string, uri, contentType, channel) {
|
||||
var win = channel.notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow).top;
|
||||
if(!win) throw "Attempt to import from a channel without an attached document refused";
|
||||
if(!win) {
|
||||
Zotero.debug("Attempt to import from a channel without an attached document refused");
|
||||
return false;
|
||||
}
|
||||
|
||||
var hostPort = channel.URI.hostPort.replace(";", "_", "g");
|
||||
|
||||
|
@ -129,7 +164,7 @@ Zotero.MIMETypeHandler = new function () {
|
|||
bag.setPropertyAsBool("allowTabModal", true);
|
||||
|
||||
var continueDownload = prompt.confirmCheck(title, text, checkMsg, checkValue);
|
||||
if(!continueDownload) return;
|
||||
if(!continueDownload) return false;
|
||||
if(checkValue.value) {
|
||||
// add to allowed sites if desired
|
||||
Zotero.Prefs.set("ingester.allowedSites", allowedSitesString+";"+hostPort);
|
||||
|
@ -148,7 +183,8 @@ Zotero.MIMETypeHandler = new function () {
|
|||
return translation.getTranslators().then(function(translators) {
|
||||
if(!translators.length) {
|
||||
// we lied. we can't really translate this file.
|
||||
throw "No translator found for handled RIS, Refer or ISI file"
|
||||
Zotero.debug("No translator found to handle this file");
|
||||
return false;
|
||||
}
|
||||
|
||||
// translate using first available
|
||||
|
@ -302,26 +338,33 @@ Zotero.MIMETypeHandler = new function () {
|
|||
inputStream.close();
|
||||
|
||||
var me = this;
|
||||
Zotero.Promise.resolve(_typeHandlers[this._contentType](readString, (this._request.name ? this._request.name : null),
|
||||
this._contentType, channel)).catch(function(e) {
|
||||
// if there was an error, handle using nsIExternalHelperAppService
|
||||
var externalHelperAppService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].
|
||||
getService(Components.interfaces.nsIExternalHelperAppService);
|
||||
var frontWindow = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
|
||||
getService(Components.interfaces.nsIWindowWatcher).activeWindow;
|
||||
|
||||
var inputStream = me._storageStream.newInputStream(0);
|
||||
var streamListener = externalHelperAppService.doContent(me._contentType, me._request, frontWindow, null);
|
||||
if (streamListener) {
|
||||
streamListener.onStartRequest(channel, context);
|
||||
streamListener.onDataAvailable(me._request, context, inputStream, 0, me._storageStream.length);
|
||||
streamListener.onStopRequest(channel, context, status);
|
||||
}
|
||||
|
||||
// then throw our error
|
||||
throw e;
|
||||
}).fin(function() {
|
||||
me._storageStream.close();
|
||||
}).done();
|
||||
Zotero.Promise.resolve(
|
||||
_typeHandlers[this._contentType](readString, (this._request.name ? this._request.name : null),
|
||||
this._contentType,
|
||||
channel)
|
||||
)
|
||||
.catch(function(e) {
|
||||
Zotero.debug(e, 2);
|
||||
|
||||
// if there was an error, handle using nsIExternalHelperAppService
|
||||
var externalHelperAppService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].
|
||||
getService(Components.interfaces.nsIExternalHelperAppService);
|
||||
var frontWindow = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
|
||||
getService(Components.interfaces.nsIWindowWatcher).activeWindow;
|
||||
|
||||
var inputStream = me._storageStream.newInputStream(0);
|
||||
var streamListener = externalHelperAppService.doContent(me._contentType, me._request, frontWindow, null);
|
||||
if (streamListener) {
|
||||
streamListener.onStartRequest(channel, context);
|
||||
streamListener.onDataAvailable(me._request, context, inputStream, 0, me._storageStream.length);
|
||||
streamListener.onStopRequest(channel, context, status);
|
||||
}
|
||||
|
||||
// then throw our error
|
||||
throw e;
|
||||
})
|
||||
.finally(function() {
|
||||
me._storageStream.close();
|
||||
});;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ Zotero.OpenURL = new function() {
|
|||
|
||||
if(resolver.getElementsByTagName("Z39.88-2004").length > 0) {
|
||||
var version = "1.0";
|
||||
} else if(resolver.getElementsByTagName("OpenUrl 0.1").length > 0) {
|
||||
} else if(resolver.getElementsByTagName("OpenURL_0.1").length > 0) {
|
||||
var version = "0.1";
|
||||
} else {
|
||||
continue;
|
||||
|
|
|
@ -279,11 +279,10 @@ Zotero.QuickCopy = new function() {
|
|||
for(var i=0; i<ps.length; i++) {
|
||||
var p = ps[i],
|
||||
paddingLeft = p.style.paddingLeft;
|
||||
Zotero.debug("PADDING LEFT "+paddingLeft);
|
||||
if(paddingLeft && paddingLeft.substr(paddingLeft.length-2) === "px") {
|
||||
var paddingPx = parseInt(paddingLeft, 10),
|
||||
ztabs = "";
|
||||
for(var i=30; i<=paddingPx; i+=30) ztabs += ZTAB;
|
||||
for (let j = 30; j <= paddingPx; j += 30) ztabs += ZTAB;
|
||||
p.insertBefore(textDoc.createTextNode(ztabs), p.firstChild);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ Zotero.Schema = new function(){
|
|||
this.dbInitialized = false;
|
||||
this.goToChangeLog = false;
|
||||
|
||||
var _schemaUpdateDeferred = Zotero.Promise.defer();
|
||||
this.schemaUpdatePromise = _schemaUpdateDeferred.promise;
|
||||
|
||||
var _dbVersions = [];
|
||||
var _schemaVersions = [];
|
||||
var _maxCompatibility = 1;
|
||||
|
@ -80,7 +83,10 @@ Zotero.Schema = new function(){
|
|||
.spread(function (userdata, compatibility) {
|
||||
if (!userdata) {
|
||||
Zotero.debug('Database does not exist -- creating\n');
|
||||
return _initializeSchema().return(true);
|
||||
return _initializeSchema()
|
||||
.then(function() {
|
||||
return _schemaUpdateDeferred.resolve(true);
|
||||
});
|
||||
}
|
||||
|
||||
// We don't handle upgrades from pre-Zotero 2.1 databases
|
||||
|
@ -164,7 +170,9 @@ Zotero.Schema = new function(){
|
|||
/*Zotero.initializationPromise
|
||||
.delay(5000)
|
||||
.then(function () Zotero.Schema.updateBundledFiles(null, false, true))
|
||||
.done();*/
|
||||
.finally(function () {
|
||||
_schemaUpdateDeferred.resolve(true);
|
||||
})*/
|
||||
|
||||
return updated;
|
||||
});
|
||||
|
|
|
@ -344,7 +344,11 @@ Zotero.Server.Connector.SaveItem.prototype = {
|
|||
} catch(e) {}
|
||||
|
||||
var cookieSandbox = data["uri"] ? new Zotero.CookieSandbox(null, data["uri"],
|
||||
data["cookie"] || "", url.userAgent) : null;
|
||||
data["detailedCookies"] ? "" : data["cookie"] || "", url.userAgent) : null;
|
||||
if(cookieSandbox && data.detailedCookies) {
|
||||
cookieSandbox.addCookiesFromHeader(data.detailedCookies);
|
||||
}
|
||||
|
||||
for(var i=0; i<data.items.length; i++) {
|
||||
Zotero.Server.Connector.AttachmentProgressManager.add(data.items[i].attachments);
|
||||
}
|
||||
|
|
|
@ -959,13 +959,7 @@ Zotero.Sync.Storage.WebDAV = (function () {
|
|||
.createInstance(nsIWBP);
|
||||
wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
|
||||
wbp.progressListener = listener;
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, destFile, null);
|
||||
}
|
||||
Zotero.Utilities.Internal.saveURI(wbp, uri, destFile);
|
||||
|
||||
return deferred.promise;
|
||||
});
|
||||
|
|
|
@ -944,13 +944,7 @@ Zotero.Sync.Storage.ZFS = (function () {
|
|||
.createInstance(nsIWBP);
|
||||
wbp.persistFlags = nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
|
||||
wbp.progressListener = listener;
|
||||
try {
|
||||
wbp.saveURI(uri, null, null, null, null, destFile);
|
||||
} catch(e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=794602
|
||||
// XXX Always use when we no longer support Firefox < 18
|
||||
wbp.saveURI(uri, null, null, null, null, destFile, null);
|
||||
}
|
||||
Zotero.Utilities.Internal.saveURI(wbp, uri, destFile);
|
||||
|
||||
return deferred.promise;
|
||||
});
|
||||
|
|
|
@ -1028,7 +1028,10 @@ Zotero.Sync.Runner = new function () {
|
|||
|
||||
var button = doc.createElement('button');
|
||||
button.setAttribute('label', buttonText);
|
||||
button.onclick = buttonCallback;
|
||||
button.onclick = function () {
|
||||
buttonCallback.call(this);
|
||||
panel.hidePopup();
|
||||
}
|
||||
buttons.appendChild(button);
|
||||
}
|
||||
|
||||
|
@ -1924,6 +1927,9 @@ Zotero.Sync.Server = new function () {
|
|||
sql = "INSERT INTO version VALUES ('syncdeletelog', ?)";
|
||||
Zotero.DB.query(sql, Zotero.Date.getUnixTimestamp());
|
||||
|
||||
var sql = "UPDATE syncedSettings SET synced=0";
|
||||
Zotero.DB.query(sql);
|
||||
|
||||
Zotero.DB.commitTransaction();
|
||||
}
|
||||
|
||||
|
@ -2104,7 +2110,19 @@ Zotero.Sync.Server = new function () {
|
|||
var background = Zotero.Sync.Runner.background;
|
||||
setTimeout(function () {
|
||||
var libraryID = parseInt(firstChild.getAttribute('libraryID'));
|
||||
var group = Zotero.Groups.getByLibraryID(libraryID);
|
||||
|
||||
try {
|
||||
var group = Zotero.Groups.getByLibraryID(libraryID);
|
||||
}
|
||||
catch (e) {
|
||||
// Not sure how this is possible, but it's affecting some people
|
||||
// TODO: Clean up in schema updates with FK check
|
||||
if (!Zotero.Libraries.exists(libraryID)) {
|
||||
let sql = "DELETE FROM syncedSettings WHERE libraryID=?";
|
||||
Zotero.DB.query(sql, libraryID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
|
@ -2132,6 +2150,42 @@ Zotero.Sync.Server = new function () {
|
|||
}, 1);
|
||||
break;
|
||||
|
||||
case 'NOTE_TOO_LONG':
|
||||
if (!Zotero.Sync.Runner.background) {
|
||||
let libraryKey = xmlhttp.responseXML.firstChild.getElementsByTagName('item');
|
||||
if (libraryKey.length) {
|
||||
let [libraryID, key] = libraryKey[0].textContent.split('/');
|
||||
if (Zotero.Libraries.getType(libraryID) == 'user') {
|
||||
libraryID = null;
|
||||
}
|
||||
let item = Zotero.Items.getByLibraryAndKey(libraryID, key);
|
||||
if (item) {
|
||||
let msg = xmlhttp.responseXML.firstChild.getElementsByTagName('error')[0].textContent;
|
||||
let e = new Zotero.Error(
|
||||
msg,
|
||||
0,
|
||||
{
|
||||
dialogText: msg,
|
||||
dialogButtonText: Zotero.getString('pane.items.showItemInLibrary'),
|
||||
dialogButtonCallback: function () {
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var win = wm.getMostRecentWindow("navigator:browser");
|
||||
win.ZoteroPane.selectItem(item.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
_error(e);
|
||||
}
|
||||
else {
|
||||
let msg = "Long note " + libraryKey[0].textContent + " not found!";
|
||||
Zotero.debug(msg, 1);
|
||||
Components.utils.reportError(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'TAG_TOO_LONG':
|
||||
if (!Zotero.Sync.Runner.background) {
|
||||
var tag = xmlhttp.responseXML.firstChild.getElementsByTagName('tag');
|
||||
|
@ -2419,7 +2473,7 @@ Zotero.Sync.Server = new function () {
|
|||
|
||||
|
||||
function _error(e, extraInfo, skipReload) {
|
||||
if (e.name && e.name == 'ZOTERO_ERROR') {
|
||||
if (e instanceof Zotero.Error) {
|
||||
switch (e.error) {
|
||||
case Zotero.Error.ERROR_MISSING_OBJECT:
|
||||
case Zotero.Error.ERROR_FULL_SYNC_REQUIRED:
|
||||
|
|
|
@ -590,6 +590,32 @@ Zotero.Translate.Sandbox = {
|
|||
if(setShortTitle) item.shortTitle = title;
|
||||
}
|
||||
|
||||
/* Clean up ISBNs
|
||||
* Allow multiple ISBNs, but...
|
||||
* (1) validate all ISBNs
|
||||
* (2) convert all ISBNs to ISBN-13
|
||||
* (3) remove any duplicates
|
||||
* (4) separate them with space
|
||||
*/
|
||||
if (item.ISBN) {
|
||||
// Match ISBNs with groups separated by various dashes or even spaces
|
||||
var isbnRe = /\b(?:97[89][\s\x2D\xAD\u2010-\u2015\u2043\u2212]*)?(?:\d[\s\x2D\xAD\u2010-\u2015\u2043\u2212]*){9}[\dx](?![\x2D\xAD\u2010-\u2015\u2043\u2212])\b/gi,
|
||||
validISBNs = [],
|
||||
isbn;
|
||||
while (isbn = isbnRe.exec(item.ISBN)) {
|
||||
var validISBN = Zotero.Utilities.cleanISBN(isbn[0]);
|
||||
if (!validISBN) {
|
||||
// Back up and move up one character
|
||||
isbnRe.lastIndex = isbn.index + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
var isbn13 = Zotero.Utilities.toISBN13(validISBN);
|
||||
if (validISBNs.indexOf(isbn13) == -1) validISBNs.push(isbn13);
|
||||
}
|
||||
item.ISBN = validISBNs.join(' ');
|
||||
}
|
||||
|
||||
// refuse to save very long tags
|
||||
if(item.tags) {
|
||||
for(var i=0; i<item.tags.length; i++) {
|
||||
|
@ -605,6 +631,13 @@ Zotero.Translate.Sandbox = {
|
|||
|
||||
for(var i=0; i<item.attachments.length; i++) {
|
||||
var attachment = item.attachments[i];
|
||||
|
||||
// Web translators are not allowed to use attachment.path
|
||||
if (attachment.path) {
|
||||
if (!attachment.url) attachment.url = attachment.path;
|
||||
delete attachment.path;
|
||||
}
|
||||
|
||||
if(attachment.url) {
|
||||
// Remap attachment (but not link) URLs
|
||||
attachment.url = translate.resolveURL(attachment.url, attachment.snapshot === false);
|
||||
|
@ -1189,16 +1222,22 @@ Zotero.Translate.Base.prototype = {
|
|||
} else {
|
||||
resolved = url;
|
||||
}
|
||||
} else if(Zotero.isFx) {
|
||||
} else if(Zotero.isFx && this.location) {
|
||||
resolved = Components.classes["@mozilla.org/network/io-service;1"].
|
||||
getService(Components.interfaces.nsIIOService).
|
||||
newURI(this.location, "", null).resolve(url);
|
||||
} else if(Zotero.isNode) {
|
||||
} else if(Zotero.isNode && this.location) {
|
||||
resolved = require('url').resolve(this.location, url);
|
||||
} else if (this.document) {
|
||||
var a = this.document.createElement('a');
|
||||
a.href = url;
|
||||
resolved = a.href;
|
||||
} else if (url.indexOf('//') == 0) {
|
||||
// Protocol-relative URL with no associated web page
|
||||
// Use HTTP by default
|
||||
resolved = 'http:' + url;
|
||||
} else {
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
resolved = a.href;
|
||||
throw new Error('Cannot resolve relative URL without an associated web page: ' + url);
|
||||
}
|
||||
|
||||
/*var m = hostPortRe.exec(resolved);
|
||||
|
@ -1500,28 +1539,7 @@ Zotero.Translate.Base.prototype = {
|
|||
"Zotero.Collection.prototype.complete = function() { Zotero._collectionDone(this); };";
|
||||
}
|
||||
|
||||
if(Zotero.isFx && !Zotero.isBookmarklet) {
|
||||
// workaround for inadvertant attempts to pass E4X back from sandbox
|
||||
src += "Zotero.Item.prototype.complete = function() { "+
|
||||
"for(var key in this) {"+
|
||||
"if("+createArrays+".indexOf(key) !== -1) {"+
|
||||
"for each(var item in this[key]) {"+
|
||||
"for(var key2 in item) {"+
|
||||
"if(typeof item[key2] === 'xml') {"+
|
||||
"item[key2] = item[key2].toString();"+
|
||||
"}"+
|
||||
"}"+
|
||||
"}"+
|
||||
"} else if(typeof this[key] === 'xml') {"+
|
||||
"this[key] = this[key].toString();"+
|
||||
"}"+
|
||||
"}";
|
||||
} else {
|
||||
src += "Zotero.Item.prototype.complete = function() { ";
|
||||
}
|
||||
|
||||
src += "Zotero._itemDone(this);"+
|
||||
"}";
|
||||
src += "Zotero.Item.prototype.complete = function() { Zotero._itemDone(this); }";
|
||||
|
||||
this._sandboxManager.eval(src);
|
||||
this._sandboxManager.importObject(this.Sandbox, this);
|
||||
|
@ -1690,7 +1708,9 @@ Zotero.Translate.Web.prototype._getSandboxLocation = function() {
|
|||
* Pass document and location to detect* and do* functions
|
||||
*/
|
||||
Zotero.Translate.Web.prototype._getParameters = function() {
|
||||
if (Zotero.Translate.DOMWrapper && Zotero.Translate.DOMWrapper.isWrapped(this.document)) {
|
||||
if (Zotero.Translate.DOMWrapper &&
|
||||
Zotero.Translate.DOMWrapper.isWrapped(this.document) &&
|
||||
Zotero.platformMajorVersion >= 35) {
|
||||
return [this._sandboxManager.wrap(Zotero.Translate.DOMWrapper.unwrap(this.document), null,
|
||||
this.document.__wrapperOverrides), this.location];
|
||||
} else {
|
||||
|
|
|
@ -401,14 +401,17 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
|||
this.sandbox.DOMParser = sandboxLocation.DOMParser;
|
||||
} else {
|
||||
this.sandbox.DOMParser = function() {
|
||||
this.__exposedProps__ = {"parseFromString":"r"};
|
||||
this.parseFromString = function(str, contentType) {
|
||||
var obj = new sandbox.Object();
|
||||
var wrappedObj = obj.wrappedJSObject || obj;
|
||||
wrappedObj.__exposedProps__ = {"parseFromString":"r"};
|
||||
wrappedObj.parseFromString = function(str, contentType) {
|
||||
var xhr = sandbox.XMLHttpRequest();
|
||||
xhr.open("GET", "data:"+contentType+";charset=utf-8,"+encodeURIComponent(str), false);
|
||||
xhr.send();
|
||||
if (!xhr.responseXML) throw new Error("error parsing XML");
|
||||
return xhr.responseXML;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"};
|
||||
|
@ -416,9 +419,12 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
|||
this.sandbox.XMLSerializer = function() {
|
||||
var s = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"]
|
||||
.createInstance(Components.interfaces.nsIDOMSerializer);
|
||||
this.serializeToString = function(doc) {
|
||||
var obj = new sandbox.Object();
|
||||
var wrappedObj = obj.wrappedJSObject || obj;
|
||||
wrappedObj.serializeToString = function(doc) {
|
||||
return s.serializeToString(Zotero.Translate.DOMWrapper.unwrap(doc));
|
||||
};
|
||||
return obj;
|
||||
};
|
||||
this.sandbox.XMLSerializer.__exposedProps__ = {"prototype":"r"};
|
||||
this.sandbox.XMLSerializer.prototype = {"__exposedProps__":{"serializeToString":"r"}};
|
||||
|
@ -443,10 +449,11 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
|||
target = new XPCNativeWrapper(target);
|
||||
}
|
||||
var ret = new sandbox.Object();
|
||||
ret.wrappedJSObject.has = function(x, prop) {
|
||||
var wrappedRet = ret.wrappedJSObject || ret;
|
||||
wrappedRet.has = function(x, prop) {
|
||||
return overrides.hasOwnProperty(prop) || prop in target;
|
||||
};
|
||||
ret.wrappedJSObject.get = function(x, prop, receiver) {
|
||||
wrappedRet.get = function(x, prop, receiver) {
|
||||
if (prop === "__wrappedObject") return target;
|
||||
if (prop === "__wrappingManager") return me;
|
||||
var y = overrides.hasOwnProperty(prop) ? overrides[prop] : target[prop];
|
||||
|
@ -461,10 +468,10 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
|||
return wrap(y.apply(target, args));
|
||||
} : new sandbox.Object());
|
||||
};
|
||||
ret.wrappedJSObject.ownKeys = function(x) {
|
||||
wrappedRet.ownKeys = function(x) {
|
||||
return Components.utils.cloneInto(target.getOwnPropertyNames(), sandbox);
|
||||
};
|
||||
ret.wrappedJSObject.enumerate = function(x) {
|
||||
wrappedRet.enumerate = function(x) {
|
||||
var y = new sandbox.Array();
|
||||
for (var i in target) y.wrappedJSObject.push(i);
|
||||
return y;
|
||||
|
|
|
@ -226,14 +226,65 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!attachment.path) {
|
||||
if (attachment.path) {
|
||||
var url = Zotero.Attachments.cleanAttachmentURI(attachment.path, false);
|
||||
if (url && /^(?:https?|ftp):/.test(url)) {
|
||||
// A web URL. Don't bother parsing it as path below
|
||||
// Some paths may look like URIs though, so don't just test for 'file'
|
||||
// E.g. C:\something
|
||||
if (!attachment.url) attachment.url = attachment.path;
|
||||
delete attachment.path;
|
||||
}
|
||||
}
|
||||
|
||||
let done = false;
|
||||
if (attachment.path) {
|
||||
var file = this._parsePath(attachment.path);
|
||||
if(!file) {
|
||||
let asUrl = Zotero.Attachments.cleanAttachmentURI(attachment.path);
|
||||
if (!attachment.url && !asUrl) {
|
||||
let e = "Translate: Could not parse attachment path <" + attachment.path + ">";
|
||||
Zotero.debug(e, 2);
|
||||
attachmentCallback(attachment, false, e);
|
||||
return false;
|
||||
} else if (!attachment.url && asUrl) {
|
||||
Zotero.debug("Translate: attachment path looks like a URI: " + attachment.path);
|
||||
attachment.url = asUrl;
|
||||
delete attachment.path;
|
||||
}
|
||||
} else {
|
||||
if (attachment.url) {
|
||||
attachment.linkMode = "imported_url";
|
||||
var myID = yield Zotero.Attachments.importSnapshotFromFile({
|
||||
file: file,
|
||||
url: attachment.url,
|
||||
title: attachment.title,
|
||||
contentType: attachment.mimeType,
|
||||
charset: attachment.charset,
|
||||
parentItemID: parentID
|
||||
});
|
||||
}
|
||||
else {
|
||||
attachment.linkMode = "imported_file";
|
||||
var myID = yield Zotero.Attachments.importFromFile({
|
||||
file: file,
|
||||
parentItemID: parentID
|
||||
});
|
||||
}
|
||||
attachmentCallback(attachment, 100);
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!done) {
|
||||
let url = Zotero.Attachments.cleanAttachmentURI(attachment.url);
|
||||
if (!url) {
|
||||
let e = "Translate: Invalid attachment URL specified <" + attachment.url + ">";
|
||||
let e = "Translate: Invalid attachment.url specified <" + attachment.url + ">";
|
||||
Zotero.debug(e, 2);
|
||||
attachmentCallback(attachment, false, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
attachment.url = url;
|
||||
url = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
|
@ -241,17 +292,17 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
|
||||
// see if this is actually a file URL
|
||||
if(url.scheme == "file") {
|
||||
attachment.path = attachment.url;
|
||||
attachment.url = false;
|
||||
let e = "Translate: Local file attachments cannot be specified in attachment.url";
|
||||
Zotero.debug(e, 2);
|
||||
attachmentCallback(attachment, false, e);
|
||||
return false;
|
||||
} else if(url.scheme != "http" && url.scheme != "https") {
|
||||
let e = "Translate: " + url.scheme + " protocol is not allowed for attachments from translators.";
|
||||
Zotero.debug(e, 2);
|
||||
attachmentCallback(attachment, false, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!attachment.path) {
|
||||
|
||||
// At this point, must be a valid HTTP/HTTPS url
|
||||
attachment.linkMode = "linked_file";
|
||||
var newItem = yield Zotero.Attachments.linkFromURL({
|
||||
|
@ -269,29 +320,6 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
}
|
||||
Zotero.debug("Translate: Created attachment; id is " + newItem.id, 4);
|
||||
attachmentCallback(attachment, 100);
|
||||
} else {
|
||||
var file = this._parsePath(attachment.path);
|
||||
if(!file) return;
|
||||
|
||||
if (attachment.url) {
|
||||
attachment.linkMode = "imported_url";
|
||||
var newItem = yield Zotero.Attachments.importSnapshotFromFile({
|
||||
file: file,
|
||||
url: attachment.url,
|
||||
title: attachment.title,
|
||||
contentType: attachment.mimeType,
|
||||
charset: attachment.charset,
|
||||
parentItemID: parentID
|
||||
});
|
||||
}
|
||||
else {
|
||||
attachment.linkMode = "imported_file";
|
||||
var newItem = yield Zotero.Attachments.importFromFile({
|
||||
file: file,
|
||||
parentItemID: parentID
|
||||
});
|
||||
}
|
||||
attachmentCallback(attachment, 100);
|
||||
}
|
||||
|
||||
// save fields
|
||||
|
@ -311,43 +339,73 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
"_parsePathURI":function(path) {
|
||||
try {
|
||||
var uri = Services.io.newURI(path, "", this._baseURI);
|
||||
} catch(e) {
|
||||
Zotero.debug("Translate: " + path + " is not a valid URI");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file;
|
||||
if(file.path != '/' && file.exists()) return file;
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
Zotero.debug("Translate: " + uri.spec + " is not a file URI");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
if(file.path == '/') {
|
||||
Zotero.debug("Translate: " + path + " points to root directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!file.exists()) {
|
||||
Zotero.debug("Translate: File at " + file.path + " does not exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
return file;
|
||||
},
|
||||
|
||||
"_parseAbsolutePath":function(path) {
|
||||
var file = Components.classes["@mozilla.org/file/local;1"].
|
||||
createInstance(Components.interfaces.nsILocalFile);
|
||||
try {
|
||||
// First, try to parse absolute paths using initWithPath
|
||||
var file = Components.classes["@mozilla.org/file/local;1"].
|
||||
createInstance(Components.interfaces.nsILocalFile);
|
||||
file.initWithPath(path);
|
||||
if(file.exists()) return file;
|
||||
} catch(e) {
|
||||
Zotero.logError(e);
|
||||
Zotero.debug("Translate: Invalid absolute path: " + path);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
if(!file.exists()) {
|
||||
Zotero.debug("Translate: File at absolute path " + file.path + " does not exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
return file;
|
||||
},
|
||||
|
||||
"_parseRelativePath":function(path) {
|
||||
try {
|
||||
var file = this._baseURI.QueryInterface(Components.interfaces.nsIFileURL).file.parent;
|
||||
var splitPath = path.split(/\//g);
|
||||
for(var i=0; i<splitPath.length; i++) {
|
||||
if(splitPath[i] !== "") file.append(splitPath[i]);
|
||||
}
|
||||
if(file.exists()) return file;
|
||||
} catch(e) {
|
||||
Zotero.logError(e);
|
||||
if (!this._baseURI) {
|
||||
Zotero.debug("Translate: Cannot parse as relative path. No base URI available.");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
var file = this._baseURI.QueryInterface(Components.interfaces.nsIFileURL).file.parent;
|
||||
var splitPath = path.split(/\//g);
|
||||
for(var i=0; i<splitPath.length; i++) {
|
||||
if(splitPath[i] !== "") file.append(splitPath[i]);
|
||||
}
|
||||
|
||||
if(!file.exists()) {
|
||||
Zotero.debug("Translate: File at " + file.path + " does not exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
return file;
|
||||
},
|
||||
|
||||
"_parsePath":function(path) {
|
||||
Zotero.debug("Translate: Attempting to parse path " + path);
|
||||
|
||||
var file;
|
||||
|
||||
// First, try to parse as absolute path
|
||||
|
|
|
@ -278,13 +278,20 @@ Zotero.Utilities = {
|
|||
/**
|
||||
* Clean and validate ISBN.
|
||||
* Return isbn if valid, otherwise return false
|
||||
* @param {String} isbn
|
||||
* @param {Boolean} [dontValidate=false] Do not validate check digit
|
||||
* @return {String|Boolean} Valid ISBN or false
|
||||
*/
|
||||
"cleanISBN":function(/**String*/ isbn) {
|
||||
"cleanISBN":function(isbn, dontValidate) {
|
||||
isbn = isbn.replace(/[^0-9a-z]+/ig, '').toUpperCase() //we only want to ignore punctuation, spaces
|
||||
.match(/(?:97[89][0-9]{10}|[0-9]{9}[0-9X])/); //13 digit or 10 digit
|
||||
.match(/\b(?:97[89][0-9]{10}|[0-9]{9}[0-9X])\b/); //13 digit or 10 digit
|
||||
if(!isbn) return false;
|
||||
isbn = isbn[0];
|
||||
|
||||
|
||||
if (dontValidate && (isbn.length == 10 || isbn.length == 13)) {
|
||||
return isbn;
|
||||
}
|
||||
|
||||
if(isbn.length == 10) {
|
||||
// Verify ISBN-10 checksum
|
||||
var sum = 0;
|
||||
|
@ -310,6 +317,34 @@ Zotero.Utilities = {
|
|||
|
||||
return false;
|
||||
},
|
||||
|
||||
/*
|
||||
* Convert ISBN 10 to ISBN 13
|
||||
* @param {String} isbn ISBN 10 or ISBN 13
|
||||
* cleanISBN
|
||||
* @return {String} ISBN-13
|
||||
*/
|
||||
"toISBN13": function(isbn) {
|
||||
if (!/^(?:97[89])?\d{9}[\dxX]$/.test(isbn)
|
||||
&& !(isbn = Zotero.Utilities.cleanISBN(isbn))
|
||||
) {
|
||||
throw new Error('Invalid ISBN: ' + isbn);
|
||||
}
|
||||
|
||||
if (isbn.length == 13) return isbn; // Recalculate check digit?
|
||||
|
||||
isbn = '978' + isbn.substr(0,9);
|
||||
|
||||
var sum = 0;
|
||||
for (var i = 0; i < 12; i++) {
|
||||
sum += isbn[i] * (i%2 ? 3 : 1);
|
||||
}
|
||||
|
||||
var checkDigit = 10 - (sum % 10);
|
||||
if (checkDigit == 10) checkDigit = 0;
|
||||
|
||||
return isbn + checkDigit;
|
||||
},
|
||||
|
||||
/**
|
||||
* Clean and validate ISSN.
|
||||
|
@ -1162,15 +1197,15 @@ Zotero.Utilities = {
|
|||
// document, we need to use selectNodes
|
||||
if(namespaces) {
|
||||
var ieNamespaces = [];
|
||||
for(var i in namespaces) {
|
||||
if(!i) continue;
|
||||
ieNamespaces.push('xmlns:'+i+'="'+Zotero.Utilities.htmlSpecialChars(namespaces[i])+'"');
|
||||
for(var j in namespaces) {
|
||||
if(!j) continue;
|
||||
ieNamespaces.push('xmlns:'+j+'="'+Zotero.Utilities.htmlSpecialChars(namespaces[j])+'"');
|
||||
}
|
||||
rootDoc.setProperty("SelectionNamespaces", ieNamespaces.join(" "));
|
||||
}
|
||||
var nodes = element.selectNodes(xpath);
|
||||
for(var i=0; i<nodes.length; i++) {
|
||||
results.push(nodes[i]);
|
||||
for(var j=0; j<nodes.length; j++) {
|
||||
results.push(nodes[j]);
|
||||
}
|
||||
} else {
|
||||
throw new Error("XPath functionality not available");
|
||||
|
@ -1289,9 +1324,10 @@ Zotero.Utilities = {
|
|||
level_padding += " ";
|
||||
}
|
||||
|
||||
//Special handling for Error
|
||||
//Special handling for Error or Exception
|
||||
var isException = Zotero.isFx && !Zotero.isBookmarklet && obj instanceof Components.interfaces.nsIException;
|
||||
var isError = obj instanceof Error;
|
||||
if (!isError && obj.constructor) {
|
||||
if (!isException && !isError && obj.constructor && obj.stack) {
|
||||
switch (obj.constructor.name) {
|
||||
case 'Error':
|
||||
case 'EvalError':
|
||||
|
@ -1303,8 +1339,16 @@ Zotero.Utilities = {
|
|||
isError = true;
|
||||
}
|
||||
}
|
||||
if (isError) {
|
||||
return (obj.constructor.name ? obj.constructor.name : 'Error') + ': '
|
||||
|
||||
if (isError || isException) {
|
||||
var header = '';
|
||||
if (isError) {
|
||||
header = obj.constructor.name ? obj.constructor.name : 'Error';
|
||||
} else {
|
||||
header = (obj.name ? obj.name + ' ' : '') + 'Exception';
|
||||
}
|
||||
|
||||
return header + ': '
|
||||
+ (obj.message ? ('' + obj.message).replace(/^/gm, level_padding).trim() : '')
|
||||
+ '\n' + level_padding + "===== Stack Trace =====\n"
|
||||
+ (obj.stack ? obj.stack.trim().replace(/^(?=.)/gm, level_padding) : '')
|
||||
|
@ -1539,89 +1583,84 @@ Zotero.Utilities = {
|
|||
|
||||
/**
|
||||
* Converts an item from toArray() format to citeproc-js JSON
|
||||
* @param {Zotero.Item} item
|
||||
* @param {Zotero.Item} zoteroItem
|
||||
* @return {Object} The CSL item
|
||||
*/
|
||||
"itemToCSLJSON":function(item) {
|
||||
if(item instanceof Zotero.Item) {
|
||||
item = item.toArray();
|
||||
"itemToCSLJSON":function(zoteroItem) {
|
||||
if (zoteroItem instanceof Zotero.Item) {
|
||||
zoteroItem = zoteroItem.toArray();
|
||||
}
|
||||
|
||||
var itemType = item.itemType;
|
||||
var cslType = CSL_TYPE_MAPPINGS[itemType];
|
||||
if(!cslType) cslType = "article";
|
||||
var cslType = CSL_TYPE_MAPPINGS[zoteroItem.itemType] || "article";
|
||||
var itemTypeID = Zotero.ItemTypes.getID(zoteroItem.itemType);
|
||||
|
||||
var cslItem = {
|
||||
'id':item.itemID,
|
||||
'id':zoteroItem.itemID,
|
||||
'type':cslType
|
||||
};
|
||||
|
||||
// Map text fields
|
||||
var itemTypeID = Zotero.ItemTypes.getID(itemType);
|
||||
// get all text variables (there must be a better way)
|
||||
for(var variable in CSL_TEXT_MAPPINGS) {
|
||||
var fields = CSL_TEXT_MAPPINGS[variable];
|
||||
for(var i=0, n=fields.length; i<n; i++) {
|
||||
var field = fields[i], value = undefined;
|
||||
var field = fields[i],
|
||||
value = null;
|
||||
|
||||
if(field in item) {
|
||||
value = item[field];
|
||||
if(field in zoteroItem) {
|
||||
value = zoteroItem[field];
|
||||
} else {
|
||||
var fieldID = Zotero.ItemFields.getID(field),
|
||||
baseMapping
|
||||
baseMapping;
|
||||
if(Zotero.ItemFields.isValidForType(fieldID, itemTypeID)
|
||||
&& (baseMapping = Zotero.ItemFields.getBaseIDFromTypeAndField(itemTypeID, fieldID))) {
|
||||
value = item[Zotero.ItemTypes.getName(baseMapping)];
|
||||
value = zoteroItem[Zotero.ItemTypes.getName(baseMapping)];
|
||||
}
|
||||
}
|
||||
|
||||
if(!value) continue;
|
||||
if (!value) continue;
|
||||
|
||||
var valueLength = value.length;
|
||||
if(valueLength) {
|
||||
if (typeof value == 'string') {
|
||||
if (field == 'ISBN') {
|
||||
// Only use the first ISBN in CSL JSON
|
||||
var isbn = value.match(/^(?:97[89]-?)?(?:\d-?){9}[\dx](?!-)\b/i);
|
||||
if (isbn) value = isbn[0];
|
||||
}
|
||||
|
||||
// Strip enclosing quotes
|
||||
if(value[0] === '"' && value[valueLength-1] === '"') {
|
||||
value = value.substr(1, valueLength-2);
|
||||
if(value.charAt(0) == '"' && value.indexOf('"', 1) == value.length - 1) {
|
||||
value = value.substring(1, value.length-1);
|
||||
}
|
||||
cslItem[variable] = value;
|
||||
break;
|
||||
}
|
||||
|
||||
cslItem[variable] = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// separate name variables
|
||||
var authorID = Zotero.CreatorTypes.getPrimaryIDForType(itemTypeID);
|
||||
var authorFieldName = Zotero.CreatorTypes.getName(authorID);
|
||||
var creators = item.creators;
|
||||
if(creators) {
|
||||
for(var i=0, n=creators.length; i<n; i++) {
|
||||
var creator = creators[i];
|
||||
|
||||
if(creator.creatorType == authorFieldName) {
|
||||
var creatorType = "author";
|
||||
} else {
|
||||
var creatorType = CSL_NAMES_MAPPINGS[creator.creatorType]
|
||||
}
|
||||
|
||||
if(!creatorType) continue;
|
||||
|
||||
if(creator.fieldMode == 1) {
|
||||
var nameObj = {'literal':creator.lastName};
|
||||
} else {
|
||||
var nameObj = {'family':creator.lastName, 'given':creator.firstName};
|
||||
}
|
||||
|
||||
if(cslItem[creatorType]) {
|
||||
cslItem[creatorType].push(nameObj);
|
||||
} else {
|
||||
cslItem[creatorType] = [nameObj];
|
||||
}
|
||||
var author = Zotero.CreatorTypes.getName(Zotero.CreatorTypes.getPrimaryIDForType(itemTypeID));
|
||||
var creators = zoteroItem.creators;
|
||||
for(var i=0; i<creators.length; i++) {
|
||||
var creator = creators[i];
|
||||
var creatorType = creator.creatorType;
|
||||
if(creatorType == author) {
|
||||
creatorType = "author";
|
||||
}
|
||||
|
||||
creatorType = CSL_NAMES_MAPPINGS[creatorType];
|
||||
if(!creatorType) continue;
|
||||
|
||||
var nameObj = {'family':creator.lastName, 'given':creator.firstName};
|
||||
|
||||
if(cslItem[creatorType]) {
|
||||
cslItem[creatorType].push(nameObj);
|
||||
} else {
|
||||
cslItem[creatorType] = [nameObj];
|
||||
}
|
||||
}
|
||||
|
||||
// get date variables
|
||||
for(var variable in CSL_DATE_MAPPINGS) {
|
||||
var date = item[CSL_DATE_MAPPINGS[variable]];
|
||||
var date = zoteroItem[CSL_DATE_MAPPINGS[variable]];
|
||||
if(date) {
|
||||
var dateObj = Zotero.Date.strToDate(date);
|
||||
// otherwise, use date-parts
|
||||
|
@ -1647,8 +1686,17 @@ Zotero.Utilities = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// extract PMID
|
||||
var extra = zoteroItem.extra;
|
||||
if(typeof extra === "string") {
|
||||
var m = /(?:^|\n)PMID:\s*([0-9]+)/.exec(extra);
|
||||
if(m) cslItem.PMID = m[1];
|
||||
m = /(?:^|\n)PMCID:\s*((?:PMC)?[0-9]+)/.exec(extra);
|
||||
if(m) cslItem.PMCID = m[1];
|
||||
}
|
||||
|
||||
//this._cache[item.id] = cslItem;
|
||||
//this._cache[zoteroItem.id] = cslItem;
|
||||
return cslItem;
|
||||
},
|
||||
|
||||
|
|
|
@ -294,6 +294,25 @@ Zotero.Utilities.Internal = {
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* saveURI wrapper function
|
||||
* @param {nsIWebBrowserPersist} nsIWebBrowserPersist
|
||||
* @param {nsIURI} source URL
|
||||
* @param {nsISupports} target file
|
||||
*/
|
||||
saveURI: function (wbp, source, target) {
|
||||
// Firefox 35 and below
|
||||
try {
|
||||
wbp.saveURI(source, null, null, null, null, target, null);
|
||||
}
|
||||
// Firefox 36+ needs one more parameter
|
||||
catch (e if e.name === "NS_ERROR_XPC_NOT_ENOUGH_ARGS") {
|
||||
wbp.saveURI(source, null, null, null, null, null, target, null);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Launch a process
|
||||
* @param {nsIFile} cmd Path to command to launch
|
||||
|
@ -510,6 +529,81 @@ Zotero.Utilities.Internal = {
|
|||
}, 0, 0, null);
|
||||
|
||||
return pipe.inputStream;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Hyphenate an ISBN based on the registrant table available from
|
||||
* https://www.isbn-international.org/range_file_generation
|
||||
* See isbn.js
|
||||
*
|
||||
* @param {String} isbn ISBN-10 or ISBN-13
|
||||
* @param {Boolean} dontValidate Do not attempt to validate check digit
|
||||
* @return {String} Hyphenated ISBN or empty string if invalid ISBN is supplied
|
||||
*/
|
||||
"hyphenateISBN": function(isbn, dontValidate) {
|
||||
isbn = Zotero.Utilities.cleanISBN(isbn, dontValidate);
|
||||
if (!isbn) return '';
|
||||
|
||||
var ranges = Zotero.ISBN.ranges,
|
||||
parts = [],
|
||||
uccPref,
|
||||
i = 0;
|
||||
if (isbn.length == 10) {
|
||||
uccPref = '978';
|
||||
} else {
|
||||
uccPref = isbn.substr(0,3);
|
||||
if (!ranges[uccPref]) return ''; // Probably invalid ISBN, but the checksum is OK
|
||||
parts.push(uccPref);
|
||||
i = 3; // Skip ahead
|
||||
}
|
||||
|
||||
var group = '',
|
||||
found = false;
|
||||
while (i < isbn.length-3 /* check digit, publication, registrant */) {
|
||||
group += isbn.charAt(i);
|
||||
if (ranges[uccPref][group]) {
|
||||
parts.push(group);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!found) return ''; // Did not find a valid group
|
||||
|
||||
// Array of registrant ranges that are valid for a group
|
||||
// Array always contains an even number of values (as string)
|
||||
// From left to right, the values are paired so that the first indicates a
|
||||
// lower bound of the range and the right indicates an upper bound
|
||||
// The ranges are sorted by increasing number of characters
|
||||
var regRanges = ranges[uccPref][group];
|
||||
|
||||
var registrant = '';
|
||||
found = false;
|
||||
i++; // Previous loop 'break'ed early
|
||||
while (!found && i < isbn.length-2 /* check digit, publication */) {
|
||||
registrant += isbn.charAt(i);
|
||||
|
||||
for(let j=0; j < regRanges.length && registrant.length >= regRanges[j].length; j+=2) {
|
||||
if(registrant.length == regRanges[j].length
|
||||
&& registrant >= regRanges[j] && registrant <= regRanges[j+1] // Falls within the range
|
||||
) {
|
||||
parts.push(registrant);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!found) return ''; // Outside of valid range, but maybe we need to update our data
|
||||
|
||||
parts.push(isbn.substring(i,isbn.length-1)); // Publication is the remainder up to last digit
|
||||
parts.push(isbn.charAt(isbn.length-1)); // Check digit
|
||||
|
||||
return parts.join('-');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
|||
this.getAncestorByTagName = getAncestorByTagName;
|
||||
this.randomString = randomString;
|
||||
this.moveToUnique = moveToUnique;
|
||||
this.reinit = reinit; // defined in zotero-service.js
|
||||
|
||||
// Public properties
|
||||
this.initialized = false;
|
||||
|
@ -174,6 +175,8 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
|||
|
||||
this.mainThread = Services.tm.mainThread;
|
||||
|
||||
this.clientName = ZOTERO_CONFIG.CLIENT_NAME;
|
||||
|
||||
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
this.platformVersion = appInfo.platformVersion;
|
||||
|
@ -252,7 +255,8 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
|||
else {
|
||||
Zotero.dir = 'ltr';
|
||||
}
|
||||
|
||||
Zotero.rtl = Zotero.dir == 'rtl';
|
||||
|
||||
// Make sure that Zotero Standalone is not running as root
|
||||
if(Zotero.isStandalone && !Zotero.isWin) _checkRoot();
|
||||
|
||||
|
@ -2240,7 +2244,7 @@ Zotero.Prefs = new function(){
|
|||
case branch.PREF_BOOL:
|
||||
return branch.getBoolPref(pref);
|
||||
case branch.PREF_STRING:
|
||||
return branch.getCharPref(pref);
|
||||
return '' + branch.getComplexValue(pref, Components.interfaces.nsISupportsString);
|
||||
case branch.PREF_INT:
|
||||
return branch.getIntPref(pref);
|
||||
}
|
||||
|
@ -2327,6 +2331,63 @@ Zotero.Prefs = new function(){
|
|||
// TODO: parse settings XML
|
||||
}
|
||||
|
||||
// Handlers for some Zotero preferences
|
||||
var _handlers = [
|
||||
[ "automaticScraperUpdates", function(val) {
|
||||
if (val){
|
||||
Zotero.Schema.updateFromRepository();
|
||||
}
|
||||
else {
|
||||
Zotero.Schema.stopRepositoryTimer();
|
||||
}
|
||||
}],
|
||||
[ "note.fontSize", function(val) {
|
||||
if (val < 6) {
|
||||
Zotero.Prefs.set('note.fontSize', 11);
|
||||
}
|
||||
}],
|
||||
[ "zoteroDotOrgVersionHeader", function(val) {
|
||||
if (val) {
|
||||
Zotero.VersionHeader.register();
|
||||
}
|
||||
else {
|
||||
Zotero.VersionHeader.unregister();
|
||||
}
|
||||
}],
|
||||
[ "zoteroDotOrgVersionHeader", function(val) {
|
||||
if (val) {
|
||||
Zotero.VersionHeader.register();
|
||||
}
|
||||
else {
|
||||
Zotero.VersionHeader.unregister();
|
||||
}
|
||||
}],
|
||||
[ "sync.autoSync", function(val) {
|
||||
if (val) {
|
||||
Zotero.Sync.Runner.IdleListener.register();
|
||||
}
|
||||
else {
|
||||
Zotero.Sync.Runner.IdleListener.unregister();
|
||||
}
|
||||
}],
|
||||
[ "search.quicksearch-mode", function(val) {
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var enumerator = wm.getEnumerator("navigator:browser");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var win = enumerator.getNext();
|
||||
if (!win.ZoteroPane) continue;
|
||||
Zotero.updateQuickSearchBox(win.ZoteroPane.document);
|
||||
}
|
||||
|
||||
var enumerator = wm.getEnumerator("zotero:item-selector");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var win = enumerator.getNext();
|
||||
if (!win.Zotero) continue;
|
||||
Zotero.updateQuickSearchBox(win.document);
|
||||
}
|
||||
}]
|
||||
];
|
||||
|
||||
//
|
||||
// Methods to register a preferences observer
|
||||
|
@ -2334,6 +2395,11 @@ Zotero.Prefs = new function(){
|
|||
function register(){
|
||||
this.prefBranch.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||
this.prefBranch.addObserver("", this, false);
|
||||
|
||||
// Register pre-set handlers
|
||||
for (var i=0; i<_handlers.length; i++) {
|
||||
this.registerObserver(_handlers[i][0], _handlers[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
function unregister(){
|
||||
|
@ -2343,143 +2409,48 @@ Zotero.Prefs = new function(){
|
|||
this.prefBranch.removeObserver("", this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {nsIPrefBranch} subject The nsIPrefBranch we're observing (after appropriate QI)
|
||||
* @param {String} topic The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID
|
||||
* @param {String} data The name of the pref that's been changed (relative to subject)
|
||||
*/
|
||||
function observe(subject, topic, data){
|
||||
if(topic!="nsPref:changed"){
|
||||
if (topic != "nsPref:changed" || !_observers[data] || !_observers[data].length) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
// subject is the nsIPrefBranch we're observing (after appropriate QI)
|
||||
// data is the name of the pref that's been changed (relative to subject)
|
||||
switch (data) {
|
||||
case "statusBarIcon":
|
||||
var doc = Services.wm.getMostRecentWindow("navigator:browser").document;
|
||||
|
||||
var addonBar = doc.getElementById("addon-bar");
|
||||
var icon = doc.getElementById("zotero-toolbar-button");
|
||||
// When the customize window is open, toolbar buttons seem to
|
||||
// become wrapped in toolbarpaletteitems, which we need to remove
|
||||
// manually if we change the pref to hidden or else the customize
|
||||
// window doesn't close.
|
||||
var wrapper = doc.getElementById("wrapper-zotero-toolbar-button");
|
||||
var palette = doc.getElementById("navigator-toolbox").palette;
|
||||
var inAddonBar = false;
|
||||
if (icon) {
|
||||
// Because of the potential wrapper, don't just use .parentNode
|
||||
var toolbar = Zotero.getAncestorByTagName(icon, "toolbar");
|
||||
inAddonBar = toolbar == addonBar;
|
||||
}
|
||||
var val = this.get("statusBarIcon");
|
||||
if (val == 0) {
|
||||
// If showing in add-on bar, hide
|
||||
if (!icon || !inAddonBar) {
|
||||
return;
|
||||
}
|
||||
palette.appendChild(icon);
|
||||
if (wrapper) {
|
||||
addonBar.removeChild(wrapper);
|
||||
}
|
||||
addonBar.setAttribute("currentset", addonBar.currentSet);
|
||||
doc.persist(addonBar.id, "currentset");
|
||||
}
|
||||
else {
|
||||
// If showing somewhere else, remove it from there
|
||||
if (icon && !inAddonBar) {
|
||||
palette.appendChild(icon);
|
||||
if (wrapper) {
|
||||
toolbar.removeChild(wrapper);
|
||||
}
|
||||
toolbar.setAttribute("currentset", toolbar.currentSet);
|
||||
doc.persist(toolbar.id, "currentset");
|
||||
}
|
||||
|
||||
// If not showing in add-on bar, add
|
||||
if (!inAddonBar) {
|
||||
var icon = addonBar.insertItem("zotero-toolbar-button");
|
||||
addonBar.setAttribute("currentset", addonBar.currentSet);
|
||||
doc.persist(addonBar.id, "currentset");
|
||||
addonBar.setAttribute("collapsed", false);
|
||||
doc.persist(addonBar.id, "collapsed");
|
||||
}
|
||||
// And make small
|
||||
if (val == 1) {
|
||||
icon.setAttribute("compact", true);
|
||||
}
|
||||
// Or large
|
||||
else if (val == 2) {
|
||||
icon.removeAttribute("compact");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "automaticScraperUpdates":
|
||||
if (this.get('automaticScraperUpdates')){
|
||||
Zotero.Schema.updateFromRepository();
|
||||
}
|
||||
else {
|
||||
Zotero.Schema.stopRepositoryTimer();
|
||||
}
|
||||
break;
|
||||
|
||||
case "note.fontSize":
|
||||
var val = this.get('note.fontSize');
|
||||
if (val < 6) {
|
||||
this.set('note.fontSize', 11);
|
||||
}
|
||||
break;
|
||||
|
||||
case "zoteroDotOrgVersionHeader":
|
||||
if (this.get("zoteroDotOrgVersionHeader")) {
|
||||
Zotero.VersionHeader.register();
|
||||
}
|
||||
else {
|
||||
Zotero.VersionHeader.unregister();
|
||||
}
|
||||
break;
|
||||
|
||||
case "sync.autoSync":
|
||||
if (this.get("sync.autoSync")) {
|
||||
Zotero.Sync.Runner.IdleListener.register();
|
||||
}
|
||||
else {
|
||||
Zotero.Sync.Runner.IdleListener.unregister();
|
||||
}
|
||||
break;
|
||||
|
||||
// TEMP
|
||||
case "sync.fulltext.enabled":
|
||||
if (this.get("sync.fulltext.enabled")) {
|
||||
// Disable downgrades if full-text sync is enabled, since otherwise
|
||||
// we could miss full-text content updates
|
||||
if (Zotero.DB.valueQuery("SELECT version FROM version WHERE schema='userdata'") < 77) {
|
||||
Zotero.DB.query("UPDATE version SET version=77 WHERE schema='userdata'");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "search.quicksearch-mode":
|
||||
var enumerator = Services.wm.getEnumerator("navigator:browser");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var win = enumerator.getNext();
|
||||
if (!win.ZoteroPane) continue;
|
||||
Zotero.updateQuickSearchBox(win.ZoteroPane.document);
|
||||
}
|
||||
|
||||
var enumerator = Services.wm.getEnumerator("zotero:item-selector");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var win = enumerator.getNext();
|
||||
if (!win.Zotero) continue;
|
||||
Zotero.updateQuickSearchBox(win.document);
|
||||
}
|
||||
break;
|
||||
var obs = _observers[data];
|
||||
for (var i=0; i<obs.length; i++) {
|
||||
try {
|
||||
obs[i](this.get(data));
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug("Error while executing preference observer handler for " + data);
|
||||
Zotero.debug(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var _observers = {};
|
||||
this.registerObserver = function(name, handler) {
|
||||
_observers[name] = _observers[name] || [];
|
||||
_observers[name].push(handler);
|
||||
}
|
||||
|
||||
this.unregisterObserver = function(name, handler) {
|
||||
var obs = _observers[name];
|
||||
if (!obs) {
|
||||
Zotero.debug("No preferences observer registered for " + name);
|
||||
return;
|
||||
}
|
||||
|
||||
var i = obs.indexOf(handler);
|
||||
if (i == -1) {
|
||||
Zotero.debug("Handler was not registered for preference " + name);
|
||||
return;
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.debug(e);
|
||||
throw (e);
|
||||
}
|
||||
|
||||
obs.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1413,7 +1413,16 @@ var ZoteroPane = new function()
|
|||
for (var i=0, len=itemsView.selection.getRangeCount(); i<len; i++) {
|
||||
itemsView.selection.getRangeAt(i, start, end);
|
||||
for (var j=start.value; j<=end.value; j++) {
|
||||
if (!itemsView.getRow(j).ref.deleted) {
|
||||
let itemRow = itemsView.getRow(j);
|
||||
|
||||
// DEBUG: Not sure how this is possible, but it was happening while switching
|
||||
// to an item in the trash in a collapsed library from another library
|
||||
if (!itemRow) {
|
||||
Zotero.debug("Item row " + j + " not found in _nonDeletedItemsSelected()", 2);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!itemRow.ref.deleted) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1600,6 +1609,12 @@ var ZoteroPane = new function()
|
|||
'pane.items.delete' + (this.itemsView.selection.count > 1 ? '.multiple' : '')
|
||||
)
|
||||
};
|
||||
var toRemove = {
|
||||
title: Zotero.getString('pane.items.remove.title'),
|
||||
text: Zotero.getString(
|
||||
'pane.items.remove' + (this.itemsView.selection.count > 1 ? '.multiple' : '')
|
||||
)
|
||||
};
|
||||
|
||||
if (collectionTreeRow.isPublications()) {
|
||||
var prompt = toDelete;
|
||||
|
@ -1610,7 +1625,7 @@ var ZoteroPane = new function()
|
|||
}
|
||||
else if (collectionTreeRow.isCollection()) {
|
||||
// In collection, only prompt if trashing
|
||||
var prompt = force ? toTrash : false;
|
||||
var prompt = force ? toTrash : toRemove;
|
||||
}
|
||||
else if (collectionTreeRow.isSearch() || collectionTreeRow.isUnfiled() || collectionTreeRow.isDuplicates()) {
|
||||
if (!force) {
|
||||
|
@ -2003,8 +2018,14 @@ var ZoteroPane = new function()
|
|||
Zotero.spawn(function* () {
|
||||
var selected = yield self.itemsView.selectItem(itemID, expand);
|
||||
if (!selected) {
|
||||
Zotero.debug("Item was not selected; switching to library");
|
||||
yield self.collectionsView.selectLibrary(item.libraryID);
|
||||
if (item.deleted) {
|
||||
Zotero.debug("Item is deleted; switching to trash");
|
||||
this.collectionsView.selectTrash(item.libraryID);
|
||||
}
|
||||
else {
|
||||
Zotero.debug("Item was not selected; switching to library");
|
||||
yield this.collectionsView.selectLibrary(item.libraryID);
|
||||
}
|
||||
yield self.itemsView.selectItem(itemID, expand);
|
||||
}
|
||||
deferred.resolve(true);
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<command id="cmd_zotero_newSavedSearch" oncommand="ZoteroPane_Local.newSearch()"/>
|
||||
<command id="cmd_zotero_newStandaloneNote" oncommand="ZoteroPane_Local.newNote(event.shiftKey);"/>
|
||||
<command id="cmd_zotero_newChildNote" oncommand="ZoteroPane_Local.newChildNote(event.shiftKey);"/>
|
||||
<!-- Keep in sync with browser.js::scrapeThisPage(), until that calls this directly -->
|
||||
<command id="cmd_zotero_newItemFromCurrentPage" oncommand="ZoteroPane.addItemFromPage('temporaryPDFHack', event.shiftKey ? !Zotero.Prefs.get('automaticSnapshots') : null)"/>
|
||||
</commandset>
|
||||
|
||||
|
@ -140,7 +141,6 @@
|
|||
</menu>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="zotero-tb-item-from-page" class="zotero-tb-button standalone-no-display" tooltiptext="&zotero.toolbar.newItemFromPage.label;" command="cmd_zotero_newItemFromCurrentPage"/>
|
||||
<toolbarbutton id="zotero-tb-lookup" class="zotero-tb-button" tooltiptext="&zotero.toolbar.lookup.label;" type="panel">
|
||||
<panel id="zotero-lookup-panel" type="arrow" onpopupshown="Zotero_Lookup.onShowing()"
|
||||
onpopuphidden="Zotero_Lookup.onHidden(event)">
|
||||
|
|
4
chrome/locale/af-ZA/zotero/csledit.dtd
Normal file
4
chrome/locale/af-ZA/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/af-ZA/zotero/cslpreview.dtd
Normal file
9
chrome/locale/af-ZA/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Browser pane">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Separate tab">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "App tab">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Statusbalk-ikoon:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "None">
|
||||
<!ENTITY zotero.preferences.fontSize "Fontgrootte:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Klein">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Medium">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Get additional styles...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Snelsleutels">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Open/sluit Zotero-paneel">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Save to Zotero (address bar icon)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Verwissel volskermmodus">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Advanced">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Files and Folders">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Locate">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Article Lookup Engine Manager">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Submit to Zotero Server">
|
||||
|
||||
<!ENTITY zotero.preferences.openAboutConfig "Open about:config">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "Skrap">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Cancel">
|
||||
<!ENTITY zotero.general.refresh "Refresh">
|
||||
<!ENTITY zotero.general.saveAs "Save As…">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Zotero Error Report">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "This may include messages unrelated to Zotero.">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "Transform Text">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "Title Case">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "Sentence case">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap first/last names">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap First/Last Names">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "New Note">
|
||||
<!ENTITY zotero.toolbar.note.standalone "New Standalone Note">
|
||||
|
@ -288,5 +290,3 @@
|
|||
<!ENTITY zotero.attachLink.title "Attach Link to URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Title:">
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Create
|
|||
general.delete=Delete
|
||||
general.moreInformation=More Information
|
||||
general.seeForMoreInformation=See %S for more information.
|
||||
general.open=Open %S
|
||||
general.enable=Enable
|
||||
general.disable=Disable
|
||||
general.remove=Remove
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=Are you sure you want to move the selected items to th
|
|||
pane.items.delete.title=Delete
|
||||
pane.items.delete=Are you sure you want to delete the selected item?
|
||||
pane.items.delete.multiple=Are you sure you want to delete the selected items?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Remove Item from Collection
|
||||
pane.items.menu.remove.multiple=Remove Items from Collection
|
||||
pane.items.menu.moveToTrash=Move Item to Trash…
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=Create Parent Item
|
|||
pane.items.menu.createParent.multiple=Create Parent Items
|
||||
pane.items.menu.renameAttachments=Rename File from Parent Metadata
|
||||
pane.items.menu.renameAttachments.multiple=Rename Files from Parent Metadata
|
||||
pane.items.showItemInLibrary=Show Item in Library
|
||||
|
||||
pane.items.letter.oneParticipant=Letter to %S
|
||||
pane.items.letter.twoParticipants=Letter to %S and %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Type a title or author to search for a reference.\n
|
|||
firstRunGuidance.quickFormatMac=Type a title or author to search for a reference.\n\nAfter you've made your selection, click the bubble or press Cmd-↓ to add page numbers, prefixes, or suffixes. You can also include a page number along with your search terms to add it directly.\n\nYou can edit citations directly in the word processor document.
|
||||
firstRunGuidance.toolbarButton.new=Click here to open Zotero, or use the %S keyboard shortcut.
|
||||
firstRunGuidance.toolbarButton.upgrade=The Zotero icon can now be found in the Firefox toolbar. Click the icon to open Zotero, or use the %S keyboard shortcut.
|
||||
|
||||
styles.bibliography=Bibliography
|
||||
styles.editor.save=Save Citation Style
|
||||
styles.editor.warning.noItems=No items selected in Zotero.
|
||||
styles.editor.warning.parseError=Error parsing style:
|
||||
styles.editor.warning.renderError=Error generating citations and bibliography:
|
||||
styles.editor.output.individualCitations=Individual Citations
|
||||
styles.editor.output.singleCitation=Single Citation (with position "first")
|
||||
styles.preview.instructions=Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
|
||||
|
|
4
chrome/locale/ar/zotero/csledit.dtd
Normal file
4
chrome/locale/ar/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/ar/zotero/cslpreview.dtd
Normal file
9
chrome/locale/ar/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "جزء التصفح">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "تبويب منفصل">
|
||||
<!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 "متوسط">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "لغة نمط الاستشهاد">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "احصل على انماط اضافية...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "اختصارات">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "فتح/إغلاق نافذة زوتيرو">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Save to Zotero (address bar icon)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "التنشيط لوضع ملء الشاشة">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "متقدم">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "الملفات والمجلدات">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "تحديد موقع المقتنى">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "إدارة محرك البحث">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "ارسال سجل الاخطاء لخادم زوتيرو">
|
||||
|
||||
<!ENTITY zotero.preferences.openAboutConfig "فتح about:config">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "افتح محرر لغة نمط الاستشهاد">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "افتح مستعرض لغة نمط الاستشهاد">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "حذف">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Cancel">
|
||||
<!ENTITY zotero.general.refresh "Refresh">
|
||||
<!ENTITY zotero.general.saveAs "Save As…">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Zotero Error Report">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "This may include messages unrelated to Zotero.">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "تغيير حالة النص">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "حرف كبير في بداية كل كلمة">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "حالة الجملة">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap first/last names">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap First/Last Names">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "ملاحظة جديدة">
|
||||
<!ENTITY zotero.toolbar.note.standalone "ملاحظة جديدة مستقلة بذاتها">
|
||||
|
@ -288,5 +290,3 @@
|
|||
<!ENTITY zotero.attachLink.title "Attach Link to URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Title:">
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=إنشاء
|
|||
general.delete=Delete
|
||||
general.moreInformation=More Information
|
||||
general.seeForMoreInformation=شاهد %S لمزيد من المعلومات.
|
||||
general.open=Open %S
|
||||
general.enable=تمكين
|
||||
general.disable=تعطيل
|
||||
general.remove=حذف
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=هل ترغب في نقل العناصر المحدد
|
|||
pane.items.delete.title=حذف
|
||||
pane.items.delete=هل ترغب في حذف العنصر المحدد؟
|
||||
pane.items.delete.multiple=هل ترغب في حذف العناصر المحددة؟
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=حذف العنصر المحدد
|
||||
pane.items.menu.remove.multiple=حذف العناصر المحددة
|
||||
pane.items.menu.moveToTrash=Move Item to Trash…
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=إنشاء عنصر رئيسي من العنصر ا
|
|||
pane.items.menu.createParent.multiple=إنشاء عناصر رئيسية من العناصر المحددة
|
||||
pane.items.menu.renameAttachments=إعادة تسمية الملف وفقا للبيانات الوصفية للعنصر الرئيسي
|
||||
pane.items.menu.renameAttachments.multiple=إعادة تسمية الملفات وفقا للبيانات الوصفية للعنصر الرئيسي
|
||||
pane.items.showItemInLibrary=Show Item in Library
|
||||
|
||||
pane.items.letter.oneParticipant=خطاب إلى %S
|
||||
pane.items.letter.twoParticipants=خطاب إلى %S و %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Type a title or author to search for a reference.\n
|
|||
firstRunGuidance.quickFormatMac=Type a title or author to search for a reference.\n\nAfter you've made your selection, click the bubble or press Cmd-↓ to add page numbers, prefixes, or suffixes. You can also include a page number along with your search terms to add it directly.\n\nYou can edit citations directly in the word processor document.
|
||||
firstRunGuidance.toolbarButton.new=Click here to open Zotero, or use the %S keyboard shortcut.
|
||||
firstRunGuidance.toolbarButton.upgrade=The Zotero icon can now be found in the Firefox toolbar. Click the icon to open Zotero, or use the %S keyboard shortcut.
|
||||
|
||||
styles.bibliography=Bibliography
|
||||
styles.editor.save=Save Citation Style
|
||||
styles.editor.warning.noItems=No items selected in Zotero.
|
||||
styles.editor.warning.parseError=Error parsing style:
|
||||
styles.editor.warning.renderError=Error generating citations and bibliography:
|
||||
styles.editor.output.individualCitations=Individual Citations
|
||||
styles.editor.output.singleCitation=Single Citation (with position "first")
|
||||
styles.preview.instructions=Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
|
||||
|
|
4
chrome/locale/bg-BG/zotero/csledit.dtd
Normal file
4
chrome/locale/bg-BG/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/bg-BG/zotero/cslpreview.dtd
Normal file
9
chrome/locale/bg-BG/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Browser pane">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Separate tab">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "App tab">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Икона в лентата за състоянието">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "Няма">
|
||||
<!ENTITY zotero.preferences.fontSize "Размер на шрифта:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Малък">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Среден">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Инсталира на допълнителни стилове...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Клавишни Комбинации">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Отваря/Затваря на Панела на Зотеро">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Save to Zotero (address bar icon)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Превключва в Режим на Цял Екран">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Допълнителни">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Files and Folders">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Locate">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Article Lookup Engine Manager">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!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.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "Изтрива">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Cancel">
|
||||
<!ENTITY zotero.general.refresh "Refresh">
|
||||
<!ENTITY zotero.general.saveAs "Save As…">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Zotero Error Report">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "This may include messages unrelated to Zotero.">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "Преобразува текст">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "Заглавни букви">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "Sentence case">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap first/last names">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap First/Last Names">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "New Note">
|
||||
<!ENTITY zotero.toolbar.note.standalone "Нова самостоятелна бележка">
|
||||
|
@ -288,5 +290,3 @@
|
|||
<!ENTITY zotero.attachLink.title "Attach Link to URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Title:">
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Създава
|
|||
general.delete=Delete
|
||||
general.moreInformation=More Information
|
||||
general.seeForMoreInformation=Виж %S за повече информация.
|
||||
general.open=Open %S
|
||||
general.enable=Включва
|
||||
general.disable=Изключва
|
||||
general.remove=Remove
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=Сигурни ли сте, че искате да п
|
|||
pane.items.delete.title=Изтрива
|
||||
pane.items.delete=Сигурни ли сте, че искате да изтриете избрания запис?
|
||||
pane.items.delete.multiple=Сигурни ли сте, че искате да изтриете избраните записи?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Изтрива избрания запис
|
||||
pane.items.menu.remove.multiple=Изтрива избраните записи
|
||||
pane.items.menu.moveToTrash=Move Item to Trash…
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=Създава родителски запис от
|
|||
pane.items.menu.createParent.multiple=Създава родителски записи от избраният записи
|
||||
pane.items.menu.renameAttachments=Преименува файла въз основа на родителските метадани
|
||||
pane.items.menu.renameAttachments.multiple=Преименува файловете въз основа на родителските метадани
|
||||
pane.items.showItemInLibrary=Show Item in Library
|
||||
|
||||
pane.items.letter.oneParticipant=Писмо до %S
|
||||
pane.items.letter.twoParticipants=Писмо до %S и %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Type a title or author to search for a reference.\n
|
|||
firstRunGuidance.quickFormatMac=Type a title or author to search for a reference.\n\nAfter you've made your selection, click the bubble or press Cmd-↓ to add page numbers, prefixes, or suffixes. You can also include a page number along with your search terms to add it directly.\n\nYou can edit citations directly in the word processor document.
|
||||
firstRunGuidance.toolbarButton.new=Click here to open Zotero, or use the %S keyboard shortcut.
|
||||
firstRunGuidance.toolbarButton.upgrade=The Zotero icon can now be found in the Firefox toolbar. Click the icon to open Zotero, or use the %S keyboard shortcut.
|
||||
|
||||
styles.bibliography=Bibliography
|
||||
styles.editor.save=Save Citation Style
|
||||
styles.editor.warning.noItems=No items selected in Zotero.
|
||||
styles.editor.warning.parseError=Error parsing style:
|
||||
styles.editor.warning.renderError=Error generating citations and bibliography:
|
||||
styles.editor.output.individualCitations=Individual Citations
|
||||
styles.editor.output.singleCitation=Single Citation (with position "first")
|
||||
styles.preview.instructions=Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
|
||||
|
|
4
chrome/locale/ca-AD/zotero/csledit.dtd
Normal file
4
chrome/locale/ca-AD/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/ca-AD/zotero/cslpreview.dtd
Normal file
9
chrome/locale/ca-AD/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Subfinestra del navegador">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Pestanya separada">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "Pestanya d'aplicacions">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Icona de la barra d'estat">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "Cap">
|
||||
<!ENTITY zotero.preferences.fontSize "Mida de lletra:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Petita">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Mitjana">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Aconsegueix estils addicionals...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Dreceres de teclat">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Obre/Tanca el Zotero">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Desa al Zotero (icona de la barra d'adreces)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Canvia a pantalla completa">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Avançat">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Fitxers i carpetes">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Localitza">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Gestor del motor de cerca d'articles">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Tramet al servidor del Zotero">
|
||||
|
||||
<!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.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<!ENTITY zotero.general.optional "(Opcional)">
|
||||
<!ENTITY zotero.general.note "Nota:">
|
||||
<!ENTITY zotero.general.selectAll "Selecciona tot">
|
||||
<!ENTITY zotero.general.deselectAll "Desselecciona tot">
|
||||
<!ENTITY zotero.general.selectAll "Selecciona-ho tot">
|
||||
<!ENTITY zotero.general.deselectAll "Anul·la la selecció">
|
||||
<!ENTITY zotero.general.edit "Edita">
|
||||
<!ENTITY zotero.general.delete "Suprimeix">
|
||||
<!ENTITY zotero.general.ok "D'acord">
|
||||
<!ENTITY zotero.general.cancel "Cancel·la">
|
||||
<!ENTITY zotero.general.refresh "Refresh">
|
||||
<!ENTITY zotero.general.saveAs "Save As…">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Informe d'error de Zotero">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "This may include messages unrelated to Zotero.">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "Això pot incloure missatges no relacionats amb el Zotero.">
|
||||
<!ENTITY zotero.errorReport.submissionInProgress "Espereu mentre s'envia l'informe d'error.">
|
||||
<!ENTITY zotero.errorReport.submitted "L'informe d'error ha estat enviat correctament.">
|
||||
<!ENTITY zotero.errorReport.reportID "Número de referència de l'informe:">
|
||||
|
@ -45,7 +47,7 @@
|
|||
<!ENTITY zotero.collections.showUnfiledItems "Mostra els elements no arxivats">
|
||||
|
||||
<!ENTITY zotero.items.itemType "Tipus d'element">
|
||||
<!ENTITY zotero.items.type_column "Item Type">
|
||||
<!ENTITY zotero.items.type_column "Tipus d'element">
|
||||
<!ENTITY zotero.items.title_column "Títol">
|
||||
<!ENTITY zotero.items.creator_column "Creador">
|
||||
<!ENTITY zotero.items.date_column "Data">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "Transforma el text">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "Majúscules o minúscules del títol">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "Majúscules o minúscules de la frase">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Intercanvia nom i cognoms">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap First/Last Names">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "Nota nova">
|
||||
<!ENTITY zotero.toolbar.note.standalone "Nova nota independent">
|
||||
|
@ -285,8 +287,6 @@
|
|||
<!ENTITY zotero.downloadManager.saveToLibrary.description "Els adjunts no es poden desar a la biblioteca seleccionada. Aquest element es desarà a la biblioteca.">
|
||||
<!ENTITY zotero.downloadManager.noPDFTools.description "Per utilitzar aquesta funció, primer cal instal·lar les eines de PDF en les preferències del Zotero.">
|
||||
|
||||
<!ENTITY zotero.attachLink.title "Attach Link to URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Title:">
|
||||
|
||||
|
||||
<!ENTITY zotero.attachLink.title "Adjunta l'enllaç a l'URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Enllaç:">
|
||||
<!ENTITY zotero.attachLink.label.title "Títol:">
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Crea
|
|||
general.delete=Suprimeix
|
||||
general.moreInformation=Més informació
|
||||
general.seeForMoreInformation=Mira %S per a més informació.
|
||||
general.open=Open %S
|
||||
general.enable=Habilita
|
||||
general.disable=Deshabilita
|
||||
general.remove=Elimina
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=Segur que voleu moure els elements seleccionats a la p
|
|||
pane.items.delete.title=Elimina
|
||||
pane.items.delete=Segur que voleu eliminar l'element seleccionat?
|
||||
pane.items.delete.multiple=Segur que voleu eliminar els elements seleccionats?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Elimina l'element seleccionat
|
||||
pane.items.menu.remove.multiple=Elimina els elements seleccionats
|
||||
pane.items.menu.moveToTrash=Desplaça l'element a la paperera.
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=Crea un element ascendent de l'element seleccionat
|
|||
pane.items.menu.createParent.multiple=Crea elements ascendents dels elements seleccionats
|
||||
pane.items.menu.renameAttachments=Canvia el nom del fitxer amb les metadades ascendents
|
||||
pane.items.menu.renameAttachments.multiple=Canvia els noms del fitxers amb les metadades ascendents
|
||||
pane.items.showItemInLibrary=Show Item in Library
|
||||
|
||||
pane.items.letter.oneParticipant=Carta a %S
|
||||
pane.items.letter.twoParticipants=Carta de %S a %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Escriu un títol o autor per cercar una referència
|
|||
firstRunGuidance.quickFormatMac=Escriu un títol o autor per cercar una referència.\n\nDesprés que hagis fet la teva selecció, fes clic a la bombolla o prem Cmd-\u2193 per afegir números de pàgina, prefixos o sufixos. També pots incloure un número de pàgina juntament amb els teus termes de cerca per afegir-lo directament.\n\nLes cites es poden editar directament en el document del processador de textos.
|
||||
firstRunGuidance.toolbarButton.new=Click here to open Zotero, or use the %S keyboard shortcut.
|
||||
firstRunGuidance.toolbarButton.upgrade=The Zotero icon can now be found in the Firefox toolbar. Click the icon to open Zotero, or use the %S keyboard shortcut.
|
||||
|
||||
styles.bibliography=Bibliography
|
||||
styles.editor.save=Save Citation Style
|
||||
styles.editor.warning.noItems=No items selected in Zotero.
|
||||
styles.editor.warning.parseError=Error parsing style:
|
||||
styles.editor.warning.renderError=Error generating citations and bibliography:
|
||||
styles.editor.output.individualCitations=Individual Citations
|
||||
styles.editor.output.singleCitation=Single Citation (with position "first")
|
||||
styles.preview.instructions=Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
|
||||
|
|
4
chrome/locale/cs-CZ/zotero/csledit.dtd
Normal file
4
chrome/locale/cs-CZ/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/cs-CZ/zotero/cslpreview.dtd
Normal file
9
chrome/locale/cs-CZ/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Panel prohlížeče">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Samostatný panel">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "Panel aplikace">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Ikona ve stavovém řádku:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "Žádná">
|
||||
<!ENTITY zotero.preferences.fontSize "Velikost písma:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Malá">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Střední">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Získat další styly...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Klávesové zkratky">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Otevřít/Zavřít Zotero panel">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Uložit do Zotera (ikona v adresním řádku)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Zapnutí celoobrazového módu">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Pokročilé">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Soubory a Složky">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Najít">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Správce mechanismu pro vyhledávání článků">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Odeslat na Zotero Server">
|
||||
|
||||
<!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.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Otevřít about:memory">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "Smazat">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Zrušit">
|
||||
<!ENTITY zotero.general.refresh "Refresh">
|
||||
<!ENTITY zotero.general.saveAs "Save As…">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Chybová zpráva Zotera">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "Může obsahovat zprávy nesouvisející se Zoterem.">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "Převést text">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "Velká Písmena">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "Velké první písmeno">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Přehodit jméno/příjmení">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Swap First/Last Names">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "Nová poznámka">
|
||||
<!ENTITY zotero.toolbar.note.standalone "Nová samostatná poznámka">
|
||||
|
@ -288,5 +290,3 @@
|
|||
<!ENTITY zotero.attachLink.title "Připojit odkaz na URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Odkaz:">
|
||||
<!ENTITY zotero.attachLink.label.title "Název:">
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Vytvořit
|
|||
general.delete=Smazat
|
||||
general.moreInformation=Více informací
|
||||
general.seeForMoreInformation=Pro více informací se podívejte na %S
|
||||
general.open=Open %S
|
||||
general.enable=Povolit
|
||||
general.disable=Zakázat
|
||||
general.remove=Odstranit
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=Jste si jisti, že chcete přesunout vybranou položku
|
|||
pane.items.delete.title=Smazat
|
||||
pane.items.delete=Jste si jisti, že chcete smazat zvolenou položku?
|
||||
pane.items.delete.multiple=Jste si jisti, že chcete smazat zvolené položky?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Smazat vybranou položku z kolekce
|
||||
pane.items.menu.remove.multiple=Smazat vybrané položky z kolekce
|
||||
pane.items.menu.moveToTrash=Přesunout položku do Koše...
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=Vytvořit rodičovskou položku z vybrané položky
|
|||
pane.items.menu.createParent.multiple=Vytvořit rodičovské položky z vybraných položek
|
||||
pane.items.menu.renameAttachments=Přejmenovat soubor z rodičovských metadat
|
||||
pane.items.menu.renameAttachments.multiple=Přejmenovat soubory z rodičovských metadat
|
||||
pane.items.showItemInLibrary=Show Item in Library
|
||||
|
||||
pane.items.letter.oneParticipant=Dopis pro %S
|
||||
pane.items.letter.twoParticipants=Dopis pro %S a %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Napište název, nebo autora k nimž hledáte citac
|
|||
firstRunGuidance.quickFormatMac=Napište název, nebo autora k nimž hledáte citaci.\n\n Když si vyberete, kliknutím na bublinu, nebo stiskem Ctrl-\u2193 můžete přidat čísla stran, prefixy, či sufixy. Číslo stránky můžete vložit přímo k vašim vyhledávaným výrazům.\n\nCitace můžete editovat přímo ve vašem textovém procesoru.
|
||||
firstRunGuidance.toolbarButton.new=Zotero otevřete kliknutím sem, nebo použitím klávesové zkratky %S
|
||||
firstRunGuidance.toolbarButton.upgrade=Ikona Zotero se nyní nachází v Panelu nástrojů Firefoxu. Zotero otevřete kliknutím na ikonu, nebo stisknutím %S.
|
||||
|
||||
styles.bibliography=Bibliography
|
||||
styles.editor.save=Save Citation Style
|
||||
styles.editor.warning.noItems=No items selected in Zotero.
|
||||
styles.editor.warning.parseError=Error parsing style:
|
||||
styles.editor.warning.renderError=Error generating citations and bibliography:
|
||||
styles.editor.output.individualCitations=Individual Citations
|
||||
styles.editor.output.singleCitation=Single Citation (with position "first")
|
||||
styles.preview.instructions=Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
|
||||
|
|
4
chrome/locale/da-DK/zotero/csledit.dtd
Normal file
4
chrome/locale/da-DK/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/da-DK/zotero/cslpreview.dtd
Normal file
9
chrome/locale/da-DK/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Browser-vindue">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Separat faneblad">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "Applikationsfaneblad">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Ikon på statuslinie:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "Intet">
|
||||
<!ENTITY zotero.preferences.fontSize "Skriftstørrelse:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Lille">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Medium">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Hent yderligere formater">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Genvejs-taster">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Åbn/Luk Zotero-vinduet">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Gem til Zotero (ikon i adresselinjen)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Slå fuldskærmsvisning til/fra">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Avanceret">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Filer og mapper">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Lokaliser">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Håndtering af søgemaskiner for artikler">
|
||||
|
@ -193,7 +190,7 @@
|
|||
<!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Tjek databasens gyldighed">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslatorsAndStyles "Reset "oversættere" og formater...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslators "Reset "oversættere"...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Reset formater...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Nulstil formater...">
|
||||
|
||||
<!ENTITY zotero.preferences.debugOutputLogging "Debug logning af output">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.message "Debug-output kan hjælpe Zoteros udviklere med at diagnosticere problemer i Zotero. Debug-logning få Zotero til at reagere langsommere, så du bør have det slået fra medmindre en Zotero-udvikler kræver om det.">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Fremsend til Zotero Server">
|
||||
|
||||
<!ENTITY zotero.preferences.openAboutConfig "Åbn about:config">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Åbn CSL-Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Åbn CSL-Preview">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Åbn formatredigering">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Åbn formatforhåndsvisning">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Åben about:memory">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!ENTITY zotero.search.joinMode.suffix "de følgende:">
|
||||
|
||||
<!ENTITY zotero.search.recursive.label "Søg i underliggende mapper">
|
||||
<!ENTITY zotero.search.noChildren "Vis kun de øverste Elementer">
|
||||
<!ENTITY zotero.search.noChildren "Vis kun elementer på øverste niveau">
|
||||
<!ENTITY zotero.search.includeParentsAndChildren "Inkluder overordnede og underordnede elementer i resultatet af søgningen">
|
||||
|
||||
<!ENTITY zotero.search.textModes.phrase "Tekststreng">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "Slet">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Annullér">
|
||||
<!ENTITY zotero.general.refresh "Opdatér">
|
||||
<!ENTITY zotero.general.saveAs "Gem som...">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Zotero fejlrapport">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "Dette kan inkludere beskeder, som ikke har noget med Zotero at gøre.">
|
||||
|
@ -30,7 +32,7 @@
|
|||
<!ENTITY zotero.upgrade.changeLogAfterLink "for at se nyhederne.">
|
||||
|
||||
<!ENTITY zotero.contextMenu.addTextToCurrentNote "Overfør den markerede tekst til din note i Zotero">
|
||||
<!ENTITY zotero.contextMenu.addTextToNewNote "Opret Zotero-element og note udfra markering">
|
||||
<!ENTITY zotero.contextMenu.addTextToNewNote "Opret Zotero-element og note ud fra markering">
|
||||
<!ENTITY zotero.contextMenu.saveLinkAsItem "Gem link som Zotero-element.">
|
||||
<!ENTITY zotero.contextMenu.saveImageAsItem "Gem billede som Zotero-element.">
|
||||
|
||||
|
@ -95,8 +97,8 @@
|
|||
|
||||
<!ENTITY zotero.toolbar.newItem.label "Nyt element">
|
||||
<!ENTITY zotero.toolbar.moreItemTypes.label "Mere">
|
||||
<!ENTITY zotero.toolbar.newItemFromPage.label "Opret nyt element udfra den aktuelle side">
|
||||
<!ENTITY zotero.toolbar.lookup.label "Tilføj elementet ud fra identifikationen">
|
||||
<!ENTITY zotero.toolbar.newItemFromPage.label "Opret nyt element ud fra den aktuelle side">
|
||||
<!ENTITY zotero.toolbar.lookup.label "Tilføj element(er) ud fra identifikator">
|
||||
<!ENTITY zotero.toolbar.removeItem.label "Fjern ...">
|
||||
<!ENTITY zotero.toolbar.newCollection.label "Ny Samling...">
|
||||
<!ENTITY zotero.toolbar.newGroup "Ny Gruppe ...">
|
||||
|
@ -105,10 +107,10 @@
|
|||
<!ENTITY zotero.toolbar.emptyTrash.label "Tøm affald">
|
||||
<!ENTITY zotero.toolbar.tagSelector.label "Vis/skjul mærkat-søgning">
|
||||
<!ENTITY zotero.toolbar.actions.label "Handlinger">
|
||||
<!ENTITY zotero.toolbar.import.label "Import...">
|
||||
<!ENTITY zotero.toolbar.import.label "Importér...">
|
||||
<!ENTITY zotero.toolbar.importFromClipboard "Hent fra udklipsholder">
|
||||
<!ENTITY zotero.toolbar.export.label "Eksporter Biblioteket ...">
|
||||
<!ENTITY zotero.toolbar.rtfScan.label "RTF Scan...">
|
||||
<!ENTITY zotero.toolbar.export.label "Eksportér bibliotek...">
|
||||
<!ENTITY zotero.toolbar.rtfScan.label "RTF-scanning...">
|
||||
<!ENTITY zotero.toolbar.timeline.label "Opret tidslinie">
|
||||
<!ENTITY zotero.toolbar.preferences.label "Indstillinger...">
|
||||
<!ENTITY zotero.toolbar.supportAndDocumentation "Support og dokumentation">
|
||||
|
@ -123,7 +125,7 @@
|
|||
<!ENTITY zotero.item.textTransform "Transformer tekst">
|
||||
<!ENTITY zotero.item.textTransform.titlecase "Betydende ord med stort ">
|
||||
<!ENTITY zotero.item.textTransform.sentencecase "Første bogstav med stort">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Byt rundt på fornavn og efternavn">
|
||||
<!ENTITY zotero.item.creatorTransform.nameSwap "Ombyt fornavn/efternavn">
|
||||
|
||||
<!ENTITY zotero.toolbar.newNote "Ny note">
|
||||
<!ENTITY zotero.toolbar.note.standalone "Ny selvstændig note">
|
||||
|
@ -176,7 +178,7 @@
|
|||
|
||||
<!ENTITY zotero.progress.title "Fremgang">
|
||||
|
||||
<!ENTITY zotero.exportOptions.title "Eksport...">
|
||||
<!ENTITY zotero.exportOptions.title "Eksportér...">
|
||||
<!ENTITY zotero.exportOptions.format.label "Format:">
|
||||
<!ENTITY zotero.exportOptions.translatorOptions.label "Oversættelsesmuligheder">
|
||||
|
||||
|
@ -264,7 +266,7 @@
|
|||
<!ENTITY zotero.rtfScan.ambiguousCitations.label "Flertydige teksthenvisnnger">
|
||||
<!ENTITY zotero.rtfScan.mappedCitations.label "Teksthenvisninger med korrespondence">
|
||||
<!ENTITY zotero.rtfScan.introPage.label "Introduktion">
|
||||
<!ENTITY zotero.rtfScan.introPage.description "Zotero can automatically extract and reformat citations and insert a bibliography into RTF files. The RTF Scan feature currently supports citations in variations upon the following formats:">
|
||||
<!ENTITY zotero.rtfScan.introPage.description "Zotero kan automatisk uddrage og reformatere henvisninger og indsætte en referenceliste i en RTF-fil. RTF-scanningsfunktionen understøtter henvisninger i følgende formater:">
|
||||
<!ENTITY zotero.rtfScan.introPage.description2 "Vælg en RTF-fil som input og en output-fil nedenfor:">
|
||||
<!ENTITY zotero.rtfScan.scanPage.label "Scanner efter referencer i dokumentet">
|
||||
<!ENTITY zotero.rtfScan.scanPage.description "Zotero scanner dit dokument for referencer. Vent venligst.">
|
||||
|
@ -278,15 +280,13 @@
|
|||
<!ENTITY zotero.rtfScan.inputFile.label "Inputfil">
|
||||
<!ENTITY zotero.rtfScan.outputFile.label "Outputfil">
|
||||
|
||||
<!ENTITY zotero.file.choose.label "Vælg filen...">
|
||||
<!ENTITY zotero.file.choose.label "Vælg fil...">
|
||||
<!ENTITY zotero.file.noneSelected.label "Der er ikke valgt en fil">
|
||||
|
||||
<!ENTITY zotero.downloadManager.label "Gem til Zotero">
|
||||
<!ENTITY zotero.downloadManager.saveToLibrary.description "Vedhæftede filer kan ikke gemmes til det valgte bibliotek. Dette element vil blive gemt i dit bibliotek i stedet.">
|
||||
<!ENTITY zotero.downloadManager.saveToLibrary.description "Vedhæftede filer kan ikke gemmes i det valgte bibliotek. Dette element vil blive gemt i dit bibliotek i stedet.">
|
||||
<!ENTITY zotero.downloadManager.noPDFTools.description "For at bruge denne funktion skal du først installere PDF-værktøjerne i Zoteros indstillinger.">
|
||||
|
||||
<!ENTITY zotero.attachLink.title "Attach Link to URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Title:">
|
||||
|
||||
|
||||
<!ENTITY zotero.attachLink.title "Tilføj henvisning til URI">
|
||||
<!ENTITY zotero.attachLink.label.link "Henvisning:">
|
||||
<!ENTITY zotero.attachLink.label.title "Titel:">
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Opret
|
|||
general.delete=Slet
|
||||
general.moreInformation=Mere information
|
||||
general.seeForMoreInformation=Se %S for nærmere oplysninger.
|
||||
general.open=Open %S
|
||||
general.enable=Slå til
|
||||
general.disable=Slå fra
|
||||
general.remove=Fjern
|
||||
|
@ -164,8 +165,8 @@ pane.collections.library=Mit Bibliotek
|
|||
pane.collections.groupLibraries=Gruppebiblioteker
|
||||
pane.collections.trash=Papirkurv
|
||||
pane.collections.untitled=Unavngivet
|
||||
pane.collections.unfiled=Elementer som ikke er gemt.
|
||||
pane.collections.duplicate=Duplikér elementer
|
||||
pane.collections.unfiled=Ikke-arkiverede elementer
|
||||
pane.collections.duplicate=Dublet-elementer
|
||||
|
||||
pane.collections.menu.rename.collection=Omdøb samling...
|
||||
pane.collections.menu.edit.savedSearch=Redigér en gemt søgning
|
||||
|
@ -195,14 +196,17 @@ tagColorChooser.maxTags=Op til %S mærker i hvert bibliotek kan have farver tilk
|
|||
pane.items.loading=Henter listen med elementer...
|
||||
pane.items.columnChooser.moreColumns=Flere kolonner
|
||||
pane.items.columnChooser.secondarySort=Sekundær sortering (%S)
|
||||
pane.items.attach.link.uri.unrecognized=Zotero did not recognize the URI you entered. Please check the address and try again.
|
||||
pane.items.attach.link.uri.file=To attach a link to a file, please use “%S”.
|
||||
pane.items.attach.link.uri.unrecognized=Zotero genkendte ikke URI'en, du indtastede. Tjek venligst adressen og prøv igen.
|
||||
pane.items.attach.link.uri.file=Anvend venligst "%S" for at tilføje en henvisning til en fil.
|
||||
pane.items.trash.title=Flyt til papirkurv
|
||||
pane.items.trash=Er du sikker på, du vil lægge dette element i papirkurven?
|
||||
pane.items.trash.multiple=Er du sikker på, du vil lægge disse elementer i papirkurven?
|
||||
pane.items.delete.title=Slet
|
||||
pane.items.delete=Er du sikker på, du vil slette dette element?
|
||||
pane.items.delete.multiple=Er du sikker på, du vil slette disse elementer?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Fjern element fra samling
|
||||
pane.items.menu.remove.multiple=Fjern elementer fra samling
|
||||
pane.items.menu.moveToTrash=Flyt element til papirkurven...
|
||||
|
@ -211,16 +215,17 @@ pane.items.menu.export=Eksportér dette element...
|
|||
pane.items.menu.export.multiple=Eksportér disse elementer...
|
||||
pane.items.menu.createBib=Dan en referenceliste ud fra element...
|
||||
pane.items.menu.createBib.multiple=Dan en referenceliste ud fra elementer...
|
||||
pane.items.menu.generateReport=Opret rapport ud fra det element...
|
||||
pane.items.menu.generateReport=Opret rapport ud fra element...
|
||||
pane.items.menu.generateReport.multiple=Opret rapport ud fra elementer...
|
||||
pane.items.menu.reindexItem=Indeksér element igen.
|
||||
pane.items.menu.reindexItem.multiple=Indeksér elementer igen.
|
||||
pane.items.menu.reindexItem=Indeksér element igen
|
||||
pane.items.menu.reindexItem.multiple=Indeksér elementer igen
|
||||
pane.items.menu.recognizePDF=Hent metadata for pdf-filen.
|
||||
pane.items.menu.recognizePDF.multiple=Hent metadata for pdf-filerne
|
||||
pane.items.menu.createParent=Opret moder-element
|
||||
pane.items.menu.createParent.multiple=Opret moder-elementer
|
||||
pane.items.menu.renameAttachments=Omdøb fil fra moder-metadata
|
||||
pane.items.menu.renameAttachments.multiple=Omdøb filer fra moder-metadata
|
||||
pane.items.showItemInLibrary=Vis element i Bibliotek
|
||||
|
||||
pane.items.letter.oneParticipant=Brev til %S
|
||||
pane.items.letter.twoParticipants=Brev til %S og %S
|
||||
|
@ -244,7 +249,7 @@ pane.item.duplicates.onlyTopLevel=Kun topniveau fulde elementer kan sammenføjes
|
|||
pane.item.duplicates.onlySameItemType=Sammenføjede elementer skal alle være af samme type.
|
||||
|
||||
pane.item.changeType.title=Henfør elementet til en ny type
|
||||
pane.item.changeType.text=Er du sikker på at du vil ændre elementets Type?\n\nFølgende felter går tabt:
|
||||
pane.item.changeType.text=Er du sikker på at du vil ændre elementets type?\n\nFølgende felter går tabt:
|
||||
pane.item.defaultFirstName=Fornavn
|
||||
pane.item.defaultLastName=Efternavn
|
||||
pane.item.defaultFullName=Fulde navn
|
||||
|
@ -400,7 +405,7 @@ itemFields.dictionaryTitle=Ordbogens titel
|
|||
itemFields.language=Sprog
|
||||
itemFields.programmingLanguage=Programmeringssprog
|
||||
itemFields.university=Universitet
|
||||
itemFields.abstractNote=Abstract/Resumé
|
||||
itemFields.abstractNote=Resumé
|
||||
itemFields.websiteTitle=Webstedets titel
|
||||
itemFields.reportNumber=Rapportens nr.
|
||||
itemFields.billNumber=Lovforslagets nr.
|
||||
|
@ -534,7 +539,7 @@ zotero.preferences.sync.reset.replaceServerData=Erstat serverdata
|
|||
zotero.preferences.sync.reset.fileSyncHistory=Al filsynkroniseringshistorik vil blive slettet.\n\nLokale vedhæftninger, som ikke findes på serveren, vil blive overført ved næste synkronisering.
|
||||
|
||||
zotero.preferences.search.rebuildIndex=Genopbyg indeks
|
||||
zotero.preferences.search.rebuildWarning=Ønsker du at gendanne det samlede indeks? Dette kan tage nogen tid.\n\nBrug %S for kun at indeksere de elementer som ikke er indekseret.
|
||||
zotero.preferences.search.rebuildWarning=Ønsker du at gendanne det samlede indeks? Dette kan tage nogen tid.\n\nBrug %S for kun at indeksere de elementer, som ikke er indekseret.
|
||||
zotero.preferences.search.clearIndex=Ryd indeks
|
||||
zotero.preferences.search.clearWarning=Efter nulstilling af indekset vil indhold fra vedhæftede filer ikke længere være søgbare.\n\nWebhenvisningsvedhæftninger kan ikke genindekseres uden at besøge siden igen. For at lade webhenvisninger være indekserede skal du vælge %S.
|
||||
zotero.preferences.search.clearNonLinkedURLs=Fjern alle undtagen webhenvisninger
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Indtast en titel eller forfatter for at søge efter
|
|||
firstRunGuidance.quickFormatMac=Indtast en titel eller forfatter for at søge efter en reference.\n\nNår du har foretaget dit valg, så klik på boblen eller tryk Cmd-↓ for at tilføje sidenumre, præfikser eller suffikser. Du kan også inkludere et sidenummer sammen med dine søgetermer.\n\nDu kan redigere henvisninger direkte i dit tekstbehandlingsdokument.
|
||||
firstRunGuidance.toolbarButton.new=Klik her for at åbne Zotero eller anvend %S-tastaturgenvejen.
|
||||
firstRunGuidance.toolbarButton.upgrade=Zotero-ikonet kan nu findes i Firefox-værktøjslinjen. Klik ikonet for at åbne Zotero eller anvend %S-tastaturgenvejen.
|
||||
|
||||
styles.bibliography=Referenceliste
|
||||
styles.editor.save=Gem henvisningsformat
|
||||
styles.editor.warning.noItems=Ingen elementer valgt i Zotero.
|
||||
styles.editor.warning.parseError=Fejl under fortolkning af format:
|
||||
styles.editor.warning.renderError=Fejl under oprettelse af henvisninger og referenceliste:
|
||||
styles.editor.output.individualCitations=Individuelle henvisninger
|
||||
styles.editor.output.singleCitation=Enkelt henvisning (med positionen "fornavn")
|
||||
styles.preview.instructions=Vælg et eller flere elementer i Zotero og klik på "Opdatér"-knappen for at se, hvordan disse elementer gengives af de installerede CSL-
|
||||
|
|
4
chrome/locale/de/zotero/csledit.dtd
Normal file
4
chrome/locale/de/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/de/zotero/cslpreview.dtd
Normal file
9
chrome/locale/de/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -12,8 +12,6 @@
|
|||
<!ENTITY zotero.preferences.showIn.browserPane "Browser Ausschnitt">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Eigenem Tab">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "App Tab">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Statusleisten-Icon:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "Kein Icon">
|
||||
<!ENTITY zotero.preferences.fontSize "Schriftgröße">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Klein">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Mittel">
|
||||
|
@ -125,8 +123,6 @@
|
|||
<!ENTITY zotero.preferences.cite.styles.styleManager.csl "CSL">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Weitere Stile hinzufügen...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Tastenkombinationen">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Zotero-Panel öffnen/schließen">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "In Zotero speichern (Adressleisten-Symbol)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Vollbild-Modus an/aus">
|
||||
|
@ -164,6 +160,7 @@
|
|||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Erweitert">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Dateien und Ordner">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Finden">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Artikel Finder verwalten">
|
||||
|
@ -204,6 +201,6 @@
|
|||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Zum Zotero-Server übertragen">
|
||||
|
||||
<!ENTITY zotero.preferences.openAboutConfig "about:config öffnen">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "CSL Editor öffnen">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "CSL Vorschau öffnen">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Zitierstil Editor öffnen">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Zitierstil Vorschau öffnen">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "about:memory öffnen">
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<!ENTITY zotero.general.delete "Löschen">
|
||||
<!ENTITY zotero.general.ok "OK">
|
||||
<!ENTITY zotero.general.cancel "Abbrechen">
|
||||
<!ENTITY zotero.general.refresh "Aktualisieren">
|
||||
<!ENTITY zotero.general.saveAs "Speichern als...">
|
||||
|
||||
<!ENTITY zotero.errorReport.title "Zotero Fehlerbericht">
|
||||
<!ENTITY zotero.errorReport.unrelatedMessages "Unter Umständen sind Nachrichten enthalten, die nicht mit Zotero in Verbindung stehen.">
|
||||
|
@ -288,5 +290,3 @@
|
|||
<!ENTITY zotero.attachLink.title "Link zu einer URI anhängen">
|
||||
<!ENTITY zotero.attachLink.label.link "Link:">
|
||||
<!ENTITY zotero.attachLink.label.title "Titel:">
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ general.create=Erstelle
|
|||
general.delete=Löschen
|
||||
general.moreInformation=Weitere Informationen
|
||||
general.seeForMoreInformation=Siehe %S für weitere Informationen.
|
||||
general.open=Open %S
|
||||
general.enable=Aktivieren
|
||||
general.disable=Deaktivieren
|
||||
general.remove=Entfernen
|
||||
|
@ -203,6 +204,9 @@ pane.items.trash.multiple=Sind Sie sicher, dass Sie die ausgewählten Einträge
|
|||
pane.items.delete.title=Löschen
|
||||
pane.items.delete=Sind Sie sicher, dass Sie den ausgewählten Eintrag löschen möchten?
|
||||
pane.items.delete.multiple=Sind Sie sicher, dass Sie die ausgewählten Einträge löschen möchten?
|
||||
pane.items.remove.title=Remove from Collection
|
||||
pane.items.remove=Are you sure you want to remove the selected item from this collection?
|
||||
pane.items.remove.multiple=Are you sure you want to remove the selected items from this collection?
|
||||
pane.items.menu.remove=Ausgewählten Eintrag entfernen
|
||||
pane.items.menu.remove.multiple=Ausgewählte Einträge entfernen
|
||||
pane.items.menu.moveToTrash=Eintrag in den Papierkorb verschieben...
|
||||
|
@ -221,6 +225,7 @@ pane.items.menu.createParent=Erstelle übergeordneten Eintrag aus ausgewähltem
|
|||
pane.items.menu.createParent.multiple=Erstelle übergeordnete Einträge aus ausgewählten Einträgen
|
||||
pane.items.menu.renameAttachments=Datei nach Metadaten des übergeordneten Eintrags umbenennen
|
||||
pane.items.menu.renameAttachments.multiple=Dateien nach Metadaten des übergeordneten Eintrags umbenennen
|
||||
pane.items.showItemInLibrary=Eintrag in Bibliothek anzeigen
|
||||
|
||||
pane.items.letter.oneParticipant=Brief an %S
|
||||
pane.items.letter.twoParticipants=Brief an %S und %S
|
||||
|
@ -968,3 +973,12 @@ firstRunGuidance.quickFormat=Geben Sie einen Titel oder Autor ein, um nach einer
|
|||
firstRunGuidance.quickFormatMac=Geben Sie einen Titel oder Autor ein, um nach einer Zitation zu suchen.\n\nNachdem Sie Ihre Auswahl getroffen haben, klicken Sie auf die Blase oder drücken Sie Cmd-\u2193, um Seitenzahlen, Präfixe oder Suffixe hinzuzufügen. Sie können die Seitenzahl auch zu Ihren Suchbegriffen hinzufügen, um diese direkt hinzuzufügen.\n\nSie können alle Zitationen direkt im Dokument bearbeiten.
|
||||
firstRunGuidance.toolbarButton.new=Klicken Sie hier oder verwenden Sie die %S Tastenkombination um Zotero zu öffnen.
|
||||
firstRunGuidance.toolbarButton.upgrade=Das Zotero Icon ist jetzt in der Firefox Symbolleiste. Klicken Sie das Icon oder verwenden Sie die %S Tastenkombination um Zotero zu öffnen.
|
||||
|
||||
styles.bibliography=Bibliografie
|
||||
styles.editor.save=Zitationsstil speichern
|
||||
styles.editor.warning.noItems=Keine Einträge in Zotero ausgewählt.
|
||||
styles.editor.warning.parseError=Fehler beim Parsen des Stils:
|
||||
styles.editor.warning.renderError=Fehler beim Erstellen der Zitationen und Bibliografie:
|
||||
styles.editor.output.individualCitations=Individuelle Zitationen
|
||||
styles.editor.output.singleCitation=Einzelne Zitation (an erster Stelle)
|
||||
styles.preview.instructions=Wählen SIe einen oder mehrere Einträge in Zotero aus und klicken Sie den "Aktualisieren"-Button, um zu sehen, wie diese Einträge mit den installierten CSL-Zitationsstilen jeweils angezeigt werden.
|
||||
|
|
4
chrome/locale/el-GR/zotero/csledit.dtd
Normal file
4
chrome/locale/el-GR/zotero/csledit.dtd
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY styles.editor "Zotero Style Editor">
|
||||
|
||||
<!ENTITY styles.editor.suppressAuthor "Suppress Author">
|
||||
<!ENTITY styles.editor.citePosition "Cite Position:">
|
9
chrome/locale/el-GR/zotero/cslpreview.dtd
Normal file
9
chrome/locale/el-GR/zotero/cslpreview.dtd
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!ENTITY styles.preview "Zotero Style Preview">
|
||||
|
||||
<!ENTITY styles.preview.citationFormat "Citation Format:">
|
||||
<!ENTITY styles.preview.citationFormat.all "all">
|
||||
<!ENTITY styles.preview.citationFormat.author "author">
|
||||
<!ENTITY styles.preview.citationFormat.authorDate "author-date">
|
||||
<!ENTITY styles.preview.citationFormat.label "label">
|
||||
<!ENTITY styles.preview.citationFormat.note "note">
|
||||
<!ENTITY styles.preview.citationFormat.numeric "numeric">
|
|
@ -1,209 +1,206 @@
|
|||
<!ENTITY zotero.preferences.title "Zotero Preferences">
|
||||
<!ENTITY zotero.preferences.title "Προτιμήσεις Zotero">
|
||||
|
||||
<!ENTITY zotero.preferences.default "Default:">
|
||||
<!ENTITY zotero.preferences.items "items">
|
||||
<!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 "General">
|
||||
<!ENTITY zotero.preferences.prefpane.general "Γενικές">
|
||||
|
||||
<!ENTITY zotero.preferences.userInterface "User Interface">
|
||||
<!ENTITY zotero.preferences.showIn "Load Zotero in:">
|
||||
<!ENTITY zotero.preferences.showIn.browserPane "Browser pane">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Separate tab">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "App tab">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Status bar icon:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "None">
|
||||
<!ENTITY zotero.preferences.fontSize "Font size:">
|
||||
<!ENTITY zotero.preferences.fontSize.small "Small">
|
||||
<!ENTITY zotero.preferences.fontSize.medium "Medium">
|
||||
<!ENTITY zotero.preferences.fontSize.large "Large">
|
||||
<!ENTITY zotero.preferences.userInterface "Περιβάλλον χρήστη">
|
||||
<!ENTITY zotero.preferences.showIn "Φόρτωση του Zotero σε:">
|
||||
<!ENTITY zotero.preferences.showIn.browserPane "Πλαίσιο περιηγητή">
|
||||
<!ENTITY zotero.preferences.showIn.separateTab "Διαχωρισμός καρτέλας">
|
||||
<!ENTITY zotero.preferences.showIn.appTab "Καρτέλα εφαρμογών">
|
||||
<!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.notes "Note font size:">
|
||||
<!ENTITY zotero.preferences.fontSize.notes "Μέγεθος γραμματοσειράς σημειώσεων:">
|
||||
|
||||
<!ENTITY zotero.preferences.miscellaneous "Miscellaneous">
|
||||
<!ENTITY zotero.preferences.autoUpdate "Automatically check for updated translators and styles">
|
||||
<!ENTITY zotero.preferences.updateNow "Update now">
|
||||
<!ENTITY zotero.preferences.reportTranslationFailure "Report broken site translators">
|
||||
<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader "Allow zotero.org to customize content based on current Zotero version">
|
||||
<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader.tooltip "If enabled, the current Zotero version will be added to HTTP requests to zotero.org.">
|
||||
<!ENTITY zotero.preferences.parseRISRefer "Use Zotero for downloaded BibTeX/RIS/Refer files">
|
||||
<!ENTITY zotero.preferences.automaticSnapshots "Automatically take snapshots when creating items from web pages">
|
||||
<!ENTITY zotero.preferences.downloadAssociatedFiles "Automatically attach associated PDFs and other files when saving items">
|
||||
<!ENTITY zotero.preferences.automaticTags "Automatically tag items with keywords and subject headings">
|
||||
<!ENTITY zotero.preferences.trashAutoEmptyDaysPre "Automatically remove items in the trash deleted more than">
|
||||
<!ENTITY zotero.preferences.trashAutoEmptyDaysPost "days ago">
|
||||
<!ENTITY zotero.preferences.miscellaneous "Διάφορα">
|
||||
<!ENTITY zotero.preferences.autoUpdate "Αυτόματος έλεγχος για ενημερωμένους μεταφραστές και στυλ">
|
||||
<!ENTITY zotero.preferences.updateNow "Ενημέρωση τώρα">
|
||||
<!ENTITY zotero.preferences.reportTranslationFailure "Αναφέρετε προβληματικούς μεταφραστές ιστοτόπου">
|
||||
<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader "Να επιτρέπεται στο zotero.org να προσαρμόσει το περιεχόμενο, βάσει της τρέχουσας έκδοσης του Zotero">
|
||||
<!ENTITY zotero.preferences.zoteroDotOrgVersionHeader.tooltip "Αν ενεργοποιηθεί, η τρέχουσα έκδοση του Zotero θα συμπεριληφθεί στα αιτήματα HTTP προς το zotero.org.">
|
||||
<!ENTITY zotero.preferences.parseRISRefer "Χρήση του Zotero για λήψη αρχείων Bib Tex/RIS/Refer">
|
||||
<!ENTITY zotero.preferences.automaticSnapshots "Αυτόματη λήψη φωτογραφικού στιγμιότυπου όταν δημιουργείτε στοιχεία από ιστοσελίδες">
|
||||
<!ENTITY zotero.preferences.downloadAssociatedFiles "Αυτόματη προσάρτηση των συνοδευτικών αρχείων PDF και άλλων όταν αποθηκεύετε στοιχεία">
|
||||
<!ENTITY zotero.preferences.automaticTags "Αυτόματη επισήμανση των στοιχείων με λέξεις κλειδιά και κεφαλίδες θέματος">
|
||||
<!ENTITY zotero.preferences.trashAutoEmptyDaysPre "Να απομακρύνονται αυτόματα από τον κάδο ανακύκλωσης στοιχεία που έχουν διαγραφεί για περισσότερο από">
|
||||
<!ENTITY zotero.preferences.trashAutoEmptyDaysPost "ημέρες πριν">
|
||||
|
||||
<!ENTITY zotero.preferences.groups "Groups">
|
||||
<!ENTITY zotero.preferences.groups.whenCopyingInclude "When copying items between libraries, include:">
|
||||
<!ENTITY zotero.preferences.groups.childNotes "child notes">
|
||||
<!ENTITY zotero.preferences.groups.childFiles "child snapshots and imported files">
|
||||
<!ENTITY zotero.preferences.groups.childLinks "child links">
|
||||
<!ENTITY zotero.preferences.groups.tags "tags">
|
||||
<!ENTITY zotero.preferences.groups "Ομάδες">
|
||||
<!ENTITY zotero.preferences.groups.whenCopyingInclude "Όταν αντιγράφονται στοιχεία μεταξύ βιβλιοθηκών, να συμπεριλαμβάνονται:">
|
||||
<!ENTITY zotero.preferences.groups.childNotes "θυγατρικές σημειώσεις">
|
||||
<!ENTITY zotero.preferences.groups.childFiles "θυγατρικά φωτογραφικά στιγμιότυπα και εισαγόμενα αρχεία">
|
||||
<!ENTITY zotero.preferences.groups.childLinks "θυγατρικοί σύνδεσμοι">
|
||||
<!ENTITY zotero.preferences.groups.tags "ετικέτες">
|
||||
|
||||
<!ENTITY zotero.preferences.openurl.caption "OpenURL">
|
||||
|
||||
<!ENTITY zotero.preferences.openurl.search "Search for resolvers">
|
||||
<!ENTITY zotero.preferences.openurl.custom "Custom...">
|
||||
<!ENTITY zotero.preferences.openurl.server "Resolver:">
|
||||
<!ENTITY zotero.preferences.openurl.version "Version:">
|
||||
<!ENTITY zotero.preferences.openurl.search "Αναζήτηση διακομιστών resolver">
|
||||
<!ENTITY zotero.preferences.openurl.custom "Προσαρμογή...">
|
||||
<!ENTITY zotero.preferences.openurl.server "Διακομιστή resolver:">
|
||||
<!ENTITY zotero.preferences.openurl.version "Έκδοσης:">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.sync "Sync">
|
||||
<!ENTITY zotero.preferences.sync.username "Username:">
|
||||
<!ENTITY zotero.preferences.sync.password "Password:">
|
||||
<!ENTITY zotero.preferences.sync.syncServer "Zotero Sync Server">
|
||||
<!ENTITY zotero.preferences.sync.createAccount "Create Account">
|
||||
<!ENTITY zotero.preferences.sync.lostPassword "Lost Password?">
|
||||
<!ENTITY zotero.preferences.sync.syncAutomatically "Sync automatically">
|
||||
<!ENTITY zotero.preferences.sync.syncFullTextContent "Sync full-text content">
|
||||
<!ENTITY zotero.preferences.sync.syncFullTextContent.desc "Zotero can sync the full-text content of files in your Zotero libraries with zotero.org and other linked devices, allowing you to easily search for your files wherever you are. The full-text content of your files will not be shared publicly.">
|
||||
<!ENTITY zotero.preferences.sync.about "About Syncing">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing "File Syncing">
|
||||
<!ENTITY zotero.preferences.sync.username "Όνομα χρήστη:">
|
||||
<!ENTITY zotero.preferences.sync.password "Κωδικού:">
|
||||
<!ENTITY zotero.preferences.sync.syncServer "Διακομιστής συγχρονισμού Zotero">
|
||||
<!ENTITY zotero.preferences.sync.createAccount "Δημιουργία λογαριασμού">
|
||||
<!ENTITY zotero.preferences.sync.lostPassword "Χάσατε τον κωδικό;">
|
||||
<!ENTITY zotero.preferences.sync.syncAutomatically "Αυτόματος συγχρονισμός">
|
||||
<!ENTITY zotero.preferences.sync.syncFullTextContent "Συγχρονισμός περιεχομένου πλήρους κειμένου">
|
||||
<!ENTITY zotero.preferences.sync.syncFullTextContent.desc "Το Zotero μπορεί να συγχρονίσει με το zotero.org και άλλες συνδεδεμένες συσκευές, το πλήρους κειμένου περιεχόμενο των αρχείων μέσα στην βιβλιοθήκη σας Zotero, επιτρέποντας την εύκολη αναζήτηση των αρχείων σας οπουδήποτε κι αν είστε. Το περιεχόμενο πλήρους κειμένου των αρχείων σας δεν κοινοποιηθεί δημοσίως.">
|
||||
<!ENTITY zotero.preferences.sync.about "Σχετικά με τον συγχρονισμό">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing "Συγχρονισμός αρχείου">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.url "URL:">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.myLibrary "Sync attachment files in My Library using">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.groups "Sync attachment files in group libraries using 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.tos1 "By using Zotero storage, you agree to become bound by its">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.tos2 "terms and conditions">
|
||||
<!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.fullSync "Full Sync with Zotero Server">
|
||||
<!ENTITY zotero.preferences.sync.reset.fullSync.desc "Merge local Zotero data with data from the sync server, ignoring sync history.">
|
||||
<!ENTITY zotero.preferences.sync.reset.restoreFromServer "Restore from Zotero Server">
|
||||
<!ENTITY zotero.preferences.sync.reset.restoreFromServer.desc "Erase all local Zotero data and restore from the sync server.">
|
||||
<!ENTITY zotero.preferences.sync.reset.restoreToServer "Restore to Zotero Server">
|
||||
<!ENTITY zotero.preferences.sync.reset.restoreToServer.desc "Erase all server data and overwrite with local Zotero data.">
|
||||
<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "Reset File Sync History">
|
||||
<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "Force checking of the storage server for all local attachment files.">
|
||||
<!ENTITY zotero.preferences.sync.reset "Reset">
|
||||
<!ENTITY zotero.preferences.sync.reset.button "Reset...">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.myLibrary "Συγχρονισμός προσαρτημένων αρχείων στην Βιβλιοθήκη μου, χρησιμοποιώντας">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.groups "Συγχρονισμός προσαρτημένων αρχείων των ομαδικών βιβλιοθηκών χρησιμοποιώντας την αποθήκευση Zotero">
|
||||
<!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 "Χρησιμοποιώντας την αποθήκευση Zotero συμφωνείτε ότι δεσμεύεστε από τους">
|
||||
<!ENTITY zotero.preferences.sync.fileSyncing.tos2 "όρους και τις προϋποθέσεις">
|
||||
<!ENTITY zotero.preferences.sync.reset.warning1 "Οι λειτουργίες που ακολουθούν προορίζονται για χρήση μόνον σε σπάνιες, ειδικές συνθήκες και θα πρέπει να χρησιμοποιούνται για λόγους γενικής επίλυσης προβλημάτων. Σε πολλές περιπτώσεις η επαναφορά των ρυθμίσεων προκαλεί επιπρόσθετα προβλήματα. Δείτε">
|
||||
<!ENTITY zotero.preferences.sync.reset.warning2 "Συγχρονισμός ρυθμίσεων επαναφοράς">
|
||||
<!ENTITY zotero.preferences.sync.reset.warning3 "για περισσότερες πληροφορίες.">
|
||||
<!ENTITY zotero.preferences.sync.reset.fullSync "Πλήρης συγχρονισμός με τους διακομιστές του Zotero">
|
||||
<!ENTITY zotero.preferences.sync.reset.fullSync.desc "Συνένωση των τοπικών δεδομένων Zotero με εκείνα του διακομιστή συγχρονισμού, αγνοώντας το ιστορικό συγχρονισμού.">
|
||||
<!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.desc "Διαγραφή όλων των δεδομένων στον διακομιστή και αντικατάστασή τους με τα τοπικά δεδομένα Zotero.">
|
||||
<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory "Μηδενισμός του ιστορικού συγχρονισμού αρχείων">
|
||||
<!ENTITY zotero.preferences.sync.reset.resetFileSyncHistory.desc "Έλεγχος του αποθηκευτικού διακομιστή για όλα τα τοπικά προσαρτημένα αρχεία.">
|
||||
<!ENTITY zotero.preferences.sync.reset "Μηδενισμός/Επαναφορά">
|
||||
<!ENTITY zotero.preferences.sync.reset.button "Μηδενισμός...">
|
||||
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.search "Search">
|
||||
<!ENTITY zotero.preferences.search.fulltextCache "Full-Text Cache">
|
||||
<!ENTITY zotero.preferences.search.pdfIndexing "PDF Indexing">
|
||||
<!ENTITY zotero.preferences.search.indexStats "Index Statistics">
|
||||
<!ENTITY zotero.preferences.prefpane.search "Αναζήτηση">
|
||||
<!ENTITY zotero.preferences.search.fulltextCache "Προσωρινή μνήμη πλήρους κειμένου">
|
||||
<!ENTITY zotero.preferences.search.pdfIndexing "Καταλογοποίηση PDF">
|
||||
<!ENTITY zotero.preferences.search.indexStats "Καταλογοποίηση στατιστικών">
|
||||
|
||||
<!ENTITY zotero.preferences.search.indexStats.indexed "Indexed:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.partial "Partial:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.unindexed "Unindexed:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.words "Words:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.indexed "Έχουν καταλογοποιηθεί:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.partial "Μερικά/Τμηματικά:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.unindexed "Εκτός καταλογοποίησης:">
|
||||
<!ENTITY zotero.preferences.search.indexStats.words "Λέξεις:">
|
||||
|
||||
<!ENTITY zotero.preferences.fulltext.textMaxLength "Maximum characters to index per file:">
|
||||
<!ENTITY zotero.preferences.fulltext.pdfMaxPages "Maximum pages to index per file:">
|
||||
<!ENTITY zotero.preferences.fulltext.textMaxLength "Μέγιστος αριθμός χαρακτήρων καταλογοποίησης ανά αρχείο:">
|
||||
<!ENTITY zotero.preferences.fulltext.pdfMaxPages "Μέγιστος αριθμός σελίδων καταλογοποίησης ανά αρχείο: ">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.export "Export">
|
||||
<!ENTITY zotero.preferences.prefpane.export "Εξαγωγή">
|
||||
|
||||
<!ENTITY zotero.preferences.citationOptions.caption "Citation Options">
|
||||
<!ENTITY zotero.preferences.export.citePaperJournalArticleURL "Include URLs of paper articles in references">
|
||||
<!ENTITY zotero.preferences.export.citePaperJournalArticleURL.description "When this option is disabled, Zotero includes URLs when citing journal, magazine, and newspaper articles only if the article does not have a page range specified.">
|
||||
<!ENTITY zotero.preferences.citationOptions.caption "Επιλογές παραπομπών">
|
||||
<!ENTITY zotero.preferences.export.citePaperJournalArticleURL "Στις αναφορές να συμπεριλαμβάνονται τα URL έντυπων άρθρων">
|
||||
<!ENTITY zotero.preferences.export.citePaperJournalArticleURL.description "Όταν επιλέγεται αυτή η λειτουργία το Zotero συμπεριλαμβάνει τις διευθύνσεις URL κατά την παράθεση άρθρων περιοδικών και εφημερίδων, μόνο αν στα άρθρα δεν ορίζεται το εύρος των σελίδων.">
|
||||
|
||||
<!ENTITY zotero.preferences.quickCopy.caption "Quick Copy">
|
||||
<!ENTITY zotero.preferences.quickCopy.defaultOutputFormat "Default Output Format:">
|
||||
<!ENTITY zotero.preferences.quickCopy.copyAsHTML "Copy as HTML">
|
||||
<!ENTITY zotero.preferences.quickCopy.macWarning "Note: Rich-text formatting will be lost on Mac OS X.">
|
||||
<!ENTITY zotero.preferences.quickCopy.siteEditor.setings "Site-Specific Settings:">
|
||||
<!ENTITY zotero.preferences.quickCopy.siteEditor.domainPath "Domain/Path">
|
||||
<!ENTITY zotero.preferences.quickCopy.siteEditor.domainPath.example "(e.g. wikipedia.org)">
|
||||
<!ENTITY zotero.preferences.quickCopy.siteEditor.outputFormat "Output Format">
|
||||
<!ENTITY zotero.preferences.quickCopy.dragLimit "Disable Quick Copy when dragging more than">
|
||||
<!ENTITY zotero.preferences.quickCopy.caption "Γρήγορη αντιγραφή">
|
||||
<!ENTITY zotero.preferences.quickCopy.defaultOutputFormat "Αρχική μορφή προϊόντος/εξόδου:">
|
||||
<!ENTITY zotero.preferences.quickCopy.copyAsHTML "Αντιγραφή ως HTML">
|
||||
<!ENTITY zotero.preferences.quickCopy.macWarning "Σημείωση: η μορφοποίηση εμπλουτισμένου κειμένου θα χαθεί στο Mac OS X.">
|
||||
<!ENTITY zotero.preferences.quickCopy.siteEditor.setings "Ρυθμίσεις βάσει ιστοτόπου:">
|
||||
<!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.prefpane.cite "Cite">
|
||||
<!ENTITY zotero.preferences.cite.styles "Styles">
|
||||
<!ENTITY zotero.preferences.cite.wordProcessors "Word Processors">
|
||||
<!ENTITY zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled "No word processor plug-ins are currently installed.">
|
||||
<!ENTITY zotero.preferences.cite.wordProcessors.getPlugins "Get word processor plug-ins...">
|
||||
<!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.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 "Use classic Add Citation dialog">
|
||||
<!ENTITY zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog "Χρήση του κλασικού διαλόγου Προσθήκη παραπομπής">
|
||||
|
||||
<!ENTITY zotero.preferences.cite.styles.styleManager "Style Manager">
|
||||
<!ENTITY zotero.preferences.cite.styles.styleManager.title "Title">
|
||||
<!ENTITY zotero.preferences.cite.styles.styleManager.updated "Updated">
|
||||
<!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.export.getAdditionalStyles "Get additional styles...">
|
||||
<!ENTITY zotero.preferences.export.getAdditionalStyles "Λήψη επιπλέον στυλ...">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.keys "Shortcut Keys">
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Άνοιγμα/Κλείσιμο του πλαισίου Zotero">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Αποθήκευση στο Zotero (εικονίδιο γραμμής διεύθυνσης)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Εναλλαγή σε λειτουργία πλήρους οθόνης">
|
||||
<!ENTITY zotero.preferences.keys.focusLibrariesPane "Εστίαση στο πλαίσιο Βιβλιοθηκών">
|
||||
<!ENTITY zotero.preferences.keys.quicksearch "Γρήγορη αναζήτηση">
|
||||
<!ENTITY zotero.preferences.keys.newItem "Δημιουργία Νέου στοιχείου">
|
||||
<!ENTITY zotero.preferences.keys.newNote "Δημιουργία Νέας σημείωσης">
|
||||
<!ENTITY zotero.preferences.keys.toggleTagSelector "Εναλλαγή Επιλογέα ετικετών">
|
||||
<!ENTITY zotero.preferences.keys.copySelectedItemCitationsToClipboard "Αντιγραφή των επιλεγμένων παραπομπών στοιχείου στην προσωρινή μνήμη">
|
||||
<!ENTITY zotero.preferences.keys.copySelectedItemsToClipboard "Αντιγραφή των επιλεγμένων στοιχείων στην προσωρινή μνήμη">
|
||||
<!ENTITY zotero.preferences.keys.importFromClipboard "Εισαγωγή από την προσωρινή μνήμη">
|
||||
<!ENTITY zotero.preferences.keys.changesTakeEffect "Οι αλλαγές εφαρμόζονται μόνον στα νέα παράθυρα">
|
||||
|
||||
<!ENTITY zotero.preferences.keys.openZotero "Open/Close Zotero Pane">
|
||||
<!ENTITY zotero.preferences.keys.saveToZotero "Save to Zotero (address bar icon)">
|
||||
<!ENTITY zotero.preferences.keys.toggleFullscreen "Toggle Fullscreen Mode">
|
||||
<!ENTITY zotero.preferences.keys.focusLibrariesPane "Focus Libraries Pane">
|
||||
<!ENTITY zotero.preferences.keys.quicksearch "Quick Search">
|
||||
<!ENTITY zotero.preferences.keys.newItem "Create a New Item">
|
||||
<!ENTITY zotero.preferences.keys.newNote "Create a New Note">
|
||||
<!ENTITY zotero.preferences.keys.toggleTagSelector "Toggle Tag Selector">
|
||||
<!ENTITY zotero.preferences.keys.copySelectedItemCitationsToClipboard "Copy Selected Item Citations to Clipboard">
|
||||
<!ENTITY zotero.preferences.keys.copySelectedItemsToClipboard "Copy Selected Items to Clipboard">
|
||||
<!ENTITY zotero.preferences.keys.importFromClipboard "Import from Clipboard">
|
||||
<!ENTITY zotero.preferences.keys.changesTakeEffect "Changes take effect in new windows only">
|
||||
<!ENTITY zotero.preferences.prefpane.proxies "Διαμεσολαβητές">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.proxies "Proxies">
|
||||
|
||||
<!ENTITY zotero.preferences.proxies.proxyOptions "Proxy Options">
|
||||
<!ENTITY zotero.preferences.proxies.desc_before_link "Zotero will transparently redirect requests through saved proxies. See the">
|
||||
<!ENTITY zotero.preferences.proxies.desc_link "proxy documentation">
|
||||
<!ENTITY zotero.preferences.proxies.desc_after_link "for more information.">
|
||||
<!ENTITY zotero.preferences.proxies.transparent "Transparently redirect requests through previously used proxies">
|
||||
<!ENTITY zotero.preferences.proxies.autoRecognize "Automatically recognize proxied resources">
|
||||
<!ENTITY zotero.preferences.proxies.disableByDomain "Disable proxy redirection when my domain name contains ">
|
||||
<!ENTITY zotero.preferences.proxies.configured "Configured Proxies">
|
||||
<!ENTITY zotero.preferences.proxies.hostname "Hostname">
|
||||
<!ENTITY zotero.preferences.proxies.scheme "Scheme">
|
||||
<!ENTITY zotero.preferences.proxies.proxyOptions "Επιλογές διαμεσολαβητή">
|
||||
<!ENTITY zotero.preferences.proxies.desc_before_link "Το Zotero θα ανακατευθύνει τα αιτήματα μέσω των αποθηκευμένων διαμεσολαβητών. Δείτε την">
|
||||
<!ENTITY zotero.preferences.proxies.desc_link "τεκμηρίωση διαμεσολαβητών">
|
||||
<!ENTITY zotero.preferences.proxies.desc_after_link "για περισσότερες πληροφορίες.">
|
||||
<!ENTITY zotero.preferences.proxies.transparent "Ενεργοποίηση της ανακατεύθυνσης διαμεσολαβητή">
|
||||
<!ENTITY zotero.preferences.proxies.autoRecognize "Αυτόματη αναγνώριση διαμεσολαβημένων πόρων">
|
||||
<!ENTITY zotero.preferences.proxies.disableByDomain "Να απενεργοποιείται η ανακατεύθυνση διαμεσολαβητή όταν η περιοχή μου περιέχει">
|
||||
<!ENTITY zotero.preferences.proxies.configured "Προσαρμοσμένους διαμεσολαβητές">
|
||||
<!ENTITY zotero.preferences.proxies.hostname "Κεντρικό όνομα διακομιστή">
|
||||
<!ENTITY zotero.preferences.proxies.scheme "Σχήμα">
|
||||
|
||||
<!ENTITY zotero.preferences.proxies.multiSite "Multi-Site">
|
||||
<!ENTITY zotero.preferences.proxies.autoAssociate "Automatically associate new hosts">
|
||||
<!ENTITY zotero.preferences.proxies.variables "You may use the following variables in your proxy scheme:">
|
||||
<!ENTITY zotero.preferences.proxies.h_variable "%h - The hostname of the proxied site (e.g., www.zotero.org)">
|
||||
<!ENTITY zotero.preferences.proxies.p_variable "%p - The path of the proxied page excluding the leading slash (e.g., about/index.html)">
|
||||
<!ENTITY zotero.preferences.proxies.d_variable "%d - The directory path (e.g., about/)">
|
||||
<!ENTITY zotero.preferences.proxies.f_variable "%f - The filename (e.g., index.html)">
|
||||
<!ENTITY zotero.preferences.proxies.a_variable "%a - Any string">
|
||||
<!ENTITY zotero.preferences.proxies.autoAssociate "Αυτόματη συσχέτιση νέων διακομιστών">
|
||||
<!ENTITY zotero.preferences.proxies.variables "Στο σχήμα διακομιστών σας, μπορείτε να χρησιμοποιείτε τις ακόλουθες μεταβλητές:">
|
||||
<!ENTITY zotero.preferences.proxies.h_variable "%h - Το όνομα υπολογιστή για τον διαμεσολαβούμενο ιστότοπο (π.χ. www.zoter.org)">
|
||||
<!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 - Οποιοδήποτε αλφαριθμητικό">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Advanced">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Files and Folders">
|
||||
<!ENTITY zotero.preferences.prefpane.advanced "Προχωρημένα">
|
||||
<!ENTITY zotero.preferences.advanced.filesAndFolders "Αρχεία και Φάκελοι">
|
||||
<!ENTITY zotero.preferences.advanced.keys "Shortcuts">
|
||||
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Locate">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Article Lookup Engine Manager">
|
||||
<!ENTITY zotero.preferences.locate.description "Description">
|
||||
<!ENTITY zotero.preferences.locate.name "Name">
|
||||
<!ENTITY zotero.preferences.locate.locateEnginedescription "A Lookup Engine extends the capability of the Locate drop down in the Info pane. By enabling Lookup Engines in the list below they will be added to the drop down and can be used to locate resources from your library on the web.">
|
||||
<!ENTITY zotero.preferences.locate.addDescription "To add a Lookup Engine that is not on the list, visit the desired search engine in your browser and select 'Add' from the Firefox Search Bar. When you reopen this preference pane you will have the option to enable the new Lookup Engine.">
|
||||
<!ENTITY zotero.preferences.locate.restoreDefaults "Restore Defaults">
|
||||
<!ENTITY zotero.preferences.prefpane.locate "Εντοπισμός">
|
||||
<!ENTITY zotero.preferences.locate.locateEngineManager "Διαχειριστής Μηχανής Αναζήτησης Άρθρων">
|
||||
<!ENTITY zotero.preferences.locate.description "Περιγραφή">
|
||||
<!ENTITY zotero.preferences.locate.name "Όνομα">
|
||||
<!ENTITY zotero.preferences.locate.locateEnginedescription "Η Μηχανή Αναζήτησης επεκτείνει τις δυνατότητες της αναπτυσσόμενης λίστας Εντοπισμού, του πλαισίου Πληροφορίες. Ενεργοποιώντας τις Μηχανές Αναζήτησης στην λίστα που ακολουθεί, αυτές θα προστεθούν στην αναπτυσσόμενη λίστα και μπορούν να χρησιμοποιηθούν για τον εντοπισμό πόρων από την βιβλιοθήκη σας στο web.">
|
||||
<!ENTITY zotero.preferences.locate.addDescription "Για να προσθέσετε μια Μηχανή Αναζήτησης που δεν υπάρχει στην λίστα, επισκεφθείτε την μηχανή αναζήτησης της αρεσκείας σας μέσα από τον περιηγητή σας και επιλέξτε "Add" μέσα από το μενού Εντοπισμού του Zotero.">
|
||||
<!ENTITY zotero.preferences.locate.restoreDefaults "Επαναφορά αρχικών ρυθμίσεων">
|
||||
|
||||
<!ENTITY zotero.preferences.charset "Character Encoding">
|
||||
<!ENTITY zotero.preferences.charset.importCharset "Import Character Encoding">
|
||||
<!ENTITY zotero.preferences.charset.displayExportOption "Display character encoding option on export">
|
||||
<!ENTITY zotero.preferences.charset "Κωδικοποίηση χαρακτήρων">
|
||||
<!ENTITY zotero.preferences.charset.importCharset "Εισαγωγή κωδικοποίησης χαρακτήρων">
|
||||
<!ENTITY zotero.preferences.charset.displayExportOption "Εμφάνιση της επιλογής κωδικοποίησης χαρακτήρων κατά την εξαγωγή">
|
||||
|
||||
<!ENTITY zotero.preferences.dataDir "Storage Location">
|
||||
<!ENTITY zotero.preferences.dataDir.useProfile "Use profile directory">
|
||||
<!ENTITY zotero.preferences.dataDir.custom "Custom:">
|
||||
<!ENTITY zotero.preferences.dataDir.choose "Choose...">
|
||||
<!ENTITY zotero.preferences.dataDir.reveal "Show Data Directory">
|
||||
<!ENTITY zotero.preferences.dataDir "Θέση Καταλόγου δεδομένων">
|
||||
<!ENTITY zotero.preferences.dataDir.useProfile "Χρήση του καταλόγου προφίλ">
|
||||
<!ENTITY zotero.preferences.dataDir.custom "Προσαρμοσμένος:">
|
||||
<!ENTITY zotero.preferences.dataDir.choose "Επιλέξτε...">
|
||||
<!ENTITY zotero.preferences.dataDir.reveal "Εμφάνιση του Καταλόγου δεδομένων">
|
||||
|
||||
<!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.message "Το Zotero θα χρησιμοποιήσει σχετικές διαδρομές για τα συνδεδεμένα προσαρτήματα αρχείων εντός του καταλόγου βάσης του, επιτρέποντας την πρόσβαση προς αρχείων σε διαφορετικούς υπολογιστές, εφόσον η δομή των αρχείων μέσα στον κατάλογο βάσης παραμένει η ίδια.">
|
||||
<!ENTITY zotero.preferences.attachmentBaseDir.basePath "Κατάλογος βάσης:">
|
||||
<!ENTITY zotero.preferences.attachmentBaseDir.selectBasePath "Επιλέξτε...">
|
||||
<!ENTITY zotero.preferences.attachmentBaseDir.resetBasePath "Επαναφορά σε απόλυτες διαδρομές...">
|
||||
|
||||
<!ENTITY zotero.preferences.dbMaintenance "Database Maintenance">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Check Database Integrity">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslatorsAndStyles "Reset Translators and Styles...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslators "Reset Translators...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Reset Styles...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance "Συντήρηση βάσης δεδομένων">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.integrityCheck "Έλεγχος της ακεραιότητας της βάσης δεδομένων">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslatorsAndStyles "Μηδενισμός/Επαναφορά μεταφραστών και στυλ...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetTranslators "Επαναφορά/Μηδενισμός μεταφραστών...">
|
||||
<!ENTITY zotero.preferences.dbMaintenance.resetStyles "Επαναφορά/Μηδενισμός στυλ...">
|
||||
|
||||
<!ENTITY zotero.preferences.debugOutputLogging "Debug Output Logging">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.message "Debug output can help Zotero developers diagnose problems in Zotero. Debug logging will slow down Zotero, so you should generally leave it disabled unless a Zotero developer requests debug output.">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.linesLogged "lines logged">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.enableAfterRestart "Enable after restart">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.viewOutput "View Output">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.clearOutput "Clear Output">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Submit to Zotero Server">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging "Καταγραφές αποσφαλμάτωσης αποτελεσμάτων">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.message "Η έξοδος ή αποτέλεσμα προς αποσφαλμάτωση μπορεί να βοηθήσει τους προγραμματιστές του Zotero να διαγιγνώσκουν προβλήματα. Οι καταγραφές αποσφαλμάτωσης θα επιβραδύνουν το Zotero, γι' αυτό εν γένει πρέπει να μην τις ενεργοποιείτε, εκτός κι αν κάποιος προγραμματιστής του Zotero ζητά εξόδους αποσφαλμάτωσης.">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.linesLogged "καταγεγραμμένες γραμμές">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.enableAfterRestart "Ενεργοποίηση μετά από επανεκκίνηση">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.viewOutput "Προβολή εξόδου">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.clearOutput "Εκκαθάριση εξόδου">
|
||||
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Να υποβληθούν στον διακομιστή Zotero">
|
||||
|
||||
<!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">
|
||||
<!ENTITY zotero.preferences.openAboutConfig "Άνοιγμα about:config">
|
||||
<!ENTITY zotero.preferences.openCSLEdit "Open Style Editor">
|
||||
<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
|
||||
<!ENTITY zotero.preferences.openAboutMemory "Άνοιγμα about:memory">
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue