diff options
-rw-r--r-- | lang/en.lua | 5 | ||||
-rw-r--r-- | lib/gitano/actions.lua | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lang/en.lua b/lang/en.lua index 37709cc..5f78a37 100644 --- a/lang/en.lua +++ b/lang/en.lua @@ -113,4 +113,9 @@ example administration repository rules and an admin user and group. -- Messages from update-ssh UPDATE_SSH_USAGE = "Usage: gitano-update-ssh /path/to/repos", + + -- Messages from the actions module + VERIFY_NEW_GITANO_ADMIN = "Verifying new gitano-admin master", + LOOKS_OKAY = "Looks okay", + VERIFY_NEW_ADMIN_SHA = "Verifying new admin sha: ${sha}", } diff --git a/lib/gitano/actions.lua b/lib/gitano/actions.lua index 264fa48..95be9d0 100644 --- a/lib/gitano/actions.lua +++ b/lib/gitano/actions.lua @@ -8,6 +8,7 @@ local util = require "gitano.util" local log = require "gitano.log" local gall = require "gall" local config = require "gitano.config" +local i18n = require 'gitano.i18n' local sio = require 'luxio.simple' local supple = require 'gitano.supple' local subprocess = require 'luxio.subprocess' @@ -19,22 +20,22 @@ local function update_actions(conf, repo, tags) tags["ref"] == "refs/heads/master" then -- Update to the master branch of the gitano-admin repo, perform a conf -- check based on the target sha - log.chat("Verifying new gitano-admin master") + log.chat(i18n.expand(VERIFY_NEW_GITANO_ADMIN)) local conf, msg = config.parse(repo.git:get(tags["newsha"])) if not conf then return false, msg end - log.chat("Looks okay") + log.chat(i18n.expand("LOOKS_OKAY")) end if tags["ref"] == "refs/gitano/admin" then -- Update to the admin branch, see if we can cause the repo to -- parse the new admin branch safely. - log.chat("Verifying new admin sha:", tags["newsha"]) + log.chat(i18n.expand("VERIFY_NEW_ADMIN_SHA", {sha=tags["newsha"]})) local ok, msg = repo:validate_admin_sha(tags["newsha"]) if not ok then return false, msg end - log.chat("Looks okay") + log.chat(i18n.expand("LOOKS_OKAY")) end |