After I was suggested to use UI translations on https://www.virtualmin.com/node/43072 and successfully doing so for all the occurrences of bandwidth, I am having troubles to get the module name "Bandwidth monitoring" replaced with a custom (translated) version automatically.
Putting bandwidth=Traffic Monitoring to /etc/webmin/webmin.descs solve the problem partially, because after that you have to go to Webmin > Webmin > Webmin Configuration > Module Titles and save it manually for the webmin.descs to take effect. And dealing with loads of Virtualmin servers we would like to automatize this process.
Could you please consult on how to load custom module titles (webmin.descs) and category names (webmin.catnames) automatically every time Webmin starts?
Comments
Submitted by yngens on Thu, 10/20/2016 - 22:35 Comment #1
By the way, the Bandwidth Monitoring under System Settings does not change even after manually saving the Module Titles page in Webmin Configurations. I of course restarted Webmin and refreshed the browser window.
Submitted by JamieCameron on Fri, 10/21/2016 - 00:05 Comment #2
That's because that isn't a module title. Instead, to get what you want you need to create the file
/etc/webmin/virtual-server/custom-lang
containingnewbw_title=Traffic Monitoring
The full list of strings that can be overridden in this way can be seen in
/usr/libexec/webmin/virtual-server/lang/en
Submitted by yngens on Fri, 10/21/2016 - 00:51 Comment #3
James, thanks, you replied to my comment, but not the post itself. So how can I load custom module and category titles automatically without going to Webmin Configuration page to save them manually?
Submitted by JamieCameron on Fri, 10/21/2016 - 10:27 Comment #4
I guess what you're asking is, if you edit
webmin.descs
manually, how can you make that take effect in Webmin?If so, the answer is to just delete the file
/etc/webmin/module.infos.cache
Submitted by yngens on Fri, 10/21/2016 - 11:03 Comment #5
ls: cannot access /etc/webmin/module.infos.cache: No such file or directory
Submitted by JamieCameron on Fri, 10/21/2016 - 17:53 Comment #6
Sorry, it's
/var/webmin/module.infos.cache
Submitted by yngens on Fri, 10/21/2016 - 22:58 Comment #7
Well, for some reason removing
/var/webmin/module.infos.cache
works if you override, let's say, Webmin Configuration. However, removing that file has no effect over "Bandwidth Monitoring" - the UI still is showing the old value. And I am talking about the Module Title, not the string on UI pages - that one is translated ok.Submitted by JamieCameron on Sat, 10/22/2016 - 10:53 Comment #8
By the "module title", do you mean the link to the module on left menu, or the title that appears on the right when you click on the module?
Submitted by yngens on Sat, 10/22/2016 - 13:12 Comment #9
Link on the left menu. It has eventually changed, don't know when, but I know for sure that deleting the infos.cache file had no immediate effect on that link.
Submitted by JamieCameron on Sat, 10/22/2016 - 18:40 Comment #10
Oh, you may also need to delete
/etc/webmin/virtual-server/links-cache/*