-
Notifications
You must be signed in to change notification settings - Fork 289
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] Unwrap Babel translations files #4767
Conversation
Hi @jpelay! I am looking into the addons in Weblate, and it seems we only have no-wrapping for yamls! As far as I can see, there is no addon for po files outputting? |
@Felienne, you're looking at Adventures, which is a YAML component. Text is the PO component and this one does have a PO add-on set to no-wrapping. I'm not sure if unwrapping is triggered and if so when. We could try changing anything in a file and see if the complete file is unwrapped. If not, we could change all wrapped files by deleting one /n and see if Weblate does the rest. |
Ah thanks @Mark-Giesen!! So it is really weird that the lines are now not wrapped in main. Could it be that pre-commit does that? I am not sure whether that only works on py files? |
The PO add-on is set to no-wrapping, but I seem to remember I set it to "wrap on new-lines". This is the --no-wrap behaviour. Maybe someone changed it, or I remember incorrectly. |
They ARE wrapped, as I understand @jpelay. Lines that are old (not changed recently) are still wrapped. I assume these were wrapped in the passed and will only be unwrapped on a change. |
Ah yeah sorry I meant weird that they are wrapped. So probably this PR will fix the issues (but we might want to wait until @Annelein's change is merged?) |
Hi @jpelay! I have merged all weblate PR's so we can do this again now (assuming you did it with a script and not manually haha) |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hail mary that this will work and not break things 🤞!
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). |
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.
Description
A while ago we opened #4501 to add an add-on to Weblate so it wouldn't wrap files, we also changed the documentation to specify a
--no-wrap
option when extracting the labels. However, we are still running into problems where it seems like the files are actually wrapped.Looking into the git blame for the files, it seems like some lines haven't been changed in months, so maybe we actually need to change them manually by unwrapping all of them, and then send them to Weblate and see what happens?