1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 05:55:46 +01:00

Fixes issue #640. Hopefully. Given that I've never seen it on any of the dozens of setups I've tested on.

This commit is contained in:
Kris Maglione
2011-09-20 18:53:51 -04:00
parent e0e947ec79
commit d568ce8762
3 changed files with 70 additions and 44 deletions

View File

@@ -60,7 +60,10 @@ var Messages = Module("messages", {
get: function get(value, default_) {
for (let bundle in values(this.bundles))
try {
return bundle.GetStringFromName(value);
let res = bundle.GetStringFromName(value);
if (res.slice(0, 2) == "+ ")
return res.slice(2).replace(/\s+/g, " ");
return res;
}
catch (e) {}
@@ -73,7 +76,10 @@ var Messages = Module("messages", {
format: function format(value, args, default_) {
for (let bundle in values(this.bundles))
try {
return bundle.formatStringFromName(value, args, args.length);
let res = bundle.formatStringFromName(value, args, args.length);
if (res.slice(0, 2) == "+ ")
return res.slice(2).replace(/\s+/g, " ");
return res;
}
catch (e) {}