• msgcat/gettext for 7.3 ?

    From Amanda Jones@21:1/5 to All on Tue Jun 27 05:06:26 2023
    Hi!

    I'm working with an ancient application that has an embedded tcl 7.3 (don't laugh please) interpreter. I am unable to alter this, though I have free reign over the tcl it uses. I'm trying to implement multi-language support, and using msgcat/gettext
    would be easiest, if it were supported...

    Has anybody backported msgcat to such an old version of tcl? I did look at copy-pasting some package code I found into my tcl, but it relied on far too much that was not supported (namespace, dict..) that I got nowhere.. I'm not /that/ good at tcl!

    Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Tue Jun 27 14:33:05 2023
    Am 27.06.2023 um 14:06 schrieb Amanda Jones:
    Hi!

    I'm working with an ancient application that has an embedded tcl 7.3 (don't laugh please) interpreter. I am unable to alter this, though I have free reign over the tcl it uses. I'm trying to implement multi-language support, and using msgcat/gettext
    would be easiest, if it were supported...

    Has anybody backported msgcat to such an old version of tcl? I did look at copy-pasting some package code I found into my tcl, but it relied on far too much that was not supported (namespace, dict..) that I got nowhere.. I'm not /that/ good at tcl!

    Thanks!

    Dear Amanda,

    yes, for some Mainframes, we are bound to TCL 7.4. That is a fact.

    Unfortunately, msgcat relies in its deep structure on dicts and namespaces.

    First, you should use the oldest msgcat you can get. I think, from tcl
    8.3 or so. You may remove all the namespace stuff and only use the
    global namespace.

    Then, you may use a dict emulation: https://wiki.tcl-lang.org/page/forward%2Dcompatible+dict

    I hope, this is of little help, but I don't really know,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)