Closes #726, Localize remaining hard-coded strings
Not localizing 'Error initializing Zotero database' or bundle.js alerts -- they shouldn't happen except during development, and if they do it doesn't really matter if the user understands them.
This commit is contained in:
parent
e0e9f6ec2d
commit
a65c5cd4e1
|
@ -235,6 +235,19 @@ var ZoteroPane = new function()
|
||||||
var errFunc = Zotero.startupErrorHandler;
|
var errFunc = Zotero.startupErrorHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!errMsg) {
|
||||||
|
// Get the stringbundle manually
|
||||||
|
var src = 'chrome://zotero/locale/zotero.properties';
|
||||||
|
var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1'].
|
||||||
|
getService(Components.interfaces.nsILocaleService);
|
||||||
|
var appLocale = localeService.getApplicationLocale();
|
||||||
|
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||||
|
.getService(Components.interfaces.nsIStringBundleService);
|
||||||
|
var stringBundle = stringBundleService.createBundle(src, appLocale);
|
||||||
|
|
||||||
|
var errMsg = stringBundle.GetStringFromName('startupError');
|
||||||
|
}
|
||||||
|
|
||||||
if (errFunc) {
|
if (errFunc) {
|
||||||
errFunc();
|
errFunc();
|
||||||
}
|
}
|
||||||
|
@ -242,7 +255,6 @@ var ZoteroPane = new function()
|
||||||
// TODO: Add a better error page/window here with reporting
|
// TODO: Add a better error page/window here with reporting
|
||||||
// instructions
|
// instructions
|
||||||
// window.loadURI('chrome://zotero/content/error.xul');
|
// window.loadURI('chrome://zotero/content/error.xul');
|
||||||
// TODO: localize if possible
|
|
||||||
alert(errMsg);
|
alert(errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -385,7 +385,16 @@
|
||||||
|
|
||||||
// Use defaults if necessary
|
// Use defaults if necessary
|
||||||
if (!errMsg) {
|
if (!errMsg) {
|
||||||
var errMsg = 'There was an error starting Zotero.';
|
// Get the stringbundle manually
|
||||||
|
var src = 'chrome://zotero/locale/zotero.properties';
|
||||||
|
var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1'].
|
||||||
|
getService(Components.interfaces.nsILocaleService);
|
||||||
|
var appLocale = localeService.getApplicationLocale();
|
||||||
|
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
|
||||||
|
.getService(Components.interfaces.nsIStringBundleService);
|
||||||
|
var stringBundle = stringBundleService.createBundle(src, appLocale);
|
||||||
|
|
||||||
|
var errMsg = stringBundle.GetStringFromName('startupError');
|
||||||
}
|
}
|
||||||
|
|
||||||
icon.setAttribute('tooltiptext', errMsg);
|
icon.setAttribute('tooltiptext', errMsg);
|
||||||
|
|
|
@ -511,7 +511,7 @@ Zotero.Schema = new function(){
|
||||||
Zotero.debug(e, 1);
|
Zotero.debug(e, 1);
|
||||||
Components.utils.reportError(e);
|
Components.utils.reportError(e);
|
||||||
Zotero.DB.rollbackTransaction();
|
Zotero.DB.rollbackTransaction();
|
||||||
alert('Error initializing Zotero database'); // TODO: localize
|
alert('Error initializing Zotero database');
|
||||||
throw(e);
|
throw(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
extensions.zotero@chnm.gmu.edu.description = The Next-Generation Research Tool
|
||||||
|
|
||||||
general.error = Error
|
general.error = Error
|
||||||
general.warning = Warning
|
general.warning = Warning
|
||||||
general.dontShowWarningAgain = Don't show this warning again.
|
general.dontShowWarningAgain = Don't show this warning again.
|
||||||
|
@ -44,6 +46,8 @@ dataDir.selectDir = Select a Zotero data directory
|
||||||
dataDir.selectedDirNonEmpty.title = Directory Not Empty
|
dataDir.selectedDirNonEmpty.title = Directory Not Empty
|
||||||
dataDir.selectedDirNonEmpty.text = The directory you selected is not empty and does not appear to be a Zotero data directory.\n\nCreate Zotero files in this directory anyway?
|
dataDir.selectedDirNonEmpty.text = The directory you selected is not empty and does not appear to be a Zotero data directory.\n\nCreate Zotero files in this directory anyway?
|
||||||
|
|
||||||
|
startupError = There was an error starting Zotero.
|
||||||
|
|
||||||
pane.collections.delete = Are you sure you want to delete the selected collection?
|
pane.collections.delete = Are you sure you want to delete the selected collection?
|
||||||
pane.collections.deleteSearch = Are you sure you want to delete the selected search?
|
pane.collections.deleteSearch = Are you sure you want to delete the selected search?
|
||||||
pane.collections.newCollection = New Collection
|
pane.collections.newCollection = New Collection
|
||||||
|
@ -113,6 +117,8 @@ pane.item.changeType.text = Are you sure you want to change the item type?\n\nT
|
||||||
pane.item.defaultFirstName = first
|
pane.item.defaultFirstName = first
|
||||||
pane.item.defaultLastName = last
|
pane.item.defaultLastName = last
|
||||||
pane.item.defaultFullName = full name
|
pane.item.defaultFullName = full name
|
||||||
|
pane.item.switchFieldMode.one = Switch to single field
|
||||||
|
pane.item.switchFieldMode.two = Switch to two fields
|
||||||
pane.item.notes.untitled = Untitled Note
|
pane.item.notes.untitled = Untitled Note
|
||||||
pane.item.notes.delete.confirm = Are you sure you want to delete this note?
|
pane.item.notes.delete.confirm = Are you sure you want to delete this note?
|
||||||
pane.item.notes.count.zero = %S notes:
|
pane.item.notes.count.zero = %S notes:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences!
|
// These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences!
|
||||||
|
|
||||||
pref("extensions.zotero.firstRun", true);
|
pref("extensions.zotero.firstRun", true);
|
||||||
|
pref("extensions.zotero@chnm.gmu.edu.description", "chrome://zotero/locale/zotero.properties");
|
||||||
|
|
||||||
pref("extensions.zotero.useDataDir", false);
|
pref("extensions.zotero.useDataDir", false);
|
||||||
pref("extensions.zotero.dataDir", '');
|
pref("extensions.zotero.dataDir", '');
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<em:id>zotero@chnm.gmu.edu</em:id>
|
<em:id>zotero@chnm.gmu.edu</em:id>
|
||||||
<em:name>Zotero</em:name>
|
<em:name>Zotero</em:name>
|
||||||
<em:version>1.0.0rc4.SVN</em:version>
|
<em:version>1.0.0rc4.SVN</em:version>
|
||||||
<em:description>The Next-Generation Research Tool</em:description>
|
|
||||||
<em:creator>Center for History and New Media<br/>George Mason University</em:creator>
|
<em:creator>Center for History and New Media<br/>George Mason University</em:creator>
|
||||||
<em:contributor>Dan Cohen</em:contributor>
|
<em:contributor>Dan Cohen</em:contributor>
|
||||||
<em:contributor>Sean Takats</em:contributor>
|
<em:contributor>Sean Takats</em:contributor>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user