Submitted by yngens on Sun, 10/28/2018 - 19:22
Tying to override the "Search Webmin" on webmin_search.cgi page by using language files, but can't find it anywhere. Could you please tell how to get this one translated?
Status:
Closed (fixed)
Comments
Submitted by andreychek on Sun, 10/28/2018 - 21:03 Comment #1
It's in the theme lang files. But, it's not that exact string in Authentic. It's just "Search". The ID is "left_search". I guess the name of the thing to search is generated in code in Authentic theme.
Looks like that's here: https://github.com/authentic-theme/authentic-theme/blob/655de0ec5e84fb9f...
The names of Webmin, Usermin, and Virtualmin are hardcoded, since they don't internationalize (because Webmin in French is still "Webmin").
What are you trying to accomplish?
Submitted by yngens on Mon, 10/29/2018 - 04:08 Comment #4
In fact, if you read https://www.virtualmin.com/node/39228 then you'll see we've been overriding lot's of strings on Webmin/Virtualmin UI since long time. We do that for several reasons of our own, some of which are:
domain
(instead of virtual server),park domain
(create alias), etc;The names of
Webmin
,Virtualmin
,Cloudmin
,Usermin
themeselves have been perfectly overridable (translatable) too, so I don't see any reason whySearch Webmin
should not be.Ilia, can you please take a look at this? Thanks!
Submitted by yngens on Mon, 10/29/2018 - 04:09 Comment #5
In other words, we are not internationalizing, but rather customizing UI terms to make it more comfortable and appealing to our end users.
Submitted by yngens on Mon, 10/29/2018 - 04:13 Comment #6
I believe the right way is to make everything overridable (translatable) like on other systems, for example on Drupal you can override everything on UI. So those hard-coded ones should be re-coded accordingly and I hope Ilia can do that.
It's part of Webmin core.
https://github.com/webmin/webmin/blob/master/lang/en#L319
..and here is the line you're talking about: https://github.com/webmin/webmin/blob/master/webmin_search.cgi#L15
Looking at the code and seeing the title produced, I see the space for improvement.
I made all labels around, including Webmin, to be a subject for change: https://github.com/authentic-theme/authentic-theme/blob/master/lang/en.U...
Submitted by yngens on Mon, 10/29/2018 - 04:35 Comment #8
After Ilia confirmed:
I am changing the project of the issue back to Webmin.
..but I didn't say the theme can not manipulate the title.
It is possible to pass the title, as you can see in the code:
$in{'title'}) || &text('wsearch_title', $ucprod)
I will do it.
Any suggestions how the title should look like?
Submitted by yngens on Mon, 10/29/2018 - 04:59 Comment #10
Oh, I was confused, so in that case let's change the issue project once again.
I think ideally that particular page's title should take in any customizations made for word
Webmin
in/etc/webmin/custom-lang
file, which has a line:main_title2=Custom Title
So your manipulation of the page's title should be composed of words
Search
and the value ofmain_title2
taken from/etc/webmin/custom-lang
file. What do you think?I don't really love the idea of folks changing the name of Webmin/Virtualmin/Cloudmin. Brand awareness is nearly the only asset we have, and the only value we get from people using the free versions of stuff. We can't stop it, of course, it's Open Source and people have done it regularly for various embedded uses of Webmin/Virtualmin over the years, but I'm not terribly happy about it, either. It says something negative one way or another...like, you don't want your customers to know it's Webmin/Virtualmin.
But, if we're gonna make it customizable, I guess it ought to be at the Webmin level, rather than theme, since the names are coming from Webmin (but, if that's the case, why is there code explicitly setting the variables being used in the theme?).
Joe, I also agree with you about re-branding topic. It shouldn't be done completely. At the same time, it wouldn't be possible to accomplish rebranding that much, so customers wouldn't know completely which panel are they using.
By the way, it might be violation of MIT license.
Bacause theme needs such labels and uses them. For example, in the navigation menu switch (Webmin, Virtualmin, and etc) - in the past there were complains and discussions about them being hardcoded. The only logical thing was to put them in the language file.
Submitted by yngens on Tue, 10/30/2018 - 04:50 Comment #14
We disclose we rely on Virtualmin everywhere (https://www.google.com/search?q=site%3Adrupion.com+virtualmin&oq=site%3A...) and even refer to Virtualmin.com documentation, so our customers are very well aware they are using Webmin/Virtualmin. The problem is not there, Joe, at all. We are changing terms on UI just because we would like to make it more appealing and easier for our customers. Anyway, it has been possible to change the UI strings before and it's just wrong letting to change it everywhere and not letting change it at one particular page. Things must be consistent - either do not let override strings anywhere or let override everywhere.
It's done with this fix.
Enjoy.
By the way, screenshots in your docs.drupion.com are made with old theme.
Submitted by yngens on Tue, 10/30/2018 - 09:35 Comment #18
Ilia, I tried to test this by pulling git version of the theme, but it still gives 19.20-beta6, so no change yet for the subject matter.
Regarding our documentation I know it is quite outdated, but we are re-branding our company soon, so everything will be different.
Try pulling it again.
It'll work.
Submitted by yngens on Tue, 10/30/2018 - 16:26 Comment #20
Should the version change, because pulling it again shows
Updating to Authentic Theme 19.20-beta6, done.
and then I made sure the translation files have "Search Webmin" replacement, but it still shows the same string.Yes, the major version is beta6, while minor version is 12. Check
theme.info
file for more details.I will probably add minor version to console output as well tomorrow.
I pull an update to my dev server, each time I push a change to the repo, to make a quadruple-test.
It just should work. Labels are in the files.
Submitted by yngens on Wed, 10/31/2018 - 04:27 Comment #22
Tested right now again and it works like a charm. Thanks a lot, Ilia!