feat(i18n): Native multi-language support with --lang flag (EN + ES)#19
Draft
ramsani wants to merge 3 commits into
Draft
feat(i18n): Native multi-language support with --lang flag (EN + ES)#19ramsani wants to merge 3 commits into
ramsani wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(i18n): Native i18n — Multi-language Artifact Generation
What
Implements Issue #15 — Native i18n with Spanish + English support.
New files:
scripts/i18n-phrases.json— 22 key structural phrases translated to EN and ESscripts/i18n-detect.py— Language detection using character frequency analysis (Spanish accents, common words)tests/test_i18n.py— Validates detection accuracy and phrase coverageModified:
scripts/deliver-artifact.py--lang en|es|autoflag--lang essets<html lang="es">in the artifact--lang ensets<html lang="en">--lang auto(default) detects from artifact content<html lang>attribute after generationartifact_languagein metadata JSONWhy
The
docs/LANGUAGE_POLICY.mdestablishes that user-facing artifact content should match the user's language. Currently this is handled inconsistently. The i18n system makes language a first-class runtime feature:--langflag: Force EN or ES output explicitly<html lang>: Screen readers and search engines get the right languageAcceptance Criteria (from #15)
deliver-artifact.py --lang esgenerates artifact with<html lang="es">deliver-artifact.py --lang engenerates artifact with<html lang="en">deliver-artifact.py(no flag) detects language automatically from contenti18n-phrases.jsonhas 22+ phrases in bothenandesaudit-artifact.py(unchanged) continues to pass — no regressionartifact_languagefieldvalidate-runtime.shincludes i18n smoke testTesting
Closes #15