Tweak wording of delayed-citations mode
"Delay citation updates until manual refresh" would be fine in the doc prefs, but "until manual refresh" is a bit too awkward for the prompt. Instead, go with @rmzelle's suggestion from #1242 of referring to "automatic citation updates", and invert the checkbox.
This commit is contained in:
parent
cc9efde843
commit
e4cc28ac60
|
@ -146,8 +146,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
if(_io.useEndnotes && _io.useEndnotes == 1) document.getElementById("displayAs").selectedIndex = 1;
|
if(_io.useEndnotes && _io.useEndnotes == 1) document.getElementById("displayAs").selectedIndex = 1;
|
||||||
let dialog = document.getElementById("zotero-doc-prefs-dialog");
|
let dialog = document.getElementById("zotero-doc-prefs-dialog");
|
||||||
dialog.setAttribute('title', `${Zotero.clientName} - ${dialog.getAttribute('title')}`);
|
dialog.setAttribute('title', `${Zotero.clientName} - ${dialog.getAttribute('title')}`);
|
||||||
}
|
|
||||||
if(document.getElementById("formatUsing")) {
|
|
||||||
if(_io.fieldType == "Bookmark") document.getElementById("formatUsing").selectedIndex = 1;
|
if(_io.fieldType == "Bookmark") document.getElementById("formatUsing").selectedIndex = 1;
|
||||||
var formatOption = (_io.primaryFieldType == "ReferenceMark" ? "referenceMarks" : "fields");
|
var formatOption = (_io.primaryFieldType == "ReferenceMark" ? "referenceMarks" : "fields");
|
||||||
document.getElementById("fields").label =
|
document.getElementById("fields").label =
|
||||||
|
@ -158,19 +157,16 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
Zotero.getString("integration."+formatOption+".fileFormatNotice");
|
Zotero.getString("integration."+formatOption+".fileFormatNotice");
|
||||||
document.getElementById("bookmarks-file-format-notice").textContent =
|
document.getElementById("bookmarks-file-format-notice").textContent =
|
||||||
Zotero.getString("integration.fields.fileFormatNotice");
|
Zotero.getString("integration.fields.fileFormatNotice");
|
||||||
}
|
|
||||||
if(document.getElementById("automaticJournalAbbreviations-checkbox")) {
|
|
||||||
if(_io.automaticJournalAbbreviations === undefined) {
|
if(_io.automaticJournalAbbreviations === undefined) {
|
||||||
_io.automaticJournalAbbreviations = Zotero.Prefs.get("cite.automaticJournalAbbreviations");
|
_io.automaticJournalAbbreviations = Zotero.Prefs.get("cite.automaticJournalAbbreviations");
|
||||||
}
|
}
|
||||||
if(_io.automaticJournalAbbreviations) {
|
if(_io.automaticJournalAbbreviations) {
|
||||||
document.getElementById("automaticJournalAbbreviations-checkbox").checked = true;
|
document.getElementById("automaticJournalAbbreviations-checkbox").checked = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (document.getElementById("delayCitationUpdates-checkbox")) {
|
document.getElementById("automaticCitationUpdates-checkbox").checked = !_io.delayCitationUpdates;
|
||||||
if (_io.delayCitationUpdates) {
|
|
||||||
document.getElementById("delayCitationUpdates-checkbox").checked = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set style to false, in case this is cancelled
|
// set style to false, in case this is cancelled
|
||||||
|
@ -205,31 +201,29 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
//
|
//
|
||||||
// For integrationDocPrefs.xul
|
// For integrationDocPrefs.xul
|
||||||
//
|
//
|
||||||
|
if (isDocPrefs) {
|
||||||
// update status of displayAs box based on style class
|
// update status of displayAs box based on style class
|
||||||
if(document.getElementById("displayAs-groupbox")) {
|
|
||||||
var isNote = selectedStyleObj.class == "note";
|
var isNote = selectedStyleObj.class == "note";
|
||||||
document.getElementById("displayAs-groupbox").hidden = !isNote;
|
document.getElementById("displayAs-groupbox").hidden = !isNote;
|
||||||
|
|
||||||
// update status of formatUsing box based on style class
|
// update status of formatUsing box based on style class
|
||||||
if(document.getElementById("formatUsing")) {
|
if(isNote) document.getElementById("formatUsing").selectedIndex = 0;
|
||||||
if(isNote) document.getElementById("formatUsing").selectedIndex = 0;
|
document.getElementById("bookmarks").disabled = isNote;
|
||||||
document.getElementById("bookmarks").disabled = isNote;
|
document.getElementById("bookmarks-caption").disabled = isNote;
|
||||||
document.getElementById("bookmarks-caption").disabled = isNote;
|
|
||||||
}
|
// update status of displayAs box based on style class
|
||||||
}
|
|
||||||
|
|
||||||
// update status of displayAs box based on style class
|
|
||||||
if(document.getElementById("automaticJournalAbbreviations-vbox")) {
|
|
||||||
document.getElementById("automaticJournalAbbreviations-vbox").hidden =
|
document.getElementById("automaticJournalAbbreviations-vbox").hidden =
|
||||||
!selectedStyleObj.usesAbbreviation;
|
!selectedStyleObj.usesAbbreviation;
|
||||||
}
|
|
||||||
// Hide the delayCitationUpdates checkbox before the prompt is shown
|
// Hide the automaticCitationUpdates checkbox before the prompt is shown
|
||||||
document.getElementById("delayCitationUpdates-vbox").hidden = _io.dontAskDelayCitationUpdates == undefined;
|
document.getElementById("automaticCitationUpdates-vbox").hidden
|
||||||
// Highlight delay citations checkbox after displaying the alert
|
= _io.dontAskDelayCitationUpdates == undefined;
|
||||||
// NOTE: Currently unused
|
|
||||||
if (_io.highlightDelayCitations) {
|
// Highlight delay citations checkbox after displaying the alert
|
||||||
document.getElementById("delayCitationUpdates-vbox").style.border = "1px dashed #e52e2e"
|
// NOTE: Currently unused
|
||||||
|
if (_io.highlightDelayCitations) {
|
||||||
|
document.getElementById("automaticCitationUpdates-vbox").style.border = "1px dashed #e52e2e"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -286,7 +280,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
}
|
}
|
||||||
_io.useEndnotes = document.getElementById("displayAs").selectedIndex;
|
_io.useEndnotes = document.getElementById("displayAs").selectedIndex;
|
||||||
_io.fieldType = (document.getElementById("formatUsing").selectedIndex == 0 ? _io.primaryFieldType : _io.secondaryFieldType);
|
_io.fieldType = (document.getElementById("formatUsing").selectedIndex == 0 ? _io.primaryFieldType : _io.secondaryFieldType);
|
||||||
_io.delayCitationUpdates = document.getElementById("delayCitationUpdates-checkbox").checked;
|
_io.delayCitationUpdates = !document.getElementById("automaticCitationUpdates-checkbox").checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember style and locale if user selected these explicitly
|
// remember style and locale if user selected these explicitly
|
||||||
|
|
|
@ -86,9 +86,9 @@
|
||||||
<description class="radioDescription">&zotero.integration.prefs.automaticJournalAbbeviations.caption;</description>
|
<description class="radioDescription">&zotero.integration.prefs.automaticJournalAbbeviations.caption;</description>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<vbox id="delayCitationUpdates-vbox">
|
<vbox id="automaticCitationUpdates-vbox">
|
||||||
<checkbox id="delayCitationUpdates-checkbox" label="&zotero.integration.prefs.delayCitationUpdates.label;" tooltiptext="&zotero.integration.prefs.delayCitationUpdates.tooltip;"/>
|
<checkbox id="automaticCitationUpdates-checkbox" label="&zotero.integration.prefs.automaticCitationUpdates.label;" tooltiptext="&zotero.integration.prefs.automaticCitationUpdates.tooltip;"/>
|
||||||
<description class="radioDescription">&zotero.integration.prefs.delayCitationUpdates.description;</description>
|
<description class="radioDescription">&zotero.integration.prefs.automaticCitationUpdates.description;</description>
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</dialog>
|
</dialog>
|
|
@ -939,8 +939,15 @@ Zotero.Integration.Fields.prototype.updateDocument = Zotero.Promise.coroutine(fu
|
||||||
// If the update takes longer than 5s suggest delaying citation updates
|
// If the update takes longer than 5s suggest delaying citation updates
|
||||||
if (diff > DELAY_CITATIONS_PROMPT_TIMEOUT && !this._session.data.prefs.dontAskDelayCitationUpdates && !this._session.data.prefs.delayCitationUpdates) {
|
if (diff > DELAY_CITATIONS_PROMPT_TIMEOUT && !this._session.data.prefs.dontAskDelayCitationUpdates && !this._session.data.prefs.delayCitationUpdates) {
|
||||||
this._doc.activate();
|
this._doc.activate();
|
||||||
var result = this._session.displayAlert(Zotero.getString('integration.delayCitationUpdates.alert'),
|
var result = this._session.displayAlert(
|
||||||
DIALOG_ICON_WARNING, DIALOG_BUTTONS_YES_NO_CANCEL);
|
Zotero.getString('integration.delayCitationUpdates.alert.text1')
|
||||||
|
+ "\n\n"
|
||||||
|
+ Zotero.getString('integration.delayCitationUpdates.alert.text2')
|
||||||
|
+ "\n\n"
|
||||||
|
+ Zotero.getString('integration.delayCitationUpdates.alert.text3'),
|
||||||
|
DIALOG_ICON_WARNING,
|
||||||
|
DIALOG_BUTTONS_YES_NO_CANCEL
|
||||||
|
);
|
||||||
if (result == 2) {
|
if (result == 2) {
|
||||||
this._session.data.prefs.delayCitationUpdates = true;
|
this._session.data.prefs.delayCitationUpdates = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,9 +231,9 @@
|
||||||
<!ENTITY zotero.integration.prefs.bookmarks.label "Bookmarks">
|
<!ENTITY zotero.integration.prefs.bookmarks.label "Bookmarks">
|
||||||
<!ENTITY zotero.integration.prefs.bookmarks.caption "Bookmarks can be shared between Word and LibreOffice, but may cause errors if accidentally modified and cannot be inserted into footnotes.">
|
<!ENTITY zotero.integration.prefs.bookmarks.caption "Bookmarks can be shared between Word and LibreOffice, but may cause errors if accidentally modified and cannot be inserted into footnotes.">
|
||||||
|
|
||||||
<!ENTITY zotero.integration.prefs.delayCitationUpdates.label "Delay citation updates until manual refresh">
|
<!ENTITY zotero.integration.prefs.automaticCitationUpdates.label "Automatically update citations">
|
||||||
<!ENTITY zotero.integration.prefs.delayCitationUpdates.tooltip "Citations with pending updates are visually highlighted">
|
<!ENTITY zotero.integration.prefs.automaticCitationUpdates.tooltip "Citations with pending updates will be highlighted in the document">
|
||||||
<!ENTITY zotero.integration.prefs.delayCitationUpdates.description "Delaying updates can speed up citation insertion in large documents.">
|
<!ENTITY zotero.integration.prefs.automaticCitationUpdates.description "Disabling updates can speed up citation insertion in large documents. Click Refresh to update citations manually.">
|
||||||
|
|
||||||
|
|
||||||
<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Use MEDLINE journal abbreviations">
|
<!ENTITY zotero.integration.prefs.automaticJournalAbbeviations.label "Use MEDLINE journal abbreviations">
|
||||||
|
|
|
@ -870,8 +870,10 @@ integration.corruptBibliography.description = All items cited in the text will a
|
||||||
integration.citationChanged = You have modified this citation since Zotero generated it. Do you want to keep your modifications and prevent future updates?
|
integration.citationChanged = You have modified this citation since Zotero generated it. Do you want to keep your modifications and prevent future updates?
|
||||||
integration.citationChanged.description = Clicking "Yes" will prevent Zotero from updating this citation if you add additional citations, switch styles, or modify the item to which it refers. Clicking "No" will erase your changes.
|
integration.citationChanged.description = Clicking "Yes" will prevent Zotero from updating this citation if you add additional citations, switch styles, or modify the item to which it refers. Clicking "No" will erase your changes.
|
||||||
integration.citationChanged.edit = You have modified this citation since Zotero generated it. Editing will clear your modifications. Do you want to continue?
|
integration.citationChanged.edit = You have modified this citation since Zotero generated it. Editing will clear your modifications. Do you want to continue?
|
||||||
integration.delayCitationUpdates.alert = Updating citations in this document is taking a long time. Would you like to delay citation updates until manual refresh?\n\nYou can change this setting later in the document preferences.
|
integration.delayCitationUpdates.alert.text1 = Updating citations in this document is taking a long time. Would you like to disable automatic citation updates?
|
||||||
integration.delayCitationUpdates.bibliography = Delayed citing mode is enabled. To see the bibliography click Refresh in Zotero plugin.
|
integration.delayCitationUpdates.alert.text2 = You will need to click Refresh in the Zotero plugin when you are done inserting citations.
|
||||||
|
integration.delayCitationUpdates.alert.text3 = You can change this setting later in the document preferences.
|
||||||
|
integration.delayCitationUpdates.bibliography = Automatic citation updates are disabled. To see the bibliography, click Refresh in the Zotero plugin.
|
||||||
|
|
||||||
styles.install.title = Install Style
|
styles.install.title = Install Style
|
||||||
styles.install.unexpectedError = An unexpected error occurred while installing "%1$S"
|
styles.install.unexpectedError = An unexpected error occurred while installing "%1$S"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user