From 4f3532487ff94d7b58bd729eadb8ae8ccee659b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 9 Mar 2019 16:59:41 +0100 Subject: [PATCH] Reduce noise when extracting and updating catalogs We omit the header as they are not filled nor used. We do not put location in comment as they are changing too often. We ignore the obsolete translations. issue8160 review47871002 --- setup.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9dc7163acd..a1e54e8ec8 100755 --- a/setup.py +++ b/setup.py @@ -18,11 +18,23 @@ args = {} try: from babel.messages import frontend as babel + class extract_messages(babel.extract_messages): + def initialize_options(self): + super().initialize_options() + self.omit_header = True + self.no_location = True + + class update_catalog(babel.update_catalog): + def initialize_options(self): + super().initialize_options() + self.omit_header = True + self.ignore_obsolete = True + args['cmdclass'] = { 'compile_catalog': babel.compile_catalog, - 'extract_messages': babel.extract_messages, + 'extract_messages': extract_messages, 'init_catalog': babel.init_catalog, - 'update_catalog': babel.update_catalog, + 'update_catalog': update_catalog, } args['message_extractors'] = {