Match localized chat strings in PlaytimeStep#9
Merged
Conversation
Owner
|
Thanks for the many contributions! Pardon my intrusion, but was this AI generated? Dalamud's new AI policy (even though this plugin isn't in the repo yet) says we have to disclose any AI generated code and we need to keep track of this stuff. I won't reject these PRs outright since they're small and would've been barely copyrightable anyway and look good anyway, but please let know if you did. |
Contributor
Author
|
Hello, Yes it's generated by Claude Opus 4.7. Reviewed and tested by myself |
redstrate
reviewed
May 1, 2026
The step waits for the chat system message produced by /playtime, but only matched the English string "Total Play Time:". On non-English clients the message never matched and the export pipeline stalled indefinitely. Use the verbatim prefixes from LogMessage row 859 in EN/FR/DE/JP, and strip any combination of colon + whitespace (including the narrow-no-break space FR uses before its colon, and the plain ASCII space JP uses with no colon at all) when extracting the value. The same code path now handles all four languages. EN: "Total Play Time: 1 day, 2 hours, 5 minutes" FR: "Temps de jeu total : 1 jour, 18 heures, 55 minutes" DE: "Gesamtspielzeit: 1 Tag, 2 Stunden, 5 Minuten" JP: "累積プレイ時間 1日2時間5分" Verified live on a French 7.5 client; EN/DE/JP markers and separators were sourced from LogMessage row 859 via xivapi (rather than guessed), so they should match the strings the game actually emits.
790b13a to
6c33cc9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PlaytimeStepwaits for the chat system message produced by/playtime, but the existing check only matches the English string"Total Play Time:". On non-English clients the chat message never matches, so the step never raisesCompletedand the export pipeline stalls there indefinitely.I noticed this on a French client where the message is
Temps de jeu total : 1 jour, 18 heures, 55 minutes— the substring check fails and the pipeline never advances past the Playtime step.Change
Split(": ")[1]extraction with anIndexOf(':', markerIdx) + 1substring, thenTrim(). This is also robust to the non-breaking space FFXIV uses before the colon in French ("total :"), which would have broken the previousSplit(": ")split even if the contains-check had passed.The DE / JP markers are best-effort based on the conventional translations; if they're wrong the worst case is the step still stalls on those clients (no behavior change for them vs. today).
Testing
Built and tested live on a 7.5 client (FR, API 15). The chat message
"Temps de jeu total : 1 jour, 18 heures, 55 minutes"is now matched and the step advances to the next stage as expected. EN markers were preserved verbatim, so existing English-client behavior is unchanged.