Lumaktaw sa pangunahing nilalaman

Sanggunian ng CLI

Mga Command

champollion init Interactive setup wizard (--yes for quick defaults)
champollion sync Translate & sync all locale files
champollion watch Auto-sync when the source file changes
champollion audit List all untranslated [EN] fallback values
champollion lint Scan source code for hardcoded strings
champollion wrap Auto-wrap hardcoded strings in t() calls (with undo)
champollion seo <sub> Generate hreflang, sitemap.xml, or JSON-LD schema
champollion integrity Audit locale files for format/encoding issues
champollion verify Verify translations are present and correct (CI gate)
champollion status Show pair configuration, plugins, and quality tiers
champollion provenance Audit translation resource licensing
champollion plugin <sub> Manage method plugins (install, remove, list)
champollion fonts <sub> Download web fonts for PUA script converters
champollion leaderboard Browse and install methods from the MT Eval Arena leaderboard
champollion tm <sub> Manage Translation Memory cache (stats, clear)
champollion xliff <sub> Export/import XLIFF 1.2 for professional review

Patakbuhin ang champollion <command> --help para sa detalyadong tulong sa anumang command.

Mga Global Option

--help, -h Show help (global or per-command)
--version, -v Print version and exit
--yes, -y Skip interactive prompts, use defaults
--config <path> Custom config file path
--dir <path> Override locales directory
--content-dir <path> Hugo/Docusaurus content directory for Markdown translation
--source <code> Override source locale (default: en)
--model <model> Override translation model (full slug or alias from shared/model-aliases.json)
--method <method> Translation method: llm, google-translate (default: from config)
--temperature <n> LLM temperature (0.0–2.0, default: 0.3)
--coaching-file <path> Path to free-text coaching prompt file (injected into system prompt)
--format <fmt> Locale file format: json, toml, yaml, or auto
--dry, --dry-run Preview changes without writing files
--concurrency <n> Max parallel API calls (sets both JSON and content, default: 48)
--json-concurrency <n> Max parallel locale translations for JSON keys (default: 200)
--content-concurrency <n> Max parallel API calls for content translation (default: 48)
--force-content Re-translate all content files (clears content lock)
--force-keys <keys> Comma-separated dot-notation keys to force re-translate
--no-tm Skip Translation Memory cache for this sync run
--no-verify Skip post-sync verification pass
--locale <code> Target locale (xliff export, tm clear)
--quiet Errors and warnings only — suppress banner, progress bar, and info lines
--json Machine-readable NDJSON output — one JSON object per event

init

Interactive setup wizard na lumilikha ng champollion.config.json. Ginagabayan kayo sa source locale, target languages, file format, at translation model.

champollion init # interactive wizard
champollion init --yes # skip wizard, use defaults
champollion init --yes --langs fr,de,ja # quick setup with specific languages
champollion init --source en --dir ./i18n # overrides with defaults

Opsyong --langs: Listahan ng target language codes na pinaghihiwalay ng kuwit. Nilalaktawan ang language prompt at inilalapat ang default register presets para sa bawat wika. Isama sa --yes para sa ganap na non-interactive setup.

Language presets: Kapag hiniling ang target languages, maaari ninyong i-type ang preset names:

  • european → fr, de, es, it, pt, nl
  • asian → ja, zh, ko
  • global → fr, es, de, ja, zh, ko, pt, ar
  • nordic → da, fi, nb, sv

Paghaluin ang presets at indibidwal na codes: european, ja → fr, de, es, it, pt, nl, ja


sync

Isinasalin ang nawawala at stale na keys sa lahat ng locale files. Pinapatakbo ang post-sync verification bilang default.

champollion sync # translate everything
champollion sync --dry-run # preview only
champollion sync --force-keys "hero.title" # force re-translate
champollion sync --force-keys "a.title,a.subtitle" # multiple keys
champollion sync --force-content # re-translate all Markdown/MDX
champollion sync --content-dir ./content # include Hugo Markdown
champollion sync --method google-translate # force Google Translate
champollion sync --concurrency 20 # 20 parallel API calls (both phases)
champollion sync --json-concurrency 30 # 30 parallel locale translations (JSON)
champollion sync --content-concurrency 8 # 8 parallel content translations
champollion sync --no-verify # skip post-sync verification
champollion sync --no-tm # skip cache, fresh API calls

Translation Memory: Bilang default, nilo-load ng sync ang .champollion/tm.json at naghahatid ng cached translations para sa hindi nabagong source values. Gamitin ang --no-tm upang laktawan ang cache (kapaki-pakinabang kapag nagpapalit ng translation providers o nagde-debug ng quality). Tingnan ang Translation Memory.

Change detection: Nag-iimbak ang champollion ng SHA-256 hashes sa .champollion.lock. Kapag nagbago ang source values, awtomatikong muling isinasalin ng susunod na sync ang mga key na iyon. I-commit ang lock file upang pare-pareho ang baseline ng lahat ng developer.

Parallelism: Parehong tumatakbo nang parallel ang JSON key translation at content translation. Sabay-sabay na isinasalin ang JSON locales (default: 200 concurrent locales), at naka-parallel din ang batches sa loob ng bawat locale (4 concurrent batches). Tumatakbo ang content translation (Markdown, MDX, blog posts) sa isang flat work-item pool (default: 48 concurrent API calls). I-override gamit ang --json-concurrency, --content-concurrency, o --concurrency (itinatakda ang pareho).

Output: Nagpapakita ang Sync ng version banner, format/framework detection, cost estimate, at per-locale progress bars:

champollion v0.1.0

[INFO] Detected format: json (auto)
[INFO] Source: en.json (2,847 keys)
[INFO] Pairs: es-MX:llm, fr:deepl

[INFO] es-MX.json — 2,847 missing
████████████████████████████████ 2,847/2,847 keys
[INFO] fr.json — 2,847 missing
████████████████████████████████ 2,847/2,847 keys
[OK] Synced 5,694 keys total.

Nag-a-update in-place ang progress bars pagkatapos ng bawat batch (~80 keys). Gamitin ang --quiet para sa errors/warnings lamang, o --json para sa machine-readable NDJSON output. Parehong sine-suppress ng mga ito ang progress bar at banner.


watch

Auto-sync kapag nagbago ang source locale file. Tumatakbo hanggang ihinto gamit ang Ctrl+C.

champollion watch

audit

Inililista ang lahat ng hindi naisaling [EN]-prefixed fallback values mula sa mga nakaraang run. Lumalabas na may code 1 kung may matagpuan — gamitin bilang CI gate upang ipa-fail ang builds na may hindi kumpletong translations.

champollion audit

verify

Muling binabasa ang lahat ng locale files mula sa disk at bine-verify na talagang naroroon at tama ang translations. Ito ang parehong verification na awtomatikong tumatakbo sa dulo ng bawat sync (maliban kung ipinasa ang --no-verify).

champollion verify # verify all locale files
champollion verify --warn-only # non-blocking
champollion verify && echo "All good" # CI gate

Ang sinusuri nito:

  • Key parity — naroroon ang lahat ng source keys sa bawat target
  • [EN] fallback markers mula sa mga nakaraang run
  • Empty translations
  • Script compliance — dapat may non-ASCII translations ang non-Latin locales
  • Placeholder preservation — tumutugma sa source ang ICU placeholders
  • Encoding issues — BOM markers, invisible characters
  • Source echoes — values na identical sa source (warning)

lint

Ini-scan ang source code para sa hardcoded user-facing strings na dapat gumamit ng i18n translation calls. Awtomatikong dini-detect ang inyong framework (next-intl, react-i18next, vue-i18n, Hugo).

champollion lint # exits 1 if issues found
champollion lint --warn-only # always exits 0
champollion lint --src ./app # custom source directory
champollion lint --min-length 4 # minimum string length to flag

Ang dini-detect nito:

  • Hardcoded strings sa JSX text, placeholder, alt, aria-label, title
  • Files na may user-facing content ngunit walang i18n framework import
  • Dead keys — locale keys na walang source file na nagre-reference
  • Coverage score — porsiyento ng strings na dumaraan sa i18n

Exclusions: Gumawa ng .champollionignore sa project root ninyo (glob patterns, tulad ng .gitignore).


wrap

Awtomatikong niwa-wrap ang hardcoded strings na na-detect ng lint sa t() calls. Lumilikha ng automatic backups bago baguhin ang files.

champollion wrap # auto-wrap with backup
champollion wrap --dry # preview wrapping changes
champollion wrap --undo # restore from .champollion-backup/

Safety gates:

  1. Git-clean check (nilalaktawan sa dry-run)
  2. Automatic backup sa .champollion-backup/
  3. Diff preview bago ang bawat file write
  4. Suporta sa --undo upang mag-restore mula sa backup

seo

Bumuo ng SEO artifacts para sa multilingual sites.

champollion seo hreflang # print hreflang tags
champollion seo sitemap --base-url https://example.com --out sitemap.xml
champollion seo jsonld --base-url https://example.com # JSON-LD schema
SubcommandOutput
hreflang<link rel="alternate" hreflang> tags
sitemapMultilingual sitemap.xml
jsonldJSON-LD WebSite language schema

integrity

Nadi-detect ang corruption at drift sa translated locale files.

champollion integrity # exits 1 if issues found
champollion integrity --warn-only # non-blocking

Ang sinusuri nito:

  • Placeholder corruption (hal., naroroon sa source ang {name} ngunit nawawala sa target)
  • Encoding issues (mojibake, invalid Unicode)
  • Untranslated copies (target value na identical sa source)
  • Orphaned keys (keys sa target na wala sa source)
  • ICU MessageFormat plural category completeness (hal., nangangailangan ang Arabic ng 6 categories)

tm

Pamahalaan ang Translation Memory cache (.champollion/tm.json). Nag-iimbak ang TM ng mga nakaraang translation at inihahatid ang mga ito sa mga susunod na sync sa halip na tumawag sa API.

champollion tm stats # show cache statistics
champollion tm clear # clear cache (with confirmation)
champollion tm clear --yes # clear without confirmation
champollion tm clear --locale fr # clear only French entries
SubcommandOutput
statsBilang ng entries, laki ng file, breakdown bawat locale
clearBurahin ang cache file (buo o bawat locale)
OptionEpekto
--locale <code>I-clear lamang ang entries para sa isang locale
--yesLaktawan ang confirmation prompt

Tingnan ang Translation Memory para sa kung paano gumagana ang TM at kung kailan ito dapat i-clear.


xliff

Mag-export at mag-import ng XLIFF 1.2 files para sa pagsusuri ng professional translators. Ang XLIFF ang universal exchange format na sinusuportahan ng CAT tools tulad ng memoQ, SDL Trados, at Phrase.

champollion xliff export --locale fr # export French XLIFF
champollion xliff export --locale ja --out ./review/ # custom output path
champollion xliff import .champollion/xliff/fr.xliff # import reviewed file
champollion xliff import ./reviewed.xliff --dry # preview import
SubcommandOutput
exportBumuo ng .xliff mula sa source + target locale files
importI-merge ang nasuring .xliff translations sa locale files
OptionEpekto
--locale <code>Target locale para sa export (kinakailangan)
--out <path>Custom output path o directory
--dryI-preview ang import nang walang pagsusulat

Tingnan ang Paggawa kasama ang Professional Translators para sa buong workflow.


status

Ipakita ang pair configuration, installed plugins, quality tiers, at benchmark scores.

champollion status

provenance

I-audit ang translation resource licensing para sa lahat ng installed plugins.

champollion provenance

plugin

Pamahalaan ang translation method plugins. Ang plugins ay mga naka-package nang translation recipes na naka-install sa .champollion/methods/.

champollion plugin list # show installed plugins
champollion plugin install ./my-method/ # install from local directory
champollion plugin remove crk-coached-v1 # remove a plugin

Tingnan ang Plugin Specification para sa plugin manifest format.


leaderboard

Mag-browse, maghanap, at mag-install ng translation methods mula sa MT Eval Arena leaderboard. Ang methods na naka-install mula sa leaderboard ay may kasamang benchmark scores at buong canonical MethodConfig — ang eksaktong configuration na ginamit sa evaluation.

champollion leaderboard # show leaderboard
champollion leaderboard --pair en:fr # filter by language pair
champollion leaderboard --install crk-coached-v8 # install a method plugin
champollion leaderboard --install crk-coached-v8 --apply # install + patch config
OptionEpekto
--pair <code>I-filter ang leaderboard ayon sa language pair (hal., en:fr)
--install <name>Mag-install ng method plugin mula sa leaderboard
--applyPagkatapos ng install, awtomatikong idagdag ang methodPlugin sa champollion.config.json

--apply workflow: Kapag nag-install kayo gamit ang --apply, isinusulat ng champollion ang method plugin sa .champollion/methods/ at pine-patch ang inyong champollion.config.json upang gamitin ito para sa kaugnay na pair. Ito ang pinakamabilis na landas mula sa "ano ang may pinakamataas na score?" patungo sa "ginagamit ko na ito sa production."


fonts

Nagda-download at namamahala ng PUA web fonts para sa constructed language script converters. Ang mga wikang gumagamit ng Private Use Area characters (Klingon, Sindarin, Kryptonian) ay nangangailangan ng custom web fonts upang ma-render ang kanilang scripts. Dina-download ng command na ito ang mga iyon mula sa verified open-source repositories.

champollion fonts list # show needed fonts
champollion fonts install # download all needed fonts
champollion fonts install --css # also generate CSS snippet
champollion fonts install --dir ./public/fonts # custom output directory
SubcommandOutput
listIpinapakita kung aling PUA fonts ang kinakailangan at ang kanilang install status
installNagda-download ng fonts para sa configured languages
OptionEpekto
--dir <path>I-override ang font output directory (auto-detected mula sa project type)
--cssBumuo ng conlang-fonts.css snippet kasama ng fonts
--config <path>Path papunta sa config file (ginagamit upang i-detect kung aling languages ang nangangailangan ng fonts)

Auto-detection: Ini-infer ang output directory mula sa structure ng inyong project:

  • Docusaurusstatic/fonts/ o website/static/fonts/
  • Hugostatic/fonts/
  • Defaultpublic/fonts/

Native Unicode converters (crk → Cree Syllabics, sr → Serbian Cyrillic) ay HINDI nangangailangan ng font installation.

Tingnan ang Conlangs, Scripts & Orthography para sa buong detalye ng PUA font.

Three-Layer Pipeline

Gamitin nang magkakasama ang lint, sync, at audit para sa lubos na maaasahang i18n:

package.json
{
"scripts": {
"i18n:lint": "champollion lint",
"i18n:sync": "champollion sync",
"i18n:audit": "champollion audit"
}
}
LayerCommandKailanLayunin
LintlintPre-commitI-block ang commits na may hardcoded strings
SyncsyncPost-commit / CIIsalin ang nawawala at nabagong keys
VerifyverifyPost-sync / CIKumpirmahin na naroroon at tama ang translations
AuditauditBuild stepIpa-fail ang deployment kung may locale na may [EN] markers

Tingnan Din