Skip to content
Snippets Groups Projects
Commit a4a3ead3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Give the scripts the gettext() treatment

For easier customization/localization
parent a25d5369
No related branches found
No related tags found
No related merge requests found
// File Scan Configuration menu // File Scan Configuration menu
require("sbbsdefs.js", "USER_EXPERT"); require("sbbsdefs.js", "USER_EXPERT");
require("gettext.js", "gettext");
"use strict"; "use strict";
...@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) { ...@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) {
if(!(user.settings & USER_EXPERT)) if(!(user.settings & USER_EXPERT))
bbs.menu(menufile); bbs.menu(menufile);
bbs.nodesync(); bbs.nodesync();
console.print("\r\n\x01y\x01hConfig: \x01n"); console.print("\r\n\x01y\x01h" + gettext("Config") + ": \x01n");
var key = console.getkeys("?QBEP\r"); var key = console.getkeys("?QBEP\r");
bbs.log_key(key); bbs.log_key(key);
...@@ -26,20 +27,14 @@ while(bbs.online && !js.terminated) { ...@@ -26,20 +27,14 @@ while(bbs.online && !js.terminated) {
break; break;
case 'B': case 'B':
user.settings ^= USER_BATCHFLAG; user.settings ^= USER_BATCHFLAG;
console.print("\r\nBatch flagging in file listings is now: \1h"); console.print("\r\n" + gettext("Batch flagging in file listings is now") + ": \1h");
if(user.settings & USER_BATCHFLAG) console.print(bbs.text((user.settings & USER_BATCHFLAG) ? bbs.text.On : bbs.text.Off));
console.print("ON");
else
console.print("OFF");
console.crlf(); console.crlf();
break; break;
case 'E': case 'E':
user.settings ^= USER_EXTDESC; user.settings ^= USER_EXTDESC;
console.print("\r\nExtended file description display is now: \1h"); console.print("\r\n" + gettext("Extended file description display is now") + ": \1h");
if(user.settings & USER_EXTDESC) console.print(bbs.text((user.settings & USER_EXTDESC) ? bbs.text.On : bbs.text.Off));
console.print("ON");
else
console.print("OFF");
console.crlf(); console.crlf();
break; break;
} }
......
// Message Scan Configuration menu // Message Scan Configuration menu
require("sbbsdefs.js", "USER_EXPERT"); require("sbbsdefs.js", "USER_EXPERT");
require("gettext.js", "gettext");
"use strict"; "use strict";
...@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) { ...@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) {
if(!(user.settings & USER_EXPERT)) if(!(user.settings & USER_EXPERT))
bbs.menu(menufile); bbs.menu(menufile);
bbs.nodesync(); bbs.nodesync();
console.print("\r\n\x01y\x01hConfig: \x01n"); console.print("\r\n\x01y\x01h" + gettext("Config") + ": \x01n");
var key = console.getkeys("?QNPISRW\r"); var key = console.getkeys("?QNPISRW\r");
bbs.log_key(key); bbs.log_key(key);
...@@ -33,11 +34,11 @@ while(bbs.online && !js.terminated) { ...@@ -33,11 +34,11 @@ while(bbs.online && !js.terminated) {
break; break;
case 'R': case 'R':
bbs.reload_msg_scan(); bbs.reload_msg_scan();
console.print("\r\nMessage scan configuration and pointers re-loaded.\r\n"); console.print("\r\n" + gettext("Message scan configuration and pointers re-loaded.") + "\r\n");
break; break;
case 'W': case 'W':
bbs.save_msg_scan(); bbs.save_msg_scan();
console.print("\r\nMessage scan configuration and pointers saved.\r\n"); console.print("\r\n" + gettext("Message scan configuration and pointers saved.") + "\r\n");
break; break;
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment