From 21b0cd7276b292d99eb8bb16f4ae918e0bc605bf Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 1 Nov 2022 11:50:25 +0100 Subject: [PATCH] Changing output --- lib/pp_admintools/app/mirror_ldap.py | 15 ++-- locale/de_DE/LC_MESSAGES/pp_admintools.po | 84 +++++++++++------------ locale/en_US/LC_MESSAGES/pp_admintools.po | 42 +++++++----- locale/pp_admintools.pot | 42 +++++++----- 4 files changed, 103 insertions(+), 80 deletions(-) diff --git a/lib/pp_admintools/app/mirror_ldap.py b/lib/pp_admintools/app/mirror_ldap.py index 0ebcc68..7473499 100644 --- a/lib/pp_admintools/app/mirror_ldap.py +++ b/lib/pp_admintools/app/mirror_ldap.py @@ -39,7 +39,7 @@ from .ldap import BaseLdapApplication from ..argparse_actions import NonNegativeItegerOptionAction from ..argparse_actions import LimitedFloatOptionAction -__version__ = '0.7.1' +__version__ = '0.7.2' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -472,6 +472,7 @@ class MirrorLdapApplication(BaseLdapApplication): LOG.debug(_("Entry {!r} is set to be kept.").format(dn)) continue + self.empty_line() self.delete_entry(self.tgt_instance, dn) count += 1 if self.wait_after_write and not self.simulate: @@ -526,6 +527,7 @@ class MirrorLdapApplication(BaseLdapApplication): LOG.debug(_("Entry {!r} is set to be synchronized.").format(dn)) continue + self.empty_line() self.delete_entry(self.tgt_instance, dn) count += 1 if self.wait_after_write and not self.simulate: @@ -557,8 +559,9 @@ class MirrorLdapApplication(BaseLdapApplication): for dn in dns: - self.empty_line() - LOG.info(_("Mirroring entry {!r} ...").format(dn)) + if self.verbose: + self.empty_line() + LOG.debug(_("Mirroring entry {!r} ...").format(dn)) src_entry = self.get_entry(dn, self.src_instance, attributes) src_attribs = self.normalized_attributes(src_entry) @@ -581,17 +584,21 @@ class MirrorLdapApplication(BaseLdapApplication): changes = self.generate_modify_data(dn, src_attribs, tgt_attribs) if changes: + self.empty_line() + LOG.info(_("Modifying entry {!r} ...").format(dn)) msg = _("Got modify data for DN {!r}:").format(dn) LOG.debug(msg + '\n' + pp(changes)) self.mirrored_entries += 1 count += 1 else: - LOG.info(_("No changes necessary on DN {!r}.").format(dn)) + LOG.debug(_("No changes necessary on DN {!r}.").format(dn)) continue else: LOG.debug(_("Target entry {!r} not found.").format(dn)) (object_classes, target_entry) = self.generate_create_entry(src_attribs) + self.empty_line() + LOG.info(_("Creating entry {!r} ...").format(dn)) msg = _("Got create data for DN {!r}:").format(dn) msg += '\nobjectClasses:\n' + pp(object_classes) msg += "\nAttributes:\n" + pp(target_entry) diff --git a/locale/de_DE/LC_MESSAGES/pp_admintools.po b/locale/de_DE/LC_MESSAGES/pp_admintools.po index afafff4..4d8bdb2 100644 --- a/locale/de_DE/LC_MESSAGES/pp_admintools.po +++ b/locale/de_DE/LC_MESSAGES/pp_admintools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-10-31 17:55+0100\n" +"POT-Creation-Date: 2022-11-01 11:45+0100\n" "PO-Revision-Date: 2022-10-20 17:12+0200\n" "Last-Translator: Frank Brehm \n" "Language: de_DE\n" @@ -905,11 +905,10 @@ msgstr[0] "einen strukturellen Eintrag im Quell-LDAP" msgstr[1] "{no} strukturelle Einträge im Quell-LDAP" #: lib/pp_admintools/app/mirror_ldap.py:316 -#, fuzzy msgid "one non-structural entry in source LDAP." msgid_plural "{no} non-structural entries in source LDAP." -msgstr[0] "einen strukturellen Eintrag im Ziel-LDAP." -msgstr[1] "{no} strukturelle Einträge im Ziel-LDAP." +msgstr[0] "einen nicht-strukturellen Eintrag im Ziel-LDAP." +msgstr[1] "{no} nicht-strukturelle Einträge im Ziel-LDAP." #: lib/pp_admintools/app/mirror_ldap.py:324 lib/pp_admintools/app/mirror_ldap.py:379 msgid "Found structural DNs in instance {!r}:" @@ -922,22 +921,20 @@ msgstr "Versuche die DNs aller Einträge in der Ziel-LDAP-Instanz zu ermitteln." #: lib/pp_admintools/app/mirror_ldap.py:363 msgid "Found total one entry in target LDAP" msgid_plural "Found {no} entries in target LDAP" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Fand insgesamt einen Eintrag im Ziel-LDAP" +msgstr[1] "Fand {no} Einträge im Ziel-LDAP" #: lib/pp_admintools/app/mirror_ldap.py:367 -#, fuzzy msgid "one structural entry in target LDAP" msgid_plural "{no} structural entries in target LDAP" -msgstr[0] "Es wurde ein struktureller Eintrag in der Ziel-LDAP-Instanz gelöscht." -msgstr[1] "Es wurden {no} strukturelle Einträge in der Ziel-LDAP-Instanz gelöscht." +msgstr[0] "ein struktureller Eintrag im Ziel-LDAP" +msgstr[1] "{no} strukturelle Einträge im Ziel-LDAP" #: lib/pp_admintools/app/mirror_ldap.py:371 -#, fuzzy msgid "one non-structural entry in target LDAP." msgid_plural "{no} non-structural entries in target LDAP." -msgstr[0] "Es wurde ein nicht-struktureller Eintrag in der Ziel-LDAP-Instanz gelöscht." -msgstr[1] "Es wurden {no} nicht-strukturelle Einträge in der Ziel-LDAP-Instanz gelöscht." +msgstr[0] "ein nicht-struktureller Eintrag im Ziel-LDAP." +msgstr[1] "{no} nicht-strukturelle Einträge im Ziel-LDAP." #: lib/pp_admintools/app/mirror_ldap.py:387 msgid "" @@ -951,7 +948,7 @@ msgstr "" msgid "Removing non structural entries from target LDAP instance." msgstr "Löschen nicht-struktureller Einträge in der Ziel-LDAP-Instanz." -#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:517 +#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:518 msgid "Entry {!r} exists on the source instance, will not be removed." msgstr "Der Eintrag {!r} existiert in der Ziel-Instanz und wird deshalb nicht gelöscht." @@ -959,76 +956,79 @@ msgstr "Der Eintrag {!r} existiert in der Ziel-Instanz und wird deshalb nicht ge msgid "Entry {!r} is a structural entry, will not be removed at this point." msgstr "Der Eintrag {!r} ist ein struktureller Eintrag, und wird deshalb an dieser Stelle nicht gelöscht." -#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:522 +#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:523 msgid "Entry {!r} is set to be kept." msgstr "Der Eintrag {!r} wurde auf Erhalten gesetzt." -#: lib/pp_admintools/app/mirror_ldap.py:481 +#: lib/pp_admintools/app/mirror_ldap.py:482 msgid "Removed one not structural entry in target LDAP instance." msgid_plural "Removed {no} not structural entries in target LDAP instance." msgstr[0] "Es wurde ein nicht-struktureller Eintrag in der Ziel-LDAP-Instanz gelöscht." msgstr[1] "Es wurden {no} nicht-strukturelle Einträge in der Ziel-LDAP-Instanz gelöscht." -#: lib/pp_admintools/app/mirror_ldap.py:486 +#: lib/pp_admintools/app/mirror_ldap.py:487 msgid "None not structural entries in target LDAP instance removed." msgstr "Es wurden keine nicht-strukturellen Einträge in der Ziel-LDAP-Instanz gelöscht." -#: lib/pp_admintools/app/mirror_ldap.py:500 +#: lib/pp_admintools/app/mirror_ldap.py:501 msgid "Removing structural entries from target LDAP instance." msgstr "Löschen struktureller Einträge in der Ziel-LDAP-Instanz." -#: lib/pp_admintools/app/mirror_ldap.py:526 +#: lib/pp_admintools/app/mirror_ldap.py:527 msgid "Entry {!r} is set to be synchronized." msgstr "Der Eintrag {!r} wurde auf Synchronisation gesetzt." -#: lib/pp_admintools/app/mirror_ldap.py:535 +#: lib/pp_admintools/app/mirror_ldap.py:537 msgid "Removed one structural entry in target LDAP instance." msgid_plural "Removed {no} structural entries in target LDAP instance." msgstr[0] "Es wurde ein struktureller Eintrag in der Ziel-LDAP-Instanz gelöscht." msgstr[1] "Es wurden {no} strukturelle Einträge in der Ziel-LDAP-Instanz gelöscht." -#: lib/pp_admintools/app/mirror_ldap.py:540 +#: lib/pp_admintools/app/mirror_ldap.py:542 msgid "None structural entries in target LDAP instance removed." msgstr "Es wurden keine strukturellen Einträge in der Ziel-LDAP-Instanz gelöscht." -#: lib/pp_admintools/app/mirror_ldap.py:548 -#, fuzzy +#: lib/pp_admintools/app/mirror_ldap.py:550 msgid "Mirroring structural entries from source to target LDAP instance." -msgstr "Löschen struktureller Einträge in der Ziel-LDAP-Instanz." +msgstr "Spiegeln struktureller Einträge von der Quell- in die Ziel-LDAP-Instanz." -#: lib/pp_admintools/app/mirror_ldap.py:561 -#, fuzzy +#: lib/pp_admintools/app/mirror_ldap.py:564 msgid "Mirroring entry {!r} ..." -msgstr "Lösche {!r} …" +msgstr "Spiegele Eintrag {!r} …" -#: lib/pp_admintools/app/mirror_ldap.py:584 -msgid "Got modify data for DN {!r}:" -msgstr "" +#: lib/pp_admintools/app/mirror_ldap.py:588 +msgid "Modifying entry {!r} ..." +msgstr "Ändere Eintrag {!r} …" #: lib/pp_admintools/app/mirror_ldap.py:589 +msgid "Got modify data for DN {!r}:" +msgstr "Bekam Änderungsdaten für DN {!r}:" + +#: lib/pp_admintools/app/mirror_ldap.py:594 msgid "No changes necessary on DN {!r}." -msgstr "" +msgstr "Keine Änderungen bei DN {!r} notwendig." -#: lib/pp_admintools/app/mirror_ldap.py:593 -#, fuzzy +#: lib/pp_admintools/app/mirror_ldap.py:598 msgid "Target entry {!r} not found." -msgstr "Die Ziel-Datei ist nicht definiert." +msgstr "Der Ziel-Eintrag {!r} wurde nicht gefunden." + +#: lib/pp_admintools/app/mirror_ldap.py:601 +msgid "Creating entry {!r} ..." +msgstr "Erstelle Eintrag {!r} …" -#: lib/pp_admintools/app/mirror_ldap.py:595 +#: lib/pp_admintools/app/mirror_ldap.py:602 msgid "Got create data for DN {!r}:" -msgstr "" +msgstr "Bekam Erstellungsdaten für DN {!r}:" -#: lib/pp_admintools/app/mirror_ldap.py:606 -#, fuzzy +#: lib/pp_admintools/app/mirror_ldap.py:613 msgid "Mirrored one structural entry in target LDAP instance." msgid_plural "Mirrored {no} structural entries to target LDAP instance." -msgstr[0] "Es wurde ein struktureller Eintrag in der Ziel-LDAP-Instanz gelöscht." -msgstr[1] "Es wurden {no} strukturelle Einträge in der Ziel-LDAP-Instanz gelöscht." +msgstr[0] "Es wurde ein struktureller Eintrag in die Ziel-LDAP-Instanz gespiegelt." +msgstr[1] "Es wurden {no} strukturelle Einträge in die Ziel-LDAP-Instanz gespiegelt." -#: lib/pp_admintools/app/mirror_ldap.py:611 -#, fuzzy +#: lib/pp_admintools/app/mirror_ldap.py:618 msgid "Mirrored no structural entries to target LDAP instance." -msgstr "Löschen nicht-struktureller Einträge in der Ziel-LDAP-Instanz." +msgstr "Spiegeln nicht-struktureller Einträge in die Ziel-LDAP-Instanz." #: lib/pp_admintools/app/pdns.py:99 lib/pp_admintools/app/pdns.py:183 msgid "Configuration not available." diff --git a/locale/en_US/LC_MESSAGES/pp_admintools.po b/locale/en_US/LC_MESSAGES/pp_admintools.po index c00e2f6..d89a6a0 100644 --- a/locale/en_US/LC_MESSAGES/pp_admintools.po +++ b/locale/en_US/LC_MESSAGES/pp_admintools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-10-31 17:55+0100\n" +"POT-Creation-Date: 2022-11-01 11:45+0100\n" "PO-Revision-Date: 2022-10-20 12:00+0200\n" "Last-Translator: Frank Brehm \n" "Language: en_US\n" @@ -914,7 +914,7 @@ msgstr "" msgid "Removing non structural entries from target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:517 +#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:518 msgid "Entry {!r} exists on the source instance, will not be removed." msgstr "" @@ -922,69 +922,77 @@ msgstr "" msgid "Entry {!r} is a structural entry, will not be removed at this point." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:522 +#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:523 msgid "Entry {!r} is set to be kept." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:481 +#: lib/pp_admintools/app/mirror_ldap.py:482 msgid "Removed one not structural entry in target LDAP instance." msgid_plural "Removed {no} not structural entries in target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:486 +#: lib/pp_admintools/app/mirror_ldap.py:487 msgid "None not structural entries in target LDAP instance removed." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:500 +#: lib/pp_admintools/app/mirror_ldap.py:501 msgid "Removing structural entries from target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:526 +#: lib/pp_admintools/app/mirror_ldap.py:527 msgid "Entry {!r} is set to be synchronized." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:535 +#: lib/pp_admintools/app/mirror_ldap.py:537 msgid "Removed one structural entry in target LDAP instance." msgid_plural "Removed {no} structural entries in target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:540 +#: lib/pp_admintools/app/mirror_ldap.py:542 msgid "None structural entries in target LDAP instance removed." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:548 +#: lib/pp_admintools/app/mirror_ldap.py:550 msgid "Mirroring structural entries from source to target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:561 +#: lib/pp_admintools/app/mirror_ldap.py:564 msgid "Mirroring entry {!r} ..." msgstr "Mirroring entry {!r} …" -#: lib/pp_admintools/app/mirror_ldap.py:584 +#: lib/pp_admintools/app/mirror_ldap.py:588 +msgid "Modifying entry {!r} ..." +msgstr "Modifying entry {!r} …" + +#: lib/pp_admintools/app/mirror_ldap.py:589 msgid "Got modify data for DN {!r}:" msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:589 +#: lib/pp_admintools/app/mirror_ldap.py:594 msgid "No changes necessary on DN {!r}." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:593 +#: lib/pp_admintools/app/mirror_ldap.py:598 msgid "Target entry {!r} not found." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:595 +#: lib/pp_admintools/app/mirror_ldap.py:601 +msgid "Creating entry {!r} ..." +msgstr "Creating entry {!r} …" + +#: lib/pp_admintools/app/mirror_ldap.py:602 msgid "Got create data for DN {!r}:" msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:606 +#: lib/pp_admintools/app/mirror_ldap.py:613 msgid "Mirrored one structural entry in target LDAP instance." msgid_plural "Mirrored {no} structural entries to target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:611 +#: lib/pp_admintools/app/mirror_ldap.py:618 msgid "Mirrored no structural entries to target LDAP instance." msgstr "" diff --git a/locale/pp_admintools.pot b/locale/pp_admintools.pot index 5a37d18..315b151 100644 --- a/locale/pp_admintools.pot +++ b/locale/pp_admintools.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pp_admintools 0.9.1\n" "Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n" -"POT-Creation-Date: 2022-10-31 17:55+0100\n" +"POT-Creation-Date: 2022-11-01 11:45+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -913,7 +913,7 @@ msgstr "" msgid "Removing non structural entries from target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:517 +#: lib/pp_admintools/app/mirror_ldap.py:460 lib/pp_admintools/app/mirror_ldap.py:518 msgid "Entry {!r} exists on the source instance, will not be removed." msgstr "" @@ -921,69 +921,77 @@ msgstr "" msgid "Entry {!r} is a structural entry, will not be removed at this point." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:522 +#: lib/pp_admintools/app/mirror_ldap.py:472 lib/pp_admintools/app/mirror_ldap.py:523 msgid "Entry {!r} is set to be kept." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:481 +#: lib/pp_admintools/app/mirror_ldap.py:482 msgid "Removed one not structural entry in target LDAP instance." msgid_plural "Removed {no} not structural entries in target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:486 +#: lib/pp_admintools/app/mirror_ldap.py:487 msgid "None not structural entries in target LDAP instance removed." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:500 +#: lib/pp_admintools/app/mirror_ldap.py:501 msgid "Removing structural entries from target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:526 +#: lib/pp_admintools/app/mirror_ldap.py:527 msgid "Entry {!r} is set to be synchronized." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:535 +#: lib/pp_admintools/app/mirror_ldap.py:537 msgid "Removed one structural entry in target LDAP instance." msgid_plural "Removed {no} structural entries in target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:540 +#: lib/pp_admintools/app/mirror_ldap.py:542 msgid "None structural entries in target LDAP instance removed." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:548 +#: lib/pp_admintools/app/mirror_ldap.py:550 msgid "Mirroring structural entries from source to target LDAP instance." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:561 +#: lib/pp_admintools/app/mirror_ldap.py:564 msgid "Mirroring entry {!r} ..." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:584 -msgid "Got modify data for DN {!r}:" +#: lib/pp_admintools/app/mirror_ldap.py:588 +msgid "Modifying entry {!r} ..." msgstr "" #: lib/pp_admintools/app/mirror_ldap.py:589 +msgid "Got modify data for DN {!r}:" +msgstr "" + +#: lib/pp_admintools/app/mirror_ldap.py:594 msgid "No changes necessary on DN {!r}." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:593 +#: lib/pp_admintools/app/mirror_ldap.py:598 msgid "Target entry {!r} not found." msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:595 +#: lib/pp_admintools/app/mirror_ldap.py:601 +msgid "Creating entry {!r} ..." +msgstr "" + +#: lib/pp_admintools/app/mirror_ldap.py:602 msgid "Got create data for DN {!r}:" msgstr "" -#: lib/pp_admintools/app/mirror_ldap.py:606 +#: lib/pp_admintools/app/mirror_ldap.py:613 msgid "Mirrored one structural entry in target LDAP instance." msgid_plural "Mirrored {no} structural entries to target LDAP instance." msgstr[0] "" msgstr[1] "" -#: lib/pp_admintools/app/mirror_ldap.py:611 +#: lib/pp_admintools/app/mirror_ldap.py:618 msgid "Mirrored no structural entries to target LDAP instance." msgstr "" -- 2.39.5