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

Gettext without headers: all translations marked fuzzy #9290

Closed
2 tasks done
rix0rrr opened this issue May 22, 2023 · 5 comments
Closed
2 tasks done

Gettext without headers: all translations marked fuzzy #9290

rix0rrr opened this issue May 22, 2023 · 5 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@rix0rrr
Copy link

rix0rrr commented May 22, 2023

Describe the issue

We are using Hosted Weblate.

Because we're noticing that when we are running gettext update commands locally (using pybabel, in case that matters), there are frequent merge conflicts in the time stamps that are in the .po file headers.

So I thought I would be clever and run pybabel with --omit-header, so it doesn't emit the magic msgid "" entry that has the metadata headers attached.

It looks like in response, Weblate has marked all my translations fuzzy, completely reordered all translations in the file, and has replaced them with the original English versions. I had to do some git trickery to get back to a workable state.

This was a surprise to me. Is this expected?

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

Have a number of .po files translated via Weblate.

Then run:

pybabel extract -F babel.cfg -o messages.pot . --no-location --sort-output --omit-header
pybabel update -i messages.pot -d translations -N  --no-wrap --omit-header

Specifically, you can see the change I made in this PR: hedyorg/hedy#4304

Expected behavior

I expected fewer conflicts. Instead I got more :).

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@rix0rrr rix0rrr added the question This is more a question for the support than an issue. label May 22, 2023
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented May 23, 2023

It is not expected to mark existing strings as fuzzy. It would be great if you would include links to the problematic commits. I've quickly looked into hedyorg/hedy#4297, and I don't see anything problematic there. What I can see is adding of fuzzy translations matching source, what was done by the “Prefill translation with source” add-on. For example in hedyorg/hedy@c5b6485

@rix0rrr
Copy link
Author

rix0rrr commented May 23, 2023

Here is the commit where Weblate starts marking a bunch of translations as fuzzy: hedyorg/hedy@93f65c1

Which follows right on the heels of hedyorg/hedy@27f41d8 where I remove all the headers from po files.

2023-05-23 at 19 09

@nijel
Copy link
Member

nijel commented Jun 1, 2023

It is not changing existing translations to be fuzzy, it adds missing strings as fuzzy. This is done by add-on, which you have installed. See https://docs.weblate.org/en/latest/admin/addons.html#prefill-translation-with-source

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Jun 16, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants