Administrators
The contributors of the Debian Edu Documentation Translation Project on Hosted Weblate with administrator privileges are:
- Petter Reinholdtsen
- Mike Gabriel
- Frans Spiesschaert
Administrators are able to push Hosted Weblate Debian Edu documentation translation updates to Salsa.
Hosted Weblate <--> Salsa relationship
The debian-edu-doc git repository has always at least two active branches, the master branch and the weblate branch. The latter one is the branch that is being tracked by the debian-edu-doc git repository at Hosted Weblate and is exclusively meant to receive translation updates from it. This means that translators on Hosted Weblate work on a copy of the permanent weblate branch of debian-edu-doc on Salsa. As a result, pushing updates from Hosted Weblate to the weblate branch on Salsa never causes any problems. However, merging the updates from the weblate branch with the translations residing in the master branch must be done carefully. Below we describe the various workflow steps of an administrator merging Hosted Weblate updates with the master branch of the debian-edu-doc manuals at Salsa.
Pushing updates to Salsa
With the continuous localization feature of Hosted Weblate, it is possible to have Hosted Weblate automatically push translation updates to Salsa. For now, this feature is not used by debian-edu-doc. Instead, translation updates are pushed manually by an administrator, whenever they have time to also merge these updates into the main branch at Salsa.
Steps on Hosted Weblate
Note
Debian Edu always has at least two manuals in active development. Each manual is a component in terms of Hosted Weblate. The source code repository URL of one arbitrarily chosen component points to the debian-edu-doc git-repo on Salsa. You could call it terefore the main component. The other component(s) use an internal weblate source code repository URL, indicating that their repository is shared with the main component. Remember that administrative tasks on Hosted Weblate should always be performed from within that main component.
So, as a Hosted Weblate debian-edu-doc administrator, at https://hosted.weblate.org/projects/debian-edu-documentation/<''main-component''>, do:
1. temporarily prevent any changes in the Hosted Weblate repository
manage > repository maintenance > lock
2. set the push URL
manage > settings > version control > repository push URL
- this URL is in the form of
3. push translation updates to Salsa
manage > repository maintenance > push
Steps on your local Git copy of debian-edu-doc
4. update your local copy of the debian-edu-doc git repository
The next two steps are intermediate steps and only needed when the pot file in the master branch has been updated in the meantime, causing the updated translations in the weblate branch having been made against an outdated version of the pot file.
* checkout the updated master branch pot file into the weblate branch
* merge the updated weblate translations with the updated pot file
5. checkout the updated weblate translations into the master branch
6. push the master branch translation updates to Salsa
In case you had to deal with an updated pot file, you now also need to merge all PO files in the weblate branch with the updated pot file, in order to keep PO and pot files in the weblate branch in sync with the master branch:
* git checkout weblate
* For each manual whose pot file has been updated, execute in their respective directories:
for PO in $(find -name "*.po") ; do msgmerge -U $PO ''manual_name''.pot ; done
* git push
Final steps on Hosted Weblate
This preliminary step has to be taken when we had to deal with an updated pot file in the master branch:
* Refresh Hosted Weblate's copy of the git repository
manage > repository maintenance > Update
7. reenable changing the hosted weblate repository
manage > repository maintenance > unlock
8. disable automatic pushes from being made by emptying the repository push URL field:
manage > settings > version control > repository push URL
That's it