[pmg-devel] [PATCH pmg-gui] add default gettext definition in case of no langfile

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


this is needed, because the gettext funciton is defined in the langfile

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 pmg-index.html.tt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pmg-index.html.tt b/pmg-index.html.tt
index 1e2354a..1f3bc65 100644
--- a/pmg-index.html.tt
+++ b/pmg-index.html.tt
@@ -14,6 +14,8 @@
     <link rel="stylesheet" type="text/css" href="/pve2/css/ext6-pmg.css" />
     [% IF langfile %]
     <script type='text/javascript' src='/pve2/locale/pmg-lang-[% lang %].js'></script>
+    [% ELSE %]
+    <script type='text/javascript'> function gettext(buf) { return buf; } </script>
     [%- END %]
     [% IF debug %]
     <script type="text/javascript" src="/pve2/ext6/ext-all-debug.js"></script>
-- 
2.11.0




More information about the pmg-devel mailing list