home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 43145 
 Digital Man to nelgin 
 Gettext - what am I doing wrong? 
 22 Jan 26 21:49:27 
 
TZUTC: -0800
MSGID: 55733.sync@1:103/705 2dd91b9c
REPLY: 55732.sync@1:103/705 2dd91a61
PID: Synchronet 3.21b-Win32 master/d0ce4d0a1 Jan 21 2026 MSC 1944
TID: SBBSecho 3.35-Linux master/5c73d262c Jan 21 2026 GCC 12.2.0
COLS: 80
BBSID: VERT
CHRS: CP437 2
FORMAT: flowed
NOTE: FSEditor.js v1.105
  Re: Gettext - what am I doing wrong?
  By: nelgin to Digital Man on Thu Jan 22 2026 11:37 pm

 > In user_settings.js there's this string:
 >
 > console.print(gettext("Choose a default file transfer protocol (or [ENTER]
 > for None):"));
 >
 > It displays in gray so I thought since it's using gettext, I would put the
 > string in the [JS] section of text.ini
 >
 > Choose a default file transfer protocol (or [ENTER] for None): =
 > \1n\1h\1yChoose a default file transfer protocol (or [ENTER] for None):
 >
 > Should we be adding localization keys to all gettext strings to make it
 > easier to change them or am I doing something wrong? Maybe the () or [] are
 > interfering with the regex?

There's no regex involved. To put control characters (e.g. those literal \1's)
in a .ini key value, you need to use string literal syntax:
https://wiki.synchro.net/config:ini_files#string_literals

That's even how's done in the examples at:
https://wiki.synchro.net/custom:text.ini

A shorter gettext() look name/key is an option and a good idea for those long
gettext() strings. For strictly colorization, I'd hope we have a better/easier
knob to fiddle than using text.ini.
-- 
                                            digital man (rob)

Synchronet/BBS Terminology Definition #86:
Telenet = Proprietary packet switched network (variant on X.75)
Norco, CA WX: 54.0øF, 91.0% humidity, 1 mph NNW wind, 0.06 inches rain/24hrs
--- SBBSecho 3.35-Linux
 * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
SEEN-BY: 103/705 105/81 106/201 124/5016 128/187 129/14 153/757 7715
SEEN-BY: 154/10 30 110 203/0 218/700 221/0 226/30 227/114 229/110
SEEN-BY: 229/112 134 206 317 400 426 428 470 700 705 240/1120 5832
SEEN-BY: 263/1 266/512 280/464 5003 5006 291/111 292/8125 301/1 310/31
SEEN-BY: 320/219 322/757 341/66 234 342/200 396/45 423/120 460/58
SEEN-BY: 460/256 1124 633/280 712/848 770/1 902/26 5020/400 8912 5054/30
SEEN-BY: 5075/35
PATH: 103/705 280/464 460/58 229/426


<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca