You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
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.
Activity