=== modified file 'Mailman/Archiver/HyperArch.py' --- Mailman/Archiver/HyperArch.py 2015-01-23 00:09:03 +0000 +++ Mailman/Archiver/HyperArch.py 2018-05-03 14:59:23 +0000 @@ -56,6 +56,7 @@ # Set up i18n. Assume the current language has already been set in the caller. _ = i18n._ +C_ = i18n.C_ gzip = None if mm_cfg.GZIP_ARCHIVE_TXT_FILES: @@ -912,7 +913,7 @@ A string can be returned if the list only contains one entry, and the empty list is legal.""" res = self.dateToVolName(float(article.date)) - self.message(_("figuring article archives\n")) + self.message(C_("figuring article archives\n")) self.message(res + "\n") return res @@ -1050,7 +1051,7 @@ self.depth=0 print self.html_head() if not self.THREADLAZY and self.type=='Thread': - self.message(_("Computing threaded index\n")) + self.message(C_("Computing threaded index\n")) self.updateThreadedIndex() def write_index_footer(self): @@ -1315,14 +1316,14 @@ def update_article(self, arcdir, article, prev, next): seq = article.sequence filename = os.path.join(arcdir, article.filename) - self.message(_('Updating HTML for article %(seq)s')) + self.message(C_('Updating HTML for article %(seq)s')) try: f = open(filename) article.loadbody_fromHTML(f) f.close() except IOError, e: if e.errno <> errno.ENOENT: raise - self.message(_('article file %(filename)s is missing!')) + self.message(C_('article file %(filename)s is missing!')) article.prev = prev article.next = next omask = os.umask(002) === modified file 'Mailman/Archiver/pipermail.py' --- Mailman/Archiver/pipermail.py 2018-01-12 12:44:15 +0000 +++ Mailman/Archiver/pipermail.py 2018-05-03 14:59:23 +0000 @@ -20,7 +20,7 @@ from Mailman import Errors from Mailman.Mailbox import ArchiverMailbox from Mailman.Logging.Syslog import syslog -from Mailman.i18n import _ +from Mailman.i18n import _, C_ # True/False try: @@ -295,7 +295,7 @@ if errno != 2: raise os.error, errdata else: - self.message(_('Creating archive directory ') + self.basedir) + self.message(C_('Creating archive directory ') + self.basedir) omask = os.umask(0) try: os.mkdir(self.basedir, self.DIRMODE) @@ -307,7 +307,7 @@ if not reload: raise IOError f = open(os.path.join(self.basedir, 'pipermail.pck'), 'r') - self.message(_('Reloading pickled archive state')) + self.message(C_('Reloading pickled archive state')) d = pickle.load(f) f.close() for key, value in d.items(): @@ -334,7 +334,7 @@ self.update_TOC = 0 self.write_TOC() # Save the collective state - self.message(_('Pickling archive state into ') + self.message(C_('Pickling archive state into ') + os.path.join(self.basedir, 'pipermail.pck')) self.database.close() del self.database @@ -446,7 +446,7 @@ # dirtied or not. def update_archive(self, archive): self.archive = archive - self.message(_("Updating index files for archive [%(archive)s]")) + self.message(C_("Updating index files for archive [%(archive)s]")) arcdir = os.path.join(self.basedir, archive) self.__set_parameters(archive) @@ -479,7 +479,7 @@ self._restore_stdout() def _update_thread_index(self, archive, arcdir): - self.message(_(" Thread")) + self.message(C_(" Thread")) self._open_index_file_as_stdout(arcdir, "thread") self.type = 'Thread' self.write_index_header() @@ -590,7 +590,7 @@ # It was an unparseable message continue msgid = m.get('message-id', 'n/a') - self.message(_('#%(counter)05d %(msgid)s')) + self.message(C_('#%(counter)05d %(msgid)s')) a = self._makeArticle(m, self.sequence) self.sequence += 1 self.add_article(a)