Commit Graph
137 Commits
Author SHA1 Message Date
Henrik Rydgård 6a36ed7de9 Translation string for run command 2026-08-31 11:33:51 +02:00
Henrik Rydgård 6ef95ebff7 langtool: New command remove-ampersands 2026-08-31 11:31:35 +02:00
Henrik RydgårdandClaude Opus 5 c9ff8f55fe langtool: Mark strings that are deliberately the same as the English one
Plenty of strings are legitimately identical in the target language - "Vsync",
"Status", "Ad Hoc multiplayer" - but the only test we had for "is this
translated" is "does it differ from English", so those got sent to the AI again
on every single run of finish-language-with-ai, costing tokens and giving it
another chance to translate something that shouldn't be.

They now get a "# same as English" comment and are skipped. finish-language-with-ai
writes it when the AI hands the English string back unchanged (which the
validation added earlier was throwing away as an error), and import-single writes
it when a language's line matches the en_US one. Deleting the comment puts the
key back in play.

Also stop comparing values with their comments still attached while working out
what's untranslated, which was leaking "# AI translated" into the context block
of the prompt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik RydgårdandClaude Opus 5 a1d205539c langtool: Let import-single create the key in en_US.ini too
It skipped the reference file, so adding a new string meant running
add-new-key-value first just to get the key into en_US.ini (and, as a side
effect, the English text into all 46 other files whether they were about to be
translated or not). Now an en_US line in the imported file is treated like any
other language, minus the "AI translated" comment, since that one is the string
the others were translated from rather than a translation.

So the workflow is one command plus validate. Languages left out of the import
simply don't get the key, and fall back to the English string at runtime -
copy-missing-lines is still there if you want the placeholder written out.

Instructions in AGENTS.md and the /add-string command updated to match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik RydgårdandClaude Opus 5 47ab1daac2 langtool: Fix losing translations when two keys share an English string
finish-language-with-ai maps the English string the AI translated back to the
key it belongs to, but the map was keyed on the English string, so when two keys
in a section share one - [Graphics] "Texture Filter" and "Texture Filtering",
[Error] "Error reading file" and "The file is not a valid zip file" - only the
last one survived and the other silently never got its translation.

Map to a list of keys instead and update all of them, and stop sending the same
line to the AI twice while we're at it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik RydgårdandClaude Opus 5 398d8238bd langtool: Validate translated strings, and check AI output before writing it
Placeholders like %1 and %d have to survive translation intact, and they don't
always: the new "validate" command finds 37 strings across four language files
where one got dropped, localized into another script, or split with a space.
It also catches empty translations, line breaks and stray quotes, and exits
non-zero so it can be used as a check in a script.

The same checks now run on everything the AI returns, before it's written to a
file - plus a check that it didn't just echo the English string back at us. A
language that fails is skipped instead of aborting the whole run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik RydgårdandClaude Opus 5 9398629ddf langtool: cargo fmt
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik RydgårdandClaude Opus 5 77e356961d langtool: Add Claude as an alternative to OpenAI for AI translation
New claude.rs talks to the Anthropic Messages API, and ai.rs picks between the
two providers. The provider is chosen with --provider, or guessed from the model
name, or from whichever of ANTHROPIC_API_KEY/OPENAI_API_KEY is set.

Also update the dependencies (and bump the clap requirement to 4.6).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0164UKoXpz9r155TRfQsoc3H
2026-08-23 16:18:07 +02:00
Henrik Rydgård b16c8accff cargo bumps 2026-08-03 11:22:05 +02:00
Henrik Rydgård 035278516f Bump langtool deps 2026-07-14 17:02:26 +02:00
Henrik Rydgård 167f8af0a2 Bump Cargo.lock for langtool, remove string 2026-07-08 18:29:40 +02:00
Henrik Rydgård 36bdde68f9 Delete the "Lazy texture cache" option 2026-06-09 23:49:54 +02:00
Henrik Rydgård affdeb827e Change rewindstate metadata to say X seconds ago 2026-05-19 12:19:31 +02:00
Henrik Rydgård 6e9d603314 Bump langtool/Cargo.lock 2026-05-13 23:09:04 +02:00
Henrik Rydgård e63c209fa7 Bump Cargo.lock for langtool 2026-04-28 22:17:09 +02:00
Henrik Rydgård 79ead80f87 Bump Cargo.lock
Replaces #21592
2026-04-27 12:36:58 +02:00
Henrik Rydgård 00526a9964 Bump cargo.lock for langtool.
Replaces #21553 by dependabot
2026-04-14 10:07:13 -06:00
Henrik Rydgård 8304d8622a Hide the save/load indicator by default, add a (developer) setting. Also sneak in an adhoc server list bug fix.
Fixes #21523
2026-04-06 10:04:09 -06:00
Henrik Rydgård cfc5d74602 Some progress with server status UI 2026-03-30 11:34:19 -06:00
Henrik Rydgård b8463b9203 Fix assorted warnings, bump Cargo.lock 2026-03-24 10:26:49 -06:00
Henrik Rydgård 1c31db1b76 Bump langtool dependencies.
Replaces #21471
2026-03-21 08:56:28 -06:00
dependabot[bot] b9753ab6b3 Bump quinn-proto from 0.11.13 to 0.11.14 in /Tools/langtool
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.13 to 0.11.14.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.13...quinn-proto-0.11.14)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-version: 0.11.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 00:19:11 +00:00
Henrik Rydgård 86dc349c1b Lang fixes 2026-03-07 10:19:17 +01:00
Henrik Rydgård 0791f542ea Fix bug in langtool 2026-03-07 10:03:43 +01:00
Henrik Rydgård 733c45cc94 Bump langtool deps to make dependabot happy 2026-03-04 12:45:22 +01:00
Henrik Rydgård c74e21243d Add support for installing plugins directly from zip files 2026-02-25 14:28:57 +01:00
Henrik Rydgård 57dffcb571 Refactor langtool a bit 2026-02-20 09:42:58 +01:00
Henrik Rydgård e8927ddf3e langtool: Add new feature to split keys with descriptions into separate key/value 2026-02-19 00:15:49 +01:00
Henrik Rydgård 911ffa64c4 Cargo bump 2026-02-14 12:04:15 +01:00
Henrik Rydgård 236a0acf71 Minor tweaks 2026-02-06 11:37:09 +01:00
Henrik Rydgård 48d50fe712 Add strings for the two gesture zones 2026-02-04 15:01:06 +01:00
Henrik Rydgård efc920c948 langtool: Clippy fixes, add ability to avoid overwriting already-translated strings with AI 2026-02-04 10:42:41 +01:00
Henrik Rydgård 28bc558619 Langtool: Bump deps 2026-02-04 00:30:01 +01:00
Henrik Rydgård 68ca54bca2 langtool regex: make the replacement parameter optional (default to empty) 2026-01-29 21:53:22 +01:00
Henrik Rydgård 21da9d6900 Langtool: Add regex command. 2026-01-29 21:53:21 +01:00
Henrik Rydgård a0e6991fdc bump 2026-01-29 17:41:57 +01:00
Henrik Rydgård c232867fba Correct functionality of the display rotation control rotation.
Fixes #19775

A future step might be to also rotate the touch screen inputs..
2026-01-23 01:18:58 +01:00
Henrik Rydgård cd1c89d4cb New hint string for packet relay, auto translated to start with 2026-01-21 01:41:34 +01:00
Henrik Rydgård 6a9b2e1e87 RetroAchievements: Improve completion messages (subset, differentiate hardcore mode) 2026-01-20 18:25:48 +01:00
Henrik Rydgård fce30fccfa Bump Cargo.lock 2026-01-20 18:25:19 +01:00
Henrik Rydgård 77b9a6e2e8 Prepare for adjustable save state slot count by making the Win32 menu dynamic 2026-01-08 16:07:48 +01:00
Henrik Rydgård 11a9430e5a Improve a translation string 2026-01-07 19:51:16 +01:00
Henrik Rydgård b7aa38a738 WASAPI: Re-enable AudioClient3. Fix a possible crash. 2026-01-05 19:48:22 +01:00
Henrik Rydgård 481d0fd18c Switch TouchInputFlags to enum class, fix some minor UI issues
Scroll views now only wheel-scroll if the mouse is hovering over them.
2025-12-19 11:38:56 +01:00
Henrik Rydgård c875b22efa Bump cargo.lock 2025-12-15 16:19:36 +01:00
Henrik Rydgård 3c6429a922 Bump cargo.lock 2025-11-23 21:24:22 +01:00
Henrik Rydgård 636e5b33b6 Upgrade some dependencies (#21009)
* Bump some deps

* Bump rcheevos

* Bump langtool deps
2025-11-16 11:30:54 +01:00
Henrik Rydgård 7b05ccafd4 Remove unnecessary linebreaks 2025-11-10 15:34:53 +01:00
Henrik Rydgård 068f055a36 langtool dep bump 2025-10-27 12:20:24 +01:00
Henrik Rydgård 7da47995dc Bump langtools deps 2025-10-20 19:53:21 +02:00