Skip to content

Match localized chat strings in PlaytimeStep#9

Merged
redstrate merged 1 commit into
redstrate:mainfrom
jblemee:fix/playtime-step-i18n
May 1, 2026
Merged

Match localized chat strings in PlaytimeStep#9
redstrate merged 1 commit into
redstrate:mainfrom
jblemee:fix/playtime-step-i18n

Conversation

@jblemee

@jblemee jblemee commented May 1, 2026

Copy link
Copy Markdown
Contributor

Problem

PlaytimeStep waits 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 raises Completed and 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

  • Match against an array of localized markers (EN / FR / DE / JP).
  • Replace the brittle Split(": ")[1] extraction with an IndexOf(':', markerIdx) + 1 substring, then Trim(). This is also robust to the non-breaking space FFXIV uses before the colon in French ("total :"), which would have broken the previous Split(": ") 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.

@redstrate

redstrate commented May 1, 2026

Copy link
Copy Markdown
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.

@jblemee

jblemee commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Hello,

Yes it's generated by Claude Opus 4.7.

Reviewed and tested by myself

Comment thread Auracite/Steps/PlaytimeStep.cs Outdated
Comment thread Auracite/Steps/PlaytimeStep.cs Outdated
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.
@jblemee jblemee force-pushed the fix/playtime-step-i18n branch from 790b13a to 6c33cc9 Compare May 1, 2026 00:46
@redstrate redstrate merged commit c384431 into redstrate:main May 1, 2026
1 check failed
@jblemee jblemee deleted the fix/playtime-step-i18n branch May 1, 2026 20:57
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.

2 participants