[debian-edu-commits] [Debian Wiki] Update of "DebianEdu/HowTo/ManageWeblate" by FransSpiesschaert

Debian Wiki wiki at debian.org
Wed Oct 5 20:34:15 BST 2022


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "DebianEdu/HowTo/ManageWeblate" page has been changed by FransSpiesschaert:
https://wiki.debian.org/DebianEdu/HowTo/ManageWeblate?action=diff&rev1=1&rev2=2

Comment:
Major rewrite, including the case of pot files having been modified in the meantime

- Frans Spiesschaert, Petter Reinholdtsen and Mike Gabriel are the project maintainers who could commit to the git repository on salsa.
+ = Administrators =
  
+ The contributors of the Debian Edu Documentation Translation Project on Hosted Weblate with administrator privileges are:
+  * Petter Reinholdtsen
+  * Mike Gabriel
+  * Frans Spiesschaert
- To be able to commit one has to:
- - log into hosted weblate
- - go to Debian Edu Documentation, component Bullseye manual (important)
- - in the menu, select Manage->Settings
- - then select the "Version control" tab
- - there one has to fill in the "Repository push URL" item with
  
+ Administrators are able to push Hosted Weblate Debian Edu documentation translation updates to Salsa.
- https://salsa-username:salsa-password@salsa.debian.org/debian-edu/debian-edu-doc.git
- - "Save" settings (at the bottom of the "Version control" tab)
- - after that go back to Debian Edu Documentation, component Bullseye
- manual
- - now in the menu, select Manage->Repository maintenance
- - if there are pending changes, then select first the Commit button
- - thereafter select the Push button.
  
+ = Hosted Weblate <--> Salsa relationship =
- This pushes the translation updates at hosted-weblate to the weblate
- branch at salsa. After that one can checkout the updated weblate
- translations into master.
  
- When this is done, I always empty the "Repository push URL" item in the "Version control" tab of
- +the Manage->Settings menu, because I don't like my salsa password being there in plain text and
- +then I "Save" settings again till the next weekly translation updates.
+ 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 ===
+ 
+ {{{#!wiki note
+ '''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
+     https://''your-salsa-username'':''your-salsa-password''@salsa.debian.org/debian-edu/debian-edu-doc.git
+ 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
+             ||<|2>|| 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.||
+              ||<|2>||* checkout the updated master branch pot file into the weblate branch <<BR>>* 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
+ 
+             ||<|2>|| 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:||
+               ||<|2>||* {{{git checkout weblate}}} <<BR>>* For each manual whose pot file has been updated, execute in their respective directories:<<BR>> {{{for PO in $(find -name "*.po") ; do msgmerge -U $PO ''manual_name''.pot ; done}}} <<BR>>* {{{git push}}}||
+ 
+ 
+ === Final steps on Hosted Weblate ===
+ 
+             ||<|2>|| This preliminary step has to been taken when we had to deal with an updated pot file in the master branch:||
+               ||<|2>||* Refresh Hosted Weblate's copy of the git repository<<BR>> {{{manage > repository maintenance > lock}}}||
+ 
+ 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
+ 



More information about the debian-edu-commits mailing list