Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Translator: Improves newline handling #597

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

davidwessman
Copy link
Collaborator

This is a frustating bug that has been open for many years:
https://issuetracker.google.com/issues/119256504?pli=1

Maybe one of the other APIs are more consistent.

- The newline replacement only worked when extra spaces were added
  by Google Translate API, which is not always happening.
- Adds some more tests to catch this and changes the replacement to
  be closer to replacing of interpolations.
- Fixes #595

This is a frustating bug that has been open for many years:
https://issuetracker.google.com/issues/119256504?pli=1

Maybe one of the other APIs are more consistent.
@glebm glebm merged commit 7b4eb29 into main Sep 15, 2024
8 checks passed
@glebm glebm deleted the 595-google-translate-newline branch September 15, 2024 20:51
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.

Newline placeholder <br id=i18n /> is not replaced with newline after translation
2 participants