diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index e6e6987f61..210f449e3b 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -42,6 +42,28 @@ Zotero_Preferences.Advanced = { }, + updateTranslators: Zotero.Promise.coroutine(function* () { + var updated = yield Zotero.Schema.updateFromRepository(Zotero.Schema.REPO_UPDATE_MANUAL); + var button = document.getElementById('updateButton'); + if (button) { + if (updated===-1) { + var label = Zotero.getString('zotero.preferences.update.upToDate'); + } + else if (updated) { + var label = Zotero.getString('zotero.preferences.update.updated'); + } + else { + var label = Zotero.getString('zotero.preferences.update.error'); + } + button.setAttribute('label', label); + + if (updated && Zotero_Preferences.Cite) { + yield Zotero_Preferences.Cite.refreshStylesList(); + } + } + }), + + migrateDataDirectory: Zotero.Promise.coroutine(function* () { var currentDir = Zotero.DataDirectory.dir; var defaultDir = Zotero.DataDirectory.defaultDir; diff --git a/chrome/content/zotero/preferences/preferences_advanced.xul b/chrome/content/zotero/preferences/preferences_advanced.xul index b811225b38..05ff72d9d8 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.xul +++ b/chrome/content/zotero/preferences/preferences_advanced.xul @@ -37,12 +37,16 @@ onpaneload="Zotero_Preferences.Advanced.init()" helpTopic="advanced"> + + + + @@ -74,6 +78,14 @@ + + +