summaryrefslogtreecommitdiff
path: root/src/mailman/model
diff options
context:
space:
mode:
authorBarry Warsaw2012-03-04 13:53:22 -0500
committerBarry Warsaw2012-03-04 13:53:22 -0500
commit73f497133ca7cadc91cdec9b87b80d2886f11472 (patch)
treea79df6a7ab5280fdc593878dca1f352bb6e8dee9 /src/mailman/model
parentd4b4c6c1857b0b337d17c594a35524c9e6bf8366 (diff)
downloadmailman-73f497133ca7cadc91cdec9b87b80d2886f11472.tar.gz
mailman-73f497133ca7cadc91cdec9b87b80d2886f11472.tar.zst
mailman-73f497133ca7cadc91cdec9b87b80d2886f11472.zip
Fix welcome_message_uri to do the placeholder interpolations guaranteed in the
IMailingList documentation. Also: * `ILanguageManager.add()` returns the `ILanguage` object just created.
Diffstat (limited to 'src/mailman/model')
-rw-r--r--src/mailman/model/docs/languages.rst5
-rw-r--r--src/mailman/model/docs/users.rst1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman/model/docs/languages.rst b/src/mailman/model/docs/languages.rst
index 21143f28b..7bfb0594d 100644
--- a/src/mailman/model/docs/languages.rst
+++ b/src/mailman/model/docs/languages.rst
@@ -31,10 +31,12 @@ Adding languages
Adding a new language requires three pieces of information, the 2-character
language code, the English description of the language, and the character set
-used by the language.
+used by the language. The language object is returned.
>>> mgr.add('en', 'us-ascii', 'English')
+ <Language [en] English>
>>> mgr.add('it', 'iso-8859-1', 'Italian')
+ <Language [it] Italian>
And you can get information for all known languages.
@@ -54,6 +56,7 @@ Other iterations
You can iterate over all the known language codes.
>>> mgr.add('pl', 'iso-8859-2', 'Polish')
+ <Language [pl] Polish>
>>> sorted(mgr.codes)
[u'en', u'it', u'pl']
diff --git a/src/mailman/model/docs/users.rst b/src/mailman/model/docs/users.rst
index bd1f36b35..7325d66b9 100644
--- a/src/mailman/model/docs/users.rst
+++ b/src/mailman/model/docs/users.rst
@@ -255,6 +255,7 @@ Some of these preferences are booleans and they can be set to ``True`` or
>>> from mailman.interfaces.languages import ILanguageManager
>>> getUtility(ILanguageManager).add('it', 'iso-8859-1', 'Italian')
+ <Language [it] Italian>
>>> from mailman.core.constants import DeliveryMode
>>> prefs = user_1.preferences