Some projects need additional setup than just creation of l10n file to register a language. Sometimes this could be automated, sometimes not. In any case it would be nice if the project could define a hook that would either do the necessary things or alert the exporter that manual action is needed.
- Option 1: have those scripts in our repository and go through normal code review (safer, less visible).
- Option 2: have those scripts located in the respective repositories in a standard location (say translatewiki-precommit)
- Option 2a: guard against exploits by adding hash for a reviewed version of the file, and do not run if hash does not match
- Option 2b: guard against exploits by extensive sandboxing
Of course, we could implement 2b in addition to 2a or 1.
For both options we need to extend the repoconfig.yaml syntax to provide a place for precommit hooks.
Option 2 is nice. If we find out later that the mechanics to register new languages are similar and the code gets duplicated across repositories (e.g. those which use Gettext for Django?), they can always adopt some shared syntax sugar.