PolishWording: Fix 'i' capitalization (#573)

* Fix 'i' capitalization

* Remove redundant capitalization fix for 'i'

Removed duplicate capitalization fix for stand-alone 'i'.

* Fix spacing in polishWording index.ts

---------

Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
Looly 2025-12-17 18:47:00 +02:00 • committed by GitHub
parent c3edc31db3
commit 6e3af4921d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -275,8 +275,8 @@ function capitalize(textInput: string): string {
}
}
// We'll fix capitalization of I's
result = result.replace(/\bi[\b']/g, "I");
// Stand-alone i's turn into I, unless there's the word 'is' after, cus then it's a vowel and not someone talking about themselves
result = result.replace(/\bi\b(?!\s+is\b)(?=['\s]|$)/g, "I");
return result;
}