pronouns: per-user pronouns ideology + Pronouns applet on Game Kit; provenance prose uses actor.pronouns at render time — TDD
- User.pronouns CharField w. choices=[pluralism (default), bawlmorese, misogyny, misandry, misanthropy] + pronoun_subj/obj/poss properties; PRONOUN_TABLE single source of truth in apps.lyric.models; mig 0002_user_pronouns
- drama.GameEvent.to_prose() drops module-level PRONOUN_* constants; SIG_READY/SIG_UNREADY/ROLE_SELECTED now resolve poss/subj from self.actor.pronouns at render time, so flipping a user's preference rewrites all their existing scroll prose; default actor → "their"
- SIG_READY prose strips a leading "The " from card_name so "the The Wanderer" reads "the Wanderer" and "the Engraven The Nomad" reads "the Engraven Nomad"; minor arcana ("Maid of Brands") untouched
- new applets/0005 seeds 'pronouns' applet (3x3, game-kit, default visible); _game_kit_sections.html grows a #id_gk_pronouns block w. 5 .gk-pronoun-card items labeled by ideology slug (italic) and tagged data-pronoun + data-trio
- card click → window.showGuard(card, "Set pronoun preference?<span class='guard-pronoun-trio'>{trio}</span>", commitCb); on OK fetches POST /dashboard/set-pronouns w. CSRF cookie + reloads so .active class moves and provenance prose re-renders; NVM dismisses
- dashboard.set_pronouns view (POST-only, login_required, 204/400/405) at /dashboard/set-pronouns; rejects choices not in PRONOUN_TABLE
- _game-kit.scss extends shared card rule to .gk-pronoun-card w. .active fill state + italic ideology label; #id_guard_portal .guard-pronoun-trio styled small/dim/centered under the question
- billscroll aperture: padding-right 0.75rem on #id_drama_scroll inside .applet-scroll so the timestamp column no longer sits beneath the scrollbar
Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,50 @@ class UserPaletteTest(TestCase):
|
||||
user = User.objects.create(email="a@b.cde")
|
||||
self.assertEqual(user.palette, "palette-default")
|
||||
|
||||
|
||||
class UserPronounsTest(TestCase):
|
||||
def test_pronouns_default_to_pluralism(self):
|
||||
user = User.objects.create(email="they@test.io")
|
||||
self.assertEqual(user.pronouns, "pluralism")
|
||||
|
||||
def test_pronouns_choices_include_all_five_options(self):
|
||||
from apps.lyric.models import PRONOUN_CHOICES
|
||||
keys = [k for (k, _) in PRONOUN_CHOICES]
|
||||
self.assertEqual(
|
||||
keys,
|
||||
["pluralism", "bawlmorese", "misogyny", "misandry", "misanthropy"],
|
||||
)
|
||||
|
||||
def test_pluralism_resolves_to_they_them_their(self):
|
||||
user = User.objects.create(email="plural@test.io")
|
||||
self.assertEqual(user.pronoun_subj, "they")
|
||||
self.assertEqual(user.pronoun_obj, "them")
|
||||
self.assertEqual(user.pronoun_poss, "their")
|
||||
|
||||
def test_bawlmorese_resolves_to_yo_yo_yos(self):
|
||||
user = User.objects.create(email="yo@test.io", pronouns="bawlmorese")
|
||||
self.assertEqual(user.pronoun_subj, "yo")
|
||||
self.assertEqual(user.pronoun_obj, "yo")
|
||||
self.assertEqual(user.pronoun_poss, "yos")
|
||||
|
||||
def test_misogyny_resolves_to_he_him_his(self):
|
||||
user = User.objects.create(email="he@test.io", pronouns="misogyny")
|
||||
self.assertEqual(user.pronoun_subj, "he")
|
||||
self.assertEqual(user.pronoun_obj, "him")
|
||||
self.assertEqual(user.pronoun_poss, "his")
|
||||
|
||||
def test_misandry_resolves_to_she_her_hers(self):
|
||||
user = User.objects.create(email="she@test.io", pronouns="misandry")
|
||||
self.assertEqual(user.pronoun_subj, "she")
|
||||
self.assertEqual(user.pronoun_obj, "her")
|
||||
self.assertEqual(user.pronoun_poss, "hers")
|
||||
|
||||
def test_misanthropy_resolves_to_it_it_its(self):
|
||||
user = User.objects.create(email="it@test.io", pronouns="misanthropy")
|
||||
self.assertEqual(user.pronoun_subj, "it")
|
||||
self.assertEqual(user.pronoun_obj, "it")
|
||||
self.assertEqual(user.pronoun_poss, "its")
|
||||
|
||||
class WalletCreationTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create(email="capman@test.io")
|
||||
|
||||
Reference in New Issue
Block a user