| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 var replacement = args[index - 1]; | 75 var replacement = args[index - 1]; |
| 76 if (typeof replacement === "undefined") | 76 if (typeof replacement === "undefined") |
| 77 continue; | 77 continue; |
| 78 | 78 |
| 79 text = text.split("$" + key + "$").join(replacement); | 79 text = text.split("$" + key + "$").join(replacement); |
| 80 } | 80 } |
| 81 return text; | 81 return text; |
| 82 } | 82 } |
| 83 | 83 |
| 84 return { | 84 return { |
| 85 noSpecialMessages: true, | |
| 86 | |
| 87 getMessage: function(key, args) | 85 getMessage: function(key, args) |
| 88 { | 86 { |
| 89 try{ | 87 try{ |
| 90 var message = getI18nMessage(key); | 88 var message = getI18nMessage(key); |
| 91 return getText(message, args); | 89 return getText(message, args); |
| 92 } | 90 } |
| 93 catch(e) | 91 catch(e) |
| 94 { | 92 { |
| 95 Cu.reportError(e); | 93 // Don't report errors for special strings, these are expected to be |
| 96 return "Missing translation: " + key; | 94 // missing. |
| 95 if (key[0] != "@") |
| 96 Cu.reportError(e); |
| 97 return ""; |
| 97 } | 98 } |
| 98 } | 99 } |
| 99 }; | 100 }; |
| 100 })(); | 101 })(); |
| 101 })(this); | 102 })(this); |
| LEFT | RIGHT |