8125e1ea14a9c8b3ab7e6ad879c82c757a539243
gperez2
  Fri Jun 14 17:40:32 2024 -0700
Switching hgTracks buttons and labels to sentence case, refs #25787

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index fdf1595..d78d446 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -8371,33 +8371,33 @@
 boolean isSessChanged = FALSE;
 if (differentString(curSessVisTracks, thisSessVisTracks))
     {
     isSessChanged = TRUE;
     }
 return isSessChanged;
 }
 
 static void printMultiRegionButton()
 /* Print button that launches multi-region configuration pop-up */
 {
 boolean isPressed = FALSE;
 if (differentString(virtModeType, "default"))
     isPressed = TRUE;
 char buf[256];
-safef(buf, sizeof buf, "configure %s multi-region display mode", 
+safef(buf, sizeof buf, "Configure %s multi-region display mode", 
                         isPressed ? "or exit" : "");
-hButtonNoSubmitMaybePressed("hgTracksConfigMultiRegionPage", "multi-region", buf,
+hButtonNoSubmitMaybePressed("hgTracksConfigMultiRegionPage", "Multi-region", buf,
             "popUpHgt.hgTracks('multi-region config'); return false;", isPressed);
 }
 
 static void printTrackDelIcon(struct track *track)
 /* little track icon after track name. Github uses SVG elements for all icons, apparently that is faster */
 /* we probably should have a library with all the icons, at least for the <svg> part */
 {
     hPrintf("<div title='Delete this custom track' data-track='%s' class='trackDeleteIcon'><svg xmlns='http://www.w3.org/2000/svg' height='0.8em' viewBox='0 0 448 512'><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d='M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z'/></svg></div>", track->track);
 
 }
 
 static void printTrackLink(struct track *track)
 /* print a link hgTrackUi with shortLabel and various icons and mouseOvers */
 {
 if (sameOk(track->groupName, "user"))
@@ -8471,58 +8471,58 @@
     puts(html);
 }
 
 void printShortcutButtons(struct cart *cart, bool hasCustomTracks, bool revCmplDisp, bool multiRegionButtonTop)
 /* Display bottom control panel. */
 {
 if (isSearchTracksSupported(database,cart))
     {
     cgiMakeButtonWithMsg(TRACK_SEARCH, TRACK_SEARCH_BUTTON,TRACK_SEARCH_HINT);
     }
 
 
 hPrintf("&nbsp;");
 // Not a submit button, because this is not a CGI function, it only calls Javascript function
 hPrintf("<button id='highlightThis' title='Add a highlight that covers the entire region shown<br><i>Keyboard shortcut:</i> h, "
-        "then m'>highlight</button>");
+        "then m'>Highlight</button>");
 jsInlineF("$('#highlightThis').click( function(ev) { highlightCurrentPosition('add'); return false; } );");
 
 hPrintf("&nbsp;");
-hButtonWithMsg("hgt.hideAll", "hide all","Hide all currently visible tracks - keyboard shortcut: h, then a");
+hButtonWithMsg("hgt.hideAll", "Hide all","Hide all currently visible tracks - keyboard shortcut: h, then a");
 
 hPrintf(" ");
 hPrintf("<INPUT TYPE='button' id='ct_add' VALUE='%s' title='%s'>",
         hasCustomTracks ? CT_MANAGE_BUTTON_LABEL : CT_ADD_BUTTON_LABEL,
         hasCustomTracks ? "Manage your custom tracks - keyboard shortcut: c, then t" : "Add your own custom tracks - keyboard shortcut: c, then t");
 jsOnEventById("click", "ct_add", "document.customTrackForm.submit(); return false;");
 
 hPrintf(" ");
-hButtonWithMsg("hgTracksConfigPage", "configure","Configure image and track selection - keyboard shortcut: c, then f");
+hButtonWithMsg("hgTracksConfigPage", "Configure","Configure image and track selection - keyboard shortcut: c, then f");
 hPrintf(" ");
 
 if (!multiRegionButtonTop)
     {
     printMultiRegionButton();
     hPrintf(" ");
     }
-hButtonMaybePressed("hgt.toggleRevCmplDisp", "reverse",
+hButtonMaybePressed("hgt.toggleRevCmplDisp", "Reverse",
                        revCmplDisp ? "Show forward strand at this location - keyboard shortcut: r, then v"
                                    : "Show reverse strand at this location - keyboard shortcut: r, then v",
                        NULL, revCmplDisp);
 hPrintf(" ");
 
-hButtonWithOnClick("hgt.setWidth", "resize", "Resize image width to browser window size - keyboard shortcut: r, then s", "hgTracksSetWidth()");
+hButtonWithOnClick("hgt.setWidth", "Resize", "Resize image width to browser window size - keyboard shortcut: r, then s", "hgTracksSetWidth()");
 
 // put the track download interface behind hg.conf control
 if (cfgOptionBooleanDefault("showDownloadUi", FALSE))
     jsInline("var showDownloadButton = true;\n");
 }
 
 
 void doTrackForm(char *psOutput, struct tempName *ideoTn)
 /* Make the tracks display form with the zoom/scroll buttons and the active
  * image.  If the ideoTn parameter is not NULL, it is filled in if the
  * ideogram is created.  */
 {
 int disconCount = 0;
 struct group *group;
 struct track *track;
@@ -9113,50 +9113,50 @@
                         "style='margin-right: 3px;'>%s</span>",
                         isSessChanged ? "gbSessionChanged" : "", sessionLabel);
         hPrintf("<i id='removeSessionPanel' title='Close' class='fa fa-remove' "
                         "style='color: #a9a9a9; font-size:smaller; vertical-align: super;'></i>");
         hPrintf("</span>");
 
         jsOnEventById("click", "recTrackSetLabel", "showRecTrackSetsPopup(); return false;");
         jsOnEventById("click", "removeSessionPanel", "removeSessionPanel(); return false;");
         }
     hPrintf("<BR>\n");
 
     /* This is a clear submit button that browsers will use by default when enter is pressed in position box. */
     hPrintf("<INPUT TYPE=IMAGE BORDER=0 NAME=\"hgt.dummyEnterButton\" src=\"../images/DOT.gif\">");
     /* Put up scroll and zoom controls. */
 #ifndef USE_NAVIGATION_LINKS
-    hWrites("move ");
-    hButtonWithOnClick("hgt.left3", "<<<", "move 95% to the left",
+    hWrites("Move ");
+    hButtonWithOnClick("hgt.left3", "<<<", "Move 95% to the left",
                        "return imageV2.navigateButtonClick(this);");
-    hButtonWithOnClick("hgt.left2", " <<", "move 47.5% to the left",
+    hButtonWithOnClick("hgt.left2", " <<", "Move 47.5% to the left",
                        "return imageV2.navigateButtonClick(this);");
-    hButtonWithOnClick("hgt.left1", " < ", "move 10% to the left",
+    hButtonWithOnClick("hgt.left1", " < ", "Move 10% to the left",
                        "return imageV2.navigateButtonClick(this);");
-    hButtonWithOnClick("hgt.right1", " > ", "move 10% to the right",
+    hButtonWithOnClick("hgt.right1", " > ", "Move 10% to the right",
                        "return imageV2.navigateButtonClick(this);");
-    hButtonWithOnClick("hgt.right2", ">> ", "move 47.5% to the right",
+    hButtonWithOnClick("hgt.right2", ">> ", "Move 47.5% to the right",
                        "return imageV2.navigateButtonClick(this);");
-    hButtonWithOnClick("hgt.right3", ">>>", "move 95% to the right",
+    hButtonWithOnClick("hgt.right3", ">>>", "Move 95% to the right",
                        "return imageV2.navigateButtonClick(this);");
-    hWrites(" zoom in ");
+    hWrites(" Zoom in ");
     /* use button maker that determines padding, so we can share constants */
     topButton("hgt.in1", ZOOM_1PT5X);
     topButton("hgt.in2", ZOOM_3X);
     topButton("hgt.in3", ZOOM_10X);
     topButton("hgt.inBase", ZOOM_BASE);
-    hWrites(" zoom out ");
+    hWrites(" Zoom out ");
     topButton("hgt.out1", ZOOM_1PT5X);
     topButton("hgt.out2", ZOOM_3X);
     topButton("hgt.out3", ZOOM_10X);
     topButton("hgt.out4", ZOOM_100X);
     hWrites("<div style='height:0.3em;'></div>\n");
 #endif//ndef USE_NAVIGATION_LINKS
 
     if (showTrackControls)
         {
 	/* Break into a second form so that zooming and scrolling
 	 * can be done with a 'GET' so that user can back up from details
 	 * page without Internet Explorer popping up an annoying dialog.
 	 * Do rest of page as a 'POST' so that the ultra-long URL from
 	 * all the track controls doesn't break things.  IE URL limit
 	 * is 2000 bytes, but some firewalls impose a ~1000 byte limit.
@@ -9367,57 +9367,57 @@
         printTrackTiming();
         }
     return;
     }
 
 if (!hideControls)
     {
     struct controlGrid *cg = NULL;
 
     /* note a trick of WIDTH=27 going on here.  The 6,15,6 widths following
      * go along with this trick */
     hPrintf("<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1 WIDTH=%d COLS=%d><TR>\n",
             tl.picWidth, 27);
 #ifndef USE_NAVIGATION_LINKS
     hPrintf("<TD COLSPAN=6 ALIGN=left NOWRAP>");
-    hPrintf("<span class='moveButtonText'>move start</span><br>");
-    hButtonWithOnClick("hgt.dinkLL", " < ", "move start position to the left",
+    hPrintf("<span class='moveButtonText'>Move start</span><br>");
+    hButtonWithOnClick("hgt.dinkLL", " < ", "Move start position to the left",
                        "return imageV2.navigateButtonClick(this);");
     hTextVar("dinkL", cartUsualString(cart, "dinkL", "2.0"), 3);
-    hButtonWithOnClick("hgt.dinkLR", " > ", "move start position to the right",
+    hButtonWithOnClick("hgt.dinkLR", " > ", "Move start position to the right",
                        "return imageV2.navigateButtonClick(this);");
     hPrintf("</TD>");
     hPrintf("<td width='30'>&nbsp;</td>\n");
 #endif//ndef USE_NAVIGATION_LINKS
     hPrintf("<TD class='infoText' COLSPAN=15 style=\"white-space:normal\">"); // allow this text to wrap
     hWrites("Click on a feature for details. ");
     hWrites("Shift+click+drag to zoom in. ");
     hWrites("Click grey side bars for track options. ");
     hWrites("Drag side bars or labels up or down to reorder tracks. ");
     hWrites("Drag tracks left or right to new position. ");
     hWrites("Press \"?\" for keyboard shortcuts. ");
     hWrites("Use drop-down controls below and press refresh to alter tracks displayed. ");
 
     hPrintf("</TD>");
 #ifndef USE_NAVIGATION_LINKS
     hPrintf("<td width='30'>&nbsp;</td>\n");
     hPrintf("<TD COLSPAN=6 ALIGN=right NOWRAP>");
-    hPrintf("<span class='moveButtonText'>move end</span><br>");
-    hButtonWithOnClick("hgt.dinkRL", " < ", "move end position to the left",
+    hPrintf("<span class='moveButtonText'>Move end</span><br>");
+    hButtonWithOnClick("hgt.dinkRL", " < ", "Move end position to the left",
                        "return imageV2.navigateButtonClick(this);");
     hTextVar("dinkR", cartUsualString(cart, "dinkR", "2.0"), 3);
-    hButtonWithOnClick("hgt.dinkRR", " > ", "move end position to the right",
+    hButtonWithOnClick("hgt.dinkRR", " > ", "Move end position to the right",
                        "return imageV2.navigateButtonClick(this);");
     hPrintf("</TD>");
 #endif//ndef USE_NAVIGATION_LINKS
     hPrintf("</TR></TABLE>\n");
 
 
     if( chromosomeColorsMade )
         {
         hPrintf("<B>Chromosome Color Key:</B><BR> ");
         hPrintf("<IMG SRC = \"../images/new_colorchrom.gif\" BORDER=1 WIDTH=596 HEIGHT=18 ><BR>\n");
         }
     if (doPliColors)
         {
         hPrintf("<B>gnomAD Loss-of-Function Constraint (LOEUF) Color Key:</B><BR> ");
         hPrintf("<table style=\"border: 1px solid black\"><tr>\n");
@@ -9431,41 +9431,41 @@
         hPrintf("<td style=\"background-color:rgb(127,233,58)\">&lt; 0.8</td>\n");
         hPrintf("<td style=\"background-color:rgb(74,240,94)\">&lt; 0.9</td>\n");
         hPrintf("<td style=\"background-color:rgb(0,244,153)\">&ge; 0.9</td>\n");
         hPrintf("<td style=\"color: white; background-color:rgb(160,160,160)\">No LOEUF score</td>\n");
         hPrintf("</tr></table>\n");
         }
 
     if (showTrackControls)
 	{
 	/* Display viewing options for each track. */
         /* Chuck: This is going to be wrapped in a table so that
          * the controls don't wrap around randomly */
         hPrintf("<table id='trackCtrlTable' border=0 cellspacing=1 cellpadding=1>\n");
         hPrintf("<tr><td align='left'>\n");
 
-        hButtonWithOnClick("hgt.collapseGroups", "collapse all", "collapse all track groups",
+        hButtonWithOnClick("hgt.collapseGroups", "Collapse all", "Collapse all track groups",
                            "return vis.expandAllGroups(false)");
         hPrintf("</td>");
 
         hPrintf("<td colspan='%d' class='controlButtons' align='CENTER' nowrap>\n", MAX_CONTROL_COLUMNS - 2);
 
         printShortcutButtons(cart, hasCustomTracks, revCmplDisp, multiRegionButtonTop);
         hPrintf("</td>\n");
 
         hPrintf("<td align='right'>");
-        hButtonWithOnClick("hgt.expandGroups", "expand all", "expand all track groups",
+        hButtonWithOnClick("hgt.expandGroups", "Expand all", "Expand all track groups",
                            "return vis.expandAllGroups(true)");
         hPrintf("</td></tr>");
 
         cg = startControlGrid(MAX_CONTROL_COLUMNS, "left");
         struct hash *superHash = hashNew(8);
 	for (group = groupList; group != NULL; group = group->next)
 	    {
 	    if ((group->trackList == NULL) && (group->errMessage == NULL))
 		continue;
 
 	    struct trackRef *tr;
 
 	    /* check if group section should be displayed */
 	    char *otherState;
 	    char *indicator;
@@ -9522,31 +9522,31 @@
                     else
                         hPrintf("<a title='Documentation about this track hub, provided by the track hub authors (not UCSC)' href='%s' "
                             "style='color:#FFF; font-size: 13px;' target=_blank>Info</a>&nbsp;&nbsp;", hub->descriptionUrl);
                     }
 
 		safef(idText, sizeof idText, "%s_%d_disconn", hubName, disconCount);
                 disconCount++;
                 hPrintf("<input name=\"hubDisconnectButton\" id='%s'"
                     " type=\"button\" value=\"disconnect\">\n", idText);
 		jsOnEventByIdF("click", idText,
                     "document.disconnectHubForm.elements['hubId'].value='%s';"
                     "document.disconnectHubForm.submit();return true;",
 		    hubName + strlen(hubTrackPrefix));
 		}
 
-            hPrintf("<input type='submit' name='hgt.refresh' value='refresh' "
+            hPrintf("<input type='submit' name='hgt.refresh' value='Refresh' "
                     "title='Update image with your changes'>\n");
             hPrintf("</td></tr></table></th>\n");
             controlGridEndRow(cg);
 
             /* Base Position track goes into map group, which will always exist. */
             if (!showedRuler && sameString(group->name, "map") )
 		{
 		char *url = trackUrl(RULER_TRACK_NAME, chromName);
 		showedRuler = TRUE;
 		myControlGridStartCell(cg, isOpen, group->name);
 		hPrintf("<A HREF=\"%s\">", url);
 		hPrintf(" %s<BR> ", RULER_TRACK_LABEL);
 		hPrintf("</A>");
 		hDropListClassWithStyle("ruler", rulerMenu,
 			sizeof(rulerMenu)/sizeof(char *), rulerMenu[rulerMode],
@@ -9602,31 +9602,31 @@
 
 	    /* now finish out the table */
 	    if (group->next != NULL)
 		controlGridEndRow(cg);
 	    }
         hashFree(&superHash);
 	endControlGrid(&cg);
 	}
 
     if (measureTiming)
         printTrackTiming();
 
     hPrintf("</DIV>\n");
     }
 if (showTrackControls)
-    hButton("hgt.refresh", "refresh");
+    hButton("hgt.refresh", "Refresh");
 
 if (sameString(database, "wuhCor1"))
     {
     puts("<p class='centeredCol'>\n"
          "For information about this browser and related resources, see "
          "<a target='blank' href='../covid19.html'>COVID-19 Research at UCSC</a>.</p>");
     // GISAID wants this displayed on any page that shows any GISAID data
     puts("<p class='centeredCol'>\n"
          "GISAID data displayed in the Genome Browser are subject to GISAID's\n"
          "<a href='https://www.gisaid.org/registration/terms-of-use/' "
          "target=_blank>Terms and Conditions</a>.\n"
          "SARS-CoV-2 genome sequences and metadata are available for download from\n"
          "<a href='https://gisaid.org' target=_blank>GISAID</a> EpiCoV&trade;.\n"
          "</p>");
     }