• exec/load/gettext.jsexec/default.js exec/load/shell_lib.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Nov 18 17:13:09 2023
    Added Files:
    Modified Files:
    exec/default.js exec/load/shell_lib.js
    Log Message:
    Start of localization support for JS modules/shells/etc.

    Similar to GNU gettext(), by loading gettext.js and enclosing all user-visible strings in gettext(), a script can get easy/easier support for non-default (i.e. US-English) locales by loading translated strings from the [JS] section of ctrl/text.<locale>.ini (if it exists), or customized strings from the [JS] section of ctrl/text.ini (if it exists).

    Results are cached for fast subsequent uses of the same string.

    What's *not* supported is different translations (e.g. colorization or whatever) for the same string used in a different scripts. That could be
    added (e.g. use a different section name for script-specific translations), pretty easily, if desired.

    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net