On 6/1/26 06:37, Leo wrote:
Hi Jon,

Hi!
I've updated the patch to address previous feedback. It has been verified to work correctly on Debian, FreeBSD, and NetBSD.

Regarding the Solaris `LANG` variable: I cross-referenced with Solaris locale documentation and confirmed that using short names like "zh" is consistent with legacy behavior and existing templates (e.g., Japanese.am).

The updated patch is attached for your convenience.

For easier access, I've also hosted it on GitHub:
https://github.com/lqy306/cde-zh/blob/main/cde-add-chinese.patch

(I hope this repository can serve as a reference for future CDE localization efforts!)

Thanks!  I had to manually apply this as it's not in the proper git "format-patch" format.  I also briefly tested it on an ubuntu box, and it works fine.

In the future, please use "git format-patch ..." to generate patches - it ensures you get the credit, will contain the full commit message you provide, etc and is easier/quicker for me to process.

Thanks for the contribution!  I've merged this to master.

-jon



Best regards,
Leo

Jon Trulson <[email protected]> 于2026年6月1日周一 05:06写道:

    Oh, and can you supply this as a git format-patch format patch
    file?  This way you get credit, you can add a proper commit
    message and it just makes things easier.

    Thanks!

    -jon

    On 5/20/26 22:51, Leo wrote:
    Hello! Indeed, I shouldn't have placed two unrelated patches in a
    single file. In fact, this fix was made to suppress FreeBSD
    compilation errors, solely due to version issues. I've already
    removed it.
    Additionally, I tested it on your NetBSD platform running CDE
    (I've tested many systems, and now my VMware is almost full
    (tears of laughter)), and everything works fine.
    If needed, I might also test it on Solaris, but please excuse
    me—I can't complete all the work in a single day.
    BTW, if SOLARIS's conditional statements primarily follow
    templates from other languages like Japanese:
    cde/programs/localized/templates$ cat Japanese.am
    #  This file is a template for setting the platform-specific LANG
    #  variable for a locale.

    if SOLARIS
    LANG=ja
    else
    LANG=ja_JP.UTF-8
    endif

    Meanwhile, I might also revise the comments tomorrow to ensure
    consistency with other languages

    Thank you!
    Leo Lee

    Brian Cole <[email protected]> 于2026年5月20日周三 00:34写道:

        Couple thoughts:

        1: I'm not qualified to comment on whether replacing
        tzsetwall with tzset is a good idea, but that doesn't seem
        related to adding Chinese language support; shouldn't that be
        a second patch?

        2: There's a `if SOLARIS` conditional - if you only tested on
        Debian, do we have any reason to think that works? (Shouldn't
        be too hard to test on illumos, at least?)

        Thanks,
        Brian

        On Tue, May 19, 2026, at 9:39 AM, Leo wrote:
        I have added full Chinese language support, with the
        detailed changes as follows:

        I added build flags for Simplified Chinese and Traditional
        Chinese in the |configure.ac <http://configure.ac/>| script,
        namely |--enable-chinese| and |--enable-chinese-tw|. Both
        options are disabled by default, consistent with other
        language configurations. Corresponding conditional
        compilation logic has been implemented, and relevant
        localisation directory build entries have been supplemented
        in the file build list.

        I revised the time handling source file |timeops.c|,
        replacing the SVR4-specific |tzsetwall| function with the
        cross-platform standard |tzset| function, which fixes
        compilation and runtime compatibility issues on modern Linux
        and BSD systems.

        I adjusted the main build configuration |Makefile.am| under
        the |localized| directory, adding conditional compilation
        branches for Chinese languages. The corresponding Chinese
        localisation subdirectories will be compiled automatically
        once the relevant build options are enabled.

        I created new build template files |Chinese.am| and
        |Chinese_TW.am| in the templates folder, with separate
        environment variable rules tailored for Solaris and general
        Unix-like operating systems.

        I built the complete directory structure for
        |zh_CN.UTF-8| Simplified Chinese localisation, including all
        subdirectories and corresponding build configurations, and
        initialised basic message catalogue files.

        I optimised the existing |zh_TW.UTF-8| Traditional Chinese
        localisation configurations: removed obsolete comments and
        outdated font settings, eliminated redundant whitespace in
        message texts, and fixed formatting errors at the end of
        version comment lines.

        Standardised |Makefile.am| build scripts have been written
        for all newly added Chinese localisation directories, which
        inherit universal template rules and automatically clean up
        temporary build files.

        All modified CDE source code compiles successfully on Debian 13.

        Required dependencies:

        sudo apt-get -y install autoconf automake libtool git
        build-essential g++ libxt-dev libxmu-dev libxft-dev
        libxinerama-dev libxpm-dev libpam0g-dev libmotif-dev
        libssl-dev libxaw7-dev libx11-dev libxss-dev libtirpc-dev
        libjpeg-dev libfreetype-dev libutempter-dev libxrender-dev
        tcl-dev ksh m4 ncompress xfonts-100dpi xfonts-75dpi
        xfonts-100dpi-transcoded xfonts-75dpi-transcoded rpcbind
        bison patch xbitmaps x11proto-fonts-dev flex opensp
        x11-xserver-utils liblmdb-dev



        Please merge these commits at your earliest convenience.
        This improvement is greatly meaningful for Chinese users who
        are fond of retro computing environments. Thank you very much!
        Leo Lee

        _______________________________________________
        cdesktopenv-devel mailing list
        [email protected]
        https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


        *Attachments:*

          * cde-add-chinese.patch


        _______________________________________________
        cdesktopenv-devel mailing list
        [email protected]
        https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel



    _______________________________________________
    cdesktopenv-devel mailing list
    [email protected]
    https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

-- Jon Trulson

       "The less you know, the more you believe."
                                -- Bono

    _______________________________________________
    cdesktopenv-devel mailing list
    [email protected]
    https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

--
Jon Trulson

  "The less you know, the more you believe."
                           -- Bono
_______________________________________________
cdesktopenv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to