From: Frank Brehm Date: Wed, 2 Jan 2019 10:25:17 +0000 (+0100) Subject: Translating lib/webhooks/get_forge_modules.py X-Git-Tag: 1.6.4^2~87 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=b7d01942fb15950a947ec15bdf54f48347199789;p=pixelpark%2Fpuppetmaster-webhooks.git Translating lib/webhooks/get_forge_modules.py --- diff --git a/get-forge-modules b/get-forge-modules index e9a3073..f6d7f86 100755 --- a/get-forge-modules +++ b/get-forge-modules @@ -6,18 +6,22 @@ import os import sys import logging +from pathlib import Path + # own modules: -basedir = os.path.abspath(os.path.dirname(__file__)) -libdir = os.path.join(basedir, 'lib') +my_path = Path(__file__) +my_real_path = my_path.resolve() +base_dir = my_real_path.parent +libdir = base_dir.joinpath('lib') -sys.path.insert(0, libdir) +sys.path.insert(0, str(libdir)) from webhooks.get_forge_modules import GetForgeModulesApp -MY_APPNAME = os.path.basename(sys.argv[0]) +MY_APPNAME = my_path.stem LOG = logging.getLogger(MY_APPNAME) -app = GetForgeModulesApp(appname=MY_APPNAME) +app = GetForgeModulesApp(appname=MY_APPNAME, base_dir=base_dir) if app.verbose > 2: LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app)) diff --git a/lib/webhooks/get_forge_modules.py b/lib/webhooks/get_forge_modules.py index b8ca7fc..1494a6d 100644 --- a/lib/webhooks/get_forge_modules.py +++ b/lib/webhooks/get_forge_modules.py @@ -20,12 +20,16 @@ import pwd import grp import errno import sys +import pathlib from operator import itemgetter # Third party modules import six import yaml +import babel + +from babel.dates import format_datetime, LOCALTZ from six import reraise @@ -42,8 +46,13 @@ from .module_list import ModuleInfoDict from .puppetfile import Puppetfile, PuppetfileError +from .xlate import XLATOR + LOG = logging.getLogger(__name__) +_ = XLATOR.gettext +ngettext = XLATOR.ngettext + # ============================================================================= class GetForgeModulesError(BaseHookError): @@ -58,30 +67,28 @@ class GetForgeModulesApp(BaseHookApp): """ default_forge_uri = 'https://forgeapi.puppet.com/v3/modules' - default_puppet_root_env_dir = os.sep + os.path.join( - 'etc', 'puppetlabs', 'code', 'environments') default_http_timeout = 30 max_http_timeout = 600 # ------------------------------------------------------------------------- - def __init__(self, appname=None, verbose=0, version=__version__): + def __init__(self, appname=None, base_dir=None, verbose=0, version=__version__): """Constructor.""" self.environments = [] - self.puppet_root_env_dir = self.default_puppet_root_env_dir + self.puppet_root_env_dir = self.puppet_envs_dir self.forge_uri = self.default_forge_uri self.http_timeout = self.default_http_timeout self.modules = None self._do_forge = True - description = textwrap.dedent('''\ - Collects information about all used Puppet Modules from {url} - and cache those information in {cdir!r}. - ''').strip().format( - url=self.default_forge_uri, cdir=self.default_data_dir) + description = _( + "Collects information about all used Puppet Modules from {url!r} " + "and cache those information in {cdir!r}.").format( + url=self.default_forge_uri, cdir=str(self.default_data_dir)) super(GetForgeModulesApp, self).__init__( - appname=appname, verbose=verbose, version=version, description=description) + appname=appname, base_dir=base_dir, verbose=verbose, + version=version, description=description) self.modules = ModuleInfoDict( appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, @@ -104,7 +111,7 @@ class GetForgeModulesApp(BaseHookApp): self.arg_parser.add_argument( '--no-forge', action='store_true', dest='no_forge', - help="Don't get module information from Puppet forge.", + help=_("Don't get module information from Puppet forge."), ) # ------------------------------------------------------------------------- @@ -113,7 +120,7 @@ class GetForgeModulesApp(BaseHookApp): super(GetForgeModulesApp, self).perform_arg_parser() if self.args.no_forge: - self.handle_info("Don't get module information from Puppet forge.") + self.handle_info(_("Don't get module information from Puppet forge.")) self.do_forge = False # ------------------------------------------------------------------------- @@ -138,7 +145,6 @@ class GetForgeModulesApp(BaseHookApp): res['default_forge_uri'] = self.default_forge_uri res['default_http_timeout'] = self.default_http_timeout res['max_http_timeout'] = self.max_http_timeout - res['default_puppet_root_env_dir'] = self.default_puppet_root_env_dir res['do_forge'] = self.do_forge return res @@ -149,21 +155,21 @@ class GetForgeModulesApp(BaseHookApp): super(GetForgeModulesApp, self).evaluate_config(config, yaml_file) if 'puppet_env_dir' in config and config['puppet_env_dir']: - path = config['puppet_env_dir'] - if os.path.isabs(path): - self.puppet_root_env_dir = os.path.normpath(path) + path = pathlib.Path(config['puppet_env_dir']) + if path.is_absolute(): + self.puppet_root_env_dir = path.resolve() else: - msg = ( + msg = _( "Path for the Puppet environments {p!r} must be " "an absolute path in {f!r}.").format( - p=path, f=yaml_file) + p=str(path), f=yaml_file) self.error_data.append(msg) if 'forge_uri' in config and config['forge_uri'] and str(config['forge_uri']).strip(): self.forge_uri = str(config['forge_uri']).strip() if 'http_timeout' in config and config['http_timeout']: - msg = "Invalid HTTP timeout {t!r} in {f!r} found.".format( + msg = _("Invalid HTTP timeout {t!r} in {f!r} found.").format( t=config['http_timeout'], f=yaml_file) try: http_timeout = int(config['http_timeout']) @@ -178,8 +184,12 @@ class GetForgeModulesApp(BaseHookApp): def run_hook(self): """Main routine.""" - dt = datetime.datetime.now().isoformat(' ') - msg = "[{}]: Here I go again ...".format(dt) + my_loc = babel.core.default_locale() + + d = datetime.datetime.now(LOCALTZ) + dt = format_datetime(d, 'yyyy-MM-dd HH:mm:ss z', tzinfo=LOCALTZ) + + msg = _("[{}]: Here I go again ...").format(dt) self.print_out(msg) print() @@ -201,8 +211,9 @@ class GetForgeModulesApp(BaseHookApp): self.write_cache_file() print() - dt = datetime.datetime.now().isoformat(' ') - msg = "[{}]: Finished.".format(dt) + d = datetime.datetime.now(LOCALTZ) + dt = format_datetime(d, 'yyyy-MM-dd HH:mm:ss z', tzinfo=LOCALTZ) + msg = _("[{}]: Finished.").format(dt) self.print_out(msg) # ------------------------------------------------------------------------- @@ -223,7 +234,7 @@ class GetForgeModulesApp(BaseHookApp): def get_forge_information(self): print() - msg = "Collecting module information from upstream ..." + msg = _("Collecting module information from upstream ...") LOG.info(msg) self.print_out(msg) @@ -255,7 +266,7 @@ class GetForgeModulesApp(BaseHookApp): # ------------------------------------------------------------------------- def read_metadata_files(self, env): - LOG.info("Reading metadata files of environment {!r} ...".format(env)) + LOG.info(_("Reading metadata files of environment {!r} ...").format(env)) pattern = os.path.join(self.puppet_root_env_dir, env, 'modules', '*') if self.verbose > 2: @@ -270,7 +281,7 @@ class GetForgeModulesApp(BaseHookApp): LOG.debug("Got module info:\n{}".format(pp(module_info.as_dict()))) self.modules.merge(module_info) else: - LOG.warn("Got no module info from direcrory {!r}".format(module_dir)) + LOG.warn(_("Got no module info from directory {!r}.").format(module_dir)) # ------------------------------------------------------------------------- def get_meta_module_info(self, module_dir, env): @@ -279,22 +290,22 @@ class GetForgeModulesApp(BaseHookApp): LOG.debug("Get module information from {!r}.".format(module_dir)) if not os.path.exists(module_dir): - LOG.warn("Directory {!r} does not exists.".format(module_dir)) + LOG.warn(_("Directory {!r} does not exists.").format(module_dir)) return None if not os.path.isdir(module_dir): - LOG.warn("Path {!r} is not a directory".format(module_dir)) + LOG.warn(_("Path {!r} is not a directory.").format(module_dir)) return None metadata_file = os.path.join(module_dir, 'metadata.json') if not os.path.exists(metadata_file): - LOG.warn("Metadatafile {!r} does not exists.".format(metadata_file)) + LOG.warn(_("Metadatafile {!r} does not exists.").format(metadata_file)) return None if not os.path.isfile(metadata_file): - LOG.warn("Metadatafile {!r} is not a regular file.".format(metadata_file)) + LOG.warn(_("Metadatafile {!r} is not a regular file.").format(metadata_file)) return None if not os.access(metadata_file, os.R_OK): - LOG.warn("Metadatafile {!r} is readable.".format(metadata_file)) + LOG.warn(_("No read access to metadatafile {!r}.").format(metadata_file)) return None if self.verbose > 2: LOG.debug("Reading and evaluating {!r}.".format(metadata_file)) @@ -304,11 +315,11 @@ class GetForgeModulesApp(BaseHookApp): with open(metadata_file, 'r', **self.open_args) as fh: json_data = json.load(fh) except ValueError as e: - LOG.warn("Could not interprete {f!r} as a regular JSON file: {e}".format( + LOG.warn(_("Could not interprete {f!r} as a regular JSON file: {e}").format( f=metadata_file, e=e)) return None if not json_data: - LOG.warn("Did not found any data in {!r}.".format(metadata_file)) + LOG.warn(_("Did not found any data in {!r}.").format(metadata_file)) return None return ModuleInfo.init_from_json( @@ -317,7 +328,7 @@ class GetForgeModulesApp(BaseHookApp): # ------------------------------------------------------------------------- def read_puppetfile(self, env): - LOG.info("Reading Puppetfile of environment {!r} ..".format(env)) + LOG.info(_("Reading Puppetfile of environment {!r} ...").format(env)) pfile = Puppetfile( env_root_dir=self.puppet_root_env_dir, environment=env, @@ -357,7 +368,7 @@ class GetForgeModulesApp(BaseHookApp): LOG.debug("Found Puppet environments:\n{}".format(pp(self.environments))) if not self.environments: raise GetForgeModulesError( - "Did not found environments in {!r}.".format(self.puppet_root_env_dir)) + _("Did not found environments in {!r}.").format(self.puppet_root_env_dir)) # ------------------------------------------------------------------------- def write_cache_file(self): @@ -375,17 +386,17 @@ class GetForgeModulesApp(BaseHookApp): data.sort(key=itemgetter('name', 'vendor')) dump = yaml.dump(data, default_flow_style=False) - LOG.info("Trying to open {!r} exclusive ...".format(tmp_file)) + LOG.info(_("Trying to open {!r} exclusive ...").format(tmp_file)) if self.simulate: - LOG.info("Simulation mode, cache file will not be written.") + LOG.info(_("Simulation mode, cache file will not be written.")) return try: fd = os.open(tmp_file, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644) fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) except OSError as e: - msg = "Error on creating file {f!r}: {e}".format(f=tmp_file, e=e) + msg = _("Error on creating file {f!r}: {e}").format(f=tmp_file, e=e) if e.errno == errno.EEXIST: LOG.warn(msg) return None @@ -415,7 +426,7 @@ class GetForgeModulesApp(BaseHookApp): f=tmp_file, u=user, g=group)) os.chown(tmp_file, fstat.st_uid, fstat.st_gid) - LOG.info("Renaming {src!r} => {tgt!r}.".format(src=tmp_file, tgt=output_file)) + LOG.info(_("Renaming {src!r} => {tgt!r}.").format(src=tmp_file, tgt=output_file)) os.rename(tmp_file, output_file) diff --git a/locale/de_DE/LC_MESSAGES/puppetmaster_webhooks.po b/locale/de_DE/LC_MESSAGES/puppetmaster_webhooks.po index c47d146..bad60a7 100644 --- a/locale/de_DE/LC_MESSAGES/puppetmaster_webhooks.po +++ b/locale/de_DE/LC_MESSAGES/puppetmaster_webhooks.po @@ -1,14 +1,14 @@ # German (Germany) translations for puppetmaster_webhooks. -# Copyright (C) 2018 Frank Brehm, Pixelpark GmbH, Berlin +# Copyright (C) 2019 Frank Brehm, Pixelpark GmbH, Berlin # This file is distributed under the same license as the puppetmaster_webhooks project. -# FIRST AUTHOR , 2018. +# Frank Brehm , 2019. # msgid "" 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 16:37+0100\n" -"PO-Revision-Date: 2018-12-28 16:17+0100\n" +"POT-Creation-Date: 2019-01-02 11:21+0100\n" +"PO-Revision-Date: 2019-01-02 11:25+0100\n" "Last-Translator: Frank Brehm \n" "Language: de_DE\n" "Language-Team: de_DE \n" @@ -76,11 +76,11 @@ msgstr "Ein optionaler Abfrage-String wie bei einem HTTP-GET-Request." #: lib/webhooks/base_app.py:616 msgid "Trying to read config from {!r} ..." -msgstr "Versuche Konfiguration aus {!r} zu lesen ..." +msgstr "Versuche Konfiguration aus {!r} zu lesen ⋯" #: lib/webhooks/base_app.py:620 msgid "Reading config from {!r} ..." -msgstr "Lese Konfiguration aus {!r} ..." +msgstr "Lese Konfiguration aus {!r} ⋯" #: lib/webhooks/base_app.py:625 msgid "" @@ -140,7 +140,7 @@ msgstr "Eingabedaten: {!r}" #: lib/webhooks/base_app.py:917 msgid "Executing {} ..." -msgstr "Führe {} aus ..." +msgstr "Führe {} aus ⋯" #: lib/webhooks/base_app.py:996 msgid "Project {!r}: Received special characters in module name" @@ -226,15 +226,15 @@ msgstr "" "Fehler beim Versenden der Fehlermail für {a!r} an {r!r} via {s}:{p}:\n" "{e}" -#: lib/webhooks/base_app.py:1167 +#: lib/webhooks/base_app.py:1159 msgid "Cache file {!r} not found." msgstr "Cache-Datei {!r} nicht gefunden." -#: lib/webhooks/base_app.py:1171 +#: lib/webhooks/base_app.py:1163 msgid "Cache file {!r} not readable." msgstr "Cache-Datei {!r} nicht lesbar." -#: lib/webhooks/base_app.py:1202 +#: lib/webhooks/base_app.py:1194 msgid "Could not evaluate content of {f!r}: {e}" msgstr "Konnte den Inhalt von {f!r} nicht auswerten: {e}" @@ -250,7 +250,7 @@ msgstr "Konnte keine Definition für das Projekt {!r} finden." #: lib/webhooks/deploy.py:201 msgid "Deploying working directory {f!r} for project {p!r} ..." -msgstr "Aktualisiere Arbeitsverzeichnis {f!r} für das Projekt {p!r} ..." +msgstr "Aktualisiere Arbeitsverzeichnis {f!r} für das Projekt {p!r} ⋯" #: lib/webhooks/deploy.py:205 msgid "Parent directory {d!r} of project {p!r} does not exists." @@ -272,6 +272,102 @@ msgstr "" "Fehlermeldungen von {c!r}:\n" "{e}" +#: lib/webhooks/deploy.py:249 +msgid "Returncode was {}." +msgstr "Rückgabewert war {}." + +#: lib/webhooks/get_forge_modules.py:84 +msgid "" +"Collects information about all used Puppet Modules from {url!r} and cache those information in " +"{cdir!r}." +msgstr "" +"Sammelt Informationen über alle verwendeten Puppet-Module von {url!r} und speichert diese " +"Informationen in {cdir!r}." + +#: lib/webhooks/get_forge_modules.py:114 lib/webhooks/get_forge_modules.py:123 +msgid "Don't get module information from Puppet forge." +msgstr "Keine Modul-Informationen von Puppet-Forge holen." + +#: lib/webhooks/get_forge_modules.py:162 +msgid "Path for the Puppet environments {p!r} must be an absolute path in {f!r}." +msgstr "Der Pfad zu den Puppet-Umgebungen {p!r} muss ein absoluter Pfad in {f!r} sein." + +#: lib/webhooks/get_forge_modules.py:172 +msgid "Invalid HTTP timeout {t!r} in {f!r} found." +msgstr "Ungültige HTTP-Zeitüberschreitung in {f!r} gefunden." + +#: lib/webhooks/get_forge_modules.py:192 +msgid "[{}]: Here I go again ..." +msgstr "[{}]: Es geht mal wieder los ⋯" + +#: lib/webhooks/get_forge_modules.py:216 +msgid "[{}]: Finished." +msgstr "[{}]: Beendet." + +#: lib/webhooks/get_forge_modules.py:237 +msgid "Collecting module information from upstream ..." +msgstr "Sammle Modul-Informationen von Upstream ⋯" + +#: lib/webhooks/get_forge_modules.py:269 +msgid "Reading metadata files of environment {!r} ..." +msgstr "Lese Metadaten-Dateien von Umgebung {!r} ⋯" + +#: lib/webhooks/get_forge_modules.py:284 +msgid "Got no module info from directory {!r}." +msgstr "Keine Modul-Informationen aus dem Verzeichnis {!r} erhalten." + +#: lib/webhooks/get_forge_modules.py:293 +msgid "Directory {!r} does not exists." +msgstr "Das Verzeichnis {!r} existiert nicht." + +#: lib/webhooks/get_forge_modules.py:297 +msgid "Path {!r} is not a directory." +msgstr "Der Pfad {!r} is kein Verzeichnis." + +#: lib/webhooks/get_forge_modules.py:302 +msgid "Metadatafile {!r} does not exists." +msgstr "Die Metadaten-Datei {!r} existiert nicht." + +#: lib/webhooks/get_forge_modules.py:305 +msgid "Metadatafile {!r} is not a regular file." +msgstr "Die Metadaten-Datei {!r} ist keine reguläre Datei." + +#: lib/webhooks/get_forge_modules.py:308 +msgid "No read access to metadatafile {!r}." +msgstr "Kein Lesezugriff auf die Metadaten-Datei {!r}." + +#: lib/webhooks/get_forge_modules.py:318 +msgid "Could not interprete {f!r} as a regular JSON file: {e}" +msgstr "Konnte {f!r} nicht als reguläre JSON-Datei interpretieren: {e}" + +#: lib/webhooks/get_forge_modules.py:322 +msgid "Did not found any data in {!r}." +msgstr "Keine Daten in {!r} gefunden." + +#: lib/webhooks/get_forge_modules.py:331 +msgid "Reading Puppetfile of environment {!r} ..." +msgstr "Lese Puppetfile von Umgebung {!r} ⋯" + +#: lib/webhooks/get_forge_modules.py:371 +msgid "Did not found environments in {!r}." +msgstr "Keine Umgebungen in {!r} gefunden." + +#: lib/webhooks/get_forge_modules.py:389 +msgid "Trying to open {!r} exclusive ..." +msgstr "Versuche, {!r} exklusiv zu öffnen ⋯" + +#: lib/webhooks/get_forge_modules.py:392 +msgid "Simulation mode, cache file will not be written." +msgstr "Simulations-Modus, Cache-Datei wird nicht geschrieben." + +#: lib/webhooks/get_forge_modules.py:399 +msgid "Error on creating file {f!r}: {e}" +msgstr "Fehler bim Erstellen der Datei {f!r}: {e}" + +#: lib/webhooks/get_forge_modules.py:429 +msgid "Renaming {src!r} => {tgt!r}." +msgstr "Umbenennung {src!r} => {tgt!r}." + #: lib/webhooks/get_module_changes.py:62 msgid "Puppet environment {!r} does not exists." msgstr "Die Puppet-Umgebung {!r} existiert nicht." @@ -302,11 +398,11 @@ msgstr "Die Puppet-Umgebung, die mit Puppet-Forge verglichen werden soll. Vorgab #: lib/webhooks/get_module_changes.py:162 msgid "Here I go. ..." -msgstr "Und hier geht's los ..." +msgstr "Und hier geht's los ⋯" #: lib/webhooks/get_module_changes.py:178 msgid "Checking verions of modules ..." -msgstr "Überprüfe Modul-Versionen ..." +msgstr "Überprüfe Modul-Versionen ⋯" #: lib/webhooks/get_module_changes.py:208 msgid "Version of module {m!r} on Puppet forge {fv!r} is newer than the local version {lv!r}." diff --git a/locale/en_US/LC_MESSAGES/puppetmaster_webhooks.po b/locale/en_US/LC_MESSAGES/puppetmaster_webhooks.po index 58975c6..45142f9 100644 --- a/locale/en_US/LC_MESSAGES/puppetmaster_webhooks.po +++ b/locale/en_US/LC_MESSAGES/puppetmaster_webhooks.po @@ -1,13 +1,13 @@ # English (United States) translations for puppetmaster_webhooks. -# Copyright (C) 2018 Frank Brehm, Pixelpark GmbH, Berlin +# Copyright (C) 2019 Frank Brehm, Pixelpark GmbH, Berlin # This file is distributed under the same license as the puppetmaster_webhooks project. -# FIRST AUTHOR , 2018. +# FIRST AUTHOR , 2019. # msgid "" 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 16:37+0100\n" +"POT-Creation-Date: 2019-01-02 11:21+0100\n" "PO-Revision-Date: 2018-12-28 09:57+0100\n" "Last-Translator: FULL NAME \n" "Language: en_US\n" @@ -216,15 +216,15 @@ msgid "" "{e}" msgstr "" -#: lib/webhooks/base_app.py:1167 +#: lib/webhooks/base_app.py:1159 msgid "Cache file {!r} not found." msgstr "" -#: lib/webhooks/base_app.py:1171 +#: lib/webhooks/base_app.py:1163 msgid "Cache file {!r} not readable." msgstr "" -#: lib/webhooks/base_app.py:1202 +#: lib/webhooks/base_app.py:1194 msgid "Could not evaluate content of {f!r}: {e}" msgstr "" @@ -258,6 +258,100 @@ msgid "" "{e}" msgstr "" +#: lib/webhooks/deploy.py:249 +msgid "Returncode was {}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:84 +msgid "" +"Collects information about all used Puppet Modules from {url!r} and cache those information in " +"{cdir!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:114 lib/webhooks/get_forge_modules.py:123 +msgid "Don't get module information from Puppet forge." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:162 +msgid "Path for the Puppet environments {p!r} must be an absolute path in {f!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:172 +msgid "Invalid HTTP timeout {t!r} in {f!r} found." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:192 +msgid "[{}]: Here I go again ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:216 +msgid "[{}]: Finished." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:237 +msgid "Collecting module information from upstream ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:269 +msgid "Reading metadata files of environment {!r} ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:284 +msgid "Got no module info from directory {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:293 +msgid "Directory {!r} does not exists." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:297 +msgid "Path {!r} is not a directory." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:302 +msgid "Metadatafile {!r} does not exists." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:305 +msgid "Metadatafile {!r} is not a regular file." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:308 +msgid "No read access to metadatafile {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:318 +msgid "Could not interprete {f!r} as a regular JSON file: {e}" +msgstr "" + +#: lib/webhooks/get_forge_modules.py:322 +msgid "Did not found any data in {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:331 +msgid "Reading Puppetfile of environment {!r} ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:371 +msgid "Did not found environments in {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:389 +msgid "Trying to open {!r} exclusive ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:392 +msgid "Simulation mode, cache file will not be written." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:399 +msgid "Error on creating file {f!r}: {e}" +msgstr "" + +#: lib/webhooks/get_forge_modules.py:429 +msgid "Renaming {src!r} => {tgt!r}." +msgstr "" + #: lib/webhooks/get_module_changes.py:62 msgid "Puppet environment {!r} does not exists." msgstr "" diff --git a/locale/puppetmaster_webhooks.pot b/locale/puppetmaster_webhooks.pot index eff9f95..4dd97b6 100644 --- a/locale/puppetmaster_webhooks.pot +++ b/locale/puppetmaster_webhooks.pot @@ -1,14 +1,14 @@ # Translations template for puppetmaster_webhooks. -# Copyright (C) 2018 Frank Brehm, Pixelpark GmbH, Berlin +# Copyright (C) 2019 Frank Brehm, Pixelpark GmbH, Berlin # This file is distributed under the same license as the puppetmaster_webhooks project. -# FIRST AUTHOR , 2018. +# FIRST AUTHOR , 2019. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: puppetmaster_webhooks 1.4.3\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2018-12-28 16:37+0100\n" +"POT-Creation-Date: 2019-01-02 11:21+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -215,15 +215,15 @@ msgid "" "{e}" msgstr "" -#: lib/webhooks/base_app.py:1167 +#: lib/webhooks/base_app.py:1159 msgid "Cache file {!r} not found." msgstr "" -#: lib/webhooks/base_app.py:1171 +#: lib/webhooks/base_app.py:1163 msgid "Cache file {!r} not readable." msgstr "" -#: lib/webhooks/base_app.py:1202 +#: lib/webhooks/base_app.py:1194 msgid "Could not evaluate content of {f!r}: {e}" msgstr "" @@ -257,6 +257,100 @@ msgid "" "{e}" msgstr "" +#: lib/webhooks/deploy.py:249 +msgid "Returncode was {}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:84 +msgid "" +"Collects information about all used Puppet Modules from {url!r} and cache those information in " +"{cdir!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:114 lib/webhooks/get_forge_modules.py:123 +msgid "Don't get module information from Puppet forge." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:162 +msgid "Path for the Puppet environments {p!r} must be an absolute path in {f!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:172 +msgid "Invalid HTTP timeout {t!r} in {f!r} found." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:192 +msgid "[{}]: Here I go again ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:216 +msgid "[{}]: Finished." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:237 +msgid "Collecting module information from upstream ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:269 +msgid "Reading metadata files of environment {!r} ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:284 +msgid "Got no module info from directory {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:293 +msgid "Directory {!r} does not exists." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:297 +msgid "Path {!r} is not a directory." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:302 +msgid "Metadatafile {!r} does not exists." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:305 +msgid "Metadatafile {!r} is not a regular file." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:308 +msgid "No read access to metadatafile {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:318 +msgid "Could not interprete {f!r} as a regular JSON file: {e}" +msgstr "" + +#: lib/webhooks/get_forge_modules.py:322 +msgid "Did not found any data in {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:331 +msgid "Reading Puppetfile of environment {!r} ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:371 +msgid "Did not found environments in {!r}." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:389 +msgid "Trying to open {!r} exclusive ..." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:392 +msgid "Simulation mode, cache file will not be written." +msgstr "" + +#: lib/webhooks/get_forge_modules.py:399 +msgid "Error on creating file {f!r}: {e}" +msgstr "" + +#: lib/webhooks/get_forge_modules.py:429 +msgid "Renaming {src!r} => {tgt!r}." +msgstr "" + #: lib/webhooks/get_module_changes.py:62 msgid "Puppet environment {!r} does not exists." msgstr ""