Clarify location of refresh button in delayed citation copy
This commit is contained in:
parent
6f6e18b406
commit
92346c8fb9
2 changed files with 23 additions and 6 deletions
|
@ -229,7 +229,7 @@ Zotero.Integration = new function() {
|
|||
var application = Zotero.Integration.getApplication(agent, command, docId);
|
||||
|
||||
Zotero.Integration.currentDoc = document = (application.getDocument && docId ? application.getDocument(docId) : application.getActiveDocument());
|
||||
Zotero.Integration.currentSession = session = yield Zotero.Integration.getSession(application, document);
|
||||
Zotero.Integration.currentSession = session = yield Zotero.Integration.getSession(application, document, agent);
|
||||
// TODO: this is pretty awful
|
||||
session.fields = new Zotero.Integration.Fields(session, document);
|
||||
session._doc = document;
|
||||
|
@ -358,7 +358,7 @@ Zotero.Integration = new function() {
|
|||
* Either loads a cached session if doc communicated since restart or creates a new one
|
||||
* @return {Zotero.Integration.Session} Promise
|
||||
*/
|
||||
this.getSession = Zotero.Promise.coroutine(function *(app, doc) {
|
||||
this.getSession = Zotero.Promise.coroutine(function *(app, doc, agent) {
|
||||
var dataString = doc.getDocumentData(),
|
||||
data, session;
|
||||
|
||||
|
@ -439,6 +439,7 @@ Zotero.Integration = new function() {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
session.agent = agent;
|
||||
return session;
|
||||
});
|
||||
|
||||
|
@ -942,8 +943,15 @@ Zotero.Integration.Fields.prototype.updateDocument = Zotero.Promise.coroutine(fu
|
|||
// 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) {
|
||||
this._doc.activate();
|
||||
|
||||
var interfaceType = 'tab';
|
||||
if (['MacWord2008', 'OpenOffice'].includes(this._session.agent)) {
|
||||
interfaceType = 'toolbar';
|
||||
}
|
||||
|
||||
var result = this._session.displayAlert(
|
||||
Zotero.getString('integration.delayCitationUpdates.alert.text1')
|
||||
Zotero.getString('integration.delayCitationUpdates.alert.text1',
|
||||
Zotero.getString(`integration.interfaceType.${interfaceType}`))
|
||||
+ "\n\n"
|
||||
+ Zotero.getString('integration.delayCitationUpdates.alert.text2')
|
||||
+ "\n\n"
|
||||
|
@ -1623,7 +1631,13 @@ Zotero.Integration.Session.prototype.writeDelayedCitation = Zotero.Promise.corou
|
|||
for (let i = fields.length-1; i >= 0; i--) {
|
||||
let field = Zotero.Integration.Field.loadExisting(fields[i]);
|
||||
if (field.type == INTEGRATION_TYPE_BIBLIOGRAPHY) {
|
||||
field.setText(Zotero.getString('integration.delayCitationUpdates.bibliography'), false)
|
||||
var interfaceType = 'tab';
|
||||
if (['MacWord2008', 'OpenOffice'].includes(this.agent)) {
|
||||
interfaceType = 'toolbar';
|
||||
}
|
||||
|
||||
field.setText(Zotero.getString('integration.delayCitationUpdates.bibliography',
|
||||
Zotero.getString(`integration.interfaceType.${interfaceType}`)), false)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -811,6 +811,9 @@ integration.fields.fileFormatNotice = The document must be saved as .doc or .doc
|
|||
integration.referenceMarks.caption = ReferenceMarks cannot be shared with Word.
|
||||
integration.referenceMarks.fileFormatNotice = The document must be saved as .odt.
|
||||
|
||||
integration.interfaceType.toolbar = toolbar
|
||||
integration.interfaceType.tab = tab
|
||||
|
||||
integration.regenerate.title = Do you want to regenerate the citation?
|
||||
integration.regenerate.body = The changes you have made in the citation editor will be lost.
|
||||
integration.regenerate.saveBehavior = Always follow this selection.
|
||||
|
@ -862,9 +865,9 @@ integration.citationChanged = You have modified this citation since Zotero ge
|
|||
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.delayCitationUpdates.alert.text1 = Updating citations in this document is taking a long time. Would you like to disable automatic citation updates?
|
||||
integration.delayCitationUpdates.alert.text2 = You will need to click Refresh in the Zotero plugin when you are done inserting citations.
|
||||
integration.delayCitationUpdates.alert.text2 = You will need to click Refresh in the Zotero %S 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.
|
||||
integration.delayCitationUpdates.bibliography = Automatic citation updates are disabled. To see the bibliography, click Refresh in the Zotero %S.
|
||||
|
||||
styles.install.title = Install Style
|
||||
styles.install.unexpectedError = An unexpected error occurred while installing "%1$S"
|
||||
|
|
Loading…
Reference in a new issue