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

[CHORE] Check .po files for accidental wrapping #4930

Merged
merged 8 commits into from
Dec 20, 2023
Merged

Conversation

rix0rrr
Copy link
Collaborator

@rix0rrr rix0rrr commented Dec 19, 2023

Translations in the .po files should never be wrapped. When we extract them, we configure --no-wrap, and we also configure Weblate to never wrap them.

However, for a reason we don't understand, wrapping still occurred in #4878.

Add a test to detect this so we don't run into the problem again.

Translations in the `.po` files should never be wrapped. When we
extract them, we configure `--no-wrap`, and we also configure Weblate
to never wrap them.

However, for a reason we don't understand, wrapping still occurred.

Add a test to detect this so we don't run into the problem again.
@ghost
Copy link

ghost commented Dec 19, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@Felienne
Copy link
Member

Perfect, this fails :)

mergify bot pushed a commit that referenced this pull request Dec 19, 2023
In #4767 we have unwrapped all po files hoping to never ever again have annoying issues. It went well for a while, but.... for reasons I can't understand, #4878 again wrapped the po files :( 

<img width="1470" alt="image" src="https://github.com/hedyorg/hedy/assets/1003685/e7375971-a41f-4746-ba94-b230a6d524ae">

This unwraps everything

Additionally, @rix0rrr created #4930 which adds a test to test for accidental unwrapping. That will not solve the issue but will 1) prevent issues and 2) might help us to understand when it goes wrong and with that why.
@Felienne
Copy link
Member

Cool, let's see if this passes now that #4929 is merged!

@Felienne
Copy link
Member

Cool, let's see if this passes now that #4929 is merged!

Ah there are some strings that have a (wanted) newline like email content:

image

And I see now some strings are also empty, which I guess we'd like to catch too in a test?

image

(but only in English, not in other languages, because Weblate will copy it over)

Copy link
Member

@Felienne Felienne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This will help us to understand why Weblate messes up stuff despite the no-wrap setting!

Copy link
Contributor

mergify bot commented Dec 20, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 546460e into main Dec 20, 2023
@mergify mergify bot deleted the check-pofiles-wrapping branch December 20, 2023 08:03
Copy link
Contributor

mergify bot commented Dec 20, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

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