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

We have to delete the destination branch to push updated translations (xlf) #13188

Open
2 tasks done
rcc1101 opened this issue Dec 4, 2024 · 6 comments
Open
2 tasks done
Labels
question This is more a question for the support than an issue.

Comments

@rcc1101
Copy link

rcc1101 commented Dec 4, 2024

Describe the issue

i have checked out : https://github.com/WeblateOrg/docker-compose.git , 1week back, branch main. The below are on weblate running on docker compose form this repo.

Once the server(s) are all up below is what i did.

  1. created a project
  2. created a component
  3. given the source branch, source repo url (bitbucket)
  4. given destination bitbucket url, branch

What works fine

  1. when component is created its downloading the (en_US) xlf files, and showing the string
  2. auto translations using openAI is working fine and generates french
  3. The file goes into the target bit bucket repo + branch

No hooks are configured.

image

What doesn't work fine

  1. after the initial translation if I update some new strings / modify existing strings in the source branch (for en_US)
  2. First of all, these changes don't flow into Weblate without cleanup/ synchronization. But the question is, the source files are going one commit forward. I was wondering what might cause conflict. On local systems moving 1 commit forward doesn't get us conflicts.
  3. I come to Manage > repository > synchronize/ update
  4. I can see the modified strings (in en_US); I can also auto translate using machine translation to french.
  5. The problem comes when i try to push the updated translated xlf file to the target repository + branch. (see image 2)
image

But if i delete the target branch from bitbucket, the step 4 above is going good. If i dont delete the target branch i get the above error. I somehow think, that weblate is trying to create a new branch from the source branch, naming it with target branch name and trying to push --which is failing when target branch is availabe already.

Below is the error i get
image

I already tried

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

Steps to reproduce the behavior

Expected behavior

When source is updated, and we synchronise it with weblate. New translations in French are created/ generated they should automatically go to destination branch on bitbucket

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

took latest url from git. branch: main

Weblate deploy checks

docker compose exec --user weblate weblate weblate check --deploy
WARN[0000] /Users/ravichandra.chitrapu/poc/weblate-docker/docker-compose.override.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E003) Cannot send e-mail ([Errno -2] Name or service not known), please check EMAIL_* settings.
	HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#out-mail
?: (weblate.E012) The server e-mail address should be changed from its default value
	HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#production-email
?: (weblate.E013) The "From" e-mail address should be changed from its default value
	HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#production-email

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
	HINT: https://docs.weblate.org/en/weblate-5.8.4/admin/backup.html

System check identified 8 issues (11 silenced).

Additional context

@nijel
Copy link
Member

nijel commented Dec 5, 2024

I got a bit lost in your description. But generally, you need to use same workflow in Weblate and in the repository to merge changes. If you use rebase in Weblate and merge commits on the repository side, you end up with issues like this. See https://docs.weblate.org/en/latest/admin/continuous.html#avoiding-merge-conflicts for more info.

@rcc1101
Copy link
Author

rcc1101 commented Dec 6, 2024

I changed the update behavior. Still issue persist. Let me describe what i did

Setup

  1. created a branch in bit bucket (lang-in) added a file ( data/translation-en_US.xlf ) into this branch.
  2. configured a project, component in Weblate. In addons added Automatic Translation, Add missing languages. Added source repository as bitbucket, source branch as lang-in , destination repo as bit bucket. Destination branch as lang-out.
  3. Added French, Telugu to translated languages.

How i used the tool

  1. came to project > component > repository maintenance > clicked synchronise
  2. came to project > component > clicked on (+) for french, telugu. Both got generated, auto translated using openAI, and sent to lang-out branch ( lang-out > data/translate-fr.xlf , data/translate-te.xlf)
  3. went to bit bucket, added a new xml snip to the file ( data/translation-en_US.xlf ), came to repository maintenance > update-with-merge > i get error Could not merge remote branch into project/component.

I was expecting weblate to pull in the updated data/translate-en_US.xlf file and auto update -data/translate-fr.xlf , data/translate-te.xlf with the new xml snippet translated tags and also push them to the target branch lang-out

I hope i am clear this time.

Like you said, i went through the merge, tried to change the git merge type but it didnt help.

@nijel
Copy link
Member

nijel commented Dec 6, 2024

Where were the conflicts? You can add Weblate as another remote and inspect it locally.

@rcc1101
Copy link
Author

rcc1101 commented Dec 9, 2024

can you give steps on how to do it? on the console I see error "could not rebase local branch to remote branch". (you may refer to my initial issue in this thread.

@nijel nijel added the question This is more a question for the support than an issue. label Dec 9, 2024
@nijel
Copy link
Member

nijel commented Dec 9, 2024

Weblate will show you instructions for the specific component if you click on Alerts tab. Generic documentation on the topic is here: https://docs.weblate.org/en/latest/faq.html#how-to-fix-merge-conflicts-in-translations

Copy link

github-actions bot commented Dec 9, 2024

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

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

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.
Projects
None yet
Development

No branches or pull requests

2 participants