Sync Translations
You are auditing and synchronizing the bilingual GramIO documentation.
Steps
- •
List all English pages:
- •Use Glob to find all
docs/**/*.mdfiles (excludingdocs/ru/).
- •Use Glob to find all
- •
List all Russian pages:
- •Use Glob to find all
docs/ru/**/*.mdfiles.
- •Use Glob to find all
- •
Find missing Russian pages:
- •For each English page
docs/{path}.md, check ifdocs/ru/{path}.mdexists. - •Collect all missing pages.
- •For each English page
- •
Find outdated translations:
- •For pages that exist in both languages, compare modification times using
ls -laorstat. - •Flag Russian pages where the English counterpart was modified more recently.
- •For pages that exist in both languages, compare modification times using
- •
Report findings:
- •Print a summary table with:
- •Missing Russian pages (no counterpart exists)
- •Outdated Russian pages (EN modified after RU)
- •Counts and percentages
- •Print a summary table with:
- •
Translate missing pages:
- •Ask the user if they want to translate the missing pages.
- •If yes, for each missing page read
docs/{path}.mdand create a full Russian translation atdocs/ru/{path}.md:- •Translate frontmatter (
title,description,keywords) to Russian. - •Translate all body content to Russian.
- •Preserve code blocks, twoslash annotations, and markdown structure exactly.
- •Translate frontmatter (
- •Also check if the missing pages need sidebar registration in
ru.locale.ts.
- •
Summary: Report how many pages were translated and what manual steps remain (sidebar registration, review).