docs icon indicating copy to clipboard operation
docs copied to clipboard

Left menu on Docs page does not display text as specified

Open Bi0T1N opened this issue 2 years ago • 2 comments

Description

  • Expected behavior: Menu entry should be ROS/Gazebo Installation
  • Actual behavior: Menu entry is Ros/gazebo Installation

Steps to reproduce

  1. Go to https://gazebosim.org/docs
  2. Notice that the left menu shows "Ros/gazebo Installation"
  3. Compare with what is written in index.yaml

Bi0T1N avatar Apr 27 '23 13:04 Bi0T1N

It's not just the single page listed above, it's wrong for all entries with more than one word. To give some more examples:

  • Ros 2 Integration instead of ROS 2 Integration
  • Spawn Urdf instead of Spawn URDF
  • Understanding The Gui instead of Understanding the GUI

It uses its own mechanism for capitalization of the output instead of respecting what is defined in the index.yaml file.

Bi0T1N avatar Apr 27 '23 14:04 Bi0T1N

I'm not an expert in Golang but the casing might come from the strings.Title() function. It's not used directly in gazebosim-web-backend or gz-go but within the go-gorm dependency. At least the following examples show the same phenomenon that can be observed at the moment:

package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println(strings.Title(strings.ToLower("Migration from Ignition"))) // Migration From Ignition
	fmt.Println(strings.Title(strings.ToLower("Spawn URDF"))) // Spawn Urdf
	fmt.Println(strings.Title(strings.ToLower("Understanding the GUI"))) // Understanding The Gui
}

Bi0T1N avatar May 06 '23 20:05 Bi0T1N

Fixed by #441

azeey avatar Jul 18 '24 18:07 azeey