Adjust message

This commit is contained in:
Adomas Venčkauskas 2026-06-03 09:50:51 +03:00
parent 90cc1f7c67
commit da3e05fb6f
3 changed files with 9 additions and 3 deletions

View file

@ -1517,7 +1517,10 @@ Zotero.Integration.Session.prototype.cite = async function (field, addNote=false
citation = new Zotero.Integration.Citation(field, await field.unserialize(), await field.getNoteIndex());
}
else if (field.type === INTEGRATION_TYPE_BIBLIOGRAPHY) {
throw new Zotero.Exception.Alert("integration.error.inBibliography");
let commandName = this._app.processorName == 'Google Docs'
? '“Add/edit bibliography”'
: 'Add/Edit Bibliography';
throw new Zotero.Exception.Alert("integration.error.inBibliography", [commandName]);
}
else {
// Treat any non-item and non-bibliograph field as a TEMP placeholder, that is likely

View file

@ -894,7 +894,7 @@ integration.error.mustInsertCitation = You must insert a citation before perfor
integration.error.mustInsertBibliography = You must insert a bibliography before performing this operation.
integration.error.cannotInsertHere = Zotero fields cannot be inserted here.
integration.error.notInCitation = You must place the cursor in a Zotero citation to edit it.
integration.error.inBibliography = To insert a citation, place the cursor in the body of the text. To edit the bibliography directly, use the Add/Edit Bibliography button.
integration.error.inBibliography = To insert a citation, place the cursor in the body of the text. To edit the bibliography directly, use %S.
integration.error.noBibliography = The current bibliographic style does not define a bibliography. If you wish to add a bibliography, please choose another style.
integration.error.deletePipe = The pipe that Zotero uses to communicate with the word processor could not be initialized. Would you like Zotero to attempt to correct this error? You will be prompted for your password.
integration.error.invalidStyle = The style you have selected does not appear to be valid. If you have created this style yourself, please ensure that it passes validation as described at https://github.com/citation-style-language/styles/wiki/Validation. Alternatively, try selecting another style.

View file

@ -646,7 +646,10 @@ describe("Zotero.Integration", function () {
await execCommand('addEditCitation', docID);
assert.isTrue(displayAlertStub.calledOnce);
assert.equal(displayAlertStub.firstCall.args[0], Zotero.getString('integration.error.inBibliography'));
assert.equal(
displayAlertStub.firstCall.args[0],
Zotero.getString('integration.error.inBibliography', ['Add/Edit Bibliography'])
);
});
it('should write an implicitly updated citation into the document', async function () {