TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
489 stars 126 forks source link

feature request: allow module messages to be less alarming #689

Closed simonLeary42 closed 3 months ago

simonLeary42 commented 7 months ago

the documentation says that you can use LMOD_ADMIN_FILE to make modules print deprecation warnings. I like to use this file to make modules print other messages as well. It's a small thing, but I would like to make the output not red. Red makes the users think that there is an error.

I tried changing m_Module_Msgs to remove the red border , but there's still one printed after the module message: https://github.com/TACC/Lmod/blob/eb3e9119ef1ec3a17f2feb693c9dba16e1c93503/src/MainControl.lua#L1442

If we had a m_Module_Msgs_close option in the message file, that would work for me.

I tried to use the colorize function myself in the message file, but was unsuccessful. If that were possible, then I would be able to decide the color of the border on a per-message basis, which would be nice.

message-file.lua

require("colorize")
return {
    en = {
        m_Module_Msgs = [==[
%{colorize("blue", "---------------")}
There are messages associated with the following module(s):
%{colorize("blue", "---------------")}]==],
    }
}
rtmclay commented 6 months ago

This feature request has been updated on the testing branch. Your site can now override m_Module_Msgs_close to get a border other that red.

Please try the testing branch to see if it works for you.

rtmclay commented 6 months ago

This feature has been merged into the main branch and has been released as Lmod 8.7.36.

rtmclay commented 5 months ago

OK to close issue?