from .base_app import BaseHookApp
+from .xlate import XLATOR
+
LOG = logging.getLogger(__name__)
DEFAULT_PARENT_DIR = '/etc/puppetlabs/code/fileserver'
+_ = XLATOR.gettext
+ngettext = XLATOR.ngettext
+
# =============================================================================
class WebhookDeployApp(BaseHookApp):
def __init__(self, appname=None, verbose=0, version=__version__):
"""Constructor."""
- description = textwrap.dedent('''\
- Receives push events as JSON-Data and synchronizes
- the local repository.
- ''').strip()
+ description = _(
+ 'Receives push events as JSON-Data and '
+ 'synchronizes the local repository.')
self.projects = {
'hiera': {
LOG.debug("Found project {!r}.".format(full_name))
return self.deploy(cfg)
- msg = "Could not find a definition for project {!r}.".format(self.full_name)
+ msg = _("Could not find a definition for project {!r}.").format(self.full_name)
self.error_data.append(msg)
LOG.error(msg)
if 'branch' in cfg and cfg['branch']:
branch = cfg['branch']
- LOG.info("Deploying working directory {f!r} for project {p!r} ...".format(
+ LOG.info(_("Deploying working directory {f!r} for project {p!r} ...").format(
f=full_path, p=full_name))
if not os.access(parent_dir, os.F_OK):
- msg = "Parent directory {d!r} of project {p!r} does not exists.".format(
+ msg = _("Parent directory {d!r} of project {p!r} does not exists.").format(
d=parent_dir, p=full_name)
LOG.error(msg)
self.error_data.append(msg)
return True
if not os.path.isdir(parent_dir):
- msg = (
+ msg = _(
"Path for parent directory {d!r} for project {p!r} "
"is not a directory.").format(d=parent_dir, p=full_name)
LOG.error(msg)
(ret_val, stdoutdata, stderrdata) = self.handler.call(cmd, sudo=self.do_sudo)
if stdoutdata:
- msg = "Output:\n{}".format(to_str(stdoutdata))
+ msg = _("Output:") + "\n{}".format(to_str(stdoutdata))
self.print_out(msg)
else:
LOG.debug("No output.")
if stderrdata:
cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd))
- msg = "Error messages on '{c}':\n{e}".format(c=cmd_str, e=to_str(stderrdata))
+ msg = _("Error messages on {c!r}:\n{e}").format(c=cmd_str, e=to_str(stderrdata))
if ret_val:
self.error_data.append(msg)
self.print_out(msg)
msgstr ""
"Project-Id-Version: puppetmaster_webhooks 1.3.1\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2018-12-28 11:49+0100\n"
-"PO-Revision-Date: 2018-12-28 11:59+0100\n"
+"POT-Creation-Date: 2018-12-28 12:16+0100\n"
+"PO-Revision-Date: 2018-12-28 12:15+0100\n"
"Last-Translator: Frank Brehm <frank.brehm@pixelpark.com>\n"
"Language: de_DE\n"
"Language-Team: de_DE <LL@li.org>\n"
msgid "Could not evaluate content of {f!r}: {e}"
msgstr "Konnte den Inhalt von {f!r} nicht auswerten: {e}"
+#: lib/webhooks/deploy.py:47
+msgid "Receives push events as JSON-Data and synchronizes the local repository."
+msgstr ""
+"Empfängt Push-Ereignisse als JSON-Data und synchronisiert das entsprechende lokale "
+"Arbeitsverzeichnis mit dem Repository."
+
+#: lib/webhooks/deploy.py:183
+msgid "Could not find a definition for project {!r}."
+msgstr "Konnte keine Definition für das Projekt {!r} finden."
+
+#: lib/webhooks/deploy.py:206
+msgid "Deploying working directory {f!r} for project {p!r} ..."
+msgstr "Aktualisiere Arbeitsverzeichnis {f!r} für das Projekt {p!r} ..."
+
+#: lib/webhooks/deploy.py:210
+msgid "Parent directory {d!r} of project {p!r} does not exists."
+msgstr "Das übergeordnete Verzeichnis {d!r} des Projekts {p!r} existiert nicht."
+
+#: lib/webhooks/deploy.py:217
+msgid "Path for parent directory {d!r} for project {p!r} is not a directory."
+msgstr "Der Pfad zum übergeordneten Verzeichnis {d!r} des Projekts {p!r} ist kein Verzeichnis."
+
+#: lib/webhooks/deploy.py:246
+msgid "Output:"
+msgstr "Ausgabe:"
+
+#: lib/webhooks/deploy.py:253
+msgid ""
+"Error messages on {c!r}:\n"
+"{e}"
+msgstr ""
+"Fehlermeldungen von {c!r}:\n"
+"{e}"
+
#: lib/webhooks/show_modules.py:58
msgid "Returns a list with all used Puppet modules."
msgstr "Gibt eine Liste mit allen Puppet-Modulen zurück."
msgstr ""
"Project-Id-Version: puppetmaster_webhooks 1.3.1\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2018-12-28 11:49+0100\n"
+"POT-Creation-Date: 2018-12-28 12:16+0100\n"
"PO-Revision-Date: 2018-12-28 09:57+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en_US\n"
msgid "Could not evaluate content of {f!r}: {e}"
msgstr ""
+#: lib/webhooks/deploy.py:47
+msgid "Receives push events as JSON-Data and synchronizes the local repository."
+msgstr ""
+
+#: lib/webhooks/deploy.py:183
+msgid "Could not find a definition for project {!r}."
+msgstr ""
+
+#: lib/webhooks/deploy.py:206
+msgid "Deploying working directory {f!r} for project {p!r} ..."
+msgstr ""
+
+#: lib/webhooks/deploy.py:210
+msgid "Parent directory {d!r} of project {p!r} does not exists."
+msgstr ""
+
+#: lib/webhooks/deploy.py:217
+msgid "Path for parent directory {d!r} for project {p!r} is not a directory."
+msgstr ""
+
+#: lib/webhooks/deploy.py:246
+msgid "Output:"
+msgstr ""
+
+#: lib/webhooks/deploy.py:253
+msgid ""
+"Error messages on {c!r}:\n"
+"{e}"
+msgstr ""
+
#: lib/webhooks/show_modules.py:58
msgid "Returns a list with all used Puppet modules."
msgstr ""
msgstr ""
"Project-Id-Version: puppetmaster_webhooks 1.4.2\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2018-12-28 11:49+0100\n"
+"POT-Creation-Date: 2018-12-28 12:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Could not evaluate content of {f!r}: {e}"
msgstr ""
+#: lib/webhooks/deploy.py:47
+msgid "Receives push events as JSON-Data and synchronizes the local repository."
+msgstr ""
+
+#: lib/webhooks/deploy.py:183
+msgid "Could not find a definition for project {!r}."
+msgstr ""
+
+#: lib/webhooks/deploy.py:206
+msgid "Deploying working directory {f!r} for project {p!r} ..."
+msgstr ""
+
+#: lib/webhooks/deploy.py:210
+msgid "Parent directory {d!r} of project {p!r} does not exists."
+msgstr ""
+
+#: lib/webhooks/deploy.py:217
+msgid "Path for parent directory {d!r} for project {p!r} is not a directory."
+msgstr ""
+
+#: lib/webhooks/deploy.py:246
+msgid "Output:"
+msgstr ""
+
+#: lib/webhooks/deploy.py:253
+msgid ""
+"Error messages on {c!r}:\n"
+"{e}"
+msgstr ""
+
#: lib/webhooks/show_modules.py:58
msgid "Returns a list with all used Puppet modules."
msgstr ""