[pve-devel] [PATCH widget-toolkit] remove gettext definition in Utils.js

Dominik Csapak d.csapak at proxmox.com
Tue Mar 6 09:06:28 CET 2018


this should not be here, rather where we include the language files
(like in pve), because this is not ecma conform and behaves very
different in different browsers (e.g. safari ignores the if check
completely and simply uses that function definition)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 Utils.js | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Utils.js b/Utils.js
index a8d7b6f..1fd6334 100644
--- a/Utils.js
+++ b/Utils.js
@@ -1,10 +1,6 @@
 Ext.ns('Proxmox');
 Ext.ns('Proxmox.Setup');
 
-if (!Ext.isFunction(gettext)) {
-    function gettext(buf) { return buf; }
-}
-
 if (!Ext.isDefined(Proxmox.Setup.auth_cookie_name)) {
     throw "Proxmox library not initialized";
 }
-- 
2.11.0




More information about the pve-devel mailing list