TIP: Click on subject to list as thread! ANSI
echo: synchronet
to: vela025
from: Digital Man
date: 2024-10-22 12:06:00
subject: Help using gettext.js

  Re: Help using gettext.js
  By: vela025 to Digital Man on Tue Oct 22 2024 12:19 am

 > >Okay, did you try a different user and see what happens?
 > Yeah it happens to all users.
 >
 > >call bbs.load_user_text() to re-load the ctrl/text..ini file.
 > This has definaetly fixed mode 7 not using control codes after an ANSI login
 > and ANSI using text.bbc.ini after a Mode 7 login! Thanks!

You're welcome.

 > >I still can't can't think of a reason why "ansi" and "ascii" would require
 > different language files.
 > Some prompts are >40 characters which looks a bit messy when it goes on to a
 > seperate line.

Try using the Ctrl-A\ (conditional new-line) sequence to add line breaks where you'd want them for 40 column terminals. You can see a lot of these in the stock ctrl/text.dat file for this reason.

But that's 40 versus 80 colum, not ANSI for ASCII. ASCII terminals are not always 40 columns.

 > And some use [ ] which in mode 7 displays as a left and right
 > arrow.

Sure, that's an argument for a "BBC" lang file and then a non-BBC lang file. I still don't see why you'd need a separate lang file for ASCII versus ANSI.

 > Having each as their own lang is a simple way for me to detect which
 > terminal type the client is using so that custom modules can be loaded for
 > each terminal type. For example msglist.js now is a script detecting the
 > terminal type (via checking the lang setting) and then branches off in to
 > msglistbbc.js/msglist.js

Again, that'd be BBC versus non-BBC.

 > So now the only issue seems to be that all terminal types for the first
 > logon after a change of terminal type between Mode 7 and ANSI causes ANSI to
 > scroll at row 13 and *Press any key to continue*. In terms of columns it is
 > either adding or taking away 40 columns from the column width for both ANSI
 > and Mode 7. Examples of how this manifests itself here:
 > http://beebs.ddns.net/BeeBS/My_Albums/Pages/Term_Dim.html Is there something
 > similar to bbs.load_user_text() for terminal row and height?

There's console.screen_rows and screen_columns, both are writable.

There's also console.getdimensions() that will query the terminal (if it's ANSI) and auto-detect the user's screen height and width, but only if one or both are set (by the user) to 0 (auto), and only for ANSI-capable terminals.
-- 
                                            digital man (rob)

Synchronet/BBS Terminology Definition #73:
SMB = Synchronet Message Base (e.g. smblib)
Norco, CA WX: 84.2øF, 27.0% humidity, 0 mph WNW wind, 0.00 inches rain/24hrs
--- SBBSecho 3.20-Linux
                                           
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.