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
require("sbbsdefs.js", "USER_EXPERT");
require("gettext.js", "gettext");
"use strict";
......@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) {
if(!(user.settings & USER_EXPERT))
bbs.menu(menufile);
bbs.nodesync();
console.print("\r\n\x01y\x01hConfig: \x01n");
console.print("\r\n\x01y\x01h" + gettext("Config") + ": \x01n");
var key = console.getkeys("?QBEP\r");
bbs.log_key(key);
......@@ -26,20 +27,14 @@ while(bbs.online && !js.terminated) {
break;
case 'B':
user.settings ^= USER_BATCHFLAG;
console.print("\r\nBatch flagging in file listings is now: \1h");
if(user.settings & USER_BATCHFLAG)
console.print("ON");
else
console.print("OFF");
console.print("\r\n" + gettext("Batch flagging in file listings is now") + ": \1h");
console.print(bbs.text((user.settings & USER_BATCHFLAG) ? bbs.text.On : bbs.text.Off));
console.crlf();
break;
case 'E':
user.settings ^= USER_EXTDESC;
console.print("\r\nExtended file description display is now: \1h");
if(user.settings & USER_EXTDESC)
console.print("ON");
else
console.print("OFF");
console.print("\r\n" + gettext("Extended file description display is now") + ": \1h");
console.print(bbs.text((user.settings & USER_EXTDESC) ? bbs.text.On : bbs.text.Off));
console.crlf();
break;
}
......
// Message Scan Configuration menu
require("sbbsdefs.js", "USER_EXPERT");
require("gettext.js", "gettext");
"use strict";
......@@ -10,7 +11,7 @@ while(bbs.online && !js.terminated) {
if(!(user.settings & USER_EXPERT))
bbs.menu(menufile);
bbs.nodesync();
console.print("\r\n\x01y\x01hConfig: \x01n");
console.print("\r\n\x01y\x01h" + gettext("Config") + ": \x01n");
var key = console.getkeys("?QNPISRW\r");
bbs.log_key(key);
......@@ -33,11 +34,11 @@ while(bbs.online && !js.terminated) {
break;
case 'R':
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;
case 'W':
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment