summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* show_post_requests(): Mark another string as translatable.bwarsaw2001-03-021-1/+1
|
* __onefile(): The qrunner framework now sets up the language contextbwarsaw2001-03-021-1/+18
| | | | | | | | | | | | | | | for each processed message. It does this by getting the preferred language of the sender of the message (defaulting to the list's preferred language if the sender isn't a member of the list). Next, it saves the previous global language context in a local variable, sets the context to the message's preferred language and disposes of the message. Then it restores the original language context. It also sets the message's metadata (key: `lang') to contain the language name for the language context in case any handler modules need access to it.
* process(): More i18n changes. The user's preferred language is passedbwarsaw2001-03-021-5/+6
| | | | | | | around via the message metadata key `lang' (set by the Runner). Use this language to get the proper postack.txt template. Also be sure to set the Content-Type: header on the message we're generating and sending back to the user.
* get_translation(), set_translation(): Function which let you set andbwarsaw2001-03-021-0/+9
| | | | restore the translation context (via the global Translations object).
* InitTemplates(): Copy both the .html and the .txt files into thebwarsaw2001-03-021-2/+3
| | | | list-specific language templates directory.
* GetPreferredLanguage(): Simplify.bwarsaw2001-03-011-4/+1
|
* show_post_requests(): Of course Thomas Wouters is right, cgi.escape()bwarsaw2001-03-011-4/+1
| | | | on the subject text is the right thing to use.
* CATEGORIES: We forgot about the auto responder!bwarsaw2001-03-011-0/+1
|
* GetConfigInfo(): Fixed typo.bwarsaw2001-03-011-1/+1
|
* More i18n changes.bwarsaw2001-03-011-19/+22
| | | | Mark all appropriate strings as translatable.
* _dispose(): If there's no appropriate key in the message metadata,bwarsaw2001-03-011-0/+12
| | | | | determine whether this message was destined for the -owner or -admin address and update the metadata.
* process_form(): In the MMNeedApproval exception clause, we need to getbwarsaw2001-03-011-0/+3
| | | | | the local variables interpolated into the exception message. Easiest way to do that is to pass it through _().
* More i18n changes.bwarsaw2001-03-011-106/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At module scope, set the system language to the server's default, until we know which list this is a request on. main(): Don't lock the list until absolutely necessary. Also, once the list is instantiated, set the system language to the list's preferred language. Once the html results document object is created, set its language to the list's preferred language too. HandleRequests() -> process_form() PrintRequests() -> show_requests() handle_no_list(): Be sure to set the document's language to the server's default (since there is no instantiated list at this point). show_requests(): Support DEFER and DISCARD on subscription requests, just like as for held posts. PrintAddMemberRequest(): Inlined and removed. PrintPostRequest() -> show_post_requests() show_post_requests(): Convert to using the mimelib interface (it's a minor shame that we have to reparse the message object to display it on this page). Watch for mimelib.Errors.MessageParseError's which could result if the held message is corrupted. If this occurs, we discard the message, but that may not be the right thing to do. process_form(): Don't save the MailList object here; that happens in the finally: clause in main(). Also some minor verbiage and formatting changes.
* __handlesubscription(): Support DEFER and DISCARD on subscriptionbwarsaw2001-03-011-3/+5
| | | | | | requests too. This means you can defer making a decision about a subscription just like a held message. You can also discard a subscription request without sending a rejection notice.
* De-string-module-ification.bwarsaw2001-03-011-6/+14
| | | | | | | | | | | | | Conversion to mimelib API. PrintPostRequest(): We must html quote the Subject: text since this gets displayed in-line in the page. E.g. if you had the following header in a held message Subject: </table> it would royally screw the admindb display. Thanks to Brian Youmans for first reporting this problem.
* Fix some imports.bwarsaw2001-03-011-3/+7
| | | | HoldMessage(): GetSender() -> get_sender()
* patterns: Added oddball MTAs turbosport.com (running something calledbwarsaw2001-02-281-2/+18
| | | | | | | MDaemon 3.5.2), and usa.net running gawd knows what. process(): Minor adjustment to algorithm which allows the address matcher to find addresses on the line that matched start cre.
* pcre: SuSE 6.4 seems to have modified the bounce match line that allbwarsaw2001-02-281-1/+1
| | | | | other Postfix installations use -- they removed the word "program" :( Now, we just search for "the postfix".
* process(): Since this is a fairly wide-ranging matcher, narrow it downbwarsaw2001-02-281-1/+1
| | | | | | a bit to messages that only contain X-Mailer: headers (regardless of the content). All GroupWise samples so far add this header (but with different values).
* check(): Make sure the last block gets checked. Also, I've found abwarsaw2001-02-281-3/+5
| | | | | sample that's nearly DSN compliant -- it uses "Action: failure" when it should be "Action: failed". Be liberal in what you accept.
* process(): Fixes for the move to mimelib.bwarsaw2001-02-281-1/+3
|
* intermediatebwarsaw2001-02-281-1/+1
|
* CommandRunner which watches qfiles/commands for such things asbwarsaw2001-02-281-0/+123
| | | | bounces, confirm notices, and -request email commands.
* hold_for_approval(): Fix the Utils.maketext() calls to pass thebwarsaw2001-02-281-1/+1
| | | | language in as a keyword argument.
* Add missing importbwarsaw2001-02-281-0/+1
|
* More i18n changes.bwarsaw2001-02-281-82/+88
| | | | | | | | | | | | | | | | | | | | | | | De-string-module-ification and some Python 2.0-isms. Fix some _() wrappings to use local variables. At global module scope, set the language to the server's default, until we know which mailing list this request is being made on. main(): Set the document's language to the server's default, until we know which mailing list this request is being made on. Then, once we know the list, set the system and document languages to the list's preferred, until we know the user making the request. (get rid of os.environ['LANG'] settings) process_form(): NEW SUPPORT -- if the user has subscribed without filling in either the password or the confirmed password, Mailman will automatically assign a password for them. If either field is filled but not both, and error message is still displayed. PrintResults() -> print_results()
* More i18n changes.bwarsaw2001-02-281-8/+8
| | | | Fix some _() wrappings to use local variables.
* More i18n changes.bwarsaw2001-02-281-12/+15
| | | | | | | | | Untabification. Fix some _() wrappings to use local variables. Fix the Utils.maketext() calls to pass the language in as a keyword argument.
* More i18n changes.bwarsaw2001-02-281-17/+29
| | | | | | | | | | | | | | | | | | De-string-module-ification. Fix some _() wrappings to use local variables. At global module scope, set the language to the server's default, until we know which mailing list this request is being made on. main(): Set the document's language to the server's default, until we know which mailing list this request is being made on. Then, once we know the list, set the system and document languages to the list's preferred, until we know the user making the request. Finally, once we've got the user, set the system and document languages to the user's preferred. (get rid of os.environ['LANG'] settings)
* Untabification.bwarsaw2001-02-281-11/+11
|
* Big i18n changes.bwarsaw2001-02-281-37/+44
| | | | | | | | | | | | | | | | | | At global scope, set the language to the server's default, at least until we know which list the request is being made on. main(): Once we know which list this request is for, switch the language over to its preferred_language. FormatListinfoOverview() -> listinfo_overview() listinfo_overview(): Significant cleanups and code re-org. Don't lock the list until absolutely necessary. Use the new preferred route for setting the language (don't use os.environ['LANG'], instead use i18n.set_language()). Set the language on the document (so the resulting html has the proper charset). FormatListListinfo() -> list_listinfo()
* More i18n changes.bwarsaw2001-02-281-12/+19
| | | | | | Fix some _() wrappings to use local variables. Also convert to use mimelib interface.
* Untabification.bwarsaw2001-02-283-83/+85
|
* Use Mailman.i18n_ instead of gettext.gettext for the translatingbwarsaw2001-02-281-6/+12
| | | | | | wrapper. Fix some _() wrappings to use local variables.
* Fix some _() wrappings to use local variables.bwarsaw2001-02-281-3/+4
| | | | | Fix the Utils.maketext() calls to pass the language in as a keyword argument.
* Big i18n changes.bwarsaw2001-02-281-322/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CATEGORIES: Move back to module scope, and mark as translatable, but fake out the translator so the strings don't get translated at import time (they will be passed through _() later). At global scope, set the language to the server's default, at least until we know which list the request is being made on. main(): Significant cleanups and code re-org. Don't lock the list until absolutely necessary. Use the new preferred route for setting the language (don't use os.environ['LANG'], instead use i18n.set_language()). Move as much out of the locking try/finally as possible, including the checks for authorization, logout, and varhelp. Also, set the language on the document (so the resulting html has the proper charset). FormatAdminOverview() -> admin_overview() admin_overview(): Code re-org. Set the document's language to the server's default (since the overview isn't list specific). Don't set os.environ['LANG'] anymore. FormatOptionHelp() -> option_help() option_help(): Similar changes as above. Also, allow get_item_characteristics() to do the unpacking of the item records. FormatConfiguration() -> show_results() show_results(): Be sure to send the category values through _() for translating. Mark a few more strings as translatable. FormatOptionsSection() -> show_variables() ColHeader() -> column_header() AddOptionsTableItem() -> add_options_table_item() GetItemCharacteristics() -> get_item_characteristics() GetItemGuiValue() -> get_item_gui_value() GetItemGuiDescr() -> get_item_gui_description() FormatMembershipOptions() -> membership_options() FormatSubmit() -> submit_button() GetValidValue() -> get_valid_value() ChangeOptions() -> change_options() AddErrorMessage() -> add_error_message() change_options(): Watch specifically for changes to `preferred_language' attribute, and do the appropriate i18n.set_language() call if found.
* copyright yearbwarsaw2001-02-281-1/+1
|
* More i18n changes.bwarsaw2001-02-281-5/+8
| | | | | | | | loginpage(): Be sure to set the proper charset on the Content-Type: header (using the charset for the list's preferred language). Fix Utils.maketext(). authenticate(): Mark more strings as translatable.
* Added some commented out code, which aids in debugging.bwarsaw2001-02-281-0/+3
|
* GetConfigInfo(): Reformatting.bwarsaw2001-02-281-5/+10
|
* set_language(): If the specified catalog file can't be found, gettextbwarsaw2001-02-281-2/+7
| | | | raises an IOError. Catch this and fall back to a NullTranslations().
* Next round of big i18n patches.bwarsaw2001-02-281-9/+22
| | | | | | | | | | | Document class (and thus HeadlessDocument) grow a new method get_language() which is passed to Utils.GetCharSet() to get the right charset parameter on the Content-Type: header. They also grow get_content_type(). Fix some _() wrappings to use local variables. Added some missing _() wrappings.
* maketext(): Even though we're using a SafeDict, it's still possiblebwarsaw2001-02-281-4/+7
| | | | | | | | | | | | | for the source string to cause exceptions, e.g. if we try to do '%(hello)f' % {'hello': 'world'} so catch any TypeError and just feed them the raw, uninterpolated template. GetCharSet(): Require a `lang' argument in lieu of using os.environ['LANG'] to pass around this information. Note, this change may cause some temporary breakages.
* Untabification.bwarsaw2001-02-281-465/+479
| | | | | | | | | | | | GetConfigInfo(): Move the setup of the language popup menu choices to outside the setting of config_info. Next round of big i18n patches. Fix some _() wrappings to use local variables. Fix the Utils.maketext() calls to pass the language in as a keyword argument.
* Next round of big i18n patches.bwarsaw2001-02-281-79/+98
| | | | | | | | | | | | | Better formatting of command descriptions. _ function should come from Mailman.i18n not from gettext. ParseMailCommands(): Convert to using mimelib interface. Fix the Utils.maketext() calls to pass the language in as a keyword argument. Fix some _() wrappings to use local variables.
* Next round of big i18n patches.bwarsaw2001-02-281-7/+10
| | | | | | | Fix the Utils.maketext() calls to pass the language in as a keyword argument. Fix some _() wrappings to use local variables.
* Untabification.bwarsaw2001-02-281-119/+119
|
* Next round of big i18n patches.bwarsaw2001-02-281-18/+19
| | | | | | Added some missing _() wrappers. Fix some _() wrappings to use local variables.
* Reformatting.bwarsaw2001-02-281-18/+21
|
* Added missing import.bwarsaw2001-02-281-1/+2
|