mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
25 lines
637 B
JavaScript
25 lines
637 B
JavaScript
var strBundleService = null;
|
|
|
|
function srGetStrBundle(path)
|
|
{
|
|
var strBundle = null;
|
|
|
|
if (!strBundleService) {
|
|
try {
|
|
strBundleService =
|
|
Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
|
|
strBundleService =
|
|
strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
|
|
} catch (ex) {
|
|
dump("\n--** strBundleService failed: " + ex + "\n");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
strBundle = strBundleService.createBundle(path);
|
|
if (!strBundle) {
|
|
dump("\n--** strBundle createInstance failed **--\n");
|
|
}
|
|
return strBundle;
|
|
}
|