VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Translate Like a Pro | 8560 — TypeScript CAC CLI Localization, Command Options, Generated Help, Unknown Flags and Release QA

TypeScript CAC command-line localization begins with a simple distinction: command words and option syntax are executable grammar, while the descriptions surrounding them exist to help people act correctly. This practical TypeScript CAC localization guide explains how to translate command-line help, configuration guidance and error recovery without altering the program’s grammar. It focuses on real search needs: making TypeScript CAC help understandable, avoiding translated flags that fail, and checking multilingual command-line releases systematically.

A designer in Portugal follows the build command, a contributor in Japan reads –help, and a CI pipeline in Canada runs the very same flags without a human present. A successful multilingual design must satisfy all three contexts. The recurring problem is the boundary between what a person should understand and what software must recognize. A translation may look elegant while copying its examples produces a rejected option, a wrong path or an unintended side effect. We will use MapForge, a fictional CLI that converts route sketches into standardized map exports as a fictional, concrete teaching case and keep every implementation decision tied to a test.

You will learn how cac(), cli.command(), command.option(), command.action(), cli.help(), cli.parse(), required and optional arguments, camelCase option access and command-scoped validation affect localization, which texts may safely vary, how to review error paths, what to test in multilingual terminals and how to prepare a release that remains compatible with automation. The guide has a quick answer, a carefully separated code example, progressive technical chapters, diagnostic investigations, a language and platform test plan, frequently asked questions and practical next steps. Its scope is TypeScript CAC, not general language theory or unrelated translation software.

Quick answer: translate the explanation without silently changing the command

  • Treat every copyable command as a test case rather than as prose.
  • Write for a reader who has never learned the original English help text.
  • Protect parser identifiers, flag spellings, subcommand tokens and returned data keys.
  • Translate descriptions, warnings, prompts and recovery guidance when the application controls them.
  • Use genuine samples that readers can execute in a safe test folder.
  • Test a successful path, help, an invalid invocation and Unicode filenames.
  • Measure terminal formatting at narrow widths and check screen-reader readability.
  • Document the installed package version and release limitations.

For MapForge, a fictional CLI that converts route sketches into standardized map exports, a useful early test is not whether every sentence is fluent. Ask a reader to choose an operation, predict what files it will affect, copy the published command, and explain what the result means. Compare that observed behavior with an English-language control run of the same binary. Only then refine rhythm, terminology and tone.

Chapter 1 — First principles: a multilingual CLI has two simultaneous readers

CAC derives behavior from command patterns and option definitions. It is neither a general translation catalog nor a complete user-interface framework; localization must surround the parser contract rather than rewrite it. A human sees lines on a screen and makes choices based on them. A program consumes tokens, types, state and paths. If one sentence describes an option incorrectly, the human can select a command that the parser never intended. That is why translation quality includes practical software validation, not just bilingual review. In a world-facing product, the same error can be magnified by automated documentation, tutorials and copied snippets.

Keep command literals, –long-flags, short aliases, argument placeholders where parser-significant, and internal option property names stable. Localize descriptions, examples’ explanatory prose and app-controlled diagnostic guidance. The most important design decision is to write down the boundary before extracting the first phrase. An argument called –config is not the English word "configuration" merely because it resembles one; its leading dashes make it a named input that scripts may depend on. A descriptive phrase such as "load a configuration file" can be translated freely, because it explains the token rather than constituting it.

Use a four-column inventory: visible source text, purpose, whether it is parser-significant, and the owner of the change. Classify headings, commands, values, errors, examples, help output and machine-readable records separately. When a string is both visible and executable, such as a command label, maintainers must consciously choose whether to keep a language-neutral token or introduce aliases with backward compatibility. Neither option is obtained by changing a translation file alone.

For a JavaScript or TypeScript maintainer shipping a command-line utility to international teams, the practical outcome is a clear distinction between readability and compatibility. A localized interface can feel natural even when a command literal remains in English, provided it is presented as an exact token and paired with a useful explanation. The reader should never have to guess which part of an example is something to type and which part is instructional commentary.

Chapter 2 — A small executable example with a strict translation boundary

The following code is an illustrative starting point for the documented public API of TypeScript CAC. Install and lock the actual package version used by your project, then run it on a disposable fixture before adapting it. The example is not a full application and intentionally does not invent built-in locale selection: the surrounding application can choose translated descriptions while preserving the declared inputs.

import cac from "cac";

const cli = cac("mapforge");
cli.command("build <source>", "Build a map export from a source file")
  .option("--format <kind>", "Output format")
  .action((source, options) => {
    console.log({ source, format: options.format });
  });
cli.help();
cli.parse();

Notice the difference between the identifiers in the code and the English phrases the person reads. The identifiers have a direct relationship to parsing and downstream code. The English descriptions are candidates for a locale-specific resource. If a user asks for German or Japanese help, it is reasonable to construct equivalent descriptions in that language; it is not reasonable to assume the parser begins recognizing new command names without changing and testing its command declarations.

Extract command descriptions and option-help sentences into a locale table, leave declarations and callback names intact, then run a golden set of argv arrays through each localized build. The translation layer should be narrow enough to debug. If a parser fails before application code has selected a locale, explain what localization control the application actually has and what remains owned by the dependency. A guide earns trust by naming that limitation rather than pretending that every third-party parser error can be translated with an invented switch.

Chapter 3 — A complete work path: from one source command to a multilingual release

Begin with the installed tool rather than a translated screen mockup. Save a real help transcript, a valid command with a known output, a missing-value case and an unknown-flag case. Create a disposable workspace; then make one locale variant, keeping command definitions identical. A native-language reviewer should know exactly what to type and why, and a developer should be able to prove that the parser and the application’s outputs have not changed unintentionally.

Next, choose a real language fallback policy. A partial translation is common in an early release. Define whether the fallback is English, whether missing resources produce an explicit marker in development, and how defaults behave when no locale is selected. This is an application responsibility unless the dependency specifically documents it. Locale values such as fr-FR and pt-BR identify language preferences; they should not automatically alter internal flag names or configuration keys.

Finally, test your help and examples as one connected product. A screenshot can demonstrate how the text looks, but it cannot show whether a copied command works or a destination file was silently overwritten. For every public tutorial, save the exact command, fixture, expected file diff, expected status and any redacted stderr. That record gives translators, testers and maintainers a shared explanation of what the software actually does.

Chapter 4 — Technical decisions and investigations

The following investigations are grouped as progressive teaching cases. Each starts with something a reader can observe, traces the technical reason, proposes a controlled change and names evidence that would justify release. They are not interchangeable with generic translation advice: each case reflects how TypeScript CAC connects visible guidance to execution.

1. Required positional argument

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: The code declares build <source> but a translated tutorial turns the bracketed token into an actual filename. Angle brackets mark a required argument in CAC’s command declaration; a placeholder is not itself a file. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Leave the declaration unchanged and place a genuine example file path after the command in the user’s language guide. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Run without the argument and with a real fixture, verifying the error and callback input. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

2. Optional positional argument

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A command such as preview [source] is described as though the source argument is always mandatory. Square brackets signal optional syntax; misreporting it changes the user’s expectation and can cause avoidable workarounds. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: State what happens with no argument and show a second example with a supplied source. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Capture both invocations and compare which callback parameter values are delivered. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

3. Command literal

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: An editor translates the command word build to a target-language verb in the only runnable example. Command names are recognized by the parser and by scripts; a translation cannot silently create a new alias. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Keep the command token in code font and translate its purpose in plain language beside it. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Paste the documented invocation into the packaged binary and confirm the intended command runs. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

4. Option long name

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A string such as –clear-screen is translated into –limpar-ecra inside a Portuguese article. The literal option may be exposed by other shell scripts and deployment instructions. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Translate the explanatory sentence but keep –clear-screen unless the application intentionally implements a documented alias. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Run both the original accepted flag and an unsupported one to demonstrate the difference. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

5. CamelCase access

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A reviewer sees –clear-screen in help and changes options.clearScreen to options.clear_screen in TypeScript. CAC exposes kebab-case options as camelCase properties; the mapping is a code-level contract. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Teach the explicit relationship between the visible flag and its JavaScript property. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Assert the callback sees options.clearScreen with the expected Boolean result. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

6. Short aliases

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A guide swaps -o for a language’s initial letter without adding that alias in command definitions. Single-letter options are meaningful tokens, often reserved or used elsewhere, and readers may copy them. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Display the shipped alias with the long flag and place translated prose after a separator. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Test the long and short forms separately and compare their parsed values. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

7. Required option values

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: The help says –format <kind> and a translation removes the angle brackets to improve typography. For CAC option definitions, brackets convey whether a value must be supplied, not optional decoration. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Keep the parser declaration syntax unchanged; explain how to choose supported formats below it. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Run –format without a value and confirm a clear error rather than a misleading success. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

8. Optional option values

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A preview option uses square-bracket notation and a guide presents a value as required in every case. Optional-value flags can yield a Boolean-like presence or a value depending on input and library behavior. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Explain both permitted shapes, with examples verified against the installed version. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Capture output for flag absent, present without value, and present with a valid value. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

9. Variadic argument

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A batch command accepts repeated paths but an example joins filenames into one comma-separated string. Shell tokenization and CAC variadic parsing are not the same as a natural-language list. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Show repeated positional tokens as real file arguments, keeping quoted paths with spaces intact. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Assert the callback receives the intended array length and preserves every path. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

10. Global options

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A localized page treats a global verbose option as though it belongs only to one subcommand. Global and command-scoped option registration have different parsing and help presentation consequences. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Explain the scope of each flag, and show exactly where it may appear in commands supported by the installed build. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Run the same flag with two commands and inspect the relevant callback options. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

11. Command-specific options

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: An operator expects –output to work on a different subcommand because both help sections mention an output file. Options registered on a command may be validated only when that command is selected. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Keep examples grouped by command and avoid reusing generic prose where defaults differ. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Exercise each command with its own options and one deliberately misplaced option. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

12. Unknown option rejection

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A local guide suggests a switch invented during translation and CAC rejects it as an unknown option. An unknown flag is a usability problem when documentation is wrong; bypassing validation is usually the wrong response. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Fix the copied example and do not enable allowUnknownOptions simply to hide a translation mistake. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Assert an unknown flag remains rejected while every published example passes. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

13. allowUnknownOptions

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A plugin-oriented subcommand deliberately forwards unknown options downstream, but the page claims all commands reject them. CAC exposes command-level control for allowing unknown options; using it changes the trust boundary. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Limit permissive parsing to the one intended command and document where the forwarded values go. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Test a known flag, a harmless unknown flag and a potentially conflicting flag with the forwarding integration. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

14. Default option value

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A help sentence promises a default path that no longer matches the value defined in option configuration. A default is part of functional behavior; translating it as illustrative prose can misstate output location. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Derive the published default from the registered option or a tested fixture and label it explicitly. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Run with and without the option, and check the chosen destination rather than only reading help. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

15. ignoreOptionDefaultValue

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A command displays a default in help while the application logic wants no implicit parsed value when absent. CAC documents a command setting that can separate displayed default text from parsed option value behavior. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Explain this difference in developer-facing documentation without asserting the two are identical. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Inspect the parsed options object for absent and explicit arguments in the chosen version. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

16. Help ordering

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: Translated descriptions grow long enough that –help output appears as a broken wall of text. Generated help combines fixed names and variable descriptions, making compact sentence design important. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Rewrite descriptions for clarity rather than deleting conditions; reserve detailed narrative for separate documentation. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Snapshot help at narrow and wide widths and ask a native reader to locate a specific command. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

17. Version output

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A product marketing translation puts the localized release name where the machine-readable version number normally appears. Version numbers support incident reports and package compatibility checks, independent of human language. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Preserve semantic version tokens and add translated release context in release notes, not in the version string. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Compare cli version output with package metadata in each locale build. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

18. Errors on stderr

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A translated validation warning is printed to stdout before a JSON response. Human-readable diagnostics and machine output often share a process but should not share an unstructured stream. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Use a stable output policy and test process exit status, output channels and noninteractive invocation. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Pipe stdout to a parser and verify diagnostics cannot corrupt data records. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

19. Unicode source paths

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A route sketch filename includes Korean characters, and the example only tests basic Latin paths. The runtime and filesystem must preserve the bytes and characters passed as positional input. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Create real fixture filenames in at least two scripts and use shell quoting appropriate for each platform. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Verify the callback receives the exact filename and can open the file successfully. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

20. Ambiguous examples

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A translated manual’s command includes an unquoted path with spaces and appears to demonstrate a parser failure. The shell may split the path before CAC sees it, so the visible failure is not always a CAC issue. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Use accurate platform-specific quoting and separate shell rules from command parser rules. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Execute the example verbatim on supported shells and compare positional argument counts. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

21. Automated scripts

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: A team translates –verbose and changes the shell examples used by CI at the same time. Existing pipelines can depend on stable flag spellings even when people want localized explanations. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Keep automation commands versioned and translate surrounding instructions, never silently modify production scripts. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Run representative CI commands with locale variables set to different values and compare output artifacts. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

22. Release regression

In MapForge, a fictional CLI that converts route sketches into standardized map exports, consider this situation: An option is renamed in code but three localized guides still advertise the previous switch. The broken interface is now replicated across every locale instead of staying a single-document error. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Generate a flag inventory and require a help snapshot comparison before translating the next release. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Verify all published usage examples against the package binary and record version and locale in evidence. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

Chapter 5 — A multilingual terminal testing matrix

Run valid and invalid invocations for each registered command, compare resulting callback values and process statuses, then inspect help at narrow widths and on Unicode-capable terminals. For a small international launch, begin with ten representative locales rather than claiming to cover every language. Languages are not merely a stress test for string length: they can expose issues with spacing, display direction, case changes, input methods, font availability and cultural assumptions. Use native review for final wording; machines can establish parser invariants, but they cannot decide whether instructions are respectful or understandable.

  • ar-EG Arabic: check copying from right-to-left prose into an otherwise left-to-right command and confirm digit/flag order
  • de-DE German: check compound descriptions and whether long help options wrap without hiding the important verb
  • es-ES Spanish: check whether option explanations keep the distinction between read-only preview and actual write
  • fr-FR French: check accented filenames, apostrophes and whether failure recovery is unambiguous
  • hi-IN Hindi: check Devanagari input and visually confusable punctuation in a narrow terminal
  • id-ID Indonesian: check concise word choice and whether task names identify the intended file operation
  • ja-JP Japanese: check kanji and kana filenames, half-width/full-width characters and copyable flag spellings
  • pt-BR Brazilian Portuguese: check longer explanations and sample paths with diacritics while preserving default values
  • th-TH Thai: check combining marks and Unicode rendering in help and diagnostic text
  • zh-CN Simplified Chinese: check Chinese path strings and whether technical option names remain visibly separate from explanations

Do not assume a given locale implies a particular script, proficiency level or platform. A Brazilian Portuguese reader may use a US English keyboard; an Arabic reader may run a headless Linux server. Locale selection, terminal encoding, filesystem behavior and shell are distinct variables. Test them separately so the team knows whether a problem belongs to translation, display, operating system or dependency behavior.

Chapter 6 — A four-week implementation and review plan

Week 1: capture the contract

Inventory every command, option, positional argument, output field and app-owned visible string. Install a locked release, collect a baseline help transcript and build a fixture for successful and failed invocations. The deliverable is a classification of translatable prose versus executable identifiers, plus a short list of user tasks the article must teach.

For TypeScript CAC, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 2: create one complete locale

Write translation keys for descriptions and recovery messages. Avoid hidden string concatenation. Apply the locale choice at an explicit boundary, then rerun the same commands with identical fixtures. Have one native reader explain each action before seeing its actual result. Review where translation makes a caution less specific.

For TypeScript CAC, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 3: exercise difficult environments

Add two non-Latin filename tests, one right-to-left help review, a narrow terminal capture, and a headless run with stdout redirected. Exercise every parsing failure represented in the guide and verify that any structured output remains parseable. Use actual build artifacts, not code snippets detached from packaging.

For TypeScript CAC, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 4: release with evidence

Freeze a reviewed glossary, update examples to match the pinned binary, publish a concise version note and keep a rollback copy. Sign off on parser invariants, native-language task success, accessibility, error recovery and release reproducibility. Assign an owner for each unfinished locale rather than hiding incompleteness behind a default translation.

For TypeScript CAC, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Chapter 7 — FAQs for maintainers and translators

Can we translate every command and flag?

Not automatically. Those spellings may be parser tokens consumed by scripts and code. Explain them in the reader’s language; introduce localized aliases only through an intentional compatible software change with tested conflict handling. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Does the package provide automatic locale selection?

Do not assume it does. Check the installed release’s documentation. When localization is application-owned, choose a locale explicitly and pass translated descriptive text at construction time, keeping fallback rules visible. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

How should we deal with a library error that remains in English?

Distinguish the dependency’s diagnostic from the application’s recovery guidance. Record the exact error, avoid unsupported claims about translating internals and provide a localized next step that identifies the rejected input. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Should we translate example file paths?

Paths in runnable commands must refer to real fixtures. You can explain a path in translation and supply an appropriate local fixture, but arbitrary word replacement inside a path may make a copied example fail. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

What about technical words that lack a natural translation?

Use a short definition rather than a fabricated equivalent. Keep the actual flag or key in code type and add an explanation of its purpose and consequence. Consistency matters more than mechanical word-for-word matching. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

How do we test Chinese, Arabic or Hindi help?

Use genuine terminal rendering with representative input, not only browser screenshots. Verify character integrity, wraps, copying, text direction and underlying parser results. Where possible, include a native-language task review. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Can a translation alter exit codes?

It should not unless application behavior is intentionally changed. A diagnostic may be translated while the process status remains useful to scripts. Test success and failure separately and inspect both stdout and stderr. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Is a fluent machine translation enough?

No. It may miss command grammar, units, irreversibility and the difference between data and instructions. Run copyable examples, request a task-focused review and check the actual program output before release. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

What is the best evidence for the article’s correctness?

A locked package version, executable examples, parser-output assertions, expected file effects, captured help, invalid-input recovery and approval from a native-language reviewer are more useful than an unsupported claim that the instructions are clear. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

How do we prevent regressions next month?

Treat the documentation as a tested companion to the CLI. Rerun examples after package upgrades, compare flag inventories and help snapshots, and update translations when the behavior or wording actually changes. In MapForge, a fictional CLI that converts route sketches into standardized map exports, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Chapter 8 — What proficiency looks like

A professional localization is a reliable bridge between the user’s intention and the software’s actual action. The reader can identify which task to choose, distinguish harmless preview from irreversible change, copy a verified command and recover when an input fails. The program continues to recognize the same interface, produce stable data and report problems through channels that human and automated consumers can understand.

The aim for a JavaScript or TypeScript maintainer shipping a command-line utility to international teams is not simply more translated words. It is less guessing, fewer broken examples, safer execution and documentation that remains trustworthy through upgrades. Start with one command, one realistic error and one multilingual test fixture. Then grow deliberately, verifying every promise you put in front of a reader.

Recommended documentation and further reading