parent
4af4212360
commit
7f84716c7e
5 changed files with 19 additions and 6 deletions
|
@ -630,22 +630,30 @@ var Zotero_LocateMenu = new function() {
|
|||
ViewOptions._libraryLookup = new function() {
|
||||
this.className = "zotero-menuitem-library-lookup";
|
||||
this.canHandleItem = function (item) { return Zotero.Promise.resolve(item.isRegularItem()); };
|
||||
this.handleItems = Zotero.Promise.method(function (items, event) {
|
||||
this.handleItems = async function (items, event) {
|
||||
// If no resolver configured, show error
|
||||
if (!Zotero.Prefs.get('openURL.resolver')) {
|
||||
let paneName = Zotero.Intl.strings['zotero.preferences.prefpane.general'];
|
||||
let [noResolverStr, openSettingsStr] = await document.l10n.formatValues(
|
||||
[
|
||||
{ id: 'locate-library-lookup-no-resolver', args: { pane: paneName } },
|
||||
{ id: 'general-open-settings' }
|
||||
]
|
||||
);
|
||||
let ps = Services.prompt;
|
||||
let buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING)
|
||||
+ (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_CANCEL);
|
||||
let index = ps.confirmEx(
|
||||
null,
|
||||
Zotero.getString('locate.libraryLookup.noResolver.title'),
|
||||
Zotero.getString('locate.libraryLookup.noResolver.text', Zotero.appName),
|
||||
noResolverStr,
|
||||
buttonFlags,
|
||||
Zotero.getString('general.openPreferences'),
|
||||
openSettingsStr,
|
||||
null, null, null, {}
|
||||
);
|
||||
if (index == 0) {
|
||||
Zotero.Utilities.Internal.openPreferences('zotero-prefpane-advanced');
|
||||
// TODO: Scroll to Locate
|
||||
Zotero.Utilities.Internal.openPreferences('zotero-prefpane-general');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -656,6 +664,6 @@ var Zotero_LocateMenu = new function() {
|
|||
if(url) urls.push(url);
|
||||
}
|
||||
ZoteroPane_Local.loadURI(urls, event);
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -193,6 +193,9 @@
|
|||
<groupbox>
|
||||
<label><html:h2>&zotero.preferences.prefpane.locate;</html:h2></label>
|
||||
|
||||
<label data-l10n-id="preferences-locate-library-lookup-intro"/>
|
||||
<separator class="thin"/>
|
||||
|
||||
<hbox align="center">
|
||||
<label control="openurl-menu" data-l10n-id="preferences-locate-resolver"></label>
|
||||
<menulist id="openurl-menu" native="true">
|
||||
|
|
|
@ -38,6 +38,7 @@ preferences-item-pane-header-style = Header Citation Style:
|
|||
preferences-item-pane-header-locale = Header Language:
|
||||
preferences-item-pane-header-missing-style = Missing style: <{ $shortName }>
|
||||
|
||||
preferences-locate-library-lookup-intro = Library Lookup can find a resource online using your library’s OpenURL resolver.
|
||||
preferences-locate-resolver = Resolver
|
||||
preferences-locate-base-url = Base URL
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ general-remove = Remove
|
|||
general-add = Add
|
||||
general-remind-me-later = Remind Me Later
|
||||
general-choose-file = Choose File…
|
||||
general-open-settings = Open Settings
|
||||
|
||||
menu-file-show-in-finder =
|
||||
.label = Show in Finder
|
||||
|
@ -521,6 +522,7 @@ item-pane-header-bibEntry =
|
|||
item-pane-header-more-options =
|
||||
.label = More Options
|
||||
|
||||
locate-library-lookup-no-resolver = You must choose a resolver from the { $pane } pane of the { -app-name } settings.
|
||||
|
||||
architecture-win32-warning-message = { -app-name } is running in 32-bit mode on a 64-bit version of Windows. { -app-name } will run more efficiently in 64-bit mode.
|
||||
architecture-warning-action = Download 64-bit { -app-name }
|
||||
|
|
|
@ -1233,7 +1233,6 @@ locate.externalViewer.label = Open in External Viewer
|
|||
locate.internalViewer.label = Open in Internal Viewer
|
||||
locate.libraryLookup.label = Library Lookup
|
||||
locate.libraryLookup.noResolver.title = No OpenURL Resolver
|
||||
locate.libraryLookup.noResolver.text = You must choose an OpenURL resolver from the Advanced pane of the %S preferences.
|
||||
locate.manageLocateEngines = Manage Lookup Engines…
|
||||
locate.locateEngineDescription = Lookup engines help you find resources in your %S library on the web. Engines enabled in this list appear in the Locate drop-down in the toolbar.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue