Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
1221:5e5661ab5c81 | 1222:e6e0ea4dc835 |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from sat.core.i18n import _ | 20 from sat.core.i18n import _, D_ |
21 | 21 |
22 from sat.core import exceptions | 22 from sat.core import exceptions |
23 from sat.core.constants import Const as C | 23 from sat.core.constants import Const as C |
24 from sat.memory.crypto import BlockCipher, PasswordHasher | 24 from sat.memory.crypto import BlockCipher, PasswordHasher |
25 from xml.dom import minidom, NotFoundErr | 25 from xml.dom import minidom, NotFoundErr |
42 <general> | 42 <general> |
43 </general> | 43 </general> |
44 <individual> | 44 <individual> |
45 <category name="General" label="%(category_general)s"> | 45 <category name="General" label="%(category_general)s"> |
46 <param name="Password" value="" type="password" /> | 46 <param name="Password" value="" type="password" /> |
47 <param name="%(history_param)s" label="%(label_history)s" value="20" min="0" max="100" type="int" security="0" /> | |
47 </category> | 48 </category> |
48 <category name="Connection" label="%(category_connection)s"> | 49 <category name="Connection" label="%(category_connection)s"> |
49 <param name="JabberID" value="name@example.org/SàT" type="string" /> | 50 <param name="JabberID" value="name@example.org/SàT" type="string" /> |
50 <param name="Password" value="" type="password" /> | 51 <param name="Password" value="" type="password" /> |
51 <param name="Priority" value="50" type="int" min="-128" max="127"/> | 52 <param name="Priority" value="50" type="int" min="-128" max="127"/> |
59 <param name="Watched" value="test@Jabber.goffi.int" type="string" /> | 60 <param name="Watched" value="test@Jabber.goffi.int" type="string" /> |
60 </category> | 61 </category> |
61 </individual> | 62 </individual> |
62 </params> | 63 </params> |
63 """ % { | 64 """ % { |
64 'category_general': _("General"), | 65 'category_general': D_("General"), |
65 'category_connection': _("Connection"), | 66 'category_connection': D_("Connection"), |
66 'label_NewAccount': _("Register new account"), | 67 'history_param': C.HISTORY_LIMIT, |
67 'label_autoconnect': _('Connect on frontend startup'), | 68 'label_history': D_('Chat history limit'), |
68 'label_autodisconnect': _('Disconnect on frontend closure'), | 69 'label_NewAccount': D_("Register new account"), |
69 'category_misc': _("Misc"), | 70 'label_autoconnect': D_('Connect on frontend startup'), |
71 'label_autodisconnect': D_('Disconnect on frontend closure'), | |
72 'category_misc': D_("Misc"), | |
70 'force_server_param': C.FORCE_SERVER_PARAM, | 73 'force_server_param': C.FORCE_SERVER_PARAM, |
71 'force_port_param': C.FORCE_PORT_PARAM, | 74 'force_port_param': C.FORCE_PORT_PARAM, |
72 } | 75 } |
73 | 76 |
74 def load_default_params(self): | 77 def load_default_params(self): |