Skip to content

fix(virtues): extend i18n scaffold to Virtue entity (follow-up to #223) - #229

Merged
jsboige merged 1 commit into
masterfrom
fix/virtue-entity-i18n-completion
Apr 24, 2026
Merged

fix(virtues): extend i18n scaffold to Virtue entity (follow-up to #223)#229
jsboige merged 1 commit into
masterfrom
fix/virtue-entity-i18n-completion

Conversation

@jsboige

@jsboige jsboige commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up fix for PR #223 (#218). The merged PR added _en/_ru/_pt columns to the Virtues CSV and scaffolded the ArgumentVirtue entity — but ArgumentVirtue is dead code. The pipeline actually loads Virtues via CsvType = typeof(Virtue) in AssetConverterConfig.cs:79, mapped by VirtueClassMap.

Without this fix, the 21 new CSV columns are silently ignored at runtime.

What changed

  • Added 21 string properties (FamilyEn, SubfamilyEn, …, LinkPt) to Virtue.cs
  • Added matching 21 .Optional() ClassMap entries in VirtueClassMap

Symmetric with the scaffold already in ArgumentVirtue.cs (kept for reverse-mapping via MappingProfile.cs, cheap to maintain).

Why this got missed in PR #223

Two Virtue entity classes exist:

  • ArgumentVirtue — referenced only by MappingProfile.CreateMap<ArgumentVirtue, Fallacy>(), which is never invoked (.Map() call absent)
  • Virtue — the one actually used by the pipeline

A post-merge blind-spot audit traced CsvType references and caught this.

Test plan

🤖 Generated with Claude Code

The earlier commit added the _en/_ru/_pt scaffold to ArgumentVirtue, which
turns out to be dead code — it's only referenced in MappingProfile.cs,
whose AutoMapper definition is never invoked anywhere. The pipeline
actually loads Virtues CSV via CsvType = typeof(Virtue) in
AssetConverterConfig.cs:79, mapped by VirtueClassMap.

This commit adds the same 21 string properties + .Optional() ClassMap
entries to Virtue.cs so the CSV i18n columns are reachable at runtime.
ArgumentVirtue scaffold kept for mapping symmetry (cheap to maintain,
would break reverse mapping if ever invoked).

Thanks to post-commit blind-spot audit that traced CsvType references
and discovered the duplicate entity class.

Build + 88 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jsboige
jsboige merged commit 82cf1cd into master Apr 24, 2026
1 check passed
@clusterManager-Myia

Copy link
Copy Markdown
Collaborator

Post-hoc review — PR #229 fix(virtues): extend i18n scaffold to Virtue entity (follow-up to #223)

Verdict: ✅ LGTM — important follow-up fix

This PR correctly identifies that PR #223 scaffolded i18n columns on ArgumentVirtue (dead code) instead of the actual runtime entity Virtue. The fix adds matching i18n properties to Virtue.cs.

Observations:

  • All 21 properties (7 fields × 3 languages) are correctly added with nullable string types.
  • Follows the same pattern as ArgumentVirtue from PR feat(virtues): scaffold i18n columns (#218) #223.
  • The PR description is transparent about the mistake — good practice.

Note: It's worth adding a deprecation notice or [Obsolete] attribute to ArgumentVirtue if it's truly dead code, to prevent future confusion.

Clean fix, no regressions.

@jsboige
jsboige deleted the fix/virtue-entity-i18n-completion branch June 1, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants