Skip to content

Conversation

@nattsw
Copy link
Contributor

@nattsw nattsw commented Apr 9, 2025

When a new post is created, and a user is in "show original" translation mode when inline translation is enabled, the new post comes in translated.

This PR fixes that by registering a custom post message callback, and checking if the user is in "show original".

Before fix

(with show=original new post written in Chinese, translated to English when it should not)

Screen.Recording.2025-04-09.at.6.51.00.PM.mov

After fix

(with show=original new post written in Chinese, not translated to English with added delay)

Screen.Recording.2025-04-09.at.6.47.25.PM.mov

Reviewer note: I attempted to write a system spec, but due to the way the jobs are triggered, it is not very possible.

Additional note: This case does not yet cover scrolling down the post stream.

@nattsw nattsw changed the title FIX: Do not translate new posts from the stream if show=original FIX: Do not translate new posts if show=original Apr 9, 2025
@nattsw nattsw merged commit a90d737 into main Apr 10, 2025
6 checks passed
@nattsw nattsw deleted the new-post-original branch April 10, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants