Skip to content

Add Korean localization for workshop documentation - #15

Merged
jamesmontemagno merged 22 commits into
github:mainfrom
justinyoo:justinyoo-localize-korean-docs
Oct 5, 2026
Merged

jamesmontemagno merged 22 commits into
github:mainfrom
justinyoo:justinyoo-localize-korean-docs

Conversation

@justinyoo

Copy link
Copy Markdown
Contributor

Summary

  • Add Korean (ko-kr) localization for 47 Markdown documents, including all LIVE_DEMO.md files.
  • Localize documentation navigation, theme toggle, hub link, docs root, locale query handling, and locale switcher UI.
  • Add Korean-first typography using Nanum Gothic for prose and D2Coding for code and terminal text, with fallbacks.
  • Add the vendored localization skill, localization sync workflow, output validation, and refreshed Korean localization metadata.

Validation

  • node docs/tests/workshop-site.test.js
  • python scripts/validate_workshop.py

The localization sync workflow has not been exercised end-to-end because it depends on the Copilot CLI and upstream documentation changes.

justinyoo and others added 16 commits October 4, 2026 10:22
Localizes all workshop lessons, READMEs, and LIVE_DEMO guides into Korean under localizations/ko-kr/, mirroring the source layout. Adds .localization-state.json to track per-file source and output SHA-256 baselines for incremental updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Introduce a ?locale= query parameter and a Docs selector, orthogonal to
the existing programming-language ?lang= parameter, so the Korean
translations under localizations/ are reachable from the site.

- Add docs/locale-registry.js as the single source of truth for locales
- Thread the locale through navigation, the homepage, and the lesson viewer
- Fall back to English when a translated lesson is missing
- Use per-locale LIVE_DEMO act headings in the Markdown preprocessor
- Publish localizations/ from the Pages workflow and cover the new URLs in
  validate_deployment.py
- Fix Korean emphasis runs that CommonMark rendered literally because a
  closing ** preceded by punctuation is not right-flanking
- Document the switcher in README.md and its Korean translation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Translate the docs homepage UI through the existing locale registry, including
metadata, accessibility labels, workshop cards, previews, and outcomes. Keep
programming-language selection independent from the human-language locale and
persist the locale query parameter on the homepage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move previous, next, hub, navigation-group, and per-step labels into the
locale registry so lesson header, sidebar, and footer navigation follow the
selected documentation locale.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Route the theme toggle labels, hub link, docs link, progress text, step
titles, and lesson status messages through the locale registry so the
Korean locale no longer falls back to English site chrome.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass the resolved locale directly to the shared theme toggle and version its
script URL so the homepage does not reuse a stale English-only asset.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The site's Latin webfonts carry no Hangul, so Korean text fell through to
whatever the OS picked. Add korean-typography.css, which overrides --font-sans
and --font-mono under html[lang=ko]: Nanum Gothic ahead of the platform Korean
fonts for prose, and D2Coding with GulimChe fallback for code and terminals.

The Latin webfont stays first in each stack so only Hangul falls through.

D2Coding is self-hosted (OFL 1.1) rather than loaded from the unofficial,
unpinned jsDelivr mirror. The TTFs come from naver/d2-coding-font and are
subset to Hangul plus CJK punctuation, which cuts each weight from ~1.5 MB to
~420 KB; a matching unicode-range keeps English pages from downloading them
at all.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The first pass put the Latin webfonts first, which limited D2Coding and Nanum
Gothic to glyphs the Latin fonts could not render. Korean families now lead both
stacks, with the Latin webfont as the immediate second choice and the platform
Korean fonts behind it.

Re-subset D2Coding from the naver/d2-coding-font VER1.4.0 release to cover Latin
alongside Hangul, plus the punctuation, arrows, and box-drawing characters the
lessons use, so leading with it no longer pushes Latin code into a Korean
fallback font. The narrow Hangul-only unicode-range is gone; English pages never
reference the family, so they still download nothing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The preview blocks kept the English continuation indents, which left the arrows
hanging mid-label once the labels were translated. Hangul renders double-width
in the monospace stack, so pad each continuation line to the cell width of its
Korean prefix instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Detect changed Markdown sources and locale registry updates after pushes to main,
run the repository-local localization skill through Copilot CLI for existing
locales, validate its output paths and the site, then open a review pull request.

Use the built-in Actions token with Copilot request permission, pin the CLI and
actions, and restrict approved shell commands so the localization agent cannot
commit or push directly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pinning the CLI to a release would strand the workflow on an old build, and
GITHUB_TOKEN authentication requires a recent version. Install the current
release instead so the job keeps working as the CLI evolves.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
All 47 translated documents now have their English sources committed, so
record the current commit as each entry's source baseline instead of the
stale commit and the null placeholder on README.md. Content fingerprints
are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reflect the shortened English README language-support section in the Korean
translation and refresh its source and localized content fingerprints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The README source and its Korean localization are now committed, so replace
the temporary null source baseline with the exact source commit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refresh the README localized_sha256 value to match the committed Korean
translation after line-ending normalization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 00:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Pending translations can be lost; output validation, locale navigation, links, and sample execution guidance also require fixes.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 11 Low severity

Open (13)
What changed in this PR

Adds Korean localization for 47 workshop documents, locale-aware site controls and navigation, Korean typography, and localization automation.

Changes:

  • Adds Korean lessons, starter guides, sample documentation, and live-demo guides.
  • Localizes site UI and introduces Korean prose and code fonts.
  • Adds synchronization tooling, localization rules, and deployment validation.
File Changes Final findings
scripts/​validate_workshop.py Updates localized UI checks. —
scripts/​validate_deployment.py Checks deployed localized content. —
scripts/​check_localization_updates.py Detects source changes and validates generated outputs. L86 — moderate, 2 votes: Filename-only registry allowance permits changes beyond existing non-English strings.
README.md Documents Korean localization support. —
localizations/​ko-kr/​workshop/​museum-09-complete.md Adds Korean museum completion guidance. —
localizations/​ko-kr/​workshop/​museum-00-preflight.md Adds Korean museum setup guidance. L258 — moderate, 2 votes: Relative lesson link bypasses the viewer and loses locale/programming-language context.
localizations/​ko-kr/​workshop/​intro-04-wrap-up.md Adds Korean SDK 101 wrap-up. —
localizations/​ko-kr/​workshop/​intro-03-podcast-agent.md Adds Korean podcast-agent lesson. —
localizations/​ko-kr/​workshop/​intro-02-hello-world.md Adds Korean Hello World lesson. —
localizations/​ko-kr/​workshop/​intro-01-sdk-basics.md Adds Korean SDK fundamentals. —
localizations/​ko-kr/​workshop/​intro-00-preflight.md Adds Korean introductory setup. —
localizations/​ko-kr/​workshop/​10-complete.md Adds Korean accessibility completion guidance. —
localizations/​ko-kr/​start-museum/​README.md Adds Korean museum starter overview. L19 — moderate, 1 vote: Preflight link opens English despite an available Korean counterpart.
localizations/​ko-kr/​start-intro/​rust/​README.md Adds Korean Rust starter guidance. —
localizations/​ko-kr/​start-intro/​rust/​LIVE_DEMO.md Adds Korean Rust demo guide. L76 — nit, 4 votes: Placeholder, import, authentication, and cleanup instructions remain untranslated or mixed-language.
L1 — nit, 2 votes: Title duplicates the language name.
localizations/​ko-kr/​start-intro/​README.md Adds Korean introductory starter overview. L16 — moderate, 1 vote: Preflight and demo-guide links escape to English originals.
localizations/​ko-kr/​start-intro/​python/​README.md Adds Korean Python starter guidance. —
localizations/​ko-kr/​start-intro/​python/​LIVE_DEMO.md Adds Korean Python demo guide. L75 — nit, 4 votes: Replacement-range, import, and cleanup instructions remain untranslated or mixed-language.
L1 — nit, 2 votes: Title duplicates the language name.
localizations/​ko-kr/​start-intro/​nodejs/​README.md Adds Korean Node.js starter guidance. —
localizations/​ko-kr/​start-intro/​nodejs/​LIVE_DEMO.md Adds Korean Node.js demo guide. L73 — nit, 4 votes: Essential editing and timeout/cleanup guidance remains untranslated.
L1 — nit, 2 votes: Title duplicates the language name.
localizations/​ko-kr/​start-intro/​java/​README.md Adds Korean Java starter guidance. —
localizations/​ko-kr/​start-intro/​java/​LIVE_DEMO.md Adds Korean Java demo guide. L96 — nit, 4 votes: Placeholder, guard, import, resource, and prompt instructions remain untranslated or mixed-language.
L1 — nit, 2 votes: Title duplicates the language name.
localizations/​ko-kr/​start-intro/​go/​README.md Adds Korean Go starter guidance. —
localizations/​ko-kr/​start-intro/​go/​LIVE_DEMO.md Adds Korean Go demo guide. L75 — nit, 4 votes: Import, placeholder, prompt, and permission instructions remain untranslated or mixed-language.
L1 — nit, 2 votes: Title duplicates the language name.
localizations/​ko-kr/​start-intro/​dotnet/​README.md Adds Korean .NET starter guidance. —
localizations/​ko-kr/​start-intro/​dotnet/​LIVE_DEMO.md Adds Korean .NET demo guide. L81 — nit, 4 votes: Essential event-handling, cleanup, and editing guidance remains untranslated or mixed-language.
localizations/​ko-kr/​start-accessibility/​README.md Adds Korean accessibility starter overview. L30 — moderate, 1 vote: Hub link returns readers to English rather than the Korean overview.
localizations/​ko-kr/​README.md Adds Korean workshop overview. L3 — moderate, 1 vote: Workshop URL uses github.github.com instead of github.github.io.
L8 — moderate, 1 vote: Starter link escapes to English.
L128 — moderate, 1 vote: Second starter link also escapes to English.
localizations/​ko-kr/​finished/​rust/​museum-exhibit-studio/​README.md Adds Korean Rust sample documentation. —
localizations/​ko-kr/​finished/​python/​museum-exhibit-studio/​README.md Adds Korean Python sample documentation. L14 — moderate, 1 vote: Commands target the documentation-only directory, which lacks the Python project.
localizations/​ko-kr/​finished/​nodejs/​museum-exhibit-studio/​README.md Adds Korean Node.js sample documentation. —
localizations/​ko-kr/​finished/​java/​museum-exhibit-studio/​README.md Adds Korean Java sample documentation. L11 — moderate, 1 vote: Execution and compilation instructions target a directory without the Maven project.
localizations/​ko-kr/​finished/​go/​museum-exhibit-studio/​README.md Adds Korean Go sample documentation. L14 — moderate, 1 vote: Run/build instructions target the documentation-only directory rather than the Go project.
localizations/​ko-kr/​finished/​dotnet/​museum-exhibit-studio/​README.md Adds Korean .NET sample documentation. —
docs/​theme-toggle.js Localizes theme controls. —
docs/​tests/​workshop-site.test.js Tests locale-aware behavior. —
docs/​styles.css Styles locale controls. —
docs/​markdown-language-preprocessor.js Supports localized demo headings. —
docs/​language-navigation.js Propagates locale selection. —
docs/​korean-typography.css Defines Korean font stacks. —
docs/​index.html Adds locale controls and localization hooks. —
docs/​homepage.js Applies localized homepage text and navigation. L224 — moderate, 1 vote: Explicit English selection is not persisted, so Start navigation can revert to saved Korean.
L148 — nit, 1 vote: Runtime setup notes remain English when Korean is selected.
docs/​fonts/​LICENSE-D2Coding.txt Includes the D2Coding font license. —
.github/​workflows/​localization-sync.yml Automates translation updates and review PRs. L75 — critical, 2 votes: Recreating the shared branch from each push can discard pending translations from earlier pushes.
.github/​workflows/​deploy.yml Publishes localized lessons and guides. —
.github/​skills/​localizations/​thumbnail.svg Adds localization skill artwork. —
.github/​skills/​localizations/​SKILL.md Defines translation and baseline procedures. —
.github/​skills/​localizations/​rules/​zh-cn.md Adds Simplified Chinese evaluation rules. —
.github/​skills/​localizations/​rules/​pt-br.md Adds Brazilian Portuguese evaluation rules. —
.github/​skills/​localizations/​rules/​ko-kr.md Adds Korean evaluation rules. —
.github/​skills/​localizations/​rules/​ja-jp.md Adds Japanese evaluation rules. —
.github/​skills/​localizations/​rules/​es-es.md Adds Spanish evaluation rules. —
.github/​skills/​localizations/​README.md Documents skill installation and usage. L20 — nit, 1 vote: Installation-guide relative link resolves to a nonexistent repository path.
.github/​skills/​localizations/​plugin.json Declares localization plugin metadata. —

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/localization-sync.yml
Comment thread localizations/ko-kr/workshop/museum-00-preflight.md Outdated
Comment thread localizations/ko-kr/start-intro/dotnet/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/go/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/go/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/nodejs/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/python/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/python/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/rust/LIVE_DEMO.md Outdated
Comment thread localizations/ko-kr/start-intro/rust/LIVE_DEMO.md Outdated
justinyoo and others added 4 commits October 5, 2026 09:39
The lesson viewer now resolves its UI strings through WorkshopLocales, but
the completion test harness still built its VM context from the pre-locale
globals, so every viewer run threw ReferenceError: WorkshopLocales is not
defined. Expose the locale registry and add the documentElement the viewer
sets lang on.

Also restore the line break that was lost where the invalid-language page is
constructed in the site tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The synchronization workflow lacks isolation between agent-controlled output, repository-write credentials, and trusted validation.

Review effort: Balanced
Findings: 2 High severity · 1 Low severity

Open (3)
Resolved since last review (13)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Persist explicit locale selection across navigation

docs/​homepage.js:225

With Korean saved in local storage, opening the homepage with ?locale=en displays English but leaves the stored locale as Korean. The start link omits the default locale, so the lesson then reads the saved preference and switches back to Korean. Persist the initially resolved locale, as the homepage already does for the initial programming language, so the explicit English choice survives navigation.

Low severity Direct Go commands to the canonical sample directory

localizations/​ko-kr/​finished/​go/​museum-exhibit-studio/​README.md:14

“This directory” now refers to the localized README directory, which contains documentation but no Go project. Running go run . there fails. Explicitly direct readers to the canonical sample directory before these commands.

Low severity Direct Java commands to the canonical sample directory

localizations/​ko-kr/​finished/​java/​museum-exhibit-studio/​README.md:11

The localized directory contains only documentation, not mvnw or the Java project, so running the following command in “this directory” fails. Add an explicit change to the canonical sample directory.

Low severity Direct Python setup to the canonical project directory

localizations/​ko-kr/​finished/​python/​museum-exhibit-studio/​README.md:14

The localized README directory has neither requirements.txt nor main.py. Following this instruction creates a virtual environment there, then fails to install or run the sample. Specify the canonical Python project directory before creating the environment.

Comment thread .github/workflows/localization-sync.yml
Comment thread .github/workflows/localization-sync.yml
Comment thread localizations/ko-kr/start-intro/dotnet/LIVE_DEMO.md Outdated
justinyoo and others added 2 commits October 5, 2026 11:19
Update session creation instructions in LIVE_DEMO.md.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Generated JavaScript can execute during validation before its contents are restricted to permitted localization data.

Review effort: Balanced
Findings: None

Resolved since last review (3)
Previously missed (7)

In code that hasn't changed since last review

Medium severity Allow partial localized content during deployment

.github/​workflows/​deploy.yml:44

These copies require every locale to contain workshop lessons and all six LIVE_DEMO guides. A README-only locale leaves the lesson glob unmatched, and a missing guide makes its cp fail; either stops the entire Pages deployment. This conflicts with fetchLocalizedMarkdown explicitly supporting missing translations through English fallback. Copy only existing localized lessons and guides so partial locales remain deployable.

Medium severity Persist resolved locale before constructing navigation links

docs/​homepage.js:225

With Korean saved in local storage, opening the hub with ?locale=en displays English but leaves the saved locale unchanged. The Start link omits the default locale, so the lesson resolves the old ko-kr preference and switches back to Korean. Persist the resolved initial locale before constructing navigation links, as initialization already does for the programming language.

Medium severity Use non-reserved names for modified D2Coding subsets

docs/​korean-typography.css:23

The file describes these fonts as glyph subsets, which makes them modified versions under the included OFL license. LICENSE-D2Coding.txt reserves D2Coding and D2Coding-Bold, and clause 3 requires written permission to use those names for modified versions. Both declarations expose the subsets as D2Coding. Use a non-reserved family name for the subsets and any corresponding embedded font names, or document permission from the copyright holder; an unmodified upstream font is another option.

Low severity Run Go commands from the canonical sample directory

localizations/​ko-kr/​finished/​go/​museum-exhibit-studio/​README.md:14

The localized directory contains only this README, not the Go project. Running go run . here fails, and the later build command also targets the wrong directory. Specify the canonical sample directory as the working directory.

Low severity Run Maven commands from the canonical Java sample directory

localizations/​ko-kr/​finished/​java/​museum-exhibit-studio/​README.md:11

This localized directory contains only the README, with no mvnw or Maven project. Both documented ./mvnw commands fail when run “in this directory.” Tell readers to enter the canonical Java sample directory first.

Low severity Point setup commands to the canonical sample directory

localizations/​ko-kr/​finished/​python/​museum-exhibit-studio/​README.md:14

“This directory” now refers to the localized directory, which contains only this README. Following these commands there creates a virtual environment but then fails because requirements.txt and main.py are in the canonical sample directory. Direct readers to that directory first.

Low severity Keep LIVE_DEMO links within each localized documentation tree

localizations/​ko-kr/​start-intro/​README.md:14

These LIVE_DEMO links escape the Korean tree even though all six translated guides exist. The same issue occurs in each language's starter README, this README's lesson links at lines 26–27, and the museum starter README's preflight link. Readers following Korean setup instructions are sent back to English. Use <language>/LIVE_DEMO.md in this table, LIVE_DEMO.md in each language README, and ../workshop/<lesson>.md for the affected lesson links.

@jamesmontemagno
jamesmontemagno merged commit 15ccc5a into github:main Oct 5, 2026
8 checks passed
@justinyoo
justinyoo deleted the justinyoo-localize-korean-docs branch October 5, 2026 16:17
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.

3 participants