From 6a67f991e29b8badcc812ff620342318b74e3329 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 23 Sep 2014 17:21:20 +0200 Subject: [PATCH] Added "loc" command for JS localisation --- src/elogd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index c3ccebb0..4780191c 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -26458,6 +26458,20 @@ void interprete(char *lbook, char *path) if (isparam("jcmd") && *getparam("jcmd")) strlcpy(command, getparam("jcmd"), sizeof(command)); + /* check for localization command */ + if (stricmp(command, "loc") == 0) { + show_http_header(NULL, FALSE, NULL); + if (isparam("value") && *getparam("value")) + rsputs(loc(getparam("value"))); + + /* dummy strings for JS-only translations */ + char *s = loc("Drop attachments here..."); + s = loc("Insert Timestamp"); + if (s) + s = NULL; // avoid compiler warning + return; + } + /* if experiment given, use it as logbook (for elog!) */ if (experiment && experiment[0]) { strcpy(logbook_enc, experiment);