mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added "loc" command for JS localisation
This commit is contained in:
parent
9297ebb858
commit
6a67f991e2
14
src/elogd.c
14
src/elogd.c
@ -26458,6 +26458,20 @@ void interprete(char *lbook, char *path)
|
|||||||
if (isparam("jcmd") && *getparam("jcmd"))
|
if (isparam("jcmd") && *getparam("jcmd"))
|
||||||
strlcpy(command, getparam("jcmd"), sizeof(command));
|
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 given, use it as logbook (for elog!) */
|
||||||
if (experiment && experiment[0]) {
|
if (experiment && experiment[0]) {
|
||||||
strcpy(logbook_enc, experiment);
|
strcpy(logbook_enc, experiment);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user