diff options
| author | Barry Warsaw | 2009-11-24 20:43:11 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-11-24 20:43:11 -0500 |
| commit | 79d9e36a0b824548a0f2bc83cb948fc5ce668151 (patch) | |
| tree | bad1f9da24b61e7afda4017066c4f39177cce29d /src/mailman/testing | |
| parent | 755dc1f981b56e4c2663b5596c95590c948ef4ad (diff) | |
| download | mailman-79d9e36a0b824548a0f2bc83cb948fc5ce668151.tar.gz mailman-79d9e36a0b824548a0f2bc83cb948fc5ce668151.tar.zst mailman-79d9e36a0b824548a0f2bc83cb948fc5ce668151.zip | |
Do not create the .mo files during setup. This makes things go much faster.
The tests do require a partial French translation for digester.txt, so just
include the bare minimum, already msgfmt'd in the mailman.testing package.
Diffstat (limited to 'src/mailman/testing')
| -rw-r--r-- | src/mailman/testing/i18n.py | 56 | ||||
| -rw-r--r-- | src/mailman/testing/mailman-fr.mo | bin | 0 -> 1945 bytes | |||
| -rw-r--r-- | src/mailman/testing/mailman-fr.po | 84 |
3 files changed, 140 insertions, 0 deletions
diff --git a/src/mailman/testing/i18n.py b/src/mailman/testing/i18n.py new file mode 100644 index 000000000..63ad878c6 --- /dev/null +++ b/src/mailman/testing/i18n.py @@ -0,0 +1,56 @@ +# Copyright (C) 2009 by the Free Software Foundation, Inc. +# +# This file is part of GNU Mailman. +# +# GNU Mailman is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# GNU Mailman. If not, see <http://www.gnu.org/licenses/>. + +"""Internationalization for the tests.""" + +from __future__ import absolute_import, unicode_literals + +__metaclass__ = type +__all__ = [ + 'install_testing_i18n', + ] + + +from contextlib import closing +from flufl.i18n import registry +from gettext import GNUTranslations, NullTranslations +from pkg_resources import resource_stream + +from mailman.core.i18n import initialize as core_initialize + + + +class TestingStrategy: + """A strategy that finds catalogs in the testing directory.""" + + def __init__(self, name): + self.name = name + + def __call__(self, language_code): + if language_code == 'en': + return NullTranslations() + mo_file = 'mailman-%s.mo' % language_code + with closing(resource_stream('mailman.testing', mo_file)) as fp: + return GNUTranslations(fp) + + + +def initialize(): + """Install a global underscore function for testing purposes.""" + strategy = TestingStrategy('mailman-testing') + application = registry.register(strategy) + core_initialize(application) diff --git a/src/mailman/testing/mailman-fr.mo b/src/mailman/testing/mailman-fr.mo Binary files differnew file mode 100644 index 000000000..df721cb0f --- /dev/null +++ b/src/mailman/testing/mailman-fr.mo diff --git a/src/mailman/testing/mailman-fr.po b/src/mailman/testing/mailman-fr.po new file mode 100644 index 000000000..5f8c910e2 --- /dev/null +++ b/src/mailman/testing/mailman-fr.po @@ -0,0 +1,84 @@ +# Catalogues Mailman en Français. +# Copyright (C) 2001, 2006 Free Software Foundation, Inc. +# Ousmane Wilane <wilane@cyg.sn>, 2002. +# Pascal George <george@lyon.inserm.fr>, 2003-2005. +# Frederic Daniel Luc Lehobey, 2006. +msgid "" +msgstr "" +"Project-Id-Version: mailman\n" +"POT-Creation-Date: Sun Jan 8 15:53:47 2006\n" +"PO-Revision-Date: 2006-11-14 12:07+0100\n" +"Last-Translator: Frederic Daniel Luc Lehobey\n" +"Language-Team: mailman-fr <mailman-fr@rezo.net>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.3\n" + +#: templates/en/masthead.txt:1 +msgid "" +"Send $real_name mailing list submissions to\n" +"\t$got_list_email\n" +"\n" +"To subscribe or unsubscribe via the World Wide Web, visit\n" +"\t$got_listinfo_url\n" +"or, via email, send a message with subject or body 'help' to\n" +"\t$got_request_email\n" +"\n" +"You can reach the person managing the list at\n" +"\t$got_owner_email\n" +"\n" +"When replying, please edit your Subject line so it is more specific than\n" +"\"Re: Contents of $real_name digest...\"" +msgstr "" +"Envoyez vos messages pour la liste $real_name à\n" +"\t$got_list_email\n" +"\n" +"Pour vous (dés)abonner par le web, consultez\n" +"\t$got_listinfo_url\n" +"\n" +"ou, par courriel, envoyez un message avec « help » dans le corps\n" +"ou dans le sujet à\n" +"\t$got_request_email\n" +"\n" +"Vous pouvez contacter l'administrateur de la liste à l'adresse\n" +"\t$got_owner_email\n" +"\n" +"Si vous répondez, n'oubliez pas de changer l'objet du message afin\n" +"qu'il soit plus spécifique que « Re: Contenu du groupe de $real_name... »" + +#: Mailman/Handlers/ToDigest.py:159 +msgid "$realname Digest, Vol $volume, Issue $issue" +msgstr "Groupe $realname, Vol. $volume, Parution $issue" + +#: Mailman/Handlers/ToDigest.py:205 +msgid "digest header" +msgstr "en-tête des remises groupées" + +#: Mailman/Handlers/ToDigest.py:208 +msgid "Digest Header" +msgstr "En-tête des remises groupées" + +#: Mailman/Handlers/ToDigest.py:221 +msgid "Today's Topics:\n" +msgstr "Thèmes du jour :\n" + +#: Mailman/Handlers/ToDigest.py:301 +msgid "Today's Topics (%(msgcount)d messages)" +msgstr "Thèmes du jour (%(msgcount)d messages)" + +#: Mailman/Handlers/ToDigest.py:327 +msgid "[Message discarded by content filter]" +msgstr "[Message rejeté par filtrage de contenu]" + +#: Mailman/Handlers/ToDigest.py:359 +msgid "digest footer" +msgstr "pied de page des remises groupées" + +#: Mailman/Handlers/ToDigest.py:362 +msgid "Digest Footer" +msgstr "Pied de page des remises groupées" + +#: Mailman/Handlers/ToDigest.py:376 +msgid "End of " +msgstr "Fin de " |
