From e02cde5c93ff54817a30af27068c84c869d50ca0 Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Sun, 29 Jan 2006 15:24:03 +0100 Subject: [PATCH] Finish french translation darcs-hash:20060129142403-86b55-840b288b57bb61ead3f81f14c7a3c8ffba053012.gz --- jabber/component.py | 45 +++++++++++------------ jabber/lang.py | 54 ++++++++++++++-------------- jabber/mailconnection_factory.py | 6 ++-- jabber/storage.py | 2 +- jmc.py | 2 +- jmc.xml | 3 +- tests/dummy_server.py | 6 ++-- tests/email_generator.py | 6 ++-- tests/jmc-test.xml | 2 +- tests/test_component.py | 6 ++-- tests/test_mailconnection_factory.py | 6 ++-- tests/test_storage.py | 2 +- tests/test_x.py | 6 ++-- tests/utils.py | 2 +- 14 files changed, 73 insertions(+), 75 deletions(-) diff --git a/jabber/component.py b/jabber/component.py index 7885050..4f510d7 100644 --- a/jabber/component.py +++ b/jabber/component.py @@ -213,7 +213,7 @@ class MailComponent(Component): reg_form.add_field(type = "text-single", \ label = lang_class.account_check_interval, \ var = "interval", \ - value = "5") + value = unicode(self.__interval)) return reg_form @@ -225,11 +225,11 @@ class MailComponent(Component): reg_form_init = X() reg_form_init.xmlns = "jabber:x:data" reg_form_init.title = lang_class.update_title - reg_form_init.instructions = lang_class.update_instructions + \ - name + reg_form_init.instructions = lang_class.update_instructions % \ + (name,) reg_form_init.type = "form" - reg_form_init.add_field(type = "fixed", \ + reg_form_init.add_field(type = "hidden", \ label = lang_class.account_name, \ var = "name", \ value = name) @@ -258,18 +258,21 @@ class MailComponent(Component): label = lang_class.account_type, \ var = "type", \ value = account.get_type()) - field.add_option(label = "POP3", \ - value = "pop3") - field.add_option(label = "POP3S", \ - value = "pop3s") - field.add_option(label = "IMAP", \ - value = "imap") - field.add_option(label = "IMAPS", \ - value = "imaps") - - reg_form_init.add_field(type = "text-single", \ - label = lang_class.account_mailbox, \ - var = "mailbox") + if account.get_type()[0:4] == "imap": + field.add_option(label = "IMAP", \ + value = "imap") + field.add_option(label = "IMAPS", \ + value = "imaps") + field = reg_form_init.add_field(type = "text-single", \ + label = lang_class.account_mailbox, \ + var = "mailbox") + field.value = account.mailbox + else: + field.add_option(label = "POP3", \ + value = "pop3") + field.add_option(label = "POP3S", \ + value = "pop3s") + field = reg_form_init.add_field(type = "list-single", \ label = lang_class.account_ffc_action, \ @@ -341,12 +344,6 @@ class MailComponent(Component): label = lang_class.account_check_interval, \ var = "interval", \ value = str(account.interval)) - - if account.get_type()[0:4] == "imap": - reg_form_init.fields["mailbox"].value = account.mailbox - else: - reg_form_init.fields["mailbox"].value = u"INBOX" - return reg_form_init """ Looping method """ @@ -478,7 +475,7 @@ class MailComponent(Component): if not node: for name in self.__storage.keys((base_from_jid,)): account = self.__storage[(base_from_jid, name)] - str_name = account.get_type() + lang_class.connection + name + str_name = lang_class.connection_label % (account.get_type().upper(), name) if account.get_type()[0:4] == "imap": str_name += " (" + account.mailbox + ")" DiscoItem(di, JID(name + "@" + unicode(self.jid)), \ @@ -491,7 +488,7 @@ class MailComponent(Component): iq = iq.make_result_response() q = iq.new_query("jabber:iq:version") q.newTextChild(q.ns(), "name", "Jabber Mail Component") - q.newTextChild(q.ns(), "version", "0.1") + q.newTextChild(q.ns(), "version", "0.2") self.stream.send(iq) return 1 diff --git a/jabber/lang.py b/jabber/lang.py index 2d2ab37..0343154 100644 --- a/jabber/lang.py +++ b/jabber/lang.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ## ## lang.py ## Login : David Rousselie @@ -43,8 +44,8 @@ class Lang: action_retrieve = u"Retrieve mail" action_digest = u"Send mail digest" update_title = u"Jabber mail connection update" - update_instructions = u"Modifying connection " - connection = u" connection " + update_instructions = u"Modifying connection '%s'" + connection_labels = u"%s connection '%s'" update_account_message = u"Updated %s connection '%s': Registered with "\ "username '%s' and password '%s' on '%s'" new_account_message = u"New %s connection '%s': Registered with " \ @@ -53,30 +54,29 @@ class Lang: class fr: register_title = u"Enregistrement d'une nouvelle connexion à un serveur email." register_instructions = u"Entrer les paramètres de connexion" - # TODO - account_name = u"Connection name" - account_login = u"Login" - account_password = u"Password" - account_host = u"Host" - account_port = u"Port" - account_type = u"Mail serveur type" - account_mailbox = u"Mailbox path (IMAP)" - account_ffc_action = u"Action when state is 'Free For Chat'" - account_online_action = u"Action when state is 'Online'" - account_away_action = u"Action when state is 'Away'" - account_xa_action = u"Action when state is 'Not Available'" - account_dnd_action = u"Action when state is 'Do not Disturb'" - account_offline_action = u"Action when state is 'Offline'" - account_check_interval = u"Mail check interval (in minutes)" - action_nothing = u"Do nothing" - action_retrieve = u"Retrieve mail" - action_digest = u"Send mail digest" - update_title = u"Jabber mail connection update" - update_instructions = u"Modifying connection " - connection = u" connection " - update_account_message = u"Updated %s connection '%s': Registered with "\ - "username '%s' and password '%s' on '%s'" - new_account_message = u"New %s connection '%s': Registered with " \ - "username '%s' and password '%s' on '%s'" + account_name = u"Nom de la connexion" + account_login = u"Nom d'utilisateur" + account_password = u"Mot de passe" + account_host = u"Adresse du serveur email" + account_port = u"Port du serveur email" + account_type = u"Type du serveur email" + account_mailbox = u"Chemin de la boîte email (IMAP)" + account_ffc_action = u"Action lorsque l'état est 'Free For Chat'" + account_online_action = u"Action lorsque l'état est 'Online'" + account_away_action = u"Action lorsque l'état est 'Away'" + account_xa_action = u"Action lorsque l'état est 'Not Available'" + account_dnd_action = u"Action lorsque l'état est 'Do not Disturb'" + account_offline_action = u"Action lorsque l'état est 'Offline'" + account_check_interval = u"Interval de vérification de nouveaux emails (en minutes)" + action_nothing = u"Ne rien faire" + action_retrieve = u"Récupérer l'email" + action_digest = u"Envoyer un résumé" + update_title = u"Mise à jour du compte JMC" + update_instructions = u"Modification de la connexion '%s'" + connection_label = u"Connexion %s '%s'" + update_account_message = u"La connexion %s '%s' a été mise à jour : \n"\ + "Nom d'utilisateur : '%s'\nMot de passe : '%s'\nsur : '%s'" + new_account_message = u"La connexion %s '%s' a été créée : \n" \ + "Nom d'utilisateur : '%s'\nMot de passe : '%s'\nsur : '%s'" diff --git a/jabber/mailconnection_factory.py b/jabber/mailconnection_factory.py index 1967933..acf6339 100644 --- a/jabber/mailconnection_factory.py +++ b/jabber/mailconnection_factory.py @@ -1,10 +1,10 @@ ## ## mailconnection_factory.py -## Login : -## Started on Fri May 20 10:41:46 2005 adro8400 +## Login : David Rousselie +## Started on Fri May 20 10:41:46 2005 David Rousselie ## $Id: mailconnection_factory.py,v 1.2 2005/09/18 20:24:07 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/jabber/storage.py b/jabber/storage.py index b9f2d46..e392bcc 100644 --- a/jabber/storage.py +++ b/jabber/storage.py @@ -1,6 +1,6 @@ ## ## storage.py -## Login : +## Login : David Rousselie ## Started on Wed Jul 20 20:26:53 2005 dax ## $Id: storage.py,v 1.1 2005/09/18 20:24:07 dax Exp $ ## diff --git a/jmc.py b/jmc.py index 17a060c..ea9bd6f 100755 --- a/jmc.py +++ b/jmc.py @@ -2,7 +2,7 @@ ## ## Jabber Mail Component ## jmc.py -## Login : David Rousselie +## Login : David Rousselie ## Started on Fri Jan 7 11:06:42 2005 ## $Id: jmc.py,v 1.3 2005/07/11 20:39:31 dax Exp $ ## diff --git a/jmc.xml b/jmc.xml index 82961b6..ed3c278 100644 --- a/jmc.xml +++ b/jmc.xml @@ -14,5 +14,6 @@ DBM /var/spool/jabber - 1 + + 5 diff --git a/tests/dummy_server.py b/tests/dummy_server.py index b88b946..04d055e 100644 --- a/tests/dummy_server.py +++ b/tests/dummy_server.py @@ -1,10 +1,10 @@ ## ## dummy_server.py -## Login : -## Started on Fri May 13 12:53:17 2005 adro8400 +## Login : David Rousselie +## Started on Fri May 13 12:53:17 2005 ## $Id: dummy_server.py,v 1.1 2005/07/11 20:39:31 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/tests/email_generator.py b/tests/email_generator.py index 93f5e40..b764fc8 100644 --- a/tests/email_generator.py +++ b/tests/email_generator.py @@ -1,11 +1,11 @@ ## # -*- coding: iso-8859-1 -*- ## email_generator.py -## Login : -## Started on Tue May 17 15:33:35 2005 adro8400 +## Login : David Rousselie +## Started on Tue May 17 15:33:35 2005 ## $Id: email_generator.py,v 1.1 2005/07/11 20:39:31 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/tests/jmc-test.xml b/tests/jmc-test.xml index 1fbe4c9..8fea6a5 100644 --- a/tests/jmc-test.xml +++ b/tests/jmc-test.xml @@ -14,5 +14,5 @@ DBM . - 1 + 5 diff --git a/tests/test_component.py b/tests/test_component.py index c3b4f88..670c1a5 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -1,10 +1,10 @@ ## ## test_mailconnection_factory.py -## Login : -## Started on Fri May 20 10:46:58 2005 adro8400 +## Login : David Rousselie +## Started on Fri May 20 10:46:58 2005 ## $Id: test_component.py,v 1.2 2005/09/18 20:24:07 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/tests/test_mailconnection_factory.py b/tests/test_mailconnection_factory.py index e2e7520..a8a674b 100644 --- a/tests/test_mailconnection_factory.py +++ b/tests/test_mailconnection_factory.py @@ -1,10 +1,10 @@ ## ## test_mailconnection_factory.py -## Login : -## Started on Fri May 20 10:46:58 2005 adro8400 +## Login : David Rousselie +## Started on Fri May 20 10:46:58 2005 ## $Id: test_mailconnection_factory.py,v 1.1 2005/07/11 20:39:31 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/tests/test_storage.py b/tests/test_storage.py index 382897b..700c9de 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -1,6 +1,6 @@ ## ## test_storage.py -## Login : +## Login : David Rousselie ## Started on Fri May 20 10:46:58 2005 dax ## $Id: test_component.py,v 1.1 2005/07/11 20:39:31 dax Exp $ ## diff --git a/tests/test_x.py b/tests/test_x.py index 71bf685..43d967b 100644 --- a/tests/test_x.py +++ b/tests/test_x.py @@ -1,10 +1,10 @@ ## ## test_x.py -## Login : -## Started on Fri May 20 10:46:58 2005 adro8400 +## Login : David Rousselie +## Started on Fri May 20 10:46:58 2005 ## $Id: test_x.py,v 1.1 2005/07/11 20:39:31 dax Exp $ ## -## Copyright (C) 2005 adro8400 +## Copyright (C) 2005 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or diff --git a/tests/utils.py b/tests/utils.py index 4537e79..0c5a619 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,6 +1,6 @@ ## ## utils.py -## Login : +## Login : David Rousselie ## Started on Mon Oct 24 21:44:43 2005 dax ## $Id$ ##