Nushell custom command localization is about writing multilingual terminal instructions that remain correct for commands defined with def, typed positional parameters and named flags. Developers looking for Nushell def examples, translated custom-command help, multilingual CLI documentation, flag descriptions or Unicode pipeline testing need to know which parts are readable prose and which parts are parsed syntax.
Nushell treats custom commands as first-class commands: their signatures participate in parsing and their descriptions can appear through the help system. Comments attached to a command or its parameters may become visible help text. Translation therefore has a direct documentation role, but it should not accidentally change parameter types, pipeline contracts, switches or data-field names.
This guide follows a harmless public-catalogue example, then explores Nushell custom command signatures, –flags, help descriptions, structured values, pipeline output, subcommands, native versus external command boundaries and localization quality checks. The aim is to make international terminal tools easier for human readers without changing what the commands actually do.
The essentials: what stays stable when a command speaks another language
- Preserve every published command token, option type, input value contract and status code unless a new interface is deliberately designed.
- Translate complete reader-facing explanations, help messages, examples and recovery instructions, not parser syntax by accident.
- Demonstrate the real command before making claims about its localization.
- Test both successful execution and missing, invalid, unusual and Unicode input.
- Keep human display language distinct from machine-readable output and data schemas.
- Use version-specific official documentation and verify a clean installation.
- Make a failed command understandable enough that a reader can correct the next attempt.
A working starting point
Begin with a small example rather than an elaborate production system. A tiny, observable command reveals its contract: what a caller types, what the program parses, what is returned and what an error means. The following snippet is deliberately limited to harmless public sample data, so the reader can concentrate on argument handling instead of installing services or handling secrets.
# Preview a public catalogue entry by its label.
#
# The label is data; it is not a command token.
def preview-public [
label: string # Catalogue label to preview
--count: int = 3 # Number of rows requested
--upper # Show uppercase labels
] {
let shown = if $upper { $label | str upcase } else { $label }
{label: $shown, requested_count: $count}
}
preview-public "Public records" --count 4
This sample returns a record and does not contact a database. Nushell help text is drawn from nearby comments; putting translated explanations in the appropriate distributed command version is a documentation choice, not automatic language negotiation. Keep command tokens, record keys and types stable unless users explicitly opt into an alternate interface.
Understand the actual parser and its boundaries
What a Nushell custom command is
Nushell’s def keyword creates a command that can accept typed arguments and participate in pipelines. It differs from a plain text script because structured values and parser validation are central.
How to use it. Start by defining one small command with an obvious purpose. Show the call and its output record so the reader learns what syntax does before discussing translation. Begin by asking what a person will actually type, what they expect the command to do, and what evidence they will see. A good explanation answers all three questions in the same order, which makes a technical rule approachable without weakening it.
Where the mistake appears. A translated guide that treats a record like printed prose may lead readers to rename fields or paste localized punctuation into data keys. In a multilingual guide, a mismatch between a sentence and a runnable command is especially difficult for beginners: they cannot tell whether they misunderstood the language or whether the example is wrong. The guide must remove that uncertainty.
Check it rather than assuming. Call the command on the documented Nushell version and inspect the result as a record, not merely a terminal screenshot. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
The def signature as a contract
A def declaration contains a name, parameter signature and body. This signature determines what callers may pass and what the parser rejects.
Try the task. Separate the grammar from its explanation: label: string is a parameter definition, while a comment such as ‘Catalogue label to preview’ is reader-facing description. Follow the complete path from reading the instruction to entering the invocation. Notice that the translator’s job is to preserve this path, not simply to substitute words while hoping the program understands them.
What to avoid. Changing string or int into a translated word is not localization; it is a syntax error. Likewise, translating punctuation in brackets can invalidate a command. This is why a translated example must be tried with a real interpreter, not approved solely as a polished sentence. Users deserve instructions that produce the promised result in their environment.
Check it rather than assuming. Test the exact code block by pasting it into a fresh session and asking help for the command. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Command names and user expectations
Custom command names can include forms unfamiliar to traditional shells, including spaces or Unicode, but the distributed command name remains part of users’ habits and scripts.
A practical approach. Choose a stable public name for a published command. If translated aliases are valuable, treat them as optional registered interfaces with compatibility tests. Put the interface rule beside a short example in the target language. Readers should be able to distinguish a literal command token, a replaceable sample value and a helpful description without studying the implementation first.
The failure mode. Renaming a command independently for every language breaks documentation cross-references and can make support instructions ambiguous. Even when the original English page is correct, an international reader can be misled by a slightly different implication. Treat that difference as a real bug if it changes the user’s next action.
Check it rather than assuming. Run the original name and any deliberate alias against identical input. Verify that one language does not expose extra permissions or altered behavior. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Positional parameters
A positional parameter like label: string receives a value at a particular place in the invocation. Translation must clarify what belongs there.
In a real guide. Show a concrete quoted label and a second label containing spaces. Explain that the label is user data while the command name and parameter syntax are fixed. Explain the decision before giving a list of exceptions. A simple operational promise is more useful than a long, vague passage that never tells the reader what will happen.
A common misunderstanding. A help page that translates a placeholder as if it were a literal option causes users to type words in the wrong place. The important distinction is between prose that can be adapted and syntax that the program recognizes. Once that distinction is visible, the rest of the localization choices become much easier to review.
Check it rather than assuming. Run missing, empty and multiword positional inputs and compare parsing behavior with the written usage sentence. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Required and optional positional arguments
Nushell distinguishes parameters that must be supplied from those that may be omitted, using signature syntax. The distinction matters for novice readers.
How to use it. Explain with a side-by-side example of a required item and a permitted optional filter. Keep the actual syntax in code and render the explanation in complete sentences. Begin by asking what a person will actually type, what they expect the command to do, and what evidence they will see. A good explanation answers all three questions in the same order, which makes a technical rule approachable without weakening it.
Where the mistake appears. Translating ‘optional’ as ‘recommended’ conceals whether the parser accepts omission. That is a consequential interface defect. In a multilingual guide, a mismatch between a sentence and a runnable command is especially difficult for beginners: they cannot tell whether they misunderstood the language or whether the example is wrong. The guide must remove that uncertainty.
Check it rather than assuming. Test both the shortest valid invocation and a complete invocation, then verify that a missing required argument produces a recognizable failure. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Make the documented interface understandable
Typed values are not display labels
A type such as int is part of the signature. The human message can explain that a whole number is required, but does not change the parser’s accepted representation.
Try the task. Use –count: int in the example and give an ordinary number. Show readers a rejected word so they understand what type checking does. Follow the complete path from reading the instruction to entering the invocation. Notice that the translator’s job is to preserve this path, not simply to substitute words while hoping the program understands them.
What to avoid. A locale may use punctuation or numerals differently from accepted syntax. Suggesting an unsupported localized numeral as an executable example is misleading. This is why a translated example must be tried with a real interpreter, not approved solely as a polished sentence. Users deserve instructions that produce the promised result in their environment.
Check it rather than assuming. Try negative, zero, large and non-Latin-digit inputs. Report the tested behavior rather than promising silent conversion. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Long flags and switches
Named flags have a — prefix. A switch such as –upper indicates a boolean choice, while –count: int expects a value.
A practical approach. In help, separate the purpose of the flag from the token. Show ‘–upper’ verbatim followed by a natural explanation such as ‘display uppercase text’. Put the interface rule beside a short example in the target language. Readers should be able to distinguish a literal command token, a replaceable sample value and a helpful description without studying the implementation first.
The failure mode. The word true placed after a switch is not always interpreted like –upper=true. A translated example must not invent spacing rules. Even when the original English page is correct, an international reader can be misled by a slightly different implication. Treat that difference as a real bug if it changes the user’s next action.
Check it rather than assuming. Test the switch absent, present and assigned with equals syntax. Confirm the guide reflects the actual parser grammar. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
The difference between –flag value and –flag=value
Nushell can distinguish a value-taking flag from a switch; equals syntax can be significant when explicitly setting boolean flags.
In a real guide. Show the relevant syntax with two test calls and say which version belongs to the real parameter. Never infer the grammar from English word order. Explain the decision before giving a list of exceptions. A simple operational promise is more useful than a long, vague passage that never tells the reader what will happen.
A common misunderstanding. A copied ‘-flag true’ example might be read as an extra positional argument rather than a true setting, giving a confusing rejection. The important distinction is between prose that can be adapted and syntax that the program recognizes. Once that distinction is visible, the rest of the localization choices become much easier to review.
Check it rather than assuming. Execute the documented forms and inspect typed values inside the function, not only their visible formatting. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Defaults and missing values
A signature may provide a default for a flag, allowing a usable command with fewer typed arguments. The default is program behavior that a translator must describe.
How to use it. State the default count plainly and show how explicit input changes it. Translate the unit and context without changing the numeric value. Begin by asking what a person will actually type, what they expect the command to do, and what evidence they will see. A good explanation answers all three questions in the same order, which makes a technical rule approachable without weakening it.
Where the mistake appears. A translator might replace the default with a culturally familiar number that is not what the program uses, causing a false promise about output size. In a multilingual guide, a mismatch between a sentence and a runnable command is especially difficult for beginners: they cannot tell whether they misunderstood the language or whether the example is wrong. The guide must remove that uncertainty.
Check it rather than assuming. Run a call with no –count and one with –count. Compare actual output and written default across supported languages. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Inline comments as parameter descriptions
Comments after parameter declarations can populate help descriptions. This makes nearby documentation part of the command’s visible interface.
Try the task. Write concise, meaningful comments describing purpose, units, permitted values and important limits. Review their length in the real help display. Follow the complete path from reading the instruction to entering the invocation. Notice that the translator’s job is to preserve this path, not simply to substitute words while hoping the program understands them.
What to avoid. Moving comments away from the signature or breaking the required syntax can cause help text to disappear even though the command still works. This is why a translated example must be tried with a real interpreter, not approved solely as a polished sentence. Users deserve instructions that produce the promised result in their environment.
Check it rather than assuming. Call help preview-public and inspect the Parameters section. Verify all comment-derived text is readable in the target language. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Handle failure, language and international data
Comments above def as command help
Nushell can take comments immediately above def and use them as a command description. A blank comment line can distinguish short and extended information.
A practical approach. Write a single useful summary first and longer context afterward. Translate full sentences, including cautions, instead of isolated keywords. Put the interface rule beside a short example in the target language. Readers should be able to distinguish a literal command token, a replaceable sample value and a helpful description without studying the implementation first.
The failure mode. A long untranslated developer note in the summary can bury the reader’s answer, while an empty comment structure may put text in an unexpected help field. Even when the original English page is correct, an international reader can be misled by a slightly different implication. Treat that difference as a real bug if it changes the user’s next action.
Check it rather than assuming. Use help and inspect the description and extra-description areas in a clean environment after editing comments. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Subcommands with spaces
Nushell supports custom command names with spaces, allowing subcommand-like naming. Documentation must show the complete literal command name.
In a real guide. Introduce a harmless command such as ‘catalogue preview’ and present its words as one callable name rather than separate shell commands. Explain the decision before giving a list of exceptions. A simple operational promise is more useful than a long, vague passage that never tells the reader what will happen.
A common misunderstanding. A translation that swaps the two words without registering an alias creates an example readers cannot execute. The important distinction is between prose that can be adapted and syntax that the program recognizes. Once that distinction is visible, the rest of the localization choices become much easier to review.
Check it rather than assuming. Call both the documented command and help for that command; verify any aliases are deliberately defined. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Pipelines carry structured values
Nushell pipelines transport values and tables, not just displayed strings. A command’s translated explanation should describe fields and transformations without renaming machine data accidentally.
How to use it. Return a record from a sample function and pipe it to get label. Teach readers to distinguish the field label from a translated screen heading. Begin by asking what a person will actually type, what they expect the command to do, and what evidence they will see. A good explanation answers all three questions in the same order, which makes a technical rule approachable without weakening it.
Where the mistake appears. A well-meaning translator may rename the label key to a target-language word, breaking the next pipeline stage while making the first display look localized. In a multilingual guide, a mismatch between a sentence and a runnable command is especially difficult for beginners: they cannot tell whether they misunderstood the language or whether the example is wrong. The guide must remove that uncertainty.
Check it rather than assuming. Test the complete pipeline after translation and compare record schemas and values across locales. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Pipeline input and output signatures
A command can accept pipeline input, and type signatures may describe its accepted and produced values. This is essential context for users composing commands.
Try the task. Use a small example that transforms a string into a string or creates a record, and explain exactly what the next command receives. Follow the complete path from reading the instruction to entering the invocation. Notice that the translator’s job is to preserve this path, not simply to substitute words while hoping the program understands them.
What to avoid. A help sentence promising a text line when the command returns a table causes users to use inappropriate string operations downstream. This is why a translated example must be tried with a real interpreter, not approved solely as a polished sentence. Users deserve instructions that produce the promised result in their environment.
Check it rather than assuming. Pipe the result into a type inspection or field operation. Record the actual type and shape as part of acceptance testing. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
External versus internal commands
Nushell can invoke native commands and external executables. External tools may have their own syntax, errors, locale and encoding behavior.
A practical approach. Draw the boundary: the Nushell wrapper translates its help, while the external program chooses its own messages unless its locale is separately controlled. Put the interface rule beside a short example in the target language. Readers should be able to distinguish a literal command token, a replaceable sample value and a helpful description without studying the implementation first.
The failure mode. Claiming that a translated wrapper automatically translates downstream errors creates gaps in diagnostics and support instructions. Even when the original English page is correct, an international reader can be misled by a slightly different implication. Treat that difference as a real bug if it changes the user’s next action.
Check it rather than assuming. Run one failing external command under different language settings and identify which layer produced each line of text. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Test, maintain and release a trustworthy command
Unicode data and command labels
Unicode can appear in command data, messages and even some custom names, but the safest approach is to treat input data separately from parsed syntax.
In a real guide. Pass labels with accents, CJK characters and combining marks through the command. Keep sample text harmless, readable and free of implicit execution. Explain the decision before giving a list of exceptions. A simple operational promise is more useful than a long, vague passage that never tells the reader what will happen.
A common misunderstanding. Visual similarity does not prove byte-for-byte equality, and Unicode normalization can matter if a value becomes a file path or lookup key. The important distinction is between prose that can be adapted and syntax that the program recognizes. Once that distinction is visible, the rest of the localization choices become much easier to review.
Check it rather than assuming. Compare returned values and exact field names in a structured test, not only in a terminal screenshot. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Localization without fragile string fragments
Complete sentences are easier to translate than pieces assembled around numbers or filenames. A multilingual command needs messages that can be reordered grammatically.
How to use it. Create a message for a failed count such as ‘Expected a whole number for –count’. Keep the stable option token as data inserted into the translated sentence. Begin by asking what a person will actually type, what they expect the command to do, and what evidence they will see. A good explanation answers all three questions in the same order, which makes a technical rule approachable without weakening it.
Where the mistake appears. Assembling ‘Error:’ plus ‘value’ plus ‘must be int’ may create unnatural target-language order and make error handling hard to review. In a multilingual guide, a mismatch between a sentence and a runnable command is especially difficult for beginners: they cannot tell whether they misunderstood the language or whether the example is wrong. The guide must remove that uncertainty.
Check it rather than assuming. Review actual formatted messages with a bilingual reader in the full terminal context and test placeholders for unusual values. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Generated help and version drift
The Nushell help renderer is part of the shell and may evolve. Your language-specific comments coexist with built-in labels and parser diagnostics.
Try the task. Pin the tested Nushell version in the release note and test the command’s help on each supported version. Do not claim control over every built-in label. Follow the complete path from reading the instruction to entering the invocation. Notice that the translator’s job is to preserve this path, not simply to substitute words while hoping the program understands them.
What to avoid. A screenshot from a different release may show headings or switch syntax that readers cannot reproduce, even if the custom function is unchanged. This is why a translated example must be tried with a real interpreter, not approved solely as a polished sentence. Users deserve instructions that produce the promised result in their environment.
Check it rather than assuming. Compare help output in the supported versions and update examples without inventing APIs that are not documented. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Reader-centered error recovery
Helpful localized diagnostics explain what failed and how to correct it. Type errors, missing arguments and invalid flags are different reader problems.
A practical approach. Write guidance for the most common mistake in each category: a missing label, a non-integer count, a wrong flag and an unexpected record field. Put the interface rule beside a short example in the target language. Readers should be able to distinguish a literal command token, a replaceable sample value and a helpful description without studying the implementation first.
The failure mode. A generic ‘command failed’ hides the precise condition the parser knows. Overexplaining internal stack traces also overwhelms ordinary users. Even when the original English page is correct, an international reader can be misled by a slightly different implication. Treat that difference as a real bug if it changes the user’s next action.
Check it rather than assuming. Test each failure deliberately and ask a non-specialist whether the displayed information is enough to make the next attempt valid. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Multilingual release acceptance
A release is ready when help, signatures, sample commands, record keys and error behavior agree in every promised language.
In a real guide. Preserve a tested command contract, exact sample transcript, translation review notes and a small version matrix. Require successful execution of copied examples. Explain the decision before giving a list of exceptions. A simple operational promise is more useful than a long, vague passage that never tells the reader what will happen.
A common misunderstanding. Language review without pipeline tests misses structural breakage, while pipeline tests without language review miss ambiguous instructions. The important distinction is between prose that can be adapted and syntax that the program recognizes. Once that distinction is visible, the rest of the localization choices become much easier to review.
Check it rather than assuming. Install in a clean Nushell session, run help and every example, then check translated comments and machine-readable output independently. Record the input, expected behavior, actual output and result status. Repeat the same case with another supported display language. If the underlying behavior changes, investigate the program contract before signing off on the translation. If only the visible explanation changes, judge that explanation for clarity, completeness and cultural appropriateness.
The reader’s final question should be practical: What do I type, what happens if I am right, and how do I recover if I am wrong? A strong international command guide answers that question in a calm sequence. It makes the ordinary case easy to follow, identifies a meaningful edge case and names the evidence that distinguishes a successful run from a plausible-looking mistake.
Walkthrough: a small international release from first draft to sign-off
Stage 1: Define the promise
A distributed research team writes a Nushell custom command to preview public catalogue labels. Their command accepts a required label, optional integer count and a switch for uppercase display. The team first demonstrates the record that comes back, including its label and requested_count fields, so readers understand that Nushell pipelines carry structured data.
This stage deserves its own evidence. Keep a runnable example and the exact user-facing message together. Ask someone unfamiliar with the code to explain what they would try next; then compare that answer with the supported behavior. The objective is not to make every term sound technical, but to make the relationship between the words and the command visible. When a reader can predict the result correctly, the documentation is doing its educational job.
Stage 2: Observe a mismatch
The first multilingual draft translates the label field name as well as its explanatory comment. A reviewer notices that an adjacent pipeline using get label now fails. The team restores the stable field name and translates only the words that explain what that field means. They record this as a deliberate contract decision.
This stage deserves its own evidence. Keep a runnable example and the exact user-facing message together. Ask someone unfamiliar with the code to explain what they would try next; then compare that answer with the supported behavior. The objective is not to make every term sound technical, but to make the relationship between the words and the command visible. When a reader can predict the result correctly, the documentation is doing its educational job.
Stage 3: Repair the failure path
Next, the team tests a missing label, an invalid count and the boolean switch. One translated instruction mistakenly shows a spaced true after the switch, creating an extra argument. Rather than blame the reader, they correct the documentation and demonstrate the executable form.
This stage deserves its own evidence. Keep a runnable example and the exact user-facing message together. Ask someone unfamiliar with the code to explain what they would try next; then compare that answer with the supported behavior. The objective is not to make every term sound technical, but to make the relationship between the words and the command visible. When a reader can predict the result correctly, the documentation is doing its educational job.
Stage 4: Verify the shipped experience
Before release they compare help output, comments, successful records and failure messages on the Nushell version they support. They test a label with non-Latin characters and verify the same record structure appears regardless of display language.
This stage deserves its own evidence. Keep a runnable example and the exact user-facing message together. Ask someone unfamiliar with the code to explain what they would try next; then compare that answer with the supported behavior. The objective is not to make every term sound technical, but to make the relationship between the words and the command visible. When a reader can predict the result correctly, the documentation is doing its educational job.
A four-week practice plan for careful translation and CLI documentation
Week 1 — map the command
Write down command names, flags, positional values, types, defaults, available locales, ordinary output and error statuses. Run the source-language help examples. Keep an evidence column for every claim in the public guide. Prioritize a tiny working demonstration over a complicated setup. A clean contract prevents later discussions about vocabulary from hiding a programming mismatch.
Week 2 — translate the reader’s decisions
Translate full meanings: what the command is for, why a value is required, and how to fix a rejected input. Keep the original executable tokens beside their explanations. Check that numerical boundaries, warnings, exceptions and promises of optional behavior are unchanged. Ask a bilingual reviewer to follow the published example without seeing the source code first.
Week 3 — stress the input boundaries
Try missing values, invalid flags, repeated options where relevant, unusual punctuation, non-Latin data, paths with spaces and conflicting instructions. Capture output channels and status separately. Inspect any machine-readable result rather than relying solely on the way the terminal prints it. Every failing test should lead to a correction in either the software, the example or the explanation.
Week 4 — package, teach and review
Run the full test matrix from a clean installation and the oldest supported runtime. Compare language variants side by side. Fix mixed-language or incomplete fallback messages, then review the guide for a sensible reading order: quick answer, working example, deeper reasoning, troubleshooting and further reading. A successful release leaves both beginners and experts able to verify what it claims.
Questions readers commonly ask
Can comments become Nushell help text?
Yes. Comments near def and parameter declarations can be used in generated help. Follow the documented placement rules and inspect the actual output. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Can I translate a custom command name?
You may define a new callable name or alias, but that is an interface change. Keeping one stable public name is generally easier for shared scripts and documentation. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Should I translate record field names?
Not merely for display. Field names are machine-readable keys used by pipelines. Translate descriptions or create explicit mappings if you intentionally change a schema. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
What does –count: int mean?
It declares a flag whose value is expected to be an integer. The explanation may be in any language, while the type syntax remains Nushell syntax. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Why does a switch behave differently from a value flag?
A boolean switch expresses a yes-or-no choice and can have special assignment syntax. A value-taking flag needs its declared type of value. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Can Nushell display native-language help automatically?
It can display comments that you provide; automatic translation and language selection require a separate design. Built-in help labels are outside a custom command’s direct prose. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Are pipelines just formatted text?
No. Nushell often carries structured values such as records and tables. Test those values directly. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
How should a multilingual release be checked?
Use copied commands, generated help, missing/invalid arguments, Unicode values, data schemas and a clean supported shell version. The reliable way to decide is to compare the documented contract with a test on the version actually distributed. Keep syntax examples copyable, and treat a message that changes the reader’s intended action as a correction priority rather than a stylistic preference.
Release checklist: what to verify before calling a translation complete
- A first-time reader can understand the command’s purpose in the opening paragraphs.
- The help text distinguishes literal syntax from illustrative user data.
- Every code example runs without secret accounts or private services.
- All advertised options and positionals match the parser, including defaults.
- Missing and malformed input produce a recoverable explanation.
- The displayed translation does not change program status or machine schemas.
- Unicode content survives the complete execution path.
- Locale selection and catalog fallback follow documented rules.
- The official runtime documentation matches the supported version.
- A clean installation produces the shown results, not merely a developer environment.
- A bilingual review covers full messages with real sample values.
- Human language and parser syntax are never confused.
- Screenshots and help examples do not promise unimplemented aliases.
- Errors and success are distinguished by observable behavior.
- Source references remain available for readers who want more detail.
Where to read next
Readers who want the broader principles of meaning, terminology, audience, accuracy and quality assurance can continue with Master Art of Translation: The Complete System for Moving Meaning Between Languages. The Translate Like a Pro series index connects focused software-localization guides without replacing the larger introduction.
Official documentation
- Nushell book: Custom Commands — use the reference for exact grammar and version-specific behavior.
- Nushell def command reference — use the reference for exact grammar and version-specific behavior.
The principle to remember
People should not have to learn a programming language merely to understand a simple command, nor should they have to guess whether a translated sentence has quietly altered its meaning. Good localization makes the tool approachable while leaving its tested contract intact. Begin with an actual use case, keep the runnable example beside the explanation, and end by checking the failure paths as carefully as the happy path. That is how a small multilingual command becomes dependable for a worldwide audience.