Feature #12342

[translate.vm]Decide if we merge 'weblate git' with 'staging git'

Added by emmapeel 2017-03-14 10:29:22 . Updated 2019-06-27 17:16:45 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2017-03-14
Due date:
% Done:

100%

Feature Branch:
Type of work:
Research
Blueprint:

Starter:
Affected tool:
Deliverable for:
309

Description

In our famous svg [1], ‘weblate git’ and ‘staging git’ have a note about being merged.

I think it will be much better to merge this two repos in one, we can always have the repo reverted to a previous stage if something stops working and we don’t need to make staging ikiwiki changed able to get to the weblate git.

[1]/code/attachments/download/1551/weblate.svg


Subtasks


Related issues

Blocks Tails - Feature #12340: [translate.vm] give weblate permission to write to /var/lib/weblate/staging Duplicate 2017-03-14

History

#1 Updated by emmapeel 2017-03-14 10:30:47

  • blocks Feature #12340: [translate.vm] give weblate permission to write to /var/lib/weblate/staging added

#2 Updated by intrigeri 2017-03-14 11:56:52

> I think it will be much better to merge this two repos in one, we can always have the repo reverted to a previous stage if something stops working and we don’t need to make staging ikiwiki changed able to get to the weblate git.

Disclaimer: here are a quick thoughts from someone who knows quite a bit about Git/ikiwiki, but doesn’t understand the proposed design very well (the meaning of the various arrows is not always obvious to me).

I see that the staging ikiwiki is in charge of updating the PO files for all languages (since our production ikiwiki doesn’t do that for languages that are not enabled in production yet). So it needs to commit and push to a Git repo (generally, a bare one). If it hasn’t a dedicated repo, but instead shares one with weblate, then it means we’ll have two different systems pushing to the same repo. IIRC ikiwiki first pulls before it attempts any push, which solves at least part of one direction of the problem. What about the other direction? In other words, does weblate assume it has exclusive write access to the Git repo it pushes to (“weblate git”), or is it able to cope with concurrent access, e.g. by pulling before pushing?

Also, I don’t understand this sentence: Weblate needs the POT files so maybe we should merge “staging Git” and “Weblate Git”. Does it mean that we’re assuming non-bare repositories here, i.e. a Git working copy where POT files would live (but without being tracked by Git)? If we want to share such a working copy between two systems, then what I wrote above is mostly useless (there’s no such thing as pushing and pulling in this case, only committing changes). But then the problem becomes: what happens when they both commit at the same time, or one commit while the other one is doing some work, e.g. weblate commits while ikiwiki is running, and what happens when ikiwiki commits files that are being worked on in weblate? I think that ikiwiki assumes exclusive access to its working copy. I wouldn’t be surprised if weblate did the same. So I have doubts about how they can cooperate here, if they use a single, shared Git repo.

Once these questions are resolved, then I think that Git merge conflict resolution will be the next big problem to tackle in this area: e.g. ikiwiki can update a string in a PO file, while the (previous version of the) very same string is being translated in weblate.

#3 Updated by sajolida 2017-09-06 17:00:16

I don’t want to be the mastermind behind this whole plan anymore.

#4 Updated by Anonymous 2017-12-19 16:44:46

  • Assignee deleted (sajolida)
  • Target version set to Tails_3.6
  • Type of work changed from Discuss to Research
  • Deliverable for set to Sponsor_L

I will think about the setup in detail myself.

#5 Updated by Anonymous 2018-01-17 13:37:08

#6 Updated by emmapeel 2018-02-09 13:37:46

After some more tests I think that .pot files are not needed on ‘weblate git’ so they can be two different repositories/folders, not sure this issue is relevant anymore.

#7 Updated by Anonymous 2018-03-02 10:58:38

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

We’ve seen together that .pot files are needed simply if we want to add new languages using the weblate interface. We have a manual procedure which could replace the procedure using the interface. So indeed they are not totally necessary, but it would be cleaner to keep them.

However, I believe that we do need two git repositories after all

- one will contain all the translations, even the unreviewed ones -> this is to be able to build the staging ikiwiki.
- the second one will contain only the reviewed translations and will push to tails/master.

Thus, I will now close this ticket - and if we decide otherwise because we realize we miss something, I’ll reopen it later.

#8 Updated by intrigeri 2019-06-27 17:16:45

  • Assignee deleted ()