| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Mailman/testing -> Mailman/test
* Removed Mailman/testing/base.py
* Fix mailmanctl by using a different way of calculating where the qrunner
script is. The configuration file no longer knows what BIN_DIR is, but the
mailmanctl script knows where it lives via sys.argv[0]. Also, PREFIX_DIR ->
VAR_DIR.
Also,
* Since the overwhelmingly predominant use of ILanguageManager is to get the
description, and since .get_language_data(code)[0] is not very readable,
split the interface into .get_description() and .get_charset().
* In the setup, automatically add all Mailman.bin modules as command line
scripts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing unit tests. Here's a summary of the changes.
- Removed all dependent third party packages, since the setup.py file now
claims all package dependencies such that they can be automatically
installed from the cheeseshop.
- Moved the misc directory into the Mailman package as Mailman/data. Moved
templates and messages to Mailman subpackages.
- Added an ILanguageManager interface, plus an implementation, so that
we don't use Defaults.LC_DESCRIPTIONS directly anymore. Added a doctest
for this interface and implementation. Defaults.LANGUAGES is moved into
mailman.cfg. Defaults.LANGUAGE_DICT is moved to _DEFAULT_LANGUAGE_DATA, and
LC_DESCRIPTIONS is removed. The calculation of the available and enabled
languages is moved to the Configuration class, but this will probably still
need work. Utils.GetLanguageDescr() and Utils.IsLanguage() are removed.
I'd like to remove GetCharSet() eventually too, but there are too many uses
of this currently, so I'm deferring it.
- Utils.findtext(): Hacks added so that templates can be retrieved from the
language catalog. The hack is that the template contents are used to find
the translation, but in the one test case where this is actually flexed, the
trailing newline in the file contents has to be trimmed. This is probably
not right.
- No more Defaults.py.in or mm_cfg.py! Defaults.py.in is moved to Defaults.py
and is no longer created from a template file. The script called
make_instance is added which creates an etc/mailman.cfg file from
mailman.cfg.in (previously, mailman.cfg.sample) and /that/ file now has the
small number of calculated values. In general, make_instance will not touch
mailman.cfg if it exists, unless the --force option is given. CGIEXT is
made the empty string by default (i.e. not generated). make_instance grows
a --var-dir option. Fleshed out the --languages opton.
- Defaults.py grows a DEFAULT_VAR_DIRECTORY variable, which is the default
location of the 'var' directory. The Configuration class uses this as one
of the directories it searches for its landmark, i.e. etc/mailman.cfg.
RUNTIME_DIR is gone, as is VAR_PREFIX.
- testall needs to write MAILMAN_USER, MAILMAN_UID, MAILMAN_GROUP,
MAILMAN_GID, and LANGUAGES run time variables.
- bin/withlist no longer needs to add config.BIN_DIR to sys.path, because in
fact that variable doesn't exist any more.
- Tweak the French catalog to make a test work. This is needed because of the
conversion from %-strings to $-strings.
- The setup.py now generates the .mo files before it does its thing. This
will have to be fixed, but for now we must generate these files on setup
build time instead of installation time.
- Removed an unused interface.
|
| |
|
|
|
|
|
|
| |
- As the default type of string in mailman-2.2 was set to 'unicode',
i18n codes became need to be fixed.
- Fixed: admin web interface. Other web interfaces needs more verification.
- Fixed: non-digest delivery. Stil to go: digest and archive.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
column in the database for this list of strings. We use SQLAlchemy's
many-to-many relationship, however because of this, you cannot simply append
new unicodes to .available_languages. You need to wrap the language code in a
Language instance and append that instance to the list.
In order to handle this, I added a property MailList.language_codes which
returns a list of the code strings (not Language instances). Also new are
MailList.set_languages() for setting (i.e. overriding) the set of available
languages for the list; and add_language() which takes a single language code,
wraps it, and appends it. The code does not and should not use
.available_languages directory any more.
MailList.GetAvailableLanguages() is removed. The 'available_languages' column
is removed from the Listdata table.
Add a getValue() to Mailman.Gui.Language in order to unwrap the language codes
stored in the database's association table. Modify _setValue() to do the
wrapping.
In dbcontext.py, don't import * from the sqlalchemy package. It contains a
'logging' name which is not the standard Python logging package. I also added
essentially a bag of attributes class called Tables which will hold references
to all the SA tables that are created. Update the make_table() API to take an
instance of Tables.
Added a close() method to DBContext. This is needed for the updated unit test
suite.
Changed bin/import.py so that when available_languages is being set, it calls
MailList.set_languages() instead of trying to set that attribute directly.
Updated some language idioms while I was at it.
More eradication of mm_cfg in favor of the config object and the Defaults
module.
In testall.py, call initialize() instead of loginit.initialize().
Promote MAX_RESTARTS into a Defaults.py.in variable. This is because the unit
tests will knock that value down to something not so annoying should one of
the qrunner-required tests traceback.
Several other important changes to the unit test suite (which now completely
succeeds again!):
- Set the uid and gid of the temporary mailman.cfg and tmp*.db files to the
Mailman user and group as specified in the config object.
- Make sure that all of the tests point to a SQLite database file that was
created with the tempfile module. This way we don't pollute our main
database with data that is getting created during the unit tests.
- In the TestBase.setUp() method, be sure to close the existing dbcontext,
clear out the mappers, and then reconnect the dbcontext with the new
SQLALCHEMY_ENGINE_URL pointing to the tempfile. However, we don't need to
reload the MailList instance any more.
- Make all tests work, except for the tests that require crypt. That upgrade
path will not be available in this version of Mailman.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and some of the admindb.py links. There may still be breakage in other parts
of the interface and I haven't gone back to verify that traditional CGI still
works.
Changes:
- Add wsgiref-0.1.2-py2.4.egg so that we can still do WSGI in Python 2.4,
which doesn't come with wsgiref. Of course this means we /also/ have to add
setuptools-0.5c3 because eggs require setuptools.
- Style cleanups in HTTPRunner.py and wsgi_app.py. Also, use cStringIO
instead of StringIO.
- All internal links within the listinfo and admin pages are (or at least
should be ;) relative now. This should make other things better, such as
running Mailman over https or alternative ports. It does kind of mean that
web_page_url is obsolete, but I haven't looked at whether we can completely
eradicate it.
- ValidateEmail(): Use ' ' in s instead of s.count(' ') > 0.
- GetPathPieces(): When path is false, return the empty list instead of None,
so we can still len() it.
- ScriptURL(): Much simpler. To support relative urls as the default, we
change the API so that it only takes a 'target' argument (i.e. the script we
want to link to). It no longer takes 'absolute' or 'web_page_url', and it
constructs its link from GetPathPieces(), the target, and the cgi extension.
- GetRequestURI(): code style updates.
- Mailman/bin/show_config.py: De-DOS-line-ending-ification.
- export.py: A few modifications, although this is likely still not final (I'm
still working on the import script). First, for <option> elements, don't
put the value in an attribute, put it in the text body of the element.
Second, put the list <option> tags in a <configuration> element. Third, put
the preferred language on an <option> tag with a 'preferred_language'
name attribute value.
- SecurityManager: Make sure that MakeCookie() and ZapCookie() use the same
'path' cookie value by refactoring that into a separate method. That method
now returns just the SCRIPT_NAME and the full listname. web_page_url
doesn't enter into it.
- loginit.py: Add a 'debug' logger since it's just too useful to have :)
- admin.py: Remove the extra / right before the query string in ?VARHELP
urls. That extra / turns out to be problematic with the relative url scheme
we're using now.
- Auth.py: whitespace normalization and copyright years update. Also, remove
a couple of unnecessary imports. Also, make sure that the actionurl is
relative.
- create.py: Typo.
- private.py: mm_cfg -> config object
- In MailList.py: GetScriptURL() can be written in terms of Utils.ScriptURL()
now.
|
| | |
|
| |
|
|
| |
of self.obscure_addresses.
|
| |
|
|
| |
Piunno. Closes SF # 649158.
|
| |
|
|
|
| |
Applied patch #600368 by Simone Piunno to ease translations for some
languages.
|
| |
|
|
|
|
|
| |
all the strings aren't properly encoded. To make life as easy as
possible, make sure that all the items in the split sequence are 8-bit
strings, encoded if necessary in the charset of the language given in
the argument list.
|
| |
|
|
| |
last received bounce.
|
| |
|
|
| |
display when only one language is available.
|
| |
|
|
| |
Simone Piunno.
|
| |
|
|
|
|
|
|
|
| |
Clarify the semantics of all these settings. Setting IMAGE_LOGOS to 0
is the only way to suppress the sponsor images, but this also
suppresses the favicon. You should now never set SHORTCUT_ICON to 0
(it should always be the string naming the favicon file).
Closes SF bugs # 546421 and 546418.
|
| |
|
|
| |
return the lang description as a non-selectable string.
|
| |
|
|
|
|
|
|
| |
GetStandardReplacements(): Expand <mm-owner> tags to the -owner
address. This is more appropriate than the -bounces address because
it reaches the human without going through the bounce processor.
Since this ends up in a message that a human will act on, it's the
correct address to use.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
listinfo.py
list_listinfo(): If the list only has one language enabled, omit
the language choice box. It's a waste of screen real-estate.
HTMLFormatter
GetStandardReplacements(): ditto
options.py
loginpage(): ditto. Also omit the paragraph that talks about
session cookies. It's probably over the heads of most users.
main(): Don't print the "No address given" if we're traveling here
from the listinfo page and they left the address field blank, as
per the instructions.
|
| |
|
|
| |
the head's LINK SHORTCUT ICON.
|
| |
|
|
|
|
|
|
|
|
|
| |
written by Ben Gertzfield, ported to MM2.1 by Marc MERLIN.
Specifically,
FormatOptionButton(): Add DontReceiveDuplicates to the list of
options names.
(Also, untabbification)
|
| |
|
|
|
|
| |
GetLangSelectBox() call for the <mm-list-langs> replacement, otherwise
a user's option page will always reset the user's language to the
list's preferred language.
|
| |
|
|
|
|
|
| |
they'll have a bounce info record, and if that record has a score
above 0, we'll add a little bit of information to their options page
explaining their current bounce score and some advice for fixing the
problem.
|
| |
|
|
|
|
| |
getDeliveryStatus() instead of getMemberOption(). Also, tailor the
disable notification based on the actual status -- gives more detail
about how the membership was actually disabled.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a hidden field so that the language choice can be propagated to the
options page.
RosterOption(): Same, for the roster page.
GetLangSelectBox(): Factor out the creation of the language selection
widget, since other code will need the same thing.
GetStandardReplacements(): Use GetLangSelectBox().
|
| |
|
|
| |
up with what options.py expects.
|
| |
|
|
| |
Russian translation easier.
|
| |
|
|
|
|
| |
"member". This makes translation to some languages difficult.
Instead, construct different messages based on whether
num_concealed is == 1 or > 1.
|
| |
|
|
|
|
|
| |
mailto: to their personal email address. Instead, hyperlink the
lot of them with a mailto: to the list's -owner address. That
let's us do a spam detect on the message before forwarding on the
owners.
|
| |
|
|
| |
multiline individual strings.
|
| |
|
|
|
|
|
|
|
|
| |
domain. From there you can get to the admin overview.
FormatEditingOption(): Remove the docstring. Also, rework the
glomming up of the text local variable to be more efficient, and
to emphasize that the same field/button should be used to quickly
unsubscribe from the list. Also, indicate what happens if you
leave the field blank.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
API instead, e.g.
GetDigestMembers() -> getDigestMemberKeys()
GetUserOption() -> getMemberOption()
GetMembers() -> getRegularMemberKeys()
FormatOptionButton(): Add ReceiveNonmatchingTopics flag.
FormatBox(): Add optional `value' parameter, which if supplied is the
default value for teh input box (default is the empty string).
|
| |
|
|
|
| |
first try to get the index of the explicit argument, falling back to
the list's preferred language, and the server's default.
|
| |
|
|
| |
converted to multiline strings for ease of translation.
|
| |
|
|
|
|
|
|
| |
value to 'remind'.
FormatDisabledNotice(): Cleaned up the text message by using
multi-line strings and string interpolation. This should also improve
the ability for these messages to be translated into Japanese.
|
| |
|
|
| |
user option.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and all references to this volatile instance variable have been
removed.
SnarfHTMLTemplate(): Also removed, since maketext() does all this in a
more general way.
ParseTags(): Use Utils.maketext() instead of SnarfHTMLTemplate().
InitTemplates(): Because of the new support for expanded template
searches, the only thing that's necessary for a list to support a
language is for it to have a (possibly empty) directory named after
the language code. Thus, the copying of template files done in this
method are unnecessary.
|
| |
|
|
|
|
| |
module with re. This quiets a Python 2.1 warning.
Also, de-string-module-ification.
|
| |
|
|
|
|
| |
former does the proper urllib.quote()'ing of the email address.
Close SF bug #214161 (old Jitterbug PR#198).
|
| |
|
|
| |
list-specific language templates directory.
|
| | |
|
| |
|
|
|
|
| |
Added some missing _() wrappers.
Fix some _() wrappings to use local variables.
|
| |
|
|
|
|
| |
find the template if lists/<listname>/<lang> doesn't exist. The
update script now creates the `en' language subdir and moves all the
templates into it.
|
| |
|
|
|
| |
module. Also, default to getting the source templates out of
$MM/templates if $MM/templates/<lang> doesn't exist.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Carlos's contribution or not. Specifically,
GetMailmanFooter(), FormatSubscriptionMsg(), FormatEditingOption():
Mark some strings as translatable, using the Mailman.i18n._
`auto-interpolating' function.
SnarfHTMLTemplate(): Catch IOErrors which could result if a list was
created in an older version of Mailman before the i18n support was
added.
GetStandardReplacements(): Watch out for missing list preferred
language (can happen to an older list which hasn't been updated). Use
DEFAULT_SERVER_LANGUAGE in that case.
InitTemplates(): Some additional code reorg.
|
| |
|
|
|
|
|
|
| |
Mark lots of strings as translatable.
SnarfHTMLTemplate(), FormatUsers(), FormatEditingOption(),
FormatReminder(), GetStandardReplacements(), GetAllReplacements(),
InitTemplates(): Accept optional `lang' argument.
|
| |
|
|
|
| |
list footer. Makes it much easier to get to the admin pages from the
normal user pages.
|
| |
|
|
|
| |
GetMailmanFooter(), FormatUsers(), FormatFormStart():
GetRelativeScriptURL() => GetScriptURL()
|
| |
|
|
| |
action path. SF Patch #100556.
|