www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 031d78eeeedac8ebdb23fd893cfb31142b3b9824
parent 4242c62b1b05e6248cfdf2b962c8d0eb46711588
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 26 Jun 2006 20:41:09 +0000

Be a bit more helpful when calling getString() on a string with no localization


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/scholar.js | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/scholar.js b/chrome/chromeFiles/content/scholar/xpcom/scholar.js @@ -156,7 +156,13 @@ var Scholar = new function(){ function getString(name){ - return _localizedStringBundle.GetStringFromName(name); + try { + var l10n = _localizedStringBundle.GetStringFromName(name); + } + catch (e){ + throw ('Localized string not available for ' + name); + } + return l10n; }