Mercurial > libervia-backend
diff src/memory/params.py @ 1222:e6e0ea4dc835
memory: add Parameter "Chat history limit"
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 24 Sep 2014 13:49:43 +0200 |
parents | f91e7028e2c3 |
children | 72f25d671368 |
line wrap: on
line diff
--- a/src/memory/params.py Fri Oct 03 12:43:59 2014 +0200 +++ b/src/memory/params.py Wed Sep 24 13:49:43 2014 +0200 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from sat.core.i18n import _ +from sat.core.i18n import _, D_ from sat.core import exceptions from sat.core.constants import Const as C @@ -44,6 +44,7 @@ <individual> <category name="General" label="%(category_general)s"> <param name="Password" value="" type="password" /> + <param name="%(history_param)s" label="%(label_history)s" value="20" min="0" max="100" type="int" security="0" /> </category> <category name="Connection" label="%(category_connection)s"> <param name="JabberID" value="name@example.org/SàT" type="string" /> @@ -61,12 +62,14 @@ </individual> </params> """ % { - 'category_general': _("General"), - 'category_connection': _("Connection"), - 'label_NewAccount': _("Register new account"), - 'label_autoconnect': _('Connect on frontend startup'), - 'label_autodisconnect': _('Disconnect on frontend closure'), - 'category_misc': _("Misc"), + 'category_general': D_("General"), + 'category_connection': D_("Connection"), + 'history_param': C.HISTORY_LIMIT, + 'label_history': D_('Chat history limit'), + 'label_NewAccount': D_("Register new account"), + 'label_autoconnect': D_('Connect on frontend startup'), + 'label_autodisconnect': D_('Disconnect on frontend closure'), + 'category_misc': D_("Misc"), 'force_server_param': C.FORCE_SERVER_PARAM, 'force_port_param': C.FORCE_PORT_PARAM, }