Inquirer.js @inquirer/prompts localization means translating the questions, options, validation messages, keyboard instructions and results of Inquirer.js Node.js interactive prompts while retaining the identity of the underlying data. This practical JavaScript and TypeScript internationalization guide is for Node.js and TypeScript developers, editorial product teams and international content operations. It explains how to make an interactive terminal workflow intelligible across languages without changing what a choice, number or permission actually means.
Consider a multilingual investigative newsroom production editor who needs to move archived reports into a new publishing system without accidentally releasing an unfinished investigation. The interface contains story reference, publication channel code, embargo state and editorial approval status. A successful local prompt is only a piece of this process. “The migration draft is recorded; publication remains blocked until editorial approval.” is appropriate when the stated record and request state have actually been verified. “The investigation is approved and available to readers.” must not appear merely because the operator pressed Enter: that stronger outcome needs separate evidence.
This full Inquirer.js @inquirer/prompts translation tutorial starts with a quick answer, then follows a logical route from language planning and stable return values to validation, keyboard behaviour, accessibility, cancellation and release testing. You will find a framework-specific implementation sketch, twenty-eight worked investigations, a four-week plan and answers to common questions. The method is useful whether you support two languages or a large international team.
Quick answer: what makes the translation reliable?
- Translate visible prompts, hints, choices, validation, shortcuts, failure states and truthful completion messages.
- Keep story reference, publication channel code, embargo state and editorial approval status independent from display language.
- Identify the exact installed Inquirer.js @inquirer/prompts version and use its supported API and terminal modes.
- Use reviewed catalog messages, named placeholders and locale-appropriate number and date formatting.
- Distinguish a locally collected answer from the external authority that determines a final outcome.
- Test Enter, Escape, Ctrl+C, absent input, long labels, no color and varying terminal widths.
- Ask target-language readers to perform a realistic task without relying on English source text.
- Do not display “The investigation is approved and available to readers.” without verified evidence.
1. Begin with the person’s job, not with a translated string
The smallest visible element of a command-line form is usually a question, but the useful unit of design is a task. a multilingual investigative newsroom production editor has a goal, an input source, several decisions and a result that may depend on another team. Write down who uses the tool, what is already known, which record they can alter and which authority makes the final decision. Otherwise a translator may produce a fluent sentence that inadvertently promises an action the interface cannot perform.
Draw the workflow on paper before editing the catalog. Distinguish an untouched form, a locally answered form, a saved draft, a submitted request, an acknowledged request, a rejected request and a final approved outcome. Add a state for an unknown result after a timeout. These distinctions stop the application from treating a terminal’s successful exit as proof that a remote process is complete. A translated ‘done’ cannot substitute for a verified business event.
For this chapter, list story reference, publication channel code, embargo state, editorial approval status on a single data dictionary page. For each item define its authoritative source, allowed representations, ownership, whether the value may change and what the user should do if it is wrong. A reader should not have to infer whether an item is a label, a code, an observation or a permission. These definitions are also the best raw material for trustworthy translations.
2. Understand the library’s responsibility and its limits
The modular @inquirer/prompts package exposes individual asynchronous prompt functions. Inquirer.js offers select and checkbox choices, search and editor interactions, and configurable prompt execution. These controls collect answers; the publishing system must separately enforce permissions, embargoes and editorial approval.
A prompt library has a valuable but bounded job: display choices, accept keystrokes, gather typed input and perhaps apply local validation. The surrounding application decides where data is stored, which services are called and who is authorized to make changes. A terminal can report that a value was selected; it cannot independently establish the historical or operational truth of the selected value. Plan messages around the boundary between interface mechanics and domain authority.
Keep a short inventory of the actual prompt types used in your project: input, select, checkbox, confirm, search, password, editor, expand, rawlist and the newer modular prompt APIs. Mark which strings come from your own code, which are produced by the library, which are derived from a validation function and which arrive from a remote service. That inventory catches the familiar failure in which the main question is translated but a confirmation, placeholder, empty-result message or failure state remains in another language. Use documentation for the pinned release; APIs and defaults may change.
3. Build a terminology sheet and a message catalog
Start with terms that carry consequences. In this example, publication channel code is not interchangeable with a descriptive caption, and editorial approval status should not be translated as though it were a personal preference. A term sheet should give a definition, a preferred translation, discouraged alternatives and a short example sentence. Where a term is used differently in multiple regions, prefer an explanatory phrase over an ambiguous short label. Preserve precision without making people decode professional jargon.
Give each user-visible message a stable semantic key. A label, a long hint, a validation error, a confirmation and a final status each deserve their own entry. Avoid sentence fragments assembled through string concatenation; grammar and word order vary among languages. Name placeholders by meaning, such as {record_reference}, {count} or {destination}, and record the expected data type. Translators need context about the action and its consequence, not merely isolated English words.
A good catalog also describes how missing translations are handled. For an important warning, a clear reviewed fallback in the source language is better than an empty line or an optimistic generic success. Track missing strings in automated tests and ensure that each supported locale has complete coverage for all consequential paths. Use a qualified reviewer for statements about rights, safety, money, authorization or release. The translator should never be forced to guess what the software actually knows.
4. Separate what the user sees from what the system stores
Human-facing text and machine-facing records solve different problems. A person might select a translated description of embargo state, but the program must save a stable code or validated typed value. Otherwise a language change, editorial rewording or new sorting order can silently alter meaning. Keep the original data contract language-neutral and present localized labels as a reversible view of it. If an option has an internal identifier, translate the explanation but not the identifier itself.
Write a round-trip test. Start in one language, select a value, save a draft, switch locale and reopen the draft. The chosen domain value should still be identical, even when the visible label is quite different. Then reverse the process. Repeat after changing the ordering or wording of choices. The same principle applies to error codes, request IDs and externally generated references. Translations should not become accidental identifiers inside the database.
A subtle problem arises with defaults. A selected first item can look like a recommendation, and a prefilled response can be mistaken for evidence that someone already checked it. Specify defaults deliberately and make the consequence visible. For an operation that needs explicit human approval, choosing nothing or defaulting to ‘no’ may be more appropriate than making the quickest keyboard path affirmative. That is a workflow design decision, not a matter of stylistic translation.
5. Practical implementation: where messages enter the prompts
The following example is a sketch of the interface boundary, not a complete application. It makes the message catalog visible and shows which values must be interpreted by the surrounding domain system. Verify syntax and behaviour against the installed dependency version, especially where fallback modes or optional features are involved. Keep the authoritative submission, logging and permission rules outside the visual prompt.
In a real application, obtain a locale from an explicit user setting or well-understood environment policy, select the reviewed catalog and pass the resulting text to the prompt API. Convert returned values into a typed or validated domain record. If an external service is involved, send a request using a stable identity and then interpret the actual response. Never create a final-status message by assuming that the prompt library guarantees server acceptance.
Treat examples as opportunities to clarify boundaries rather than as copy-and-paste production systems. The program may need retries, access controls, structured error types, secure token handling and audit logs. Those concerns belong in their own tested components. What matters for translation is that the text a person reads matches the operation that the program really performs.
import { input, select, confirm } from '@inquirer/prompts';
const reference = await input({ message: messages.storyReference });
const channel = await select({
message: messages.channelQuestion,
choices: [
{ name: messages.internalArchive, value: 'internal_archive' },
{ name: messages.reviewQueue, value: 'review_queue' }
]
});
const submit = await confirm({ message: messages.submitForReview, default: false });
// A completed prompt must not bypass the publication approval service.
6. Validation should explain a correction, not simply report failure
Validation happens at different levels. The prompt may check whether a field is blank, parse a number, or ensure that a choice belongs to a known set. The application may check whether two answers are mutually consistent. An external system may reject a request because a record is missing, a user lacks permission or the service is offline. Translating all these situations as ‘invalid input’ is inaccurate and unhelpful. Give each error class a stable code and an explanation of what the reader can actually fix.
When an answer is rejected, say which field needs attention, why it failed and one safe next action. Do not echo a secret or a sensitive full value in an error. Provide realistic examples without making them look like defaults. If a service is unavailable, do not promise that repeating the action will always be safe: the previous request might already have been accepted. Report uncertainty and allow a verified status check or a carefully designed idempotent retry.
Validation is also about the limits of evidence. A correctly formatted story reference does not prove that the record exists or is approved. A matching publication channel code does not prove that the record belongs to the operator. A grammatically correct confirmation cannot replace permission checks. The reader is best served when the interface names the distinction between syntactic correctness, semantic consistency, recorded acknowledgement and final authority.
7. International keyboards, Unicode, layout and screen-reader use
Terminals are less visually flexible than web pages. A translated question may be far longer than its English source. Unicode characters can have combining marks, and display-cell width need not equal byte length or code-point count. Right-to-left phrases alongside Latin identifiers may be visually confusing. Test real target-language content in the terminal families you support, including narrow widths, full-width characters, accents, complex scripts and bidirectional text. A green unit test against ASCII is not a rendering audit.
Keyboard instructions are themselves part of the language experience. Do not claim Escape cancels a form unless it does so in that exact configuration. Check what Enter does with an empty response, how focus moves, whether hidden choices can be revealed and whether a shortcut is still understandable on a different keyboard. If the prompt relies heavily on color, arrows or cursor movement, test no-color use and assess an alternate plain-input route where required. Screenshots are not a substitute for user observation.
Accessibility is not synonymous with translation. A fluent label can still be inaccessible when its focus state is invisible or when the terminal reprints content too quickly for assistive technology. Include keyboard-only testing, explicit state words and a way for readers to revisit a long instruction. Evaluate actual assistive technology where the target audience needs it. Record limitations honestly rather than declaring universal compatibility merely because the library supports Unicode input.
8. Cancellation, privacy and the truth of a final message
Abandoning a prompt, skipping a question, pressing Ctrl+C and receiving a service timeout are different events. A cancelled local interaction may leave no saved work, or it may leave a recoverable draft. Either outcome can be acceptable if it is intentional and clearly stated. Do not translate ‘cancelled’ as ‘rejected’ when no authority has evaluated the request. If a submission status is unknown, do not translate it as failure or success merely to offer a comforting sentence.
Privacy begins before a person presses Submit. Decide which values may appear in the terminal history, diagnostic output, log files, saved drafts and translated error messages. A masked entry can still leak into a trace, and a richly descriptive success message can expose confidential identifiers. Use stable error codes for support and redact sensitive data in ordinary logging. Review message catalogs for examples that inadvertently teach people to paste real credentials or protected references into support tickets.
Finish with the right factual statement. In the running example, “The migration draft is recorded; publication remains blocked until editorial approval.” says less than “The investigation is approved and available to readers.”, but it may be precisely what the verified data supports. The best translated message is not necessarily the most reassuring. It is the one that lets the person decide what to do next without inventing a completed approval, delivery, publication or scientific result.
9. A release process that protects meaning over time
Build a compact set of fixtures representing ordinary, unusual and dangerous cases. For each, record the locale, input, returned typed value, authority response, visible message and the next available action. Automate invariant checks such as equal domain codes and identical permission outcomes across languages. Add human tests for clarity, actual keyboard movement and interpretation of final status. Both kinds of evidence matter: language review cannot find every data bug, and code tests cannot determine whether a sentence misleads readers.
Review changes to the dependency version, the term sheet and the service contract together. A changed library default can make an old keyboard hint false; a new business state can make an old translated sentence misleading; a revised collection or depot taxonomy can invalidate a selection label. Require a test whenever one of these changes. Maintain a short list of people authorized to approve high-consequence messages, and keep the recorded result of their review.
A useful release record identifies what is supported rather than merely saying ‘localization passed’. State the locales, platforms, terminal modes, actual package version, known limitations and the tests that were run. Keep a rollback path if a serious translation error affects decisions. Most failures appear at boundaries—between a label and its stored code, between a prompt and a service, between an accepted request and an authorized outcome. Test those boundaries first.
Practical investigations: twenty-eight ways a multilingual prompt can fail
The following incidents are designed as practical learning exercises for Inquirer.js @inquirer/prompts. Each one identifies a plausible misunderstanding, a concrete design decision and a test that could detect it. Work through them with actual translated strings and a test environment; no single test proves that every terminal or reader will behave identically.
1. Names and values in select choices
Imagine this failure during an ordinary session: A translated channel name is used as a database key, breaking when an editor changes from French to English. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Provide choices with localized name and invariant value fields; store the value in the migration record. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Choose the same channel in three locales and compare the persisted code. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
2. Checkbox options and complete selection review
A realistic field test exposes the following difficulty: The user chooses several distribution channels and misses that one selection is public-facing. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Review the entire selected set in a translated confirmation screen; apply a separate embargo gate. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Test mixed private and public choices with an unpublished investigation. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
3. Input validation for story references
The misleading assumption in this situation is: A translated example looks like a valid story reference and operators paste it as though it belongs to the report. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Separate example text from actual input and validate the reference against the archive service. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Enter the example, a malformed reference and a legitimate reference in each locale. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
4. Confirm default near a publish boundary
A team discovers an error only after switching locale: The confirmation is affirmative by default and a hurried editor completes the migration by pressing Enter. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Use an explicit negative default for consequential operations and name the precise action. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Press Enter without typing and assert that no public publishing operation is attempted. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
5. Search among hundreds of desks
Consider what happens when a hurried operator uses the default path: English desk names are indexed, but an Arabic desk name cannot be found from the Arabic interface. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Index reviewed localized search terms and aliases, but return a stable desk ID from each result. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Search local script, diacritic variants and source-language aliases for one desk. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
6. Asynchronous search results
The boundary between the screen and the saved record breaks here: A fast second query is followed by a slow response for the earlier query, which replaces the visible options. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Associate each query with a response generation and ignore stale results; state loading and empty results clearly. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Use a controlled delayed lookup and ensure the displayed label matches the chosen value. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
7. Editor prompt for investigative notes
A reviewer notices that a fluent sentence still creates the wrong expectation: External editing leaves a temporary file with sensitive source notes longer than expected. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Define data retention and cleanup, choose a safe editor context and keep a review step separate from migration. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Cancel the external editor and examine whether any unapproved content remains in files or logs. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
8. Password prompt and sensitive archive tokens
Imagine this failure during an ordinary session: Masking tokens is mistaken for encryption and a debug trace accidentally records the actual token. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Avoid printing secrets, restrict token lifetime and redact logs; masking alone is only a display measure. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Run an instrumented failure path and inspect logging, trace output and temporary files. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
9. Expand choices and keyboard letters
A realistic field test exposes the following difficulty: A translated label starts with a different initial and an English keyboard shortcut no longer matches it. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Treat shortcut keys as controls distinct from labels, document them clearly and avoid locale collisions. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Check the same answer via shortcut and arrow navigation on multiple keyboard layouts. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
10. Raw list and numbered choices
The misleading assumption in this situation is: A user thinks the list order is fixed while the localized sort moves a high-consequence channel. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Make ordering and numbering deliberate; avoid encoding business meaning in display position. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Sort translated choices and verify code selection is unaffected by display order. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
11. Number prompt for scheduled delay
A team discovers an error only after switching locale: Localized date text is confused with numeric minutes until embargo expiry. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Keep units explicit and parse the requested number as a typed quantity; show a fully formatted review summary. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Test zero, negative, very large and decimal input against the documented domain rule. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
12. Validation message from server
Consider what happens when a hurried operator uses the default path: A forbidden publish channel is rejected, but the translated UI calls it a typo instead of a permission issue. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Use stable error codes and distinguish validation, authorization and service outages. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Inject each error class and ask a reviewer whether the corrective action is clear. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
13. Choice descriptions for sensitive channels
The boundary between the screen and the saved record breaks here: A brief translated label loses the distinction between preview, internal archive and live publication. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Include consequences in the option description or an adjacent help view, not hidden behind jargon. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Ask a new editor to explain each option without seeing the English label. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
14. Cancellation and Ctrl+C
A reviewer notices that a fluent sentence still creates the wrong expectation: The person exits a partially completed wizard, but the system silently saves a migration as submitted. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Catch abort as a distinct outcome; state what draft data was retained and what was never submitted. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Cancel at each question and compare record state and audit log. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
15. External editor unavailable
Imagine this failure during an ordinary session: An environment lacks the preferred editor executable, so the UI fails before the reader can correct a note. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Provide a tested fallback such as a safe text input or clear recovery instructions for that environment. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Test with VISUAL and EDITOR absent, invalid and configured, including on a supported platform. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
16. Terminal width for headlines
A realistic field test exposes the following difficulty: Translated titles wrap into the checkbox controls and obscure which story belongs to which row. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Truncate safely with a distinct immutable reference and provide an accessible full-text view. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Test the longest title at 40 and 80 columns, then read it aloud from the interface. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
17. Bidirectional story titles
The misleading assumption in this situation is: An RTL headline containing an English identifier appears to show the wrong issue or story number. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Isolate the reference visually and keep the canonical identifier separate from the human headline. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Have bilingual editors transcribe the correct reference from a bidirectional terminal. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
18. CJK and combining-character input
A team discovers an error only after switching locale: A renderer assumes one character equals one display cell, shifting the cursor inside a search field. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Test grapheme clusters and terminal cell widths using actual names and search queries. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Enter complex scripts, combining marks and emoji modifiers, checking cursor movement and deletion. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
19. Embargo dates and local time
Consider what happens when a hurried operator uses the default path: A localized prompt shows a calendar date without timezone, and an editor mistakes the embargo boundary. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Explain the timezone, preserve an unambiguous instant in storage and display local time with its zone. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Compare two users in distant timezones reviewing the same embargo. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
20. Pluralized migration warnings
The boundary between the screen and the saved record breaks here: A warning about multiple unpublished stories is translated using a singular-only template. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Use locale-aware number and plural formatting with named placeholders rather than English fragments. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Test counts zero, one, two and larger values in locales with different plural categories. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
21. A blank search response
A reviewer notices that a fluent sentence still creates the wrong expectation: An empty result is read as proof that a source report was deleted. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Say ‘no matches under these filters’ and offer a route to check the source archive. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Search a report excluded by filters and verify the interface does not claim it never existed. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
22. Mixed-locale warning chain
Imagine this failure during an ordinary session: A wizard mixes English system errors with translated questions and the reader misses an important caveat. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Map library, application and service messages separately and audit the entire visible flow. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Capture both successful and failing transcripts in every supported locale. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
23. Interrupted HTTP call after answering
A realistic field test exposes the following difficulty: The editor completes the prompts but receives no acknowledgement of the remote migration. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Use request IDs, inspect the server state and avoid treating a CLI return as proof of completion. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Drop the response to a successful remote write and verify retries are safe. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
24. Duplicate migration from a retry
The misleading assumption in this situation is: A user retries after a spinner stalls and the archive contains two new story records. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Use deduplication or idempotency keys when supported by the service and reveal the existing record. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Repeat the same request identifier and verify at most one migrated story. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
25. Review summary before final action
A team discovers an error only after switching locale: A translated checkbox list sounds harmless but contains a public destination. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Show explicit destination, embargo and approval state immediately before submission. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Ask a fresh operator to identify whether the pending action can publish anything. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
26. Package version and modular imports
Consider what happens when a hurried operator uses the default path: Code from a legacy Inquirer.js tutorial is mixed with the newer modular package, causing different interaction assumptions. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Pin package versions, use the matching import style and review updated prompt documentation. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Run scripted examples against the locked project dependencies in a clean environment. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
27. Accessibility without color cues
The boundary between the screen and the saved record breaks here: The CLI distinguishes draft and public channels only by red and green highlighting. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Write state words, give keyboard guidance and test no-color and alternative interaction modes. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Disable color and observe a reader selecting the intended private option. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
28. Evidence of editorial publication
A reviewer notices that a fluent sentence still creates the wrong expectation: The terminal displays ‘published’ when only the migration queue accepted the task. This is not merely a visual defect: it can affect whether the operator understands the choice, whether the application stores the intended domain value or whether the next step is safe. A good translation must make the same meaningful action available without changing the underlying rules.
A practical repair is to treat the interface, data contract and instruction as separate responsibilities. Render verified states distinctly: saved, queued, approved, released or unknown result. Explain the action in words that the target-language reader can use immediately, including any relevant limit on what the prompt has actually confirmed. Avoid hiding the important part in a tooltip or an untranslated status line.
To verify the repair, Simulate a queued-but-unapproved migration and inspect every localized completion message. Record the displayed text, the actual returned value and any side effect. Repeat with a negative or interrupted path instead of testing only a successful example. The exercise is complete when a reviewer can explain the outcome accurately from the localized terminal alone.
A four-week route from first translation to dependable use
Week 1: learn the task and map the claims
Interview a person who performs move archived reports into a new publishing system without accidentally releasing an unfinished investigation. Watch them complete one ordinary and one interrupted workflow. Extract every visible prompt, error, default and final status into a message inventory. Define story reference, publication channel code, embargo state, editorial approval status in a data dictionary and identify the source of authority for each. Choose a minimum set of representative locales, including one that expands text and one with different script behaviour. At the end of the week, every message should have a purpose and every stored code a stable meaning.
Week 2: implement the boundary between labels and values
Introduce reviewed catalogs and route messages through Inquirer.js @inquirer/prompts according to its documented version. Keep input values typed or mapped to canonical codes; never save localized labels as surrogate identifiers. Add validation messages that distinguish a repairable local mistake from a forbidden operation or an unavailable service. Check empty input, defaults, optional questions and end-to-end save/reload behaviour. A draft recorded in one locale should render correctly when reopened in another without data conversion.
Week 3: test actual readers and terminals
Run realistic examples with bilingual reviewers, not only developers who already know the intended answer. Observe how they interpret the task, the consequence of choices and a pending result. Test long translations, keyboard layouts, Unicode, narrow widths, no color, interrupted sessions, accessibility and supported terminal modes. Check that the positive and negative examples in this article cannot be confused. Fix misleading wording at the source and update the vocabulary sheet rather than patching a single screen in isolation.
Week 4: rehearse failures and release with evidence
Create a small release matrix for locale, package version, platform, action state and result. Simulate denial, stale lookup, lost acknowledgement and a harmless retry. Confirm that authority checks are not bypassed and that error messages offer safe next steps. Document known limits, assign owners for the catalog and domain contract, and establish a rollback procedure. Release only after the user can see the real state, including cases where no final outcome is yet known.
Release checklist: evidence a reader can trust
- Reviewed translations exist for all visible questions, help text, errors, interruptions and outcomes.
- Stable codes and typed values are unchanged by locale, display wording or option ordering.
- Required and optional answers have explicit and tested defaults.
- Time, numbers, plural forms and units are displayed with correct local conventions.
- Remote permissions and final outcomes are verified by the responsible system.
- Timeouts, retries and cancellation never masquerade as approval.
- Unicode, RTL, narrow screens, no-color and keyboard behaviours were observed on real terminals.
- At least one target-language reviewer completed a task without the English version.
- Package version, supported environment and known limits are documented.
- Drafts, logs and terminal transcripts do not unnecessarily expose protected information.
Frequently asked questions
Is translating the visible question sufficient?
No. A useful Inquirer.js @inquirer/prompts implementation also translates hint text, choices, error messages, keyboard guidance, cancellation and final status. It must preserve the same returned data and permissions in every locale. Translating only the main label creates a superficially multilingual interface that can still mislead someone at the most important step.
May we translate internal identifiers?
Usually not. story reference and other domain codes should retain their documented canonical representations. Translate a description of the identifier, not the data used by the application to identify the record. If a genuine external naming standard has different representations, handle that as a versioned data-mapping project rather than a cosmetic language change.
Should dates and numbers be formatted differently?
Yes, when they are human-facing. Use locale-aware formatting for display, but keep canonical typed values and an unambiguous timezone or unit in storage. Never guess how an ambiguous decimal separator, date order or shortened unit should be interpreted. Validate the input grammar that the application actually supports and explain it in the reader’s language.
What happens if a translation key is missing?
Use a reviewed and truthful fallback instead of an empty string. Track missing keys automatically so a critical warning is not silently dropped. Decide whether the locale can be offered for a consequential workflow when essential instructions remain untranslated. A fallback should make uncertainty visible, not invent a positive outcome.
Can machine translation perform the whole review?
Machine translation can help generate candidates, but a person with domain knowledge should approve consequential terminology and status messages. The right sentence depends on the underlying action, stored values and who can authorize it. Test whether target-language readers infer the same task and outcome, not merely whether the words sound natural.
How do we test keyboard shortcuts?
Run the actual installed Inquirer.js @inquirer/prompts version under the locales and terminal types you support. Check Enter, Escape, navigation, shortcuts, empty responses and interrupted sessions. A translated hint is reliable only when it describes the behaviour of the configured control. Include users who have different keyboard layouts.
Should selection lists be sorted by localized names?
They may be, provided the sorting does not change the saved identity or create a misleading default. Distinguish similarly named options with stable codes or explanatory details. When ordering has business meaning, define that order explicitly. Test that selecting the same semantic item always produces the same machine-facing value.
What does a successful CLI exit really prove?
Only what the program verified. If Inquirer.js @inquirer/prompts gathered an answer and the receiving system has not confirmed final status, say that plainly. “The migration draft is recorded; publication remains blocked until editorial approval.” and “The investigation is approved and available to readers.” are materially different claims. Do not infer the second from the first just because the process returned without an exception.
How should errors be explained?
Identify whether the problem is input syntax, invalid state, permission, missing data, connectivity or uncertain acknowledgement. Show a stable error reference and a safe next step. Do not blame the reader for server outages or advise blind resubmission when a previous request might already have been accepted.
Is Unicode support the same as international accessibility?
No. Accepting Unicode bytes does not guarantee correct grapheme editing, bidirectional layout, text wrapping, screen-reader access or keyboard usability. Test realistic target-language text and observe actual readers. Where a rich terminal view is unsuitable, provide a supported simple route or document the limitation.
What is the smallest responsible first release?
Start with the actual set of tasks a small audience needs, a complete reviewed catalog for those paths, stable domain identifiers, negative tests and a clearly stated list of supported environments. A narrower reliable release is more useful than a large language menu that contains unverified warnings or ambiguous confirmation states.
How often should translations be reviewed?
Review them when business rules, input schemas, library versions, terminology or supported terminals change. High-consequence messages should have named owners. Capture representative terminal transcripts as tests, and involve target-language reviewers before changing the meaning of a status or a permission.
Does translating a choice’s name alter its Inquirer.js value?
It should not. The displayed ‘name’ can be localized while the ‘value’ stays a stable application code. Check the exact prompt’s option shape in the installed version.
Is Inquirer.js the same as the other npm package called prompts?
No. @inquirer/prompts is the modular Inquirer.js project, whereas the package named ‘prompts’ is a separate library. Keep dependency, API and support documents clearly separated.
When can an editor prompt be used safely?
It can be useful for long notes, but external editor use introduces filesystem, process, encoding and privacy considerations. Never treat leaving an editor as evidence that publication was authorized.
Can a CLI search safely make an embargoed report public?
No. A search or select interaction only gathers a choice. The editorial system must enforce embargo and publication authorization independently of locale and keyboard input.
Official documentation and further reading
- Inquirer.js @inquirer/prompts official documentation
- Inquirer.js @inquirer/prompts supporting package reference
- Unicode text segmentation and grapheme boundaries
- Unicode CLDR: locale conventions and plural data
- W3C Web Accessibility Initiative: accessible interaction principles
- Master Art of Translation — complete translation system
- Translate Like a Pro — series index
Conclusion: the language may change; the decision must not
The most professional translation is not the most elaborate sentence. It is the message that allows someone to complete the correct task, understand a limitation and recognize the actual state of their work. In Inquirer.js @inquirer/prompts, that means meaningful labels, stable values, truthful validation, predictable cancellation and practical tests on the terminals people use.
Start with one complete workflow for a multilingual investigative newsroom production editor. Translate the questions and the surrounding consequences, not only the nouns. Verify the stored identifiers and the real outcome after every switch of language. When the screen says “The migration draft is recorded; publication remains blocked until editorial approval.”, the records should support those words. When the stronger claim “The investigation is approved and available to readers.” is not yet true, do not display it. That discipline is the difference between a multilingual-looking interface and a dependable international tool.