Todo #13590
closed
Fix inconsistent capitalization of ``sudo`` in package (menu entry, config page, etc.)
Added by Marcus GM almost 3 years ago.
Updated almost 3 years ago.
Description
Guys,
I have installed the 'sudo' package.
It appears in small case ( 'sudo' ) under the Main Menu -> System.
I would like to edit that to 'Sudo'. Any idea where this main menu item can be edited ?
I have posted this issue in /r/PFSENSE/ and was advised to post it here.
I have tried
grep -ri 'sudo' *
in
'/usr/local/pkg/sudo.xml'
'/usr/local/pkg/sudo.inc'
'/usr/local/share/pfSense-pkg-sudo/info.xml'
'/usr/local/www/guiconfig.inc'
but these dont seem to affect the menu item name.
Thanks.
p/s - This is more of a UI Issue rather than a Bug.
p/s - Screenshot attached.
Files
grep -ri 'sudo' file_name
- Tracker changed from Bug to Todo
- Project changed from pfSense to pfSense Packages
- Subject changed from UI Issue - Main Menu -> System to Fix inconsistent capitalization of ``sudo`` in package (menu entry, config page, etc.)
- Category changed from Sudo to sudo
- Priority changed from Normal to Very Low
- Release Notes deleted (
Default)
- Affected Version deleted (
2.5.2)
- Affected Architecture deleted (
All)
The program is actually named "sudo" (lowercase), but there are a couple references to it that show it capitalized, so it should be consistent one way or the other in the GUI at least.
Hi Jim,
Thanks for the update.
Pls note that I am not referring to the 'sudo' command but to to the 'sudo' entry in the Main Menu -> System.
When this menu item is clicked, it opens up a GUI that allows us to configure options for 'sudo' - adding users / groups / commands etc.
The actual command 'sudo' is executed later in the console/ terminal.
What i have found so far is that editing '/cf/conf/config.xml' and renaming 'sudo' to 'Sudo'
fixes the entry under Main Menu -> System.
<installedpackages>
.
.
.
<menu>
<name>sudo</name>
<section>System</section>
<url>/pkg_edit.php?xml=sudo.xml</url>
</menu>
.
.
.
</installedpackages>
I'm aware of that distinction. What I'm saying is that it should be "sudo" everywhere to match the name of the software, and "Sudo" nowhere. (Or, perhaps, "Sudo" everywhere in the GUI). So it should be consistent one way or the other.
If the upstream project prefers "sudo" we should use that form in the menu and page titles, it doesn't matter if it doesn't match our style, it's their name/trademark, we should respect what they say. I haven't looked at their documentation to see if they have a preference.
Just wondering if '/cf/conf/config.xml' is the correct place to rename menu entries ?
That's where menu entries end up post-install. That isn't where the menu entry comes from in the package definition (read: where this would be changed for new installs)
At https://www.sudo.ws/ they use both, so both versions seem to be acceptable. We can use whatever fits better here, that's in my opinion Sudo.
- Status changed from New to Closed
When checking on this I found a problem with changing the menu entry. When a package manages its menu entry, it must match exactly. So if we change the menu entry in the package and someone restores an older configuration that still contains the old name, then the user would end up with two menu entries ("Sudo" and "sudo") and there is no easy way for the user to correct that other than hand editing the configuration.
I'm not sure it's worth the hassle and potential user confusion to change this, and since the upstream project seems to use both forms interchangeably, it's best to leave it as-is.
Also available in: Atom
PDF