[{"data":1,"prerenderedAt":773,"buildId":774},["ShallowReactive",2],{"docs:\u002Fguide\u002Fcasing":3},{"page":4,"section":16,"document":17,"credits":10,"prev":766,"next":769},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"casing","\u002Fguide\u002Fcasing","guide\u002Fcasing.md","Casing rules","How glosslint checks capitals with exact, spelling and context terms, and how case styles set the casing of labels, headers and sentences.",null,[],"i-lucide-case-sensitive","article",true,5,"guide",{"nodes":18,"toc":751},[19,54,62,78,128,134,140,147,264,270,273,281,287,293,301,307,348,427,438,444,455,529,541,547,577,583,598,604,703,734,740],[20,21,22,23,27,28,31,32,35,36,39,40,42,43,48,49,53],"p",{},"Product terms follow different capitalisation rules depending on what they are. Brands like ",[24,25,26],"code",{},"eBike"," stay fixed everywhere, plain nouns like ",[24,29,30],{},"Checkout"," only care about word splits, and UI concepts like ",[24,33,34],{},"Day Pass"," change case between buttons and sentences. Set ",[24,37,38],{},"case"," and ",[24,41,5],{}," on your ",[44,45,47],"a",{"href":46},"\u002Fguide\u002Fcorpus","corpus"," or individual ",[44,50,52],{"href":51},"\u002Fguide\u002Fterms","terms"," to match how your team writes.",[55,56,61],"h2",{"id":57,"anchor":58},"case-modes",{"label":59,"icon":60},"Section titled \"Case modes\"","#","Case modes",[20,63,64,65,67,68,70,71,73,74,77],{},"Set ",[24,66,38],{}," on a term to choose how glosslint checks its capitals. If you set ",[24,69,5],{}," on a term without ",[24,72,38],{},", it becomes a ",[24,75,76],{},"context"," term.",[79,80,81,95],"table",{},[82,83,84],"thead",{},[85,86,87,92],"tr",{},[88,89,90],"th",{},[24,91,38],{},[88,93,94],{},"What is reported",[96,97,98,109,119],"tbody",{},[85,99,100,106],{},[101,102,103],"td",{},[24,104,105],{},"spelling",[101,107,108],{},"The default. Only splits and hyphens: \"Check-out\" and \"check out\" are spelled \"Checkout\". Capitals are free. The fix keeps the writer's capitals, so \"check-out\" becomes \"checkout\".",[85,110,111,116],{},[101,112,113],{},[24,114,115],{},"exact",[101,117,118],{},"One form everywhere. \"E-bike\" and \"Ebike\" are both reported, and the fix is always \"eBike\".",[85,120,121,125],{},[101,122,123],{},[24,124,76],{},[101,126,127],{},"Title Case in labels and lowercase in sentences, capitalised at the start of a sentence. A button \"Buy a day pass\" becomes \"Buy a Day Pass\", and the sentence \"Buy a Day Pass at the kiosk.\" becomes \"Buy a day pass at the kiosk.\"",[55,129,133],{"id":130,"anchor":131},"how-context-decides-the-kind-of-text",{"label":132,"icon":60},"Section titled \"How context decides the kind of text\"","How context decides the kind of text",[20,135,136,137,139],{},"To check a ",[24,138,76],{}," term, glosslint needs to know whether a string is a label, a table header, or a sentence. It guesses from the key, attribute, or element name, and from the text itself.",[141,142,146],"h3",{"id":143,"anchor":144},"names-limits-and-elements",{"label":145,"icon":60},"Section titled \"Names, limits, and elements\"","Names, limits, and elements",[148,149,150,176,202,208,241,250],"ul",{},[151,152,153,157,158,161,162,161,165,168,169,171,172,175],"li",{},[154,155,156],"strong",{},"Headers."," A string is a header when its name holds ",[24,159,160],{},"header",", ",[24,163,164],{},"column",[24,166,167],{},"col",", or ",[24,170,88],{},", as AG Grid's ",[24,173,174],{},"headerName"," does.",[151,177,178,181,182,161,185,161,188,161,191,168,194,197,198,201],{},[154,179,180],{},"Labels."," A string is a label when its name holds a word such as ",[24,183,184],{},"label",[24,186,187],{},"title",[24,189,190],{},"button",[24,192,193],{},"tab",[24,195,196],{},"heading",", or ends in ",[24,199,200],{},"name",".",[151,203,204,207],{},[154,205,206],{},"Length and stop limit."," Both headers and labels need at most seven words and no closing period.",[151,209,210,213,214,161,217,161,220,161,223,161,226,168,229,232,233,161,235,168,238,201],{},[154,211,212],{},"Sentences."," A string is a sentence when its name holds a word such as ",[24,215,216],{},"description",[24,218,219],{},"tooltip",[24,221,222],{},"text",[24,224,225],{},"message",[24,227,228],{},"hint",[24,230,231],{},"help",", or when it ends in ",[24,234,201],{},[24,236,237],{},"!",[24,239,240],{},"?",[151,242,243,246,247,249],{},[154,244,245],{},"Everything else."," In anything else, comments included, ",[24,248,76],{}," terms get no casing check.",[151,251,252,255,256,259,260,263],{},[154,253,254],{},"Vue templates."," Text takes its kind from its element: a ",[24,257,258],{},"\u003Ctemplate #header>"," slot is a header, and ",[24,261,262],{},"\u003Ch2>"," is a label.",[141,265,269],{"id":266,"anchor":267},"shape-fallback-and-fix-kind",{"label":268,"icon":60},"Section titled \"Shape fallback and fix kind\"","Shape fallback and fix kind",[20,271,272],{},"Template text and YAML values that their name does not place are classified by their shape:",[148,274,275,278],{},[151,276,277],{},"At four words or fewer with no closing stop, they count as labels, unless they open like a sentence (\"There is\", \"This\", \"Are you\").",[151,279,280],{},"Longer strings count as labels when they are already in Title Case, and as sentences otherwise.",[20,282,283,284,286],{},"Because only the text's shape placed those strings, a ",[24,285,76],{}," fix there is offered as a suggestion rather than an autofix.",[141,288,292],{"id":289,"anchor":290},"markdown-files",{"label":291,"icon":60},"Section titled \"Markdown files\"","Markdown files",[20,294,295,296,300],{},"In Markdown checked by the ",[44,297,299],{"href":298},"\u002Fintegrations\u002Fcli","CLI",", headings are labels, a table's first row is headers, and paragraphs and list items are sentences.",[141,302,306],{"id":303,"anchor":304},"overriding-with-kindof",{"label":305,"icon":60},"Section titled \"Overriding with kindOf\"","Overriding with kindOf",[20,308,309,310,314,315,319,320,323,324,327,328,330,331,334,335,161,338,161,341,168,344,347],{},"The ",[44,311,313],{"href":312},"\u002Fintegrations\u002Feslint","ESLint"," config and the ",[44,316,318],{"href":317},"\u002Fintegrations\u002Fx18n","x18n"," plugin both take a ",[24,321,322],{},"kindOf"," option that decides first. It receives ",[24,325,326],{},"{ text, name, file, shown }",", where ",[24,329,200],{}," is the key, attribute, or element and ",[24,332,333],{},"shown"," says the text is shown as it is. Return ",[24,336,337],{},"\"label\"",[24,339,340],{},"\"header\"",[24,342,343],{},"\"sentence\"",[24,345,346],{},"undefined"," to leave the string to glosslint. Because your callback's answer counts as certain, its fixes are autofixes:",[349,350,353],"pre",{"language":351,"class":352},"ts","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[24,354,356],{"class":355},"language-ts",[357,358,361,364,368,370,372,375,378,382,385,389,392,396,399,402,405,408,411,414,417,420,424],"span",{"class":359,"style":360},"line","display: inline",[357,362,322],{"style":363},"color:#953800;--shiki-dark:#FFA657",[357,365,367],{"style":366},"color:#1F2328;--shiki-dark:#E6EDF3",": ({ ",[357,369,200],{"style":363},[357,371,161],{"style":366},[357,373,374],{"style":363},"file",[357,376,377],{"style":366}," }) ",[357,379,381],{"style":380},"color:#CF222E;--shiki-dark:#FF7B72","=>",[357,383,384],{"style":366}," (file?.",[357,386,388],{"style":387},"color:#8250DF;--shiki-dark:#D2A8FF","includes",[357,390,391],{"style":366},"(",[357,393,395],{"style":394},"color:#0A3069;--shiki-dark:#A5D6FF","\"\u002Fcharts\u002F\"",[357,397,398],{"style":366},") ",[357,400,401],{"style":380},"&&",[357,403,404],{"style":366}," name ",[357,406,407],{"style":380},"===",[357,409,410],{"style":394}," \"text\"",[357,412,413],{"style":380}," ?",[357,415,416],{"style":394}," \"label\"",[357,418,419],{"style":380}," :",[357,421,423],{"style":422},"color:#0550AE;--shiki-dark:#79C0FF"," undefined",[357,425,426],{"style":366},"),",[428,429,432],"github-callout",{"type":430,"title":431},"note","Note",[20,433,434,435,437],{},"The name words, sentence openers, and Title Case rules are English, so ",[24,436,76],{}," expects English source text.",[55,439,443],{"id":440,"anchor":441},"case-styles",{"label":442,"icon":60},"Section titled \"Case styles\"","Case styles",[20,445,446,448,449,451,452,454],{},[24,447,5],{}," sets how ",[24,450,76],{}," terms are written in labels, headers, and sentences. Set it on the corpus for every ",[24,453,76],{}," term, and on a term for that term alone.",[79,456,457,467],{},[82,458,459],{},[85,460,461,464],{},[88,462,463],{},"Style",[88,465,466],{},"Day Pass is written",[96,468,469,480,496,507,519],{},[85,470,471,475],{},[101,472,473],{},[24,474,187],{},[101,476,477,479],{},[24,478,34],{},". The default in labels and headers.",[85,481,482,487],{},[101,483,484],{},[24,485,486],{},"sentence",[101,488,489,168,492,495],{},[24,490,491],{},"day pass",[24,493,494],{},"Day pass"," at the start of a sentence. The default in sentences.",[85,497,498,503],{},[101,499,500],{},[24,501,502],{},"lower",[101,504,505],{},[24,506,491],{},[85,508,509,514],{},[101,510,511],{},[24,512,513],{},"upper",[101,515,516],{},[24,517,518],{},"DAY PASS",[85,520,521,526],{},[101,522,523],{},[24,524,525],{},"as-written",[101,527,528],{},"As the term is written in the corpus.",[20,530,531,532,535,536,538,539,201],{},"A header takes the label style unless ",[24,533,534],{},"casing.header"," sets its own. Words with an inner capital, such as ",[24,537,26],{},", keep it in every style except ",[24,540,513],{},[141,542,546],{"id":543,"anchor":544},"whole-label-casing",{"label":545,"icon":60},"Section titled \"Whole-label casing\"","Whole-label casing",[20,548,549,550,553,554,557,558,561,562,564,565,567,568,570,571,553,573,576],{},"By default only the term itself is checked, so the label ",[24,551,552],{},"\"Day pass price\""," becomes ",[24,555,556],{},"\"Day Pass price\"",". With ",[24,559,560],{},"wholeLabel: true"," on the corpus, a label or header that holds a ",[24,563,76],{}," term follows the term's style as a whole when that style is ",[24,566,187],{}," or ",[24,569,513],{},": ",[24,572,552],{},[24,574,575],{},"\"Day Pass Price\"",", in one fix that also holds the term's own fix.",[20,578,579,580,582],{},"When checking a whole label in ",[24,581,187],{}," style:",[148,584,585,595],{},[151,586,587,588,39,591,594],{},"Small words such as ",[24,589,590],{},"\"a\"",[24,592,593],{},"\"of\""," stay lowercase unless they start the label or follow a dash or colon.",[151,596,597],{},"Text in parentheses keeps its case.",[141,599,603],{"id":600,"anchor":601},"configuring-styles-per-kind",{"label":602,"icon":60},"Section titled \"Configuring styles per kind\"","Configuring styles per kind",[349,605,607],{"language":351,"filename":606,"class":352},"glosslint.config.ts",[24,608,609,623,624,623,638,623,643,623,666,623,672,623,688,623,695],{"class":355},[357,610,611,614,617,620],{"class":359,"style":360},[357,612,613],{"style":380},"export",[357,615,616],{"style":380}," default",[357,618,619],{"style":387}," defineCorpus",[357,621,622],{"style":363},"({","\n",[357,625,626,629,632,635],{"class":359,"style":360},[357,627,628],{"style":366},"  casing: { header: ",[357,630,631],{"style":394},"\"upper\"",[357,633,634],{"style":366}," }",[357,636,637],{"style":363},",",[357,639,640],{"class":359,"style":360},[357,641,642],{"style":366},"  terms: [",[357,644,645,648,651,654,657,660,663],{"class":359,"style":360},[357,646,647],{"style":366},"    { term: ",[357,649,650],{"style":394},"\"Day Pass\"",[357,652,653],{"style":366},", abbr: [",[357,655,656],{"style":394},"\"DP\"",[357,658,659],{"style":366},"], case: ",[357,661,662],{"style":394},"\"context\"",[357,664,665],{"style":366}," },",[357,667,668],{"class":359,"style":360},[357,669,671],{"style":670},"color:#6E7781;--shiki-dark:#8B949E","    \u002F\u002F \"Ride history\" in labels, \"ride history\" in sentences, \"RIDE HISTORY\" in headers.",[357,673,674,676,679,682,685],{"class":359,"style":360},[357,675,647],{"style":366},[357,677,678],{"style":394},"\"Ride history\"",[357,680,681],{"style":366},", casing: { label: ",[357,683,684],{"style":394},"\"as-written\"",[357,686,687],{"style":366}," } },",[357,689,690,693],{"class":359,"style":360},[357,691,692],{"style":366},"  ]",[357,694,637],{"style":363},[357,696,697,700],{"class":359,"style":360},[357,698,699],{"style":363},"})",[357,701,702],{"style":366},";",[20,704,705,706,709,710,712,713,716,717,720,721,723,724,726,727,39,730,733],{},"With this corpus, the AG Grid column ",[24,707,708],{},"{ headerName: \"Day pass\" }"," is reported with the fix ",[24,711,518],{},", and a button ",[24,714,715],{},"\"Buy a day pass\""," still becomes ",[24,718,719],{},"\"Buy a Day Pass\"",". In an ",[24,722,513],{}," header any term written all in capitals passes, abbreviations and ",[24,725,115],{}," terms too, so ",[24,728,729],{},"DP",[24,731,732],{},"EBIKE"," are not reported there.",[141,735,739],{"id":736,"anchor":737},"lowercase-abbreviations",{"label":738,"icon":60},"Section titled \"Lowercase abbreviations\"","Lowercase abbreviations",[20,741,742,743,746,747,750],{},"An abbreviation written all in lowercase is not reported, so ",[24,744,745],{},"\"dp\""," in prose passes while ",[24,748,749],{},"\"Dp\""," is reported.",[752,754,761],{"id":57,"depth":753,"text":61},2,{"id":130,"depth":753,"text":133,"children":755},[756,758,759,760],{"id":143,"depth":757,"text":146},3,{"id":266,"depth":757,"text":269},{"id":289,"depth":757,"text":292},{"id":303,"depth":757,"text":306},{"id":440,"depth":753,"text":443,"children":762},[763,764,765],{"id":543,"depth":757,"text":546},{"id":600,"depth":757,"text":603},{"id":736,"depth":757,"text":739},{"path":51,"title":767,"description":768},"Defining terms","Configure glosslint terms with descriptions, nuance, avoid words, abbreviations, casing options, locale forms, and inline test examples.",{"path":770,"title":771,"description":772},"\u002Fguide\u002Fignored-text","What glosslint skips","See what text glosslint blanks before matching, which code strings ESLint ignores, and which Markdown and MDX syntax the CLI skips.",1795627930103,"94d466e2-147b-430f-b5f0-25c6a986e462"]