diff options
Diffstat (limited to 'bin/gitano-pre-receive-hook.in')
-rw-r--r-- | bin/gitano-pre-receive-hook.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/gitano-pre-receive-hook.in b/bin/gitano-pre-receive-hook.in index b917633..694894e 100644 --- a/bin/gitano-pre-receive-hook.in +++ b/bin/gitano-pre-receive-hook.in @@ -44,21 +44,21 @@ gitano.config.repo_path(repo_root) local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then - gitano.log.fatal("Unable to locate administration repository. Cannot continue"); + gitano.log.fatal(gitano.i18n.expand("ERROR_NO_ADMIN_REPO")); end local admin_head = admin_repo:get(admin_repo.HEAD) if not admin_head then - gitano.log.fatal("Unable to find the HEAD of the administration repository. Cannot continue"); + gitano.log.fatal(gitano.i18n.expand("ERROR_BAD_ADMIN_REPO")); end local config, msg = gitano.config.parse(admin_head) if not config then - gitano.log.critical("Unable to parse administration repository.") + gitano.log.critical(gitano.i18n.expand("ERROR_CANNOT_PARSE_ADMIN")) gitano.log.critical(" * " .. (msg or "No error?")) - gitano.log.fatal("Cannot continue") + gitano.log.fatal(gitano.i18n.expand("ERROR_CANNOT_CONTINUE")) end -- Now, are we an admin? @@ -74,13 +74,13 @@ end local repo, msg = gitano.repository.find(config, project) if not repo then - gitano.log.critical("Unable to locate repository.") + gitano.log.critical(gitano.i18n.expand("ERROR_CANNOT_LOCATE_REPO")) gitano.log.critical(" * " .. (tostring(msg))) - gitano.log.fatal("Cannot continue") + gitano.log.fatal(gitano.i18n.expand("ERROR_CANNOT_CONTINUE")) end if repo.is_nascent then - gitano.log.fatal("Repository " .. repo.name .. " is nascent") + gitano.log.fatal(gitano.i18n.expand("ERROR_REPO_IS_NASCENT", {name=repo.name})) end -- pre-receive can prevent updates. Its name is a bit misleading. @@ -101,7 +101,7 @@ if repo:uses_hook("pre-receive") then gitano.log.debug("Configuring for pre-receive hook") gitano.actions.set_supple_globals("pre-receive") - local msg = "Running repository pre-receive hook" + local msg = gitano.i18n.expand("RUNNING_PRE_RECEIVE_HOOK") gitano.log.info(msg) gitano.log.syslog.info(msg) @@ -115,9 +115,9 @@ if repo:uses_hook("pre-receive") then } local ok, msg = gitano.supple.run_hook("pre-receive", repo, info, updates) if not ok then - gitano.log.crit(msg or "No reason given, but errored somehow.") + gitano.log.crit(msg or gitano.i18n.expand("ERROR_NO_ERROR_FOUND")) end - gitano.log.info("Finished") + gitano.log.info(gitano.i18n.expand("FINISHED")) end gitano.log.syslog.close() |