lingo: use "an" before words starting with Ü

This commit is contained in:
Dash committed 2026-10-17 15:55:47 +02:00
1 parent 0f1100d4be
commit fa31045052
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ def plural(subject: str) -> str:
def indefinite(subject: str, qty: int) -> str:
if qty == 1:
if subject.startswith(tuple("AEIOU?aeiou?")):
if subject.startswith(tuple("AEIOUÜaeiouü")):
return "an " + subject
return "a " + subject
return str(qty) + " " + plural(subject)
+9
View File
@@ -0,0 +1,9 @@
from pqcli.lingo import indefinite, to_roman
def test_indefinite_article() -> None:
assert indefinite("Orc", 1) == "an Orc"
assert indefinite("Ürn", 1) == "an Ürn"
assert indefinite("über-Orc", 1) == "an über-Orc"
assert indefinite("?", 1) == "a ?"
assert indefinite("Rat", 1) == "a Rat"