summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Be sure to set the language to the DEFAULT_SERVER_LANGUAGE as soon asbwarsaw2001-05-181-1/+4
| | | | possible.
* dequeue(): Since IOError and OSError are both derived frombwarsaw2001-05-181-1/+1
| | | | | | EnvironmentError, it makes for slightly cleaner and more efficient code to catch the common base class rather than a tuple containing the two derived classes.
* send_i18n_digests(): In addition to passing in the user's preferredbwarsaw2001-05-181-1/+1
| | | | | language, also pass in the MailList object; maketext() digs the preferred language out of the list object.
* hold_for_approval(): In addition to passing in the user's preferredbwarsaw2001-05-181-4/+2
| | | | | language, also pass in the MailList object; maketext() digs the preferred language out of the list object.
* process(): In addition to passing in the user's preferred language,bwarsaw2001-05-181-1/+1
| | | | | also pass in the MailList object; maketext() digs the preferred language out of the list object.
* main(): Instead of passing in the list's preferred language, simplybwarsaw2001-05-181-1/+1
| | | | | pass in the MailList object; maketext() digs the preferred language out of the list object.
* main(): Don't call HTMLFormatter.InitVars() since mlist._template_dirbwarsaw2001-05-181-9/+6
| | | | | | | | | | has been removed. FormatHTML(): Call Utils.maketext() instead of SnarfHTMLTemplate() since that's also been removed. ChangeHTML(): Don't use mlist._template_dir to find the path to the list-centric template. Instead use mlist.fullpath().
* main(): Instead of passing in the list's preferred language, simplybwarsaw2001-05-181-5/+6
| | | | | | | | | pass in the MailList object; maketext() digs the preferred language out of the list object. Also, use mm_cfg.MAILMAN_OWNER as the originator of the mail message instead of `mailman-owner@' + mlist.host_name. This closes SF bug #424389, although I'm not 100% sure this is the right fix.
* show_requests(): Instead of passing in the list's preferred language,bwarsaw2001-05-181-1/+1
| | | | | simply pass in the MailList object; maketext() digs the preferred language out of the list object.
* loginpage(): Instead of passing in the list's preferred language,bwarsaw2001-05-181-1/+1
| | | | | simple pass in self; maketext() digs the preferred language out of the list object.
* Better support for command line scripts which want to set the defaultbwarsaw2001-05-181-5/+12
| | | | | | | | | | | language to the value of $LANGUAGE (or any of the other gettext module supported environment variables). Specifically, set_language(): Allow the `language' parameter to default to None, which tells gettext.translation() to use its own defaults. When the module global _translation is None, call set_language() with no arguments.
* GetConfigInfo(), AddMember(), ConfirmUnsubscription(),bwarsaw2001-05-181-8/+6
| | | | | | | | | | ApprovedAddMember(), DeleteMember(): Instead of passing in the list's preferred language, simple pass in self; maketext() digs the preferred language out of the list object. In AddMember(), ConfirmUnsubscription(), and ApprovedAddMember(), the argument `lang' is also passed in case the user chose a language other than the list's default.
* AddApprovalMsg(), ProcessHelpCmd(): Instead of passing in the list'sbwarsaw2001-05-181-2/+2
| | | | | preferred language, simple pass in self; maketext() digs the preferred language out of the list object.
* __read(), _seed(): Since IOError and OSError are both derived frombwarsaw2001-05-181-3/+3
| | | | | | EnvironmentError, it makes for slightly cleaner and more efficient code to catch the common base class rather than a tuple containing the two derived classes.
* HoldSubscription(), __refuse(): Instead of passing in the list'sbwarsaw2001-05-181-2/+2
| | | | | preferred language, simple pass in self; maketext() digs the preferred language out of the list object.
* Removed some unnecessary imports.bwarsaw2001-05-181-4/+1
|
* InitVars(): Removed, since self._template_dir is no longer necessarybwarsaw2001-05-181-43/+1
| | | | | | | | | | | | | | | | 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.
* GetConfigInfoy(): Instead of passing in the list's preferred language,bwarsaw2001-05-181-4/+3
| | | | | | | | simple pass in self; maketext() digs the preferred language out of the list object. SetUserDigest(): Add a note about the (possibly) redundant self.Save() call.
* SendSubscribeAck(), MailUserPassword(): In addition to passing in thebwarsaw2001-05-181-4/+3
| | | | | | | | user's preferred language, also pass in self so maketext() can dig out the list's preferred language if for some odd reason the user's preferred language can't be found. Also, remove the obsolete os.environ['LANG'] setting.
* HandleBouncingAddress(): Instead of passing in the list's preferredbwarsaw2001-05-181-3/+3
| | | | | language, simple pass in self; maketext() digs the preferred language out of the list object.
* T.__init__(), T.new_archive(), BSDDBdatabase.__openIndices(): Usebwarsaw2001-05-181-7/+20
| | | | os.mkdir() instead of Utils.mkdir().
* __openIndices(): Use os.mkdir() instead of Utils.mkdir().bwarsaw2001-05-181-6/+9
|
* Remove an unnecessary import.bwarsaw2001-05-181-3/+1
|
* Archiver.InitVars(): Use os.mkdir() instead of Utils.mkdir().bwarsaw2001-05-181-6/+7
|
* maketext(): Better support for template specialization levels. Thisbwarsaw2001-05-181-37/+83
| | | | | | | | | | | | function now takes an additional optional argument `mlist' which must be a MailList object. It implements an expanding search order for a specific template file: list-centric, domain-centric, site-centric, global default. Each of these prefixes in turn the explicit language passed as an argument, then the list's preferred language, then the site's default language. The first matching template file found is returned. mkdir(): Removed. Use os.mkdir() instead.
* Added the new "Internationalization" sidebar linkbwarsaw2001-05-1725-153/+172
|
* The start of some docs for i18nbwarsaw2001-05-170-0/+0
|
* intermediatebwarsaw2001-05-171-0/+228
|
* intermediatebwarsaw2001-05-171-0/+56
|
* Added Tokio Kikuchibwarsaw2001-05-171-0/+1
|
* Application of SF patch #420396, submitted by Tokio Kikuchi. Thisbwarsaw2001-05-162-7/+25
| | | | script was not setting up the i18n environment in the `blessed' way.
* admin_overview(): Application of SF patch #420396, submitted by Tokiobwarsaw2001-05-161-8/+6
| | | | | Kikuchi. Japanese translations have difficulty when the sentences are split.
* listinfo_overview(): Application of SF patch #420396, submitted bybwarsaw2001-05-161-4/+3
| | | | | Tokio Kikuchi. Japanese translations have difficulty when the sentences are split.
* Create(): Add a call to CheckValues() so that even if DEFAULT_URL isbwarsaw2001-05-161-0/+1
| | | | | misconfigured in mm_cfg.py to be missing a trailing slash, one will be added upon list creation.
* Template for the private archives login screen.bwarsaw2001-05-160-0/+0
|
* intermediatebwarsaw2001-05-161-0/+40
|
* main(): Change the way the private archives authentication page isbwarsaw2001-05-161-5/+7
| | | | | | | | | displayed: - use the private.html template instead of private.txt - calculate the ACTION attribute via the absolute url back to the `private' cgi script
* GetBaseArchiveURL(): Instead of relying on the configuration variablebwarsaw2001-05-161-4/+2
| | | | | PRIVATE_ARCHIVE_URL, calculate the url to the `private' cgi script via self.GetScriptURL().
* PRIVATE_ARCHIVE_URL: Removed; we can calculate this on the fly.bwarsaw2001-05-161-1/+0
|
* WebAuthenticate(): Minor simplification.bwarsaw2001-05-161-3/+3
|
* syslog() entries should go to logs/error not logs/qrunner. It'sbwarsaw2001-05-151-5/+5
| | | | highly annoying to have to tail more than one log file to find bugs.
* This file was never published in yr 2000.bwarsaw2001-05-141-1/+1
|
* enqueue(): The `received_time' metadata (which is set here once, butbwarsaw2001-05-141-22/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only if it has no prior value), is encoded into the file name so that we can guarantee FIFO order on the processed files. We can't encode the received time in the file attributes because there isn't enough precision (and I suspect that stat'ing all those files will be too much of a disk I/O drain). Instead, the filebase is composed of the string representation of the current time in float seconds, the symbol `+', and the SHA1 hexdigest of a hash of the uniquifying data. This makes it easy and quick to decode received time for FIFO sorting, but retains the "random" digest for bitrange slicing. Note that the received_time metadata value is never changed once its set so the first part of the filebase will remain unchanged as it moves between queues (while the hexdigest will almost definitely change on each queue move). dequeue(): Be more robust about missing .msg or .db files when the other exists (usually, it'll be the .msg file that's missing). Return None for either the msg or data part of the 2-tuple return value, where None means "missing". files(): Utililize the new file naming convention to break apart the file name and sort the files in FIFO order, while still retaining the bitrange random hash feature. MarshalSwitchboard: All Python versions up to and including Python 2.1 have a bug in the marshal representation of binary floating point numbers. Specifically, it loses precision that Mailman requires. The solution in this class is to have a hardcoded list of known float attributes, convert them to strings via repr() before marshaling the dictionary, and convert them back to floats -- via a safe eval() -- when reading the marshal back from file.
* main(): Don't set the `received_time' metadata here; it's set in thebwarsaw2001-05-141-3/+1
| | | | queue runner.
* __oneloop(): Guarantee FIFO order on the processed messages. Webwarsaw2001-05-141-16/+23
| | | | | | | | | | assume that the list of files coming back from Switchboard.files() is sorted by received time, so we don't need to randomize this list. Also, it's now possible for Switchboard.dequeue() to return None for either or both of msg and msgdata (say if the .msg file for a .db file got lost somehow). Check that both are not None before proceeding (but if either is None, log an error).
* process(): We don't need to set the `received_time' metadata item,bwarsaw2001-05-141-1/+0
| | | | since this is guaranteed to be filled in by the runner.
* reap(): It's possible under some circumstances to get an ECHILD frombwarsaw2001-05-141-1/+8
| | | | | the os.waitpid() call. This means there are no children left so we can just clear the dictionary and return.
* get_item_gui_description(): Can't add two Label() widgets, so formatbwarsaw2001-05-111-2/+2
| | | | them to plain text first.
* ProcessConfirmation(): Fix tuple unpacking typo in unsub confirmation.bwarsaw2001-05-111-1/+1
|
* _dispose(): Add support for mylist-join and mylist-leave aliases. Thebwarsaw2001-05-111-0/+10
| | | | | | | | | | | | mail scripts simply add metadata `tojoin' or `toleave' respectively, which tell CommandRunner which operation to perform. This is a bit crufty since MailCommandHandler.ParseMailCommands() still handles the actual job of adding or deleting the member. CommandRunner hacks the Subject: line of the message to add just the specific desired command, and it empties the message's payload (effectively ignoring any additional commands or useless text in the email message).