#40 New project: avahi
Closed by jibecfed. Opened by evverx.

Website: https://github.com/avahi/avahi
Repository: https://github.com/avahi/avahi
Name of the development branch: master
Filemask: po/*
Username: evverx

It would be great if it was also possible to add https://src.fedoraproject.org/user/pemensik (who is an upstream avahi maintainer as well).

It's prompted by https://github.com/avahi/avahi/issues/603


On a somewhat related note since I'm planning to turn on the webhook to let Weblate open PRs I wonder if the Fedora instance somehow gets around https://github.com/WeblateOrg/weblate/issues/9518?

According to https://docs.fedoraproject.org/en-US/localization/hosting/
you are welcome to use the fedora translation platform

one single issue @evverx is that there is no POT file in there repository.
Weblate's behavior is as follow:
maintainer update the POT file as much as required in the git repository
Weblate will get informed, and update every languages, eventually notifying translators there is new strings to translate
as far as I know, without this file, it is not possible to have a correct usage of weblate, since the users won't be in sync with what is to translate in the software

@jibecfed I've just added the pot file: https://github.com/avahi/avahi/commit/45378fb97eff8bc4d2b43c471fb10410cb1b7073 and the webhook was triggered when that commit was pushed to the master branch. I'm not sure how to make sure it works.

great, thank you

I did complete the component configuration to add this POT file
I did add you as admin on this project
I translated French language and Weblate opened a pull request https://github.com/avahi/avahi/pull/625

as long as you don't merge it, Weblate will reuse this pull request with all translations
you are really welcome to send an email on https://lists.fedoraproject.org/archives/list/trans@lists.fedoraproject.org/ to invite translators to translate your project

also, if you give a timeline, it helps a lot for organization

as an example: next release should happen by first week of september, any translation done before 1 September 2024 will be included in the release.

have a nice day,

Metadata Update from @jibecfed:
- Issue status updated to: Closed (was: Open)

Thank you!

Just to make sure I wonder if Weblate is going to open PRs automatically going forward? As far as I understand it should be set up somehow but I'm not sure if I can do that because I'm not familiar with all those settings yet. I'm not sure how to add @pemensik to the organization either. Could you point me in the right direction?

I'm not sure how to add @pemensik to the organization either

I've found https://docs.weblate.org/en/weblate-5.6.2/admin/access.html#inviting-new-users and sent an invitation. The UI says "Pending invitation" so it seems it should work once it's accepted.

PRs should probably be covered at https://docs.weblate.org/en/weblate-5.6.2/devel/integration.html#manage-vcs and https://docs.weblate.org/en/weblate-5.6.2/admin/continuous.html#continuous-localization. I can see "2 pending changes" and the "commit" button there.

Just to make sure I wonder if Weblate is going to open PRs automatically going forward?

Yes it will

Got it. Thank you!

@jibecfed Sorry to bother you again but looks like as soon as I merged https://github.com/avahi/avahi/pull/626 the translation was closed with

The translation was automatically locked due to following alerts: Could not merge the repository

Rebasing (1/4)
dropping 901d0f260cebc9e71bd87c6830fe9dba0ce726af Translated using Weblate (Portuguese (Brazil)) -- patch contents already upstream
Rebasing (2/4)
Auto-merging po/ja.po
Auto-merging po/ko.po
CONFLICT (content): Merge conflict in po/ko.po
error: could not apply 761b818... Translated using Weblate (Japanese)
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm ", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 761b818... Translated using Weblate (Japanese)
(1)
```
It seems I screwed something up somewhere. I'll try to resolve it by following https://docs.weblate.org/en/weblate-5.6.2/faq.html#how-to-fix-merge-conflicts-in-translations but I'm not sure how I ended up there. Should I do something before merging PRs on GitHub to avoid conflicts like that?

Looks like I shouldn't have squashed that PR: https://docs.weblate.org/en/latest/admin/continuous.html#avoiding-merge-conflicts-on-weblate-originated-changes. My bad. Sorry!

I'll just start rebasing PRs and try to figure out how to make commits less chatty without squashing them.

@pemensik as far as I can see the translation was temporarily closed with

Could not push the repository.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
 (128)

20 minutes ago. Did you do anything there? I can see

Repository rebased
Original revision: d09678d6a0d1b5fb36710e78b63f5399786a5c24
New revision: d09678d6a0d1b5fb36710e78b63f5399786a5c24

but I'm not sure where it came from.

(The merge conflict was fixed 5 hours ago and avahi was unlocked)

As far as I understand the "Reset all changes in the Weblate repository" button in the "avahi/glossary" component was pressed. (I've just pressed it too. It was reset and then 46 commits were added on top were various tbx files were added). I'm not sure what I should do to fix it. I'm guessing it should be possible to reset all those commits manually and force-push it to sync it with the upstream repository but I'm not 100% sure.

Could you please slow down? I'm totally lost ;)

Consider Weblate as "owner" of all po files=2E
If you want a smooth experience with weblate, it is better to let it handl=
e everything=2E

If you want to control commits and po files, then it requires to discuss t=
o understand how you would like it to work, so that we find the right way=
=2E

What are the issues you are facing and would like to solve?
Jean-Baptiste

Looking at some commits like https://github.com/avahi/avahi/commit/f03ecdc6e7617a2163619f859bb00b79fd48775c I see you squashed commits from Weblate's pull request. Please prefer "Create a merge commit" button instead of "squase and merge", because Weblate pushes to the PR commits and latter on expect those commits to be there. If they are not there and another unexpected commit (the squashed one) appears, we have a merge conflict for the next commits from Weblate

typos:
squase -> squash
latter -> later

What are the issues you are facing and would like to solve?

Currently https://translate.fedoraproject.org/projects/avahi/glossary/ says

The translation is temporarily closed for contributions due to maintenance, please come back later.
The translation was automatically locked due to following alerts: Could not push the repository.

I'm trying to figure out how it ended up there and how it can be fixed.

Please prefer "Create a merge commit" button instead of "squase and merge", because Weblate pushes to the PR commits and latter on expect those commits to be there

Got it. I'll do that going forward.

(I squashed https://github.com/avahi/avahi/pull/626 because I wanted to shorten Weblate commit messages)

Looks like Weblate keeps sending alerts like

Fedora Weblate / avahi / Glossary avahi
Repository has changes.
The VCS repository has many changes compared to the upstream. Please merge the changes manually or set up push to automate this.

I'm not planning to merge those 46 commits with all those tbx files (and I'm still not sure why all those commits were added there).

I took a look at https://docs.weblate.org/en/weblate-5.6.2/user/glossary.html#glossary where glossaries are described and it seems it was probably created automatically at some point. Given that it isn't used anywhere upstream I wonder if it's safe to remove the "glossary" component? If it doesn't affect https://translate.fedoraproject.org/projects/avahi/master/ in any way I think it should be fine to remove it.

@evverx I have tried to setup source VCS access, but do not have time to fix it yet. I have added URLs including pushing at https://translate.fedoraproject.org/settings/avahi/master/#vcs, maybe clear those again. Not sure which are necessary and cannot spend time on it now. Sorry for creating chaos!

https://translate.fedoraproject.org/settings/avahi/master/#vcs

@pemensik got it. What's weird is that the "master" component is fine in the sense that Weblate doesn't try to push changes directly to the upstream repository and opens PRs like https://github.com/avahi/avahi/pull/629 instead.

I went to https://translate.fedoraproject.org/settings/avahi/glossary/#vcs and took a look at those settings. "Repository push URL" was empty but "Push branch" was "weblate". Once I removed "weblate" and reset the "glossary" component Weblate no longer tried to push those 46 commits directly to the repository, opened https://github.com/avahi/avahi/pull/630 and the alert was gone. Then I flipped "Push on commit" and reset the component again. Those 46 commits were added on the Weblate side without pushing anything upstream or opening PRs.

I'm guessing it was "fixed" (in a sense) but I think the glossary should maybe be removed so as not to confuse anyone. I don't know how safe it is to remove that component though.

@evverx I tried something:

In https://translate.fedoraproject.org/settings/avahi/master/#vcs, I changed the following:
- "Version control system": from "GitHub pull request" and "no remote repository"
- "Source code repository": from "https://github.com/avahi/avahi.git" to "local:"

I merely based myself in the glossary's configuration of another translation project.

This should probably stop new commits and pull request from the glossary.

Actually, I changed in https://translate.fedoraproject.org/settings/avahi/glossary/#vcs (the glossary URL)

@rffontenelle thank you! It seems "no remote repository" should certainly prevent Weblate from syncing with the upstream repository.

I wonder if it should be locked using https://docs.weblate.org/en/weblate-5.6.2/devel/integration.html#managing-version-control-repository just in case to prevent contributors from changing/translating it? I'm worried that since it's unlocked it could look like that it's used.

@evverx Please do not lock it. Whenever the team wants to improve consistency of the translation of some terms, they add an entry to the glossary. Weblate treats the glossary as a component, but a little bit different from other translation components. I'm afraid that if you lock it, users won't be able to add new entries.

@rffontenelle understood. I'll leave it as is then. Thank you!

@pemensik FWIW it doesn't look like the translations are used by the Fedora package in the sense that it looks for them in the wrong place:

openat(AT_FDCWD</home/vagrant>, "/usr//locale/hi_IN/LC_MESSAGES/avahi.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD</home/vagrant>, "/usr//locale/hi/LC_MESSAGES/avahi.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

To get it to work DATADIRNAME should be set to share when the package is built. (That part of the avahi build system looks weird in general and probably needs looking into)

@evverx The unset DATADIRNAME problem affects any distro with gettext >=0.20, so I filed an issue in https://github.com/avahi/avahi/issues/644 (it would be the correct place to discuss this anyway).

Metadata