tractatus/docs/I18N_IMPLEMENTATION_SUMMARY.md
TheFlow 44a91e7fcf feat: add case submission portal admin interface and i18n support
Case Submission Portal (Admin Moderation Queue):
- Add statistics endpoint (GET /api/cases/submissions/stats)
- Enhance filtering: status, failure_mode, AI relevance score
- Add sorting options: date, relevance, completeness
- Create admin moderation interface (case-moderation.html)
- Implement CSP-compliant admin UI (no inline event handlers)
- Deploy moderation actions: approve, reject, request-info
- Fix API parameter mapping for different action types

Internationalization (i18n):
- Implement lightweight i18n system (i18n-simple.js, ~5KB)
- Add language selector component with flag emojis
- Create German and French translations for homepage
- Document Te Reo Māori translation requirements
- Add i18n attributes to homepage
- Integrate language selector into navbar

Bug Fixes:
- Fix search button modal display on docs.html (remove conflicting flex class)

Page Enhancements:
- Add dedicated JS modules for researcher, leader, koha pages
- Improve page-specific functionality and interactions

Documentation:
- Add I18N_IMPLEMENTATION_SUMMARY.md (implementation guide)
- Add TE_REO_MAORI_TRANSLATION_REQUIREMENTS.md (cultural sensitivity guide)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 14:50:47 +13:00

7.3 KiB

Internationalization Implementation Summary

Date: October 15, 2025 Status: Infrastructure Complete | German & French Ready | Te Reo Māori Respectfully Deferred Purpose: Test cultural adaptation capabilities with European languages before approaching Māori communities


What's Been Built

1. Translation Files

Directory Structure:

public/locales/
├── en/              # English (baseline)
│   └── homepage.json
├── de/              # German
│   └── homepage.json  
├── fr/              # French
│   └── homepage.json
└── mi/              # Te Reo Māori (empty - deferred)

Content Translated:

  • Hero section (title, subtitle, CTAs)
  • Value proposition
  • Three audience paths (Researcher, Implementer, Leader)
  • Six framework capabilities
  • 27027 incident case study
  • Footer content
  • Total: ~106 translation keys per language

2. Simple i18n System

File: /public/js/i18n-simple.js (151 lines)

Features:

  • Automatic language detection (localStorage → browser → English)
  • JSON translation file loading
  • Dynamic content replacement via data-i18n attributes
  • Language switching without page reload
  • Fallback to English on errors
  • Only ~5KB (much lighter than i18next's 20KB)

Supported Languages:

  • English (en) - Baseline
  • German (de) - Complete
  • French (fr) - Complete
  • ⏸️ Te Reo Māori (mi) - Respectfully deferred

3. Language Selector Component

File: /public/js/components/language-selector.js

Features:

  • Dropdown with flag emojis (🇬🇧 🇩🇪 🇫🇷 🇳🇿)
  • Shows "Te Reo Māori (Coming Soon)" as disabled option
  • Saves preference to localStorage
  • Accessible (ARIA labels, keyboard navigation)
  • Tailwind-styled to match site design

4. Te Reo Māori Documentation

File: /docs/TE_REO_MAORI_TRANSLATION_REQUIREMENTS.md

Key Points:

  • Explains why deferral is respectful, not disinterested
  • Documents professional consultation requirements
  • Lists priority pages for eventual translation
  • Estimates budget (~NZD $1,000-2,000)
  • Outlines cultural appropriateness review process
  • Acknowledges this may take longer than other features

Cultural Adaptation Philosophy

Why German and French First?

  1. Test the infrastructure - Validate translation system works
  2. Identify cultural challenges - Learn about adaptation issues
  3. Demonstrate international capability - Show framework works beyond English
  4. Build confidence - Prove the system before approaching Māori communities

Why Te Reo Māori is Different

Te Tiriti partnership is a core values commitment, not a "nice to have":

We will NOT:

  • Use AI/machine translation
  • Deploy without professional review
  • Rush to "check the diversity box"
  • Approach communities with incomplete work

We WILL:

  • Wait until system is complete and stable
  • Offer something of real value
  • Properly compensate consultation
  • Respect cultural appropriateness requirements

Implementation Guide

To Add i18n to a Page:

  1. Add scripts to HTML (in <head> or before </body>):
<script src="/js/i18n-simple.js"></script>
<script src="/js/components/language-selector.js"></script>
  1. Add language selector container:
<div id="language-selector-container"></div>
  1. Add translation keys to elements:
<h1 data-i18n="hero.title">Tractatus AI Safety Framework</h1>
<p data-i18n="hero.subtitle">Structural constraints...</p>
  1. Create/update translation file:
{
  "hero": {
    "title": "Tractatus AI Safety Framework",
    "subtitle": "Structural constraints..."
  }
}

Language Codes:

  • en = English
  • de = Deutsch (German)
  • fr = Français (French)
  • mi = Te Reo Māori (deferred)

Translation Quality

German Translation

Approach:

  • Technical terminology appropriate for German-speaking academics/engineers
  • Formal register (Sie-form implied)
  • Culturally appropriate for Germany, Austria, Switzerland
  • Key terms:
    • "Sicherheit" (safety/security)
    • "Beschränkungen" (constraints)
    • "Werteentscheidungen" (values decisions)
    • "Menschliche Entscheidungsfreiheit" (human agency)

French Translation

Approach:

  • Technical precision for French-speaking tech communities
  • Formal "vous" register
  • Appropriate for France, Belgium, Switzerland, Quebec, Francophone Africa
  • Key terms:
    • "Sécurité" (safety)
    • "Contraintes" (constraints)
    • "Décisions de valeurs" (values decisions)
    • "Agence humaine" (human agency)

Note: Both translations created by AI language model (Claude) with technical expertise. For production, recommend:

  • Professional review of technical terminology
  • Cultural appropriateness check
  • Native speaker validation

Next Steps

Immediate (This Session):

  1. Te Reo Māori documentation updated
  2. German translation created
  3. French translation created
  4. Language selector built
  5. Test on homepage (add i18n attributes) - COMPLETE
  6. Deploy to production - COMPLETE (October 16, 2025)
  7. Monitor for cultural adaptation issues

Short-term (Next 2 weeks):

  • Add i18n to About/Values page
  • Add i18n to Researcher/Implementer/Leader pages
  • Gather feedback from German/French speakers
  • Refine translations based on feedback

Long-term (When System Complete):

  • Professional review of German/French translations
  • Approach Māori language consultants
  • Budget allocation for professional Māori translation
  • Cultural appropriateness review process
  • Te Reo Māori launch

Success Metrics

Technical:

  • i18n system < 10KB total (actual: ~5KB)
  • No page reload required for language switch
  • Fallback to English on errors
  • LocalStorage persistence working

Cultural:

  • Respectful documentation of Māori deferral
  • Professional-quality German/French translations
  • Positive feedback from German/French users
  • No cultural insensitivity reports

Values Alignment:

  • Te Tiriti commitment documented
  • Approach emphasizes respect over speed
  • Professional consultation budgeted
  • Transparency about translation status

Files Created (This Session)

/public/locales/en/homepage.json          # English baseline (106 lines)
/public/locales/de/homepage.json          # German translation (106 lines)
/public/locales/fr/homepage.json          # French translation (106 lines)
/public/js/i18n-simple.js                 # i18n system (151 lines)
/public/js/components/language-selector.js # Language selector (66 lines)
/docs/TE_REO_MAORI_TRANSLATION_REQUIREMENTS.md  # 170 lines
/docs/I18N_IMPLEMENTATION_SUMMARY.md      # This file

Total: 7 new files, ~805 lines of code/documentation


Acknowledgments

This implementation respects:

  • Te Tiriti o Waitangi - Partnership principles
  • CARE Principles - Indigenous data sovereignty
  • Cultural sensitivity - Approach communities when we have value to offer
  • Professional standards - Quality over speed

Philosophy: "Respectful deferral is not lack of interest—it's cultural sensitivity."


Last Updated: October 15, 2025
Status: Infrastructure complete, German/French ready for testing Next Review: After homepage i18n testing complete