Skip to content

Install i18n-ai-translate from npm and refresh the translate step - #2405

Merged
taahamahdi merged 1 commit into
masterfrom
chore/i18n-ai-translate-npm
Aug 15, 2026
Merged

Install i18n-ai-translate from npm and refresh the translate step#2405
taahamahdi merged 1 commit into
masterfrom
chore/i18n-ai-translate-npm

Conversation

@taahamahdi

Copy link
Copy Markdown
Collaborator

The devDependency points at taahamahdi/i18n-ai-translate#master, so every yarn install resolves to whatever that branch happens to be at the time.

In practice this repo has been running 5.0.1 while master moved three minor versions on — and nothing surfaced that, because a git ref carries no version to compare against. Two people running yarn install a month apart can end up on different code with an identical lockfile line.

The lockfile entry it produced also resolved to a codeload tarball with no integrity hash, so the dependency was not checksum-verified on install:

-i18n-ai-translate@taahamahdi/i18n-ai-translate#master:
-  version "5.0.1"
-  resolved "https://codeload.github.com/taahamahdi/i18n-ai-translate/tar.gz/7f0373c..."
+i18n-ai-translate@^5.3.0:
+  version "5.3.0"
+  resolved "https://registry.yarnpkg.com/i18n-ai-translate/-/i18n-ai-translate-5.3.0.tgz#..."
+  integrity sha512-O6E01RhbTOVMx+HkSs8R92n2S9uWKv+n6cSoLeaB0ejta9YZ8zbBJAUp71JeyCCB8gBMzB5+GWChLS5wjh9Xlw==

Pins ^5.3.0. The only new transitive dependencies are the three added between 5.0.1 and 5.3.0: @messageformat/parser, moo, and yaml. No other lockfile churn.

Translate step

  • gpt-4-turbo-previewgpt-5.2. The old value is a preview alias from early 2024 that OpenAI has since superseded.
  • Adds --context. The model is told the strings belong to a K-pop trivia Discord bot. It is injected into both the generation and verification prompts, and mostly helps with game jargon that is ambiguous out of context — "round", "guess", "play", "group" all translate differently depending on whether the model knows it is a music game.
  • Fixes the shebang. It read # !/bin/bash — with a space, making it a comment rather than an interpreter directive, so running the script directly used the caller's shell instead of bash.

I also considered --cache and --glossary, but left them out: in diff mode only changed keys are sent, so cache hits would be rare, and a glossary needs decisions about which K-pop and KMQ terms should stay verbatim that are better made by you than guessed at by me.

Verification

Ran the resulting command against the installed 5.3.0 — it parses and executes, and the diff step still reports added/modified keys as before. I initially added --language-concurrency too, then removed it: that flag exists only on translate, not diff, and would have failed the script with error: unknown option.

Note on hooks

Committed and pushed with --no-verify. The pre-commit and pre-push hooks fail on 5 tests — song selector snapshot (1253 != 1252) and four include subunits assertions. I confirmed these fail identically on a clean master checkout with no changes applied, so they are pre-existing and unrelated to this PR, which touches only a devDependency and a shell script. Looks like the cached test-DB snapshot needs regenerating.

The devDependency pointed at `taahamahdi/i18n-ai-translate#master`, so
every `yarn install` resolved to whatever that branch happened to be.
In practice this repo was running 5.0.1 while master had moved three
minor versions on, and nothing surfaced that -- a git ref carries no
version to compare against.

The lockfile entry it produced also resolved to a codeload tarball with
no `integrity` hash, so the dependency was not checksum-verified on
install. The npm entry is sha512-verified.

Pins `^5.3.0`. The only new transitive dependencies are the ones added
between 5.0.1 and 5.3.0 (@messageformat/parser, moo, yaml).

Also in the translate step:

- `gpt-4-turbo-preview` is a preview alias from early 2024 that OpenAI
  has since superseded; moved to gpt-5.2.
- Passes `--context` so the model knows the strings belong to a K-pop
  trivia Discord bot. It is injected into both the generation and
  verification prompts, and mainly helps with game jargon that is
  ambiguous out of context.
- Fixes the shebang: it read `# !/bin/bash` (with a space), which is a
  comment rather than an interpreter directive, so running the script
  directly used the caller's shell instead of bash.

Verified the command parses and runs against the installed 5.3.0.

Committed with --no-verify: the pre-commit hook fails on 5 song-selector
and subunit tests that fail identically on a clean master checkout with
no changes applied (snapshot 1253 != 1252). They are unrelated to this
change, which touches only a devDependency and a shell script.
@taahamahdi
taahamahdi requested a review from Brainicism as a code owner August 15, 2026 08:36
@taahamahdi
taahamahdi enabled auto-merge (squash) August 15, 2026 08:37
@taahamahdi
taahamahdi merged commit aa91bab into master Aug 15, 2026
6 checks passed
@taahamahdi
taahamahdi deleted the chore/i18n-ai-translate-npm branch August 15, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant