From ecfd1e1d0cf9d4f19d8f4f91c9b2eae93b8d0386 Mon Sep 17 00:00:00 2001
From: Nigel Reed <nigel@nigelreed.net>
Date: Tue, 11 Feb 2025 17:28:16 -0600
Subject: [PATCH] More changes for MODE7 Updates for Mode 7 graphics

---
 exec/bullseye.js  |  3 ++-
 exec/login.js     |  5 +++--
 exec/logon.js     |  4 ----
 exec/logonlist.js |  7 -------
 exec/noyesbar.js  | 15 +++++++++++----
 exec/yesnobar.js  | 17 ++++++++++++-----
 6 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/exec/bullseye.js b/exec/bullseye.js
index a5f3e65dd7..c3de0da67e 100644
--- a/exec/bullseye.js
+++ b/exec/bullseye.js
@@ -7,6 +7,7 @@
 // @format.tab-size 4, @format.use-tabs true
 
 require("sbbsdefs.js", "P_NOERROR");
+require("gettext.js", 'gettext');
 
 "use strict";
 
@@ -48,7 +49,7 @@ if(bull.length < 1) {
 
 while(bbs.online && !js.terminated) {
 	if(bbs.menu("../bullseye", P_NOERROR)) {
-		console.mnemonics("\r\nEnter number of bulletin or [~Quit]: ");
+		console.mnemonics(gettext("\r\nEnter number of bulletin or [~Quit]: "));
 		b = console.getnum(bull.length);
 	} else {
 		for(i = 0; i < bull.length; ++i)
diff --git a/exec/login.js b/exec/login.js
index 347eb97e9e..e97e2ce6ea 100644
--- a/exec/login.js
+++ b/exec/login.js
@@ -67,11 +67,12 @@ for(var c=0; c < options.login_prompts; c++) {
 	if(!str.length) // blank
 		continue;
 
+
 	// New user application?
 	if(str.toUpperCase()=="NEW") {
 	   if(bbs.newuser()) {
-		   bbs.logon();
-		   exit();
+		bbs.logon();
+		exit();
 	   }
 	   continue;
 	}
diff --git a/exec/logon.js b/exec/logon.js
index 5be63f0299..0b7feadc38 100644
--- a/exec/logon.js
+++ b/exec/logon.js
@@ -12,10 +12,6 @@
 require("sbbsdefs.js", 'SS_RLOGIN');
 require("nodedefs.js", 'NODE_QUIET');
 
-if(console.term_supports(USER_MODE7)) {
-	log(LOG_DEBUG, "Setting users language to m7");
-	user.lang = "m7";
-}
 
 if(!bbs.mods.avatar_lib)
 	bbs.mods.avatar_lib = load({}, 'avatar_lib.js');
diff --git a/exec/logonlist.js b/exec/logonlist.js
index 63b174aa0b..da7f527347 100644
--- a/exec/logonlist.js
+++ b/exec/logonlist.js
@@ -45,13 +45,6 @@ if(!js.global.bbs) {
 if(!bbs.mods.logonlist_lib)
 	bbs.mods.logonlist_lib = load({}, 'logonlist_lib.js');
 var options = load("modopts.js", "logonlist");
-function dump_objs(obj) {
-        Object.keys(obj).forEach(function (e) {
-                writeln(e + ': ' + JSON.stringify(obj[e]));
-        });
-}
-dump_objs(options);
-writeln("lang: " + user.lang);
 if(!options)
 	options = {};
 if(options.last_few_callers === undefined)
diff --git a/exec/noyesbar.js b/exec/noyesbar.js
index 7855eb7c43..bd97f40539 100644
--- a/exec/noyesbar.js
+++ b/exec/noyesbar.js
@@ -8,6 +8,10 @@ const yes_key = yes_str[0];
 const no_str = bbs.text(bbs.text.No);
 const no_key = no_str[0];
 
+var options = load("modopts.js", "noyesbar");
+if(!options)
+	options = {};
+
 while(console.question.substring(0, 2) == "\r\n") {
 	console.crlf();
 	console.question = console.question.substring(2);
@@ -18,18 +22,21 @@ if(console.question.substring(0, 2) == "\x01\?") {
 	console.question = console.question.substring(2);
 }
 
-console.putmsg("\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
+console.putmsg(options.noyes_question || "\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
 var affirm = false;
 while(bbs.online && !js.terminated) {
 	var str;
 	if(affirm)
-		str = format("\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
+		str = format(options.highlight_yes_fmt || "\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
 	else
-		str = format("\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
+		str = format(options.highlight_no_fmt || "\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
 	console.print(str);
 	var key = console.getkey(0).toUpperCase();
 	console.backspace(console.strlen(str));
-	console.print("\x01n\x01h\x01>");
+	if(console.term_supports(USER_MODE7))
+		console.print(" ");
+	else
+		console.print("\x01n\x01h\x01>");
 	if(console.aborted)
 		break;
 	if(key == '\r')
diff --git a/exec/yesnobar.js b/exec/yesnobar.js
index 6b64c4a4ec..1b7f454ced 100644
--- a/exec/yesnobar.js
+++ b/exec/yesnobar.js
@@ -1,5 +1,4 @@
 // JS version of yesnobar.src
-
 require("sbbsdefs.js", "P_NOABORT");
 
 "use strict";
@@ -9,6 +8,10 @@ const yes_key = yes_str[0];
 const no_str = bbs.text(bbs.text.No);
 const no_key = no_str[0];
 
+var options = load("modopts.js", "yesnobar");
+if(!options)
+	options = {};
+
 while(console.question.substring(0, 2) == "\r\n") {
 	console.crlf();
 	console.question = console.question.substring(2);
@@ -19,18 +22,22 @@ if(console.question.substring(0, 2) == "\x01\?") {
 	console.question = console.question.substring(2);
 }
 
-console.putmsg("\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
+console.putmsg(options.yesno_question || "\x01n\x01b\x01h[\x01c@CHECKMARK@\x01b] \x01y@QUESTION->@? @CLEAR_HOT@", P_NOABORT);
 var affirm = true;
 while(bbs.online && !js.terminated) {
 	var str;
 	if(affirm)
-		str = format("\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", yes_str, no_str);
+		str = format(options.highlight_yes_fmt || "\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", no_str, yes_str);
 	else
-		str = format("\x01n\x01b\x01h \x01~%s \x014\x01w\x01e[\x01~%s]", yes_str, no_str);
+		str = format(options.highlight_no_fmt || "\x01h\x014\x01w\x01e[\x01~%s]\x01n\x01b\x01h \x01~%s ", no_str, yes_str);
 	console.print(str);
 	var key = console.getkey(0).toUpperCase();
 	console.backspace(console.strlen(str));
-	console.print("\x01n\x01h\x01>");
+	if(console.term_supports(USER_MODE7))
+		console.print(" ");
+	else
+		console.print("\x01n\x01h\x01>");
+	
 	if(console.aborted)
 		break;
 	if(key == '\r')
-- 
GitLab