Skip to content

feat(virtues): scaffold i18n columns (#218) - #223

Merged
jsboige merged 1 commit into
masterfrom
feat/issue-218-virtues-i18n-scaffold
Apr 24, 2026
Merged

feat(virtues): scaffold i18n columns (#218)#223
jsboige merged 1 commit into
masterfrom
feat/issue-218-virtues-i18n-scaffold

Conversation

@jsboige

@jsboige jsboige commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Scaffolds multilingual support for Virtues (issue #218) by adding empty _en/_ru/_pt columns to the CSV and matching Optional() ClassMap entries on the entity. No data is populated — this is a schema-only change so the DatasetUpdater translation pipeline (unblocked by #183/PR #210) can write multilingual fields without further code changes.

Scope

  • Cards/Fallacies/Argumentum Virtues - Taxonomy.csv — header + 222 data rows get 21 trailing empty fields (7 cols × 3 langs):
    family_en, subfamily_en, subsubfamily_en, title_en, description_en, remark_en, link_en
    • same for _ru + same for _pt.
  • Entities/ArgumentVirtue.cs — 21 new string properties (FamilyEn…LinkPt, Ru, Pt) + 21 .Name("…").Optional() ClassMap entries. FR fields stay non-optional.

What this is NOT

Why

Complements the #216 rendering-side scaffold so the full i18n chain (CSV → entity → localization → templates) is now wired. Once PR #222's model migration lands and DatasetUpdaterRootConfig.VirtuesTaxonomy.Enabled = true, Virtues become fully translatable without touching code.

Test plan

  • dotnet build — no errors, only pre-existing warnings
  • dotnet test — 88 pass / 0 fail / 1 skip (Freeplane GUI, expected)
  • CSV reloads cleanly in CsvHelper (import via Import-Csv reports 223 rows × 38 columns, was 17)
  • Runtime smoke: follow-up after merge, run pipeline stage that loads Virtues and confirm no warnings about unmapped columns

Refs #218
Depends on: none (scaffold only, no runtime coupling to #222)

🤖 Generated with Claude Code

Add empty _en/_ru/_pt columns to Argumentum Virtues - Taxonomy.csv
(family/subfamily/subsubfamily/title/description/remark/link × 3 langs
= 21 new columns) and matching Optional() ClassMap entries in
ArgumentVirtue entity.

No data is populated — this is a schema scaffold so the DatasetUpdater
translation pipeline (unblocked by #183/PR #210) can write multilingual
fields without further code changes. Complements the LocalizationConfig
scaffold merged in #216 which was no-op until these columns existed.

Validated: dotnet build + 88 tests pass (1 skip Freeplane GUI).
CSV: 223 rows × 38 columns (was 17).

Refs #218

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

jsboige commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

Post-commit blind-spot audit — fix added

Tracing CsvType references during a downstream audit revealed that the Virtues CSV is actually loaded via Entities/Virtue.cs (singular, CsvType = typeof(Virtue) in AssetConverterConfig.cs:79), NOT ArgumentVirtue.cs which the initial commit scaffolded.

ArgumentVirtue is referenced only by MappingProfile.cs (an AutoMapper CreateMap<ArgumentVirtue, Fallacy>() definition that is never actually invoked anywhere in the codebase) — i.e., dead code.

Commit e904dcfe extends the _en/_ru/_pt scaffold to Virtue.cs (21 properties + matching .Optional() ClassMap entries). The original ArgumentVirtue scaffold is kept for symmetry — AutoMapper's .ReverseMap() would break otherwise if that code path is ever re-enabled.

Without this fix, activating DatasetUpdater.VirtuesTaxonomy.Enabled = true would run fine (DatasetUpdater works with dynamic DataTable columns, not via Virtue entity), but the downstream pipeline stage that loads Virtues for PDF rendering would silently drop the translated data.

Build + 88 tests still pass on the new HEAD.

jsboige added a commit that referenced this pull request Apr 24, 2026
…ompletion

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

Copy link
Copy Markdown
Collaborator

Post-hoc review — PR #223 feat(virtues): scaffold i18n columns (#218)

Verdict: ✅ LGTM — with a note on dead code

Well-executed scaffold for Virtues i18n. CSV gets 21 new empty columns (7 fields × 3 languages), entity gets matching Optional() ClassMap entries.

Concerns:

CSV structure is consistent with the Fallacies i18n pattern. No data populated, no regressions.

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