Skip to content

generate-locales.mjs: an invalid --lang is only rejected after every API call has been paid for; help text names the wrong default model; no request timeout #246

Closed

Description

@Nawid3333

Severity: low

Where: generate-locales.mjs (parseArgs only checks --lang is non-empty; langShape is tested per key inside the apply loop after all batches ran; model: process.env.OPENAI_MODEL || 'gpt-5-mini' while the help text says "default: OPENAI_MODEL or gpt-4o-mini"; callOpenAI has no timeout)

What happens

node generate-locales.mjs --lang french (or any shape langShape rejects) runs every batch against the API, then prints "Updated combined-locales.json with 0 'french' translations" and rewrites the file (reformatting it) with no change.

Suggested fix

Test langShape in parseArgs and exit 1 with the expected shape; fix the help text; add req.setTimeout.

Confidence: high.


From a line-by-line code review of the tree at 41363fd (2026-10-02). Each claim above was checked against the source before filing; the reproduction steps and line references are as of that commit.


Generated by Claude Code

Activity

  1. added
    bugSomething isn't working
    code-reviewFound by the 2026-10-02 line-by-line review
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-reviewFound by the 2026-10-02 line-by-line review

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions