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 | 7620 — Crystal OptionParser Localization, Usage Banners, Flags, Unicode and Error QA

Crystal OptionParser localization is the practical work of translating Crystal command-line usage banners, flag descriptions and error guidance while preserving the parser’s actual behavior. Searches for Crystal CLI translation, multilingual OptionParser help and localized invalid_option messages often begin when a compiled command is distributed to international colleagues but still explains every failure in English.

Crystal’s standard-library OptionParser handles flags, options, help formatting and selected error callbacks. It does not automatically turn a language code into translated prose. The programmer must define a catalog, select a locale at the right time, connect human-facing declarations to that catalog and make sure missing or unknown options still behave like genuine failures.

Imagine quartzscan, a fictional tool used by materials inspection teams to check a laboratory materials record. An engineer types quartzscan check sample.json –lang de. German guidance can explain the inspection workflow, but sample IDs, timestamps, instrument readings and JSON keys remain constrained by their source contracts. This guide shows how to make translated Crystal help accurate, useful and safe across compiled releases.

Quick answer: what to translate, what to preserve

Translate the human explanations in Crystal OptionParser: command summaries, option help, expected errors, recovery steps, examples and warnings. Preserve the operational contract: sample IDs, timestamps, instrument readings and JSON keys and every accepted command token unless an explicit versioned change is intended. A language preference is not permission to alter actual application behavior. The strongest multilingual command is the same dependable tool, understood by more people.

  • Identify the message owner across require option_parser, parser.banner, on flag descriptions, separators, invalid_option, missing_option, subcommands and generated help.
  • Choose an explicit locale and fallback before generating help.
  • Keep command names, parsed values, exit codes and machine schemas stable.
  • Test valid commands, invalid commands, Unicode paths, narrow terminals and noninteractive pipelines.
  • Run the packaged release in each supported language with a real user task.

Contents and learning route

  • The difference between translated help and executable syntax
  • A fictional command you can inspect safely
  • Building a message inventory and locale policy
  • 36 implementation and troubleshooting investigations
  • A four-week rollout and maintenance sequence
  • Frequently asked questions and official references

Start with the difference between a person and a parser

The person using quartzscan reads a sentence and forms an expectation. The parser receives exact tokens and either accepts them or rejects them. Those two interfaces share a terminal but perform different jobs. If a sentence says a command will only inspect an input while the code actually writes a changed file, the translation is dangerous even if its grammar is perfect. If the sentence contains a translated switch spelling that the parser does not recognize, it is not useful documentation. Translate meaning faithfully; verify behavior separately.

For materials inspection teams, the central issue is whether the reader can check a laboratory materials record, tell a warning from a successful result, and recover from a plausible mistake. The examples in this guide use a fictional tool, not an existing public service. They are intended to make principles testable without exposing real data or encouraging blind copying into production. An accurate tutorial makes its assumptions visible, particularly when showing a library API that may evolve.

Locale choice needs a written policy. Decide whether an explicit command-line option overrides an application preference, whether an environment variable is honored, which regional variants have reviewed catalogs, and what happens when a translation key is missing. Fallback should be legible rather than silent, but it should not claim full-language support where important paths remain untranslated. Record the intended language alongside test evidence so a support engineer can reproduce what the user actually saw.

A small command example and the message inventory

Consider the illustrative invocation quartzscan check sample.json --lang de. The operation is to check a laboratory materials record. Identify the executable, positional operands, named flags, selected locale, destination files, user-facing result and machine-readable result. Write down a normal success, a missing input, an unknown flag and a domain-invalid file. Record stdout, stderr, exit status and observable side effects for each. This matrix exposes gaps that a screenshot of translated help cannot show.

require "option_parser"
language = "en"
parser = OptionParser.new
parser.banner = "Usage: quartzscan check FILE [options]"
parser.on("--lang=CODE", "Language for help text") { |v| language = v }
parser.on("-h", "--help", "Show command help") { puts parser; exit }
parser.invalid_option { |flag| STDERR.puts "Unknown option: #{flag}"; exit(64) }
parser.parse(ARGV)
# Illustrative only; add catalog lookup and real command validation.

This is a teaching skeleton, not a production-ready translated tool. Check the exact APIs and examples against the pinned Crystal compiler and standard-library release. The library boundary matters: Crystal’s OptionParser knows how to parse named flags and assemble help from programmer-supplied declarations. It is not an end-to-end locale catalog. A program needs an explicit language source, localized human messages, error ownership rules and compiled-artifact tests. For each catalog entry, retain a stable ID, message purpose, audience, placeholder type, permitted terminology, original semantic claim and a link to the test that makes the wording true.

Practical design questions before any translation

First, separate the translation of explanatory prose from the invention of alternate executable syntax. An international user may welcome a command described in their language and still need to type the canonical flags shown in examples. If a product intentionally supports multilingual aliases, those aliases are new software features with testing and compatibility costs. Never change data field names or exit semantics simply because their English wording resembles ordinary words.

Second, design the message catalog for actual variation: plural counts, named parameters, regional vocabulary, date context and units. For instance, a measurement can be displayed with regional punctuation while its CSV or JSON representation remains governed by a data contract. Avoid substituting visually attractive values into the machine channel. A user should be able to compare two language settings and recognize the same underlying record.

Third, treat failure paths as major features. Users turn to help when something went wrong, often under time pressure. An invalid option message should identify the bad token and a valid correction, not invent a successful operation. A failed file read is different from a parsing failure. A refused overwrite is different from a completed write. Precise language and appropriate nonzero status protect both people and automation.

36 implementation decisions and troubleshooting investigations

The following cases progress from framework metadata to terminal behavior and release assurance. Each describes a reproducible symptom, an explanation of the relevant ownership boundary, a focused correction and an observable test. The point is not to memorize dozens of warnings. It is to learn how to find the layer responsible for an incorrect user experience, correct it without changing unrelated behavior, and collect evidence that the fix works.

The command contract and generated help

Begin by reading Crystal OptionParser as a set of declarations that form a public command contract. Help may be generated, but its truth still depends on the code. Before revising any translation, identify which object or handler owns the sentence, which exact syntax remains valid, and who will read it.

1. Usage banner

A useful diagnostic begins with the user’s experience: German help begins with an English Usage heading and the wrong positional structure. This is not merely an editing problem. The banner is an application-supplied string rather than a universal language feature. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Build a locale-aware banner that preserves exact option and operand syntax. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Compare the banner to a successful real invocation. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

2. Option descriptions

Imagine an operator encountering this situation: A translated help screen still explains –lang in English. The underlying issue is usually a boundary between human wording and program behavior: Descriptions supplied to parser.on were defined before locale selection. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to pass reviewed target-language descriptions during parser construction. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Run –help under two locale settings. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

3. Short flags

An international team reports a concrete mismatch: An editor translates a short option letter in prose and the resulting example fails. Investigate the responsible layer before revising text, because Short flag spelling is executable grammar rather than a natural-language abbreviation. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to leave option tokens stable unless you intentionally register extra aliases. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Execute each short and long form shown in help. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

4. Argument placeholders

During a release review, the team observes the following: A flag description changes FILE to a translated word that is mistaken for a literal token. The likely explanation is specific rather than mysterious: A placeholder was rendered without a clear typographic or semantic distinction. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, separate human explanation from accepted syntax and use consistent placeholder notation. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, copy a sample command and confirm its argument is recognized. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

5. Separators

A useful diagnostic begins with the user’s experience: Translated sections lose the headings separating file options from output options. This is not merely an editing problem. OptionParser separators are message-bearing presentation components. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Catalog section headings and keep their grouping aligned to actual option definitions. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Review complete help, not merely the first screen. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

6. Invalid options

Imagine an operator encountering this situation: An unknown –lagn option is silently accepted as if it were –lang. The underlying issue is usually a boundary between human wording and program behavior: Error handling hides an invalid token rather than preserving parsing truth. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to use invalid_option to explain the exact bad token and a valid recovery path. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Submit an invalid switch and check nonzero exit status. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

7. Missing values

An international team reports a concrete mismatch: –lang without a code produces an English failure or an empty language. Investigate the responsible layer before revising text, because An expected argument was missing and the handler was not localized. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to use missing_option or the appropriate exception boundary with a clear missing-value explanation. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Run the incomplete option and inspect stderr. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

8. Unknown arguments

During a release review, the team observes the following: A positional filename is discarded because an unknown_args path was misunderstood. The likely explanation is specific rather than mysterious: Unclaimed arguments need explicit ownership distinct from known flags. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, validate and report leftover arguments rather than ignoring unexpected data. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, pass a real filename and an extra unexpected operand. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

Locale resolution and language resources

Locale behavior must be designed, not guessed. The same invocation can pass through catalog loading, framework-generated messages, application validation and operating-system errors. All of those paths need an agreed language policy, with safe fallback and clear ownership of missing translations.

9. Subcommands

A useful diagnostic begins with the user’s experience: A help page lists check and export but the parser only handles check. This is not merely an editing problem. The explanatory command tree drifted away from actual subcommand declarations. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Build help from registered subcommands and maintain one source of truth. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Invoke every listed subcommand and test nested help. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

10. Locale before parsing

Imagine an operator encountering this situation: A user requests German help using a flag that is itself parsed after the help text is built. The underlying issue is usually a boundary between human wording and program behavior: Language discovery and parser construction have a circular timing dependency. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to use a documented preparse or rebuild strategy that does not execute side effects twice. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Check –lang de –help and help with the locale option in the other order. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

11. Default locale

An international team reports a concrete mismatch: The default is assumed to be English but follows a developer workstation setting. Investigate the responsible layer before revising text, because Environment and application defaults were not defined as a contract. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to set explicit precedence and record fallback behavior for unsupported settings. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Test with no language flag on two machines. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

12. Locale tags

During a release review, the team observes the following: de-DE is rejected while de appears in the help as supported. The likely explanation is specific rather than mysterious: Resource identifiers and accepted option values are not normalized consistently. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, normalize known language tags and define regional fallback policy. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, try full and base language identifiers. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

13. Unavailable locale

A useful diagnostic begins with the user’s experience: An unsupported locale returns blank help. This is not merely an editing problem. The lookup layer returned null rather than usable source text. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Fall back to a reviewed source-language string and disclose language limitations. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Run an unsupported locale while requesting –help. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

14. Message IDs

Imagine an operator encountering this situation: Translators modify a raw English source sentence and orphan its catalog entry. The underlying issue is usually a boundary between human wording and program behavior: English prose was used as the only lookup key. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to adopt stable message identifiers and record source contexts for every user-visible string. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Rename one source sentence in a test branch and check lookup behavior. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

15. Placeholder order

An international team reports a concrete mismatch: A warning reverses instrument ID and file path. Investigate the responsible layer before revising text, because Unnamed interpolation values are fragile in languages with different word order. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to use named placeholders and reviewer context explaining each value. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Test distinct synthetic file and instrument identifiers. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

16. Escaping

During a release review, the team observes the following: A user-controlled filename is interpreted as terminal control text. The likely explanation is specific rather than mysterious: Presentation output inserted unchecked data into a formatted message. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, treat untrusted arguments as literal data and avoid interpreting embedded control sequences. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, inspect redirected output with a deliberately odd filename. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

Unicode, numbers and the terminal

A terminal is not a book page. It is simultaneously a display, a keyboard interface and a pathway for other programs. Unicode rendering, file encodings, symbols, widths and right-to-left text require tests in the target environment; a string that looks correct in an editor can still fail in a real workflow.

17. Text expansion

A useful diagnostic begins with the user’s experience: A German phrase stretches past the option column and hides the description. This is not merely an editing problem. Terminal width and text expansion were not considered during design. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Review narrow help output and avoid assumptions based on English string length. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Capture help at multiple terminal widths. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

18. Unicode input

Imagine an operator encountering this situation: The help displays accented text but the CLI fails to open an accented path. The underlying issue is usually a boundary between human wording and program behavior: Translation rendering and filesystem encoding were conflated. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to test Crystal file operations with Unicode paths independently of the message catalog. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Open the same harmless fixture under two path spellings. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

19. Right-to-left output

An international team reports a concrete mismatch: Arabic explanatory text causes visual confusion around –lang and filenames. Investigate the responsible layer before revising text, because Unicode bidi display depends on terminal capabilities. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to use clear literal command examples and test actual RTL terminals rather than assuming correctness. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Copy a command from help and run it verbatim. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

20. Plural errors

During a release review, the team observes the following: A batch check summary reports one failures. The likely explanation is specific rather than mysterious: English quantity formatting was copied into every locale. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, use plural-aware translation rules appropriate to each supported language. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, check zero, one and several failures. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

21. Numeric precision

A useful diagnostic begins with the user’s experience: A localized inspection log rounds an instrument measurement that feeds the JSON report. This is not merely an editing problem. UI formatting was applied to engineering data. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Localize explanatory text and keep machine-data precision and unit definitions intact. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Compare structured output field by field under both locales. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

22. Date context

Imagine an operator encountering this situation: A warning says expired today without specifying which time zone applies. The underlying issue is usually a boundary between human wording and program behavior: A translation removed the reference time and changed meaning. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to display meaningful date context while preserving the source timestamp and offset. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Compare one event shown in two regional preferences. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

23. Error severity

An international team reports a concrete mismatch: An invalid option prints a polite hint but returns success. Investigate the responsible layer before revising text, because A localized callback prints a message and exits incorrectly. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to set process status according to failure semantics, independent of the language used. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Assert exit status in command-line integration tests. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

24. Diagnostic channel

During a release review, the team observes the following: Translated notices are added to stdout before JSON records. The likely explanation is specific rather than mysterious: Machine-readable data and human diagnostics share one stream. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, send errors and status messages to intentional channels and document those boundaries. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, parse stdout as JSON in every locale. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

Failures, automation and consequences

An error message is part of the program’s promise about what happened. When translating warnings and recovery instructions, verify the underlying result, write effects, logs and exit codes. The reader’s next action should follow from tested facts rather than reassuring but untrue prose.

25. File side effects

A useful diagnostic begins with the user’s experience: Translated help calls –write a preview although it overwrites output. This is not merely an editing problem. The text lost the distinction between inspection and mutation. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Review action consequences against code and make overwrite behavior explicit. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Run against disposable output and check whether bytes change. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

26. Quoted examples

Imagine an operator encountering this situation: A file path with spaces fails after translation removed protective quotes. The underlying issue is usually a boundary between human wording and program behavior: Shell syntax was edited as ordinary punctuation. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to test command examples in supported shells and preserve meaningful quoting. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Copy the full translated example into a shell. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

27. Release compilers

An international team reports a concrete mismatch: The program works with a development compiler but not the deployed binary. Investigate the responsible layer before revising text, because Standard-library API or packaging assumptions were not pinned. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to compile and test using the exact compiler and target selected for release. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Run the shipped binary on the target system. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

28. Build resources

During a release review, the team observes the following: Catalog files disappear in the compiled deployment. The likely explanation is specific rather than mysterious: The runtime expected source-tree-relative files. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, bundle catalog assets or define verified external resource paths. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, run the binary outside the source directory. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

29. Regression fixtures

A useful diagnostic begins with the user’s experience: A snapshot sees English changes but not untranslated error callbacks. This is not merely an editing problem. Only the root help view was included in tests. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Capture invalid_option, missing_option and application error paths separately. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Diff output after introducing a new flag. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

30. Help accessibility

Imagine an operator encountering this situation: Color alone indicates a destructive operation. The underlying issue is usually a boundary between human wording and program behavior: The wording assumes all users see colored output. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to state consequences explicitly in plain text and maintain keyboard-only use. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Disable ANSI color and complete the task. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

31. Configuration precedence

An international team reports a concrete mismatch: A config file and command line choose different languages for different messages. Investigate the responsible layer before revising text, because Different layers read preference independently. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to choose one resolved locale per invocation and pass it to all message owners. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Set deliberately conflicting config and CLI preferences. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

32. Secret redaction

During a release review, the team observes the following: A translated error prints a full credentials path. The likely explanation is specific rather than mysterious: Arguments were interpolated into diagnostics without privacy review. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, redact sensitive values while retaining the context required for recovery. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, test with synthetic private-looking paths. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

Packaging, testing and release assurance

Localization becomes real only after installation. Development catalogs, compiler settings and local terminal defaults are not evidence that the same resources and behavior reach users. Release checks should include fresh environments and a language-proficient person who can actually complete the intended task.

33. Translation completeness

A useful diagnostic begins with the user’s experience: Catalog counts look complete but a child command uses raw English. This is not merely an editing problem. Message extraction ignores subcommand-specific declarations. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

Correct the responsible layer: Inspect every registered command and the actual generated help in each locale. Keep the visible syntax, expected values and operation consequences aligned with the implementation. Document any deliberate change to accepted inputs separately from the translation of help. That distinction lets a reviewer judge language quality without accidentally approving a behavior change.

Prove the result with a small experiment: Run the complete command help inventory. Capture the invoked command, the selected locale, stdout, stderr and exit status. Then repeat the same test with the source language. If the data result or accepted flags change unexpectedly, the problem is compatibility, not merely style.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

34. Upgrade verification

Imagine an operator encountering this situation: A standard-library change modifies OptionParser help spacing. The underlying issue is usually a boundary between human wording and program behavior: Compiler upgrades can alter generated formatting and callbacks. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

The practical correction is to pin a compiler range and rerun output snapshots on upgrades. Make the rule understandable to a newcomer, not only the maintainer. If an example contains a flag, value or file path, explain which part is literal and which part is illustrative. Readers should not have to infer parser rules from typography.

The acceptance check is concrete: Compare help under two documented compiler versions. Ask a second person to predict the operation from the translated wording before running it. Compare that prediction with the actual result; a mismatch means the sentence needs more work even if every catalog key exists.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

35. Native review

An international team reports a concrete mismatch: A reviewer understands each sentence but cannot perform the check task. Investigate the responsible layer before revising text, because Translation completeness does not establish successful interaction. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

A reliable repair is to give a fluent user a real check workflow and ask them to recover from one incorrect flag. Translate what the tool truthfully promises, not what the author wishes it could do. If an action could create, delete or overwrite data, write the consequence directly in the target language and cross-check it against the implementation.

Verification should be observable rather than impressionistic: Record whether the task was completed without an English explanation. Use a disposable fixture and preserve evidence of what the command really did. Check that recovery guidance remains actionable in plain text, under a narrow terminal and when the output is redirected to a file.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

36. Documentation boundaries

During a release review, the team observes the following: The article example is copied as though it were a production parser. The likely explanation is specific rather than mysterious: An illustrative snippet omits catalog design, domain validation and process tests. A fluent translation of the wrong behavior would make the problem harder to notice, so diagnosis should begin with the unmodified invocation, current language choice and exact source of the message.

For a durable solution, label examples honestly and adapt them to the installed language version before shipping. Give the translation reviewer enough context to keep the instruction accurate: purpose, audience, nontranslatable terms and variable types. A short glossary entry often prevents more mistakes than a broad direction to make everything sound natural.

To close the case, compile the adapted example and test error branches. Record what changed in the message and what deliberately stayed stable in the parser or data contract. This prevents later maintainers from repeating the same error when adding a new language or upgrading dependencies.

There is a broader lesson here for Crystal OptionParser: the reader needs a usable decision, while a script needs a reliable contract. In this case, ask whether the translated sentence correctly identifies the affected input, the present state and a permitted next action. Avoid a false claim of success, never hide an unsupported feature behind friendly wording, and let the final test use the same installed program that the reader will receive.

A four-week plan: from source text to a dependable multilingual release

Week 1 — map actual behavior

Inventory require option_parser, parser.banner, on flag descriptions, separators, invalid_option, missing_option, subcommands and generated help. Save the current English help, nested commands, normal outputs, recoverable errors and failure exit codes. Choose two pilot languages based on real reader needs. Make a catalog sheet with message identifiers, owner, context, placeholders, nontranslatable tokens, supported locale tags and a test reference. Record what is outside the first release’s scope. This week is complete only when the team knows what must remain unchanged.

Week 2 — write and integrate

Translate application-owned prose and connect the selected language to help registration and error boundaries. Keep examples executable. Verify the sample command quartzscan check sample.json --lang de against the chosen library version; do not copy the teaching skeleton blindly. Ask a reviewer to inspect technical terminology and verbs that imply side effects. Add catalog-key checks and locale fallbacks. Do not claim full language coverage merely because the application starts without an exception.

Week 3 — test real workflows

Run valid and invalid invocations under all declared language variants. Cover flags, arguments, missing values, Unicode paths, right-to-left text where relevant, narrow terminals, colorless output and redirected stdout. Check that sample IDs, timestamps, instrument readings and JSON keys keep their defined meaning. Include expected failures with nonzero status, a machine-output comparison and a safe test of any overwrite warning. Give a fluent reader a realistic task to complete without an English explanation.

Week 4 — package, release and maintain

Build the exact distributable for each target environment, then run it from outside the source tree. Confirm catalogs are included and fallback behavior is truthful. Archive sample help captures, a language coverage report, the version of Crystal OptionParser, known limitations and the reviewer sign-off. After publication, monitor reports by problem and locale rather than treating every complaint as a translation defect. Recheck everything when parser declarations or dependencies change.

A practical acceptance matrix for editors, testers and translators

Build a small matrix in which each row is an actual invocation and each column is a language or environment. At minimum record success with a legitimate sample file, missing required input, unrecognized option, unsupported locale, file-reading failure, Unicode filename, redirected stdout, non-color terminal, and a complete installed-artifact run. The expected answer is not always identical wording. The expected answer is consistent meaning, stable machine behavior and a recovery path that works.

The matrix should have separate fields for what the command accepted, which files or services changed, what text appeared, whether the output was machine-readable, and the exit status. Mark each deviation as a translation defect, a program defect, a packaging defect or a documentation defect. This prevents the team from editing prose to compensate for a parser failure. Keep one unaltered golden fixture for data comparisons and one disposable fixture for writing tests.

Do not use word-for-word similarity to English as the sole test. Some languages need a different sentence order, a plural category or a more explicit consequence. A good reviewer asks: Can the intended reader identify the correct command, understand what will happen, recognize a failure, and recover safely? An expert review complements automated key coverage, but does not replace behavior tests. Both are needed.

Frequently asked questions

Does Crystal OptionParser translate messages?

No. It assembles help and processes flags; the program provides the localized descriptions, locale selection and expected-error messages. In practice, check the answer against the pinned Crystal compiler and standard-library release and a real invocation of quartzscan check sample.json --lang de. This keeps the advice current and distinguishes a documented library capability from an application-specific implementation choice.

When should locale selection occur?

Before help descriptions are finalized, or through an explicitly tested rebuild strategy that preserves parser side effects. In practice, check the answer against the pinned Crystal compiler and standard-library release and a real invocation of quartzscan check sample.json --lang de. This keeps the advice current and distinguishes a documented library capability from an application-specific implementation choice.

Are translated flag names supported by default?

No. Flag declarations define accepted syntax; natural-language help does not create new aliases. In practice, check the answer against the pinned Crystal compiler and standard-library release and a real invocation of quartzscan check sample.json --lang de. This keeps the advice current and distinguishes a documented library capability from an application-specific implementation choice.

How do I test a distributed Crystal binary?

Execute the release build outside the source tree with supported locales, invalid flags, Unicode paths and machine-output checks. In practice, check the answer against the pinned Crystal compiler and standard-library release and a real invocation of quartzscan check sample.json --lang de. This keeps the advice current and distinguishes a documented library capability from an application-specific implementation choice.

What should I keep unchanged?

Accepted flags, data identifiers, unit definitions, error semantics and stable serialized formats unless an intentional interface version changes them. In practice, check the answer against the pinned Crystal compiler and standard-library release and a real invocation of quartzscan check sample.json --lang de. This keeps the advice current and distinguishes a documented library capability from an application-specific implementation choice.

Official documentation and connected learning

Version-sensitive details should be checked in the official documentation for the actual dependency installed. The examples above are intentionally small; they describe a method of reasoning and verification, not a guarantee that one snippet covers every project architecture. Follow the documentation links for current parser declarations, help hooks and build constraints, and test any adaptation in a controlled environment.

Conclusion: translate the explanation, preserve the truth

Professional Crystal OptionParser localization is successful when materials inspection teams can check a laboratory materials record with confidence, understand limitations and recover from mistakes without being misled. A translated command should not quietly change sample IDs, timestamps, instrument readings and JSON keys, executable names, error conditions or outputs consumed by another program. Start with the real operation, write natural but exact language, test every failure path, and verify the packaged artifact. The best multilingual tool is not one with the greatest number of translated strings: it is one that more people can use correctly.