User:Amire80/twn maintenance summary

Tutorial for YAML files: https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration_example
 * user account in shell
 * user account in twn
 * staff group
 * gadget - rights recommended
 * also gadgets block and rename-user
 * reply templates: rights, mail
 * Support:
 * questions about message wording and documentation
 * MediaWiki - usually easy to fix
 * Other projects - need commit access
 * Updating sources:
 * Openstreetmap
 * update-osm on shell
 * goto https://translatewiki.net/wiki/Special:ManageMessageGroups
 * If keys added, rebuild message index: sudo -u betawiki php /www/w/extensions/Translate/scripts/createMessageIndex.php

MediaWiki

 * ''See also the main documentation at Repository management

Importing from the source repo

 * bupdate # updates everything, incl. extensions etc.
 * repo update mediawiki # only MediaWiki code. no need to sudo / b.
 * cd /www/w/extensions/Translate/scripts
 * php sync-group.php --lang=en,qqq --group=core # Run this only on core!
 * in case of conflicts: Skip accepts the Wiki translation.
 * php sync-group.php --lang=en --group=ext-translate-pagetranslation # Run this only on core!
 * shortcut:

sync-extmaintained ext-translate-pagetranslation
 * php sync-group.php # Run this only on core!
 * Check fuzzyBot changes to see if there is anything that needs fuzzying (Special:Contributions/FuzzyBot)

Exporting from TWN to the source repo
Source repos are listed in /resources/USERNAME/REPOCONF.

(copy and run environment variables lines) (enter the secret passphrase)
 * ssh-agent
 * ssh-add /home/betawiki/id_rsa

Create private repo (ONLY ONCE!)
 * repocreate mediawiki

Update private repo (every time!)
 * repoupdate mediawiki

Export from TWN database to my private repo:
 * repoexport mediawiki

Export from my private repo to the central repo:
 * repocommit mediawiki

Note, repo commands with and without space:
 * repo update foo # updates /resources/projects
 * repoupdate foo # updates stuff where you are currently in

Alternative to only update one extension because you need to test:

If messages were changed, rebuild the localisation caches:

$ b php /www/w/maintenance/rebuildLocalisationCache.php --threads=12


 * update sources - in /home/betawiki/bin
 * process changes - Special:ManageMessageGroups
 * update message index if needed - createmi
 * export / bxa [productshortcut|groupname] (bxa = betawiki export all)
 * - bxa osm will export all OpenStreetMap related groups.
 * download to the machine you commit from.
 * Make an alias: alias mtgz='cd $HOME/export; tar -pczf $HOME/x.tgz .; cd -' # It's so much quicker :)
 * Update your local sources (!!!)
 * Unpack on the machine you commit from.
 * commit from your local machine.
 * push if needed (git)
 * (like 1) re-import committed translations (update-xxxx on translatewiki shell)
 * (like 2) Special:ManageMessageGroups