wiki/howto/development/i18n.md
... ...
@@ -66,9 +66,26 @@ During the translation process, translators may have questions regarding new or
66 66
67 67
When translations are done, they are pushed to the same ``translation`` branch of ``https://github.tools.sap/SAP-Sailing-Analytics/sapsailing`` by LXLabs and then usually contain the translation of all changed or added message strings. LXLabs goes by the default locale ("en") and ignores all we do in the German ("de") locale.
68 68
69
-We maintain a [Hudson build job](https://hudson.sapsailing.com/job/SAPSailingAnalytics-translation/) for the ``translation`` branch on our regular repository. Each time we receive translations back from LXLabs we first push them to the ``translation`` branch on our core repo at ``ssh://trac@sapsailing.com/home/trac/git`` and see if the Hudson job builds them without errors. This partly goes back to the times when LXLabs had issues exporting Java properties file syntax when placeholders and single-quote characters were used in the translations; a common problem in the French translations. However, this has improved massively, and we haven't seen any translation-incurred build errors in a long time. Yet, we stick to the process.
69
+We have a Github webhook installed (see [https://github.tools.sap/SAP-Sailing-Analytics/sapsailing/settings/hooks/285417](https://github.tools.sap/SAP-Sailing-Analytics/sapsailing/settings/hooks/285417)) which triggers a CGI-BIN script that is installed on sapsailing.com at ``/var/www/cgi-bin/github.cgi`` and is versioned under ``configuration/httpd/cgi-bin/github.cgi`` to which ``/var/www/cgi-bin/github.cgi`` is a symbolic link, and which reacts to pushes from the user with the e-mail address ``tmsatsls+github.tools.sap_service-tip-git@sap.com``, pushing to branch ``translation``. In this case, the Git workspace installed at ``/home/wiki/gitwiki`` for the user ``wiki`` is used to fetch the latest translations, using the Git remote ``sapsailing`` which is expected to use a Personal Access Token (PAT) that is granted read access to the repository. The changes are then pushed to the ``translation`` branch on ``ssh://trac@sapsailing.com/home/trac/git`` which is expected to trigger the [udson job for the translation branch](https://hudson.sapsailing.com/job/SAPSailingAnalytics-translation/). This, in turn, will run a full build, and if successful, merge the ``translation`` branch into ``master`` and push it back to ``ssh://trac@sapsailing.com/home/trac/git`` which will then trigger the [master's build job](https://hudson.sapsailing.com/job/SAPSailingAnalytics-master/).
70 70
71
-Once the Hudson job for the ``translation`` branch has built the LXLabs translations OK, we merge the ``translation`` branch into our ``master`` branch, and once a good release has been obtained, roll-out to the landscape can take place.
71
+First building in a separate job before merging into master partly goes back to the times when LXLabs had issues exporting Java properties file syntax when placeholders and single-quote characters were used in the translations; a common problem in the French translations. However, this has improved massively, and we haven't seen any translation-incurred build errors in a long time. Yet, we stick to the process.
72
+
73
+Roll-out to the landscape can take place after the master job has built a release successfully.
74
+
75
+The Github webhook CGI script is pointed to by the ``/etc/httpd/conf.d/004-git-ssl.conf`` configuration which has to enable symbolic links for its CGI directory (``Options FollowSymLinks``). The ``ScriptAlias`` in the configuration is defined like this:
76
+
77
+```
78
+ScriptAlias /hooks/ /var/www/cgi-bin/
79
+<Directory "/var/www/cgi-bin">
80
+ SSLOptions +StdEnvVars
81
+ AllowOverride None
82
+ Options FollowSymLinks
83
+ Order allow,deny
84
+ Allow from all
85
+</Directory>
86
+```
87
+
88
+letting the webhook react to the URL ``https://git.sapsailing.com/hooks/github.cgi``. The Github hook configuration must be set to use ``application/json`` as the content type as the CGI script parses pusher and ref from the request body that is expected to be in JSON format.
72 89
73 90
## Adding New Collections of Translatable Strings
74 91