feat(lookup): optional QRZ nickname as the logged name

QRZ publishes <nickname> — the name an operator goes BY on the air — and
OpsLog was composing fname + name instead. "Bob" is what belongs in a log;
"Robert J Smith" is what belongs on a licence.

QRZ only, and deliberately so: HamQTH's <nick> already fills the Name field
that way, so the same switch there would toggle a behaviour it has no way to
turn off.

A published nickname is optional, so an empty one falls through to the
registered name. That is the whole point of it being a fallback rather than a
swap, and it is what the test pins — a blank nickname must never blank the
name.
This commit is contained in:
2026-08-13 10:49:52 +02:00
parent b2382a6135
commit 8e49d37cbd
9 changed files with 140 additions and 57 deletions
+7 -7
View File
@@ -4,14 +4,14 @@ import "testing"
func TestTitleCase(t *testing.T) {
cases := map[string]string{
"NOEL CHENAVARD": "Noel Chenavard",
"VETRAZ-MONTHOUX": "Vetraz-Monthoux",
"o'brien": "O'Brien",
"NOEL CHENAVARD": "Noel Chenavard",
"VETRAZ-MONTHOUX": "Vetraz-Monthoux",
"o'brien": "O'Brien",
"866 ROUTE DES VOIRONS": "866 Route Des Voirons",
"PARIS": "Paris",
"": "",
" saint-étienne ": "Saint-Étienne",
"JOHN": "John",
"PARIS": "Paris",
"": "",
" saint-étienne ": "Saint-Étienne",
"JOHN": "John",
}
for in, want := range cases {
if got := titleCase(in); got != want {