- reverse lookup also for CH, IT and AT
authorMichael Schmidt <drmichael@users.schwerkraft.elitedvb.net>
Wed, 13 Aug 2008 19:28:26 +0000 (19:28 +0000)
committerMichael Schmidt <drmichael@users.schwerkraft.elitedvb.net>
Wed, 13 Aug 2008 19:28:26 +0000 (19:28 +0000)
- italian language support
- display of calls during standby are now configurable (as is, list or nothing)
- filter can handle list of MSNs
- show missed calls from FRITZ!Box (press long BLUE, ...)

Bug fixes...

fritzcall/po/FritzCall.pot
fritzcall/po/de.po
fritzcall/po/it.po
fritzcall/src/plugin.py

index 22a6df8..7e17777 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-30 09:28+0200\n"
+"POT-Creation-Date: 2008-08-08 08:37+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,109 +16,118 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../plugin.py:319
+#: ../plugin.py:489
 msgid "Append shortcut number"
 msgstr ""
 
-#: ../plugin.py:318
-msgid "Append type of number (home, mobile, business)"
+#: ../plugin.py:488
+msgid "Append type of number"
 msgstr ""
 
-#: ../plugin.py:320
+#: ../plugin.py:490
 msgid "Append vanity name"
 msgstr ""
 
-#: ../plugin.py:53
+#: ../plugin.py:54
 msgid "Austria"
 msgstr ""
 
-#: ../plugin.py:325
+#: ../plugin.py:495
 msgid "Automatically add new Caller to PhoneBook"
 msgstr ""
 
-#: ../plugin.py:47
+#: ../plugin.py:48
 msgid "CF Drive"
 msgstr ""
 
-#: ../plugin.py:299
+#: ../plugin.py:469
 msgid "Call monitoring"
 msgstr ""
 
-#: ../plugin.py:343
+#: ../plugin.py:513
 msgid "Can't create PhoneBook.txt"
 msgstr ""
 
-#: ../plugin.py:275
+#: ../plugin.py:441
 msgid "Cancel"
 msgstr ""
 
-#: ../plugin.py:749
-msgid "Connected to Fritz!Box!"
+#: ../plugin.py:930
+msgid "Connected to FRITZ!Box!"
 msgstr ""
 
-#: ../plugin.py:759
+#: ../plugin.py:940
 #, python-format
 msgid ""
-"Connecting to Fritz!Box failed\n"
+"Connecting to FRITZ!Box failed\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
 
-#: ../plugin.py:746
-msgid "Connecting to Fritz!Box..."
+#: ../plugin.py:927
+msgid "Connecting to FRITZ!Box..."
 msgstr ""
 
-#: ../plugin.py:755
+#: ../plugin.py:936
 #, python-format
 msgid ""
-"Connection to Fritz!Box! lost\n"
+"Connection to FRITZ!Box! lost\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
 
-#: ../plugin.py:77
+#: ../plugin.py:212
 #, python-format
-msgid "Could not load phonebook from Fritz!Box - Error: %s"
+msgid "Could not load missed calls from FRITZ!Box - Error: %s"
 msgstr ""
 
-#: ../plugin.py:154
-msgid "Could not parse Fritz!Box Phonebook entry"
+#: ../plugin.py:116
+#, python-format
+msgid "Could not load phonebook from FRITZ!Box - Error: %s"
 msgstr ""
 
-#: ../plugin.py:313
-msgid "Country"
+#: ../plugin.py:206
+msgid "Could not parse FRITZ!Box Phonebook entry"
 msgstr ""
 
-#: ../plugin.py:807 ../plugin.py:810
-msgid "Display Fritzbox-Fon calls on screen"
+#: ../plugin.py:483
+msgid "Country"
 msgstr ""
 
-#: ../plugin.py:47
-msgid "Flash"
+#: ../plugin.py:990
+msgid "Display FRITZ!box-Fon calls on screen"
 msgstr ""
 
-#: ../plugin.py:301
-msgid "Fritz!Box FON IP address"
+#: ../plugin.py:471
+msgid "FRITZ!Box FON IP address"
 msgstr ""
 
-#: ../plugin.py:73
+#: ../plugin.py:83
 #, python-format
-msgid "Fritz!Box Login failed! - Error: %s"
+msgid "FRITZ!Box Login failed! - Error: %s"
 msgstr ""
 
-#: ../plugin.py:196
-msgid "Fritz!Box Login failed! - Wrong Password!"
+#: ../plugin.py:93
+msgid "FRITZ!Box Login failed! - Wrong Password!"
 msgstr ""
 
-#: ../plugin.py:53
+#: ../plugin.py:48
+msgid "Flash"
+msgstr ""
+
+#: ../plugin.py:54
 msgid "Germany"
 msgstr ""
 
-#: ../plugin.py:47
+#: ../plugin.py:322
+msgid "Getting missed calls from FRITZ!Box..."
+msgstr ""
+
+#: ../plugin.py:48
 msgid "Harddisk"
 msgstr ""
 
-#: ../plugin.py:419
+#: ../plugin.py:595
 #, python-format
 msgid ""
 "Incoming Call on %s from\n"
@@ -129,23 +138,35 @@ msgid ""
 "to: %s"
 msgstr ""
 
-#: ../plugin.py:53
+#: ../plugin.py:54
 msgid "Italy"
 msgstr ""
 
-#: ../plugin.py:379
+#: ../plugin.py:554
 msgid "Last 10 calls:\n"
 msgstr ""
 
-#: ../plugin.py:307
+#: ../plugin.py:477
 msgid "MSN to show (separated by ,)"
 msgstr ""
 
-#: ../plugin.py:276
+#: ../plugin.py:443
+msgid "Missed Calls"
+msgstr ""
+
+#: ../plugin.py:340 ../plugin.py:991
+msgid "Missed calls"
+msgstr ""
+
+#: ../plugin.py:326
+msgid "Missed calls during Standby"
+msgstr ""
+
+#: ../plugin.py:442
 msgid "OK"
 msgstr ""
 
-#: ../plugin.py:421
+#: ../plugin.py:597
 #, python-format
 msgid ""
 "Outgoing Call on %s to\n"
@@ -156,95 +177,103 @@ msgid ""
 "from: %s"
 msgstr ""
 
-#: ../plugin.py:317
-msgid "Password Accessing Fritz!Box"
+#: ../plugin.py:485
+msgid "Password Accessing FRITZ!Box"
 msgstr ""
 
-#: ../plugin.py:324
+#: ../plugin.py:494
 msgid "PhoneBook Location"
 msgstr ""
 
-#: ../plugin.py:328
+#: ../plugin.py:498
 msgid "Prefix for Outgoing Calls"
 msgstr ""
 
-#: ../plugin.py:315
-msgid "Read PhoneBook from Fritz!Box"
+#: ../plugin.py:486
+msgid "Read PhoneBook from FRITZ!Box"
 msgstr ""
 
-#: ../plugin.py:311
+#: ../plugin.py:481
 msgid "Reverse Lookup Caller ID (DE,CH,IT,AT only)"
 msgstr ""
 
-#: ../plugin.py:123 ../plugin.py:147
+#: ../plugin.py:176 ../plugin.py:200
 msgid "Shortcut"
 msgstr ""
 
-#: ../plugin.py:305
+#: ../plugin.py:475
 msgid "Show Calls for specific MSN"
 msgstr ""
 
-#: ../plugin.py:309
+#: ../plugin.py:479
 msgid "Show Outgoing Calls"
 msgstr ""
 
-#: ../plugin.py:303
+#: ../plugin.py:473
 msgid "Show after Standby"
 msgstr ""
 
-#: ../plugin.py:327
+#: ../plugin.py:497
 msgid "Strip Leading 0"
 msgstr ""
 
-#: ../plugin.py:53
+#: ../plugin.py:54
 msgid "Switzerland"
 msgstr ""
 
-#: ../plugin.py:310
+#: ../plugin.py:480
 msgid "Timeout for Call Notifications (seconds)"
 msgstr ""
 
-#: ../plugin.py:394 ../plugin.py:501 ../plugin.py:579 ../plugin.py:606
-#: ../plugin.py:639 ../plugin.py:664 ../plugin.py:733
+#: ../plugin.py:226 ../plugin.py:569 ../plugin.py:677 ../plugin.py:755
+#: ../plugin.py:782 ../plugin.py:815 ../plugin.py:845 ../plugin.py:914
 msgid "UNKNOWN"
 msgstr ""
 
-#: ../plugin.py:47
+#: ../plugin.py:48
 msgid "USB Stick"
 msgstr ""
 
-#: ../plugin.py:322
+#: ../plugin.py:492
 msgid "Use internal PhoneBook"
 msgstr ""
 
-#: ../plugin.py:125 ../plugin.py:149
+#: ../plugin.py:178 ../plugin.py:202
 msgid "Vanity"
 msgstr ""
 
-#: ../plugin.py:271
-msgid "You need to enable the monitoring on your Fritz!Box by dialing #96*5*!"
+#: ../plugin.py:437
+msgid "You need to enable the monitoring on your FRITZ!Box by dialing #96*5*!"
 msgstr ""
 
-#: ../plugin.py:118
+#: ../plugin.py:233
+msgid ""
+"You need to set the password of the FRITZ!Box\n"
+"in the configuration dialog to display missed calls\n"
+"\n"
+"It could be a communication issue, just try again."
+msgstr ""
+
+#: ../plugin.py:171
 msgid "home"
 msgstr ""
 
-#: ../plugin.py:116
+#: ../plugin.py:169
 msgid "mobile"
 msgstr ""
 
-#: ../plugin.py:37
+#: ../plugin.py:38
 msgid "show as list"
 msgstr ""
 
-#: ../plugin.py:37
+#: ../plugin.py:38
 msgid "show each call"
 msgstr ""
 
-#: ../plugin.py:37
+#: ../plugin.py:38
 msgid "show nothing"
 msgstr ""
 
-#: ../plugin.py:120
+#: ../plugin.py:173
 msgid "work"
 msgstr ""
index 555f76c..e589a2c 100644 (file)
@@ -7,99 +7,132 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Enigma2 FritzCall Plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-30 09:28+0200\n"
-"PO-Revision-Date: 2008-07-30 09:36+0200\n"
+"POT-Creation-Date: 2008-08-08 08:37+0200\n"
+"PO-Revision-Date: 2008-08-05 20:43+0200\n"
 "Last-Translator: Michael Schmidt <michael@schmidt-schmitten.com>\n"
 "Language-Team: german <de@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: ../plugin.py:489
 msgid "Append shortcut number"
-msgstr "Zeige auch Kurzwahl an"
+msgstr "Füge Kurzwahl an"
 
-msgid "Append type of number (home, mobile, business)"
-msgstr "Zeige auch Typ der Nummer an (privat, mobil, geschäftlich)"
+#: ../plugin.py:488
+msgid "Append type of number"
+msgstr "Füge Typ der Nummer an"
 
+#: ../plugin.py:490
 msgid "Append vanity name"
-msgstr "Zeige auch Vanity-Nummer an"
+msgstr "Füge Vanity-Nummer an"
 
+#: ../plugin.py:54
 msgid "Austria"
 msgstr "Österreich"
 
+#: ../plugin.py:495
 msgid "Automatically add new Caller to PhoneBook"
 msgstr "Anrufer automatisch dem Telefonbuch hinzufügen"
 
+#: ../plugin.py:48
 msgid "CF Drive"
 msgstr "CF Laufwerk"
 
+#: ../plugin.py:469
 msgid "Call monitoring"
 msgstr "Anrufanzeige"
 
+#: ../plugin.py:513
 msgid "Can't create PhoneBook.txt"
 msgstr "Kann Phonebook.txt nicht anlegen"
 
+#: ../plugin.py:441
 msgid "Cancel"
 msgstr "Abbruch"
 
-msgid "Connected to Fritz!Box!"
-msgstr "Verbunden mit Fritz!Box!"
+#: ../plugin.py:930
+msgid "Connected to FRITZ!Box!"
+msgstr "Verbunden mit FRITZ!Box!"
 
+#: ../plugin.py:940
 #, python-format
 msgid ""
-"Connecting to Fritz!Box failed\n"
+"Connecting to FRITZ!Box failed\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
-"Verbindung zur Fritz!Box fehlgeschlagen\n"
+"Verbindung zur FRITZ!Box fehlgeschlagen\n"
 " (%s)\n"
 "neuer Versuch..."
 
-msgid "Connecting to Fritz!Box..."
-msgstr "Verbinde mit Fritz!Box..."
+#: ../plugin.py:927
+msgid "Connecting to FRITZ!Box..."
+msgstr "Verbinde mit FRITZ!Box..."
 
+#: ../plugin.py:936
 #, python-format
 msgid ""
-"Connection to Fritz!Box! lost\n"
+"Connection to FRITZ!Box! lost\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
-"Verbindung mit Fritz!Box verloren\n"
+"Verbindung mit FRITZ!Box verloren\n"
 " (%s)\n"
 "neuer Versuch..."
 
+#: ../plugin.py:212
 #, python-format
-msgid "Could not load phonebook from Fritz!Box - Error: %s"
-msgstr "Konnte Telefonbuch nicht von Fritz!Box laden - Fehler: %s"
+msgid "Could not load missed calls from FRITZ!Box - Error: %s"
+msgstr "Konnte verpasste Anrufe nicht von FRITZ!Box laden - Fehler: %s"
 
-msgid "Could not parse Fritz!Box Phonebook entry"
-msgstr "Konnte Eintrag in Fritz!Box-Telefonbuch nicht lesen"
+#: ../plugin.py:116
+#, python-format
+msgid "Could not load phonebook from FRITZ!Box - Error: %s"
+msgstr "Konnte Telefonbuch nicht von FRITZ!Box laden - Fehler: %s"
+
+#: ../plugin.py:206
+msgid "Could not parse FRITZ!Box Phonebook entry"
+msgstr "Konnte Eintrag in FRITZ!Box-Telefonbuch nicht lesen"
 
+#: ../plugin.py:483
 msgid "Country"
 msgstr "Land"
 
-msgid "Display Fritzbox-Fon calls on screen"
-msgstr "Anzeige der Anrufe auf der Fritzbox-Fon"
-
-msgid "Flash"
-msgstr "Flash"
+#: ../plugin.py:990
+msgid "Display FRITZ!box-Fon calls on screen"
+msgstr "Anzeige der Anrufe auf der FRITZ!Box Fon"
 
-msgid "Fritz!Box FON IP address"
-msgstr "Fritz!Box FON IP-Adresse"
+#: ../plugin.py:471
+msgid "FRITZ!Box FON IP address"
+msgstr "FRITZ!Box FON IP-Adresse"
 
+#: ../plugin.py:83
 #, python-format
-msgid "Fritz!Box Login failed! - Error: %s"
-msgstr "Fritz!Box Login fehlgeschlagen! - Fehler: %s"
+msgid "FRITZ!Box Login failed! - Error: %s"
+msgstr "FRITZ!Box Login fehlgeschlagen! - Fehler: %s"
+
+#: ../plugin.py:93
+msgid "FRITZ!Box Login failed! - Wrong Password!"
+msgstr "FRITZ!Box Login fehlgeschlagen! - Falsches Passwort"
 
-msgid "Fritz!Box Login failed! - Wrong Password!"
-msgstr "Fritz!Box Login fehlgeschlagen! - Falsches Passwort"
+#: ../plugin.py:48
+msgid "Flash"
+msgstr "Flash"
 
+#: ../plugin.py:54
 msgid "Germany"
 msgstr "Deutschland"
 
+#: ../plugin.py:322
+msgid "Getting missed calls from FRITZ!Box..."
+msgstr "Hole die Liste verpasster Anrufe von der FRITZ!Box..."
+
+#: ../plugin.py:48
 msgid "Harddisk"
 msgstr "Festplatte"
 
+#: ../plugin.py:595
 #, python-format
 msgid ""
 "Incoming Call on %s from\n"
@@ -116,18 +149,36 @@ msgstr ""
 "---------------------------------------------\n"
 "an: %s"
 
+#: ../plugin.py:54
 msgid "Italy"
 msgstr "Italien"
 
+#: ../plugin.py:554
 msgid "Last 10 calls:\n"
 msgstr "Die letzten zehn Anrufe im Standby:\n"
 
+#: ../plugin.py:477
 msgid "MSN to show (separated by ,)"
 msgstr "anzuzeigende MSNs (getrennt durch ,)"
 
+# This is the text for the yellow button, thus very short...
+#: ../plugin.py:443
+msgid "Missed Calls"
+msgstr "Verpasst"
+
+#: ../plugin.py:340 ../plugin.py:991
+msgid "Missed calls"
+msgstr "Verpasste Anrufe"
+
+#: ../plugin.py:326
+msgid "Missed calls during Standby"
+msgstr "Verpasste Anrufe während Standby"
+
+#: ../plugin.py:442
 msgid "OK"
 msgstr "OK"
 
+#: ../plugin.py:597
 #, python-format
 msgid ""
 "Outgoing Call on %s to\n"
@@ -144,74 +195,111 @@ msgstr ""
 "---------------------------------------------\n"
 "von: %s"
 
-msgid "Password Accessing Fritz!Box"
-msgstr "Passwort der Fritz!Box"
+#: ../plugin.py:485
+msgid "Password Accessing FRITZ!Box"
+msgstr "Passwort der FRITZ!Box"
 
+#: ../plugin.py:494
 msgid "PhoneBook Location"
 msgstr "Speicherort des Telefonbuchs"
 
+#: ../plugin.py:498
 msgid "Prefix for Outgoing Calls"
 msgstr "Vorwahl für ausgehende Anrufe"
 
-msgid "Read PhoneBook from Fritz!Box"
-msgstr "Telefonbuch der Fritz!Box auslesen"
+#: ../plugin.py:486
+msgid "Read PhoneBook from FRITZ!Box"
+msgstr "Telefonbuch der FRITZ!Box auslesen"
 
+#: ../plugin.py:481
 msgid "Reverse Lookup Caller ID (DE,CH,IT,AT only)"
 msgstr "Rückwärtssuche (nur DE,CH,IT,AT)"
 
+#: ../plugin.py:176 ../plugin.py:200
 msgid "Shortcut"
 msgstr "Kurzwahl"
 
+#: ../plugin.py:475
 msgid "Show Calls for specific MSN"
 msgstr "Zeige nur Anrufe bestimmter Nummern"
 
+#: ../plugin.py:479
 msgid "Show Outgoing Calls"
 msgstr "Zeige ausgehende Anrufe an"
 
+#: ../plugin.py:473
 msgid "Show after Standby"
 msgstr "Anzeige nach Standby"
 
+#: ../plugin.py:497
 msgid "Strip Leading 0"
 msgstr "Führende 0 entfernen"
 
+#: ../plugin.py:54
 msgid "Switzerland"
 msgstr "Schweiz"
 
+#: ../plugin.py:480
 msgid "Timeout for Call Notifications (seconds)"
 msgstr "Anzeigedauer in Sekunden"
 
+#: ../plugin.py:226 ../plugin.py:569 ../plugin.py:677 ../plugin.py:755
+#: ../plugin.py:782 ../plugin.py:815 ../plugin.py:845 ../plugin.py:914
 msgid "UNKNOWN"
 msgstr "UNBEKANNT"
 
+#: ../plugin.py:48
 msgid "USB Stick"
 msgstr "USB Stick"
 
+#: ../plugin.py:492
 msgid "Use internal PhoneBook"
 msgstr "Benutze internes Telefonbuch"
 
+#: ../plugin.py:178 ../plugin.py:202
 msgid "Vanity"
 msgstr "Vanity"
 
-msgid "You need to enable the monitoring on your Fritz!Box by dialing #96*5*!"
+#: ../plugin.py:437
+msgid "You need to enable the monitoring on your FRITZ!Box by dialing #96*5*!"
 msgstr ""
-"Monitoring auf der Fritz!Box muss durch Wählen von #96*5* eingeschaltet "
+"Monitoring auf der FRITZ!Box muss durch Wählen von #96*5* eingeschaltet "
 "werden!"
 
+#: ../plugin.py:233
+msgid ""
+"You need to set the password of the FRITZ!Box\n"
+"in the configuration dialog to display missed calls\n"
+"\n"
+"It could be a communication issue, just try again."
+msgstr ""
+"In der Konfiguration muss das Passwort für\n"
+"die FRITZ!Box gesetzt sein.\n"
+"\n"
+"Es könnte eine Kommunikationsproblem mit der FRITZ!Box sein.\n"
+"Versuchen Sie es nochmal."
+
+#: ../plugin.py:171
 msgid "home"
 msgstr "privat"
 
+#: ../plugin.py:169
 msgid "mobile"
 msgstr "mobil"
 
+#: ../plugin.py:38
 msgid "show as list"
 msgstr "Liste der Anrufe"
 
+#: ../plugin.py:38
 msgid "show each call"
 msgstr "Anzeige der einzelnen Anrufe"
 
+#: ../plugin.py:38
 msgid "show nothing"
 msgstr "keine Anzeige"
 
+#: ../plugin.py:173
 msgid "work"
 msgstr "geschäftlich"
 
index 7beb032..a0e3a46 100644 (file)
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2008 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <spaeleus@croci.org>, 2008.
-#
 msgid ""
 msgstr ""
-"Project-Id-Version: Enigma2 Fritz!Box plugin italian locale\n"
+"Project-Id-Version: Enigma2 FRITZ!Box plugin italian locale\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-30 09:28+0200\n"
-"PO-Revision-Date: 2008-07-30 09:33+0200\n"
-"Last-Translator: Spaeleus <spaeleus@croci.org>\n"
+"POT-Creation-Date: 2008-08-08 08:37+0200\n"
+"PO-Revision-Date: 2008-08-07 20:49+0100\n"
+"Last-Translator: Spaeleus <spaeleus#croci.org>\n"
 "Language-Team: www.linsat.net <spaeleus@croci.org>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Poedit-Language: Italian\n"
 "X-Poedit-Country: ITALY\n"
 "X-Poedit-SourceCharset: iso-8859-1\n"
 
+#: ../plugin.py:489
 msgid "Append shortcut number"
 msgstr "Aggiungere numero breve"
 
-msgid "Append type of number (home, mobile, business)"
-msgstr "Aggiungere il tipo di numero (casa, cellulare, ufficio...)"
+#: ../plugin.py:488
+msgid "Append type of number"
+msgstr "Agg. il tipo di numero (casa,cell.,uff.)"
 
+#: ../plugin.py:490
 msgid "Append vanity name"
 msgstr "Aggiungere nome 'Vanity'"
 
+#: ../plugin.py:54
 msgid "Austria"
 msgstr "Austria"
 
+#: ../plugin.py:495
 msgid "Automatically add new Caller to PhoneBook"
-msgstr "Inserire automaticamente nuovo chiamante in rubrica"
+msgstr "Ins. autom. nuovo chiamante in rubrica"
 
+#: ../plugin.py:48
 msgid "CF Drive"
 msgstr "Drive CF"
 
+#: ../plugin.py:469
 msgid "Call monitoring"
 msgstr "Monitoraggio chiamate"
 
+#: ../plugin.py:513
 msgid "Can't create PhoneBook.txt"
 msgstr "Impossibile creare PhoneBook.txt!"
 
+#: ../plugin.py:441
 msgid "Cancel"
 msgstr "Annullare"
 
-msgid "Connected to Fritz!Box!"
-msgstr "Connesso alla Fritz!Box!"
+#: ../plugin.py:930
+msgid "Connected to FRITZ!Box!"
+msgstr "Connesso alla FRITZ!Box!"
 
+#: ../plugin.py:940
 #, python-format
 msgid ""
-"Connecting to Fritz!Box failed\n"
+"Connecting to FRITZ!Box failed\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
-"Connessione alla Fritz!Box fallita!\n"
+"Connessione alla FRITZ!Box fallita!\n"
 "(%s)\n"
 "Nuovo tentativo in corso..."
 
-msgid "Connecting to Fritz!Box..."
-msgstr "Connessione alla Fritz!Box in corso"
+#: ../plugin.py:927
+msgid "Connecting to FRITZ!Box..."
+msgstr "Connessione alla FRITZ!Box in corso"
 
+#: ../plugin.py:936
 #, python-format
 msgid ""
-"Connection to Fritz!Box! lost\n"
+"Connection to FRITZ!Box! lost\n"
 " (%s)\n"
 "retrying..."
 msgstr ""
-"Connessione alla Fritz!Box persa!\n"
+"Connessione alla FRITZ!Box persa!\n"
 "(%s)\n"
 "Nuovo tentativo in corso..."
 
+#: ../plugin.py:212
 #, python-format
-msgid "Could not load phonebook from Fritz!Box - Error: %s"
-msgstr "Impossibile caricare la rubrica dalla Fritz!Box! - Errore: %s"
+msgid "Could not load missed calls from FRITZ!Box - Error: %s"
+msgstr "Impossibile caricare la rubrica dalla FRITZ!Box! - Errore: %s"
 
-msgid "Could not parse Fritz!Box Phonebook entry"
-msgstr "Impossibile analizzare la voce nella Rubrica della Fritz!Box!"
+#: ../plugin.py:116
+#, python-format
+msgid "Could not load phonebook from FRITZ!Box - Error: %s"
+msgstr "Impossibile caricare la rubrica dalla FRITZ!Box! - Errore: %s"
+
+#: ../plugin.py:206
+msgid "Could not parse FRITZ!Box Phonebook entry"
+msgstr "Impossibile analizzare la voce nella Rubrica della FRITZ!Box!"
 
+#: ../plugin.py:483
 msgid "Country"
 msgstr "Nazione"
 
-msgid "Display Fritzbox-Fon calls on screen"
-msgstr "Visualizza sullo schermo le chiamate telefoniche"
-
-msgid "Flash"
-msgstr "Flash"
+#: ../plugin.py:990
+msgid "Display FRITZ!box-Fon calls on screen"
+msgstr "Visualizza le chiamate telef. sulla TV"
 
-msgid "Fritz!Box FON IP address"
-msgstr "Indirizzo IP Fritz!Box FON"
+#: ../plugin.py:471
+msgid "FRITZ!Box FON IP address"
+msgstr "Indirizzo IP FRITZ!Box FON"
 
+#: ../plugin.py:83
 #, python-format
-msgid "Fritz!Box Login failed! - Error: %s"
-msgstr "Login alla Fritz!Box fallito! - Errore: %s"
+msgid "FRITZ!Box Login failed! - Error: %s"
+msgstr "Login alla FRITZ!Box fallito! - Errore: %s"
+
+#: ../plugin.py:93
+msgid "FRITZ!Box Login failed! - Wrong Password!"
+msgstr "Login alla FRITZ!Box fallito! - Password errata!"
 
-msgid "Fritz!Box Login failed! - Wrong Password!"
-msgstr "Login alla Fritz!Box fallito! - Password errata!"
+#: ../plugin.py:48
+msgid "Flash"
+msgstr "Flash"
 
+#: ../plugin.py:54
 msgid "Germany"
 msgstr "Germania"
 
+#: ../plugin.py:322
+msgid "Getting missed calls from FRITZ!Box..."
+msgstr "Recupero chiamate perse dalla Fritz!Box in corso"
+
+#: ../plugin.py:48
 msgid "Harddisk"
 msgstr "Harddisk"
 
+#: ../plugin.py:595
 #, python-format
 msgid ""
 "Incoming Call on %s from\n"
@@ -120,18 +148,35 @@ msgstr ""
 "---------------------------------------------\n"
 "a: %s"
 
+#: ../plugin.py:54
 msgid "Italy"
 msgstr "Italia"
 
+#: ../plugin.py:554
 msgid "Last 10 calls:\n"
 msgstr "Ultime 10 chiamate:\n"
 
+#: ../plugin.py:477
 msgid "MSN to show (separated by ,)"
 msgstr "MSN da mostrare (separare con ,)"
 
+#: ../plugin.py:443
+msgid "Missed Calls"
+msgstr "Chiamate Perse"
+
+#: ../plugin.py:340 ../plugin.py:991
+msgid "Missed calls"
+msgstr "Chiamate perse"
+
+#: ../plugin.py:326
+msgid "Missed calls during Standby"
+msgstr "Chiamate perse durante lo standby"
+
+#: ../plugin.py:442
 msgid "OK"
 msgstr "OK"
 
+#: ../plugin.py:597
 #, python-format
 msgid ""
 "Outgoing Call on %s to\n"
@@ -148,71 +193,110 @@ msgstr ""
 "---------------------------------------------\n"
 "da: %s"
 
-msgid "Password Accessing Fritz!Box"
-msgstr "Password di accesso alla Fritz!Box"
+#: ../plugin.py:485
+msgid "Password Accessing FRITZ!Box"
+msgstr "Password di accesso alla FRITZ!Box"
 
+#: ../plugin.py:494
 msgid "PhoneBook Location"
 msgstr "Posizione Rubrica"
 
+#: ../plugin.py:498
 msgid "Prefix for Outgoing Calls"
 msgstr "Prefisso per le chiamate in uscita"
 
-msgid "Read PhoneBook from Fritz!Box"
-msgstr "Caricare la Rubrica dalla Fritz!Box"
+#: ../plugin.py:486
+msgid "Read PhoneBook from FRITZ!Box"
+msgstr "Caricare la Rubrica dalla FRITZ!Box"
 
+#: ../plugin.py:481
 msgid "Reverse Lookup Caller ID (DE,CH,IT,AT only)"
-msgstr "Identificativo Chiamante (solo IT, CH, DE, AT)"
+msgstr "Identificativo Chiamante (solo IT,CH,DE,AT)"
 
+#: ../plugin.py:176 ../plugin.py:200
 msgid "Shortcut"
 msgstr "Numero breve"
 
+#: ../plugin.py:475
 msgid "Show Calls for specific MSN"
 msgstr "Mostrare le chiamate per MSN specifico"
 
+#: ../plugin.py:479
 msgid "Show Outgoing Calls"
 msgstr "Mostrare le chiamate in uscita"
 
+#: ../plugin.py:473
 msgid "Show after Standby"
 msgstr "Mostrare chiamate dopo lo Standby"
 
+#: ../plugin.py:497
 msgid "Strip Leading 0"
 msgstr "Sopprimere '0' iniziali"
 
+#: ../plugin.py:54
 msgid "Switzerland"
 msgstr "Svizzera"
 
+#: ../plugin.py:480
 msgid "Timeout for Call Notifications (seconds)"
 msgstr "Ritardo notifica chiamate (secondi)"
 
+#: ../plugin.py:226 ../plugin.py:569 ../plugin.py:677 ../plugin.py:755
+#: ../plugin.py:782 ../plugin.py:815 ../plugin.py:845 ../plugin.py:914
 msgid "UNKNOWN"
 msgstr "SCONOSCIUTO"
 
+#: ../plugin.py:48
 msgid "USB Stick"
 msgstr "Penna USB"
 
+#: ../plugin.py:492
 msgid "Use internal PhoneBook"
 msgstr "Usare la Rubrica interna"
 
+#: ../plugin.py:178 ../plugin.py:202
 msgid "Vanity"
 msgstr "'Vanity'"
 
-msgid "You need to enable the monitoring on your Fritz!Box by dialing #96*5*!"
-msgstr "Per abilitare il monitoraggio sulla Fritz!Box comporre #96*5*!"
+#: ../plugin.py:437
+msgid "You need to enable the monitoring on your FRITZ!Box by dialing #96*5*!"
+msgstr "Per abilitare il monitoraggio sulla FRITZ!Box comporre #96*5*!"
 
+#: ../plugin.py:233
+msgid ""
+"You need to set the password of the FRITZ!Box\n"
+"in the configuration dialog to display missed calls\n"
+"\n"
+"It could be a communication issue, just try again."
+msgstr ""
+"E' necessario impostare la password della Fritz!Box\n"
+"nel menu configurazione per mostrare le chiamate perse.\n"
+"\n"
+"Potrebbe trattarsi di un problema di comunicazione, riprovare."
+
+#: ../plugin.py:171
 msgid "home"
 msgstr "Casa"
 
+#: ../plugin.py:169
 msgid "mobile"
 msgstr "Cellulare"
 
+#: ../plugin.py:38
 msgid "show as list"
 msgstr "Come lista"
 
+#: ../plugin.py:38
 msgid "show each call"
 msgstr "Tutte"
 
+#: ../plugin.py:38
 msgid "show nothing"
 msgstr "Nulla"
 
+#: ../plugin.py:173
 msgid "work"
 msgstr "Ufficio"
+
+#~ msgid "Append type of number (home, mobile, business)"
+#~ msgstr "Agg. il tipo di numero (casa,cell.,uff.)"
index 7bc7d3c..876508e 100644 (file)
@@ -8,6 +8,7 @@ from Components.Label import Label
 from Components.Button import Button
 from Components.config import config, ConfigSubsection, ConfigSelection, ConfigIP, ConfigEnableDisable, getConfigListEntry, ConfigText, ConfigInteger
 from Components.ConfigList import ConfigListScreen
+from Components.ScrollLabel import ScrollLabel
 
 from Plugins.Plugin import PluginDescriptor
 from Tools import Notifications
@@ -52,123 +53,80 @@ config.plugins.FritzCall.showVanity = ConfigEnableDisable(default = False)
 config.plugins.FritzCall.prefix = ConfigText(default = "", fixed_size = False)
 config.plugins.FritzCall.country = ConfigSelection(choices = [("DE", _("Germany")), ("CH", _("Switzerland")), ("IT", _("Italy")), ("AT", _("Austria"))])
 
-class FritzCallPhonebook:
+def html2utf8(in_html):
+       try:
+               import htmlentitydefs
+               htmlentitynumbermask = re.compile('(&#(\d{1,5}?);)')
+               htmlentitynamemask = re.compile('(&(\D{1,5}?);)')
+               entities = htmlentitynamemask.finditer(in_html)
+               entitydict = {}
+               for x in entities:
+                       entitydict[x.group(1)] = x.group(2)
+               for key, name in entitydict.items():
+                       try:
+                               entitydict[key] = htmlentitydefs.name2codepoint[name]
+                       except KeyError:
+                               pass
+               entities = htmlentitynumbermask.finditer(in_html)
+               for x in entities:
+                       entitydict[x.group(1)] = x.group(2)
+               for key, codepoint in entitydict.items():
+                       try:
+                               in_html = in_html.replace(key, (unichr(int(codepoint)).encode('utf8')))
+                       except ValueError:
+                               pass
+       except ImportError:
+               return in_html.replace("&amp;", "&").replace("&szlig;", "ß").replace("&auml;", "ä").replace("&ouml;", "ö").replace("&uuml;", "ü").replace("&Auml;", "Ä").replace("&Ouml;", "Ö").replace("&Uuml;", "Ü")
+       return in_html
+
+class FritzCallFBF:
        def __init__(self):
-               self.phonebook = {}
-               self.reload()
+               print "[FritzCallFBF] __init__"
+               self.missedCallback = None
+               self.loginCallback = None
 
        def notify(self, text):
                Notifications.AddNotification(MessageBox, text, type=MessageBox.TYPE_ERROR, timeout=config.plugins.FritzCall.timeout.value)
 
-       def create(self):
-               try:
-                       f = open(config.plugins.FritzCall.phonebookLocation.value, 'w')
-                       f.write("01234567890#Name, Street, Location (Keep the Spaces!!!)\n");
-                       f.close()
-                       return True
-               except IOError:
-                       return False
-
        def errorLogin(self, error):
-               text = _("Fritz!Box Login failed! - Error: %s") %error
+               text = _("FRITZ!Box Login failed! - Error: %s") %error
                self.notify(text)
 
-       def errorLoad(self, error):
-               text = _("Could not load phonebook from Fritz!Box - Error: %s") %error
-               self.notify(text)
-
-       def loadFritzBoxPhonebook(self):
-               print "[FritzCallPhonebook] loadFritzBoxPhonebook"
-
-               host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
-               uri = "/cgi-bin/webcm"# % tuple(config.plugins.FritzCall.hostname.value)
-               parms = urlencode({'getpage':'../html/de/menus/menu2.html', 'var:lang':'de','var:pagename':'fonbuch','var:menu':'fon'})
-
-               url = "http://%s%s?%s" %(host, uri, parms)
-
-               getPage(url).addCallback(self._gotPageLoad).addErrback(self.errorLoad)
-
-       def parseFritzBoxPhonebook(self, html):
-               print "[FritzCallPhonebook] parseFritzBoxPhonebook"
-               found = re.match('.*<table id="tList".*?</tr>\n(.*?)</table>', html, re.S)
-
-               if found:
-                       table = found.group(1)
-                       if re.search('TrFonName', table):                  # this is the new style
-                               #===============================================================================
-                               #                               7170 / 7270 / New Style
-                               #       We expect one line with TrFonName followed by several lines with
-                               #       TrFonNr(Kind,Number,Shortcut,Vanity), which all belong to the name in TrFonName.
-                               #===============================================================================
-                               text = table.split('\n')
-                               for line in text:
-                                       found = re.match('.*TrFonName\(".*", "(.*)", ".*"\)', line, re.S)
-                                       if found:
-                                               name = found.group(1)
-                                               continue
-                                       found = re.match('.*TrFonNr\("(.*)", "(.*)", "(.*)", "(.*)"\)', line, re.S) # TrFonNr(Art,Nummer,Kurzwahl,Vanity)
-                                       if found:
-                                               thisname = name
-
-                                               kind = found.group(1)
-                                               if config.plugins.FritzCall.showType.value:
-                                                       if kind == "mobile":
-                                                               thisname = thisname + " (" +_("mobile") + ")"
-                                                       elif kind == "home":
-                                                               thisname = thisname + " (" +_("home") + ")"
-                                                       elif kind == "work":
-                                                               thisname = thisname + " (" +_("work") + ")"
-
-                                               if config.plugins.FritzCall.showShortcut.value and found.group(3):
-                                                       thisname = thisname + ", " + _("Shortcut") + ": " + found.group(3)
-                                               if config.plugins.FritzCall.showVanity.value and found.group(4):
-                                                       thisname = thisname + ", " + _("Vanity") + ": " + found.group(4)
-
-                                               thisnumber = found.group(2).strip()
-                                               thisname = thisname.replace("&amp;", "&").replace("&szlig;", "ß").replace("&auml;", "ä").replace("&ouml;", "ö").replace("&uuml;", "ü").replace("&Auml;", "Ä").replace("&Ouml;", "Ö").replace("&Uuml;", "Ü").strip()
-                                               print "[FritzCallPhonebook] Adding '''%s''' with '''%s''' from Fritz!Box Phonebook!" %(thisname, thisnumber)
-                                               if thisnumber <> "":
-                                                       self.phonebook[thisnumber] = thisname
-                                               else:
-                                                       print "[FritzCallPhonebook] ignoring empty number"
-                                               continue
-                       elif re.search('TrFon', table):
-                               #===============================================================================
-                               #                               7050 / Old Style
-                               #       We expect one line with TrFon(No,Name,Number,Shortcut,Vanity)
-                               #===============================================================================                                
-                               text = table.split('\n')
-                               for line in text:
-                                       found = re.match('.*TrFon\(".*", "(.*)", "(.*)", "(.*)", "(.*)"\)', line, re.S)
-                                       if found:
-                                               name = found.group(1)
-                                               thisnumber = found.group(2)
-                                               if config.plugins.FritzCall.showShortcut.value and found.group(3):
-                                                       name = name + ", " + _("Shortcut") + ": " + found.group(3)
-                                               if config.plugins.FritzCall.showVanity.value and found.group(4):
-                                                       name = name + ", " +_("Vanity") +": " + found.group(4)
-                                               name = name.replace("&amp;", "&").replace("&szlig;", "ß").replace("&auml;", "ä").replace("&ouml;", "ö").replace("&uuml;", "ü").replace("&Auml;", "Ä").replace("&Ouml;", "Ö").replace("&Uuml;", "Ü")
-                                               print "[FritzCallPhonebook] Adding '''%s''' with '''%s''' from Fritz!Box Phonebook!" %(name, thisnumber)
-                                               self.phonebook[thisnumber.strip()] = name.strip()
-                       else:
-                               self.notify(_("Could not parse Fritz!Box Phonebook entry"))
-               else:
-                       print "[FritzCallPhonebook] Could not read Fritz!Box Phonebook"
-                       # self.notify(_("Could not read Fritz!Box Phonebook"))
-
-
        def _gotPageLogin(self, html):
 #              print "[FritzCallPhonebook] _gotPageLogin"
                # workaround: exceptions in gotPage-callback were ignored
                try:
-                       self.verifyLogin(html)
+                       print "[FritzCallFBF] _gotPageLogin: verify login"
+                       found = re.match('.*<p class="errorMessage">FEHLER:&nbsp;Das angegebene Kennwort', html, re.S)
+                       if found:
+                               text = _("FRITZ!Box Login failed! - Wrong Password!")
+                               self.notify(text)
+                       else:
+                               self.loginCallback()
+                       loginCallback = None
                except:
                        import traceback, sys
                        traceback.print_exc(file=sys.stdout)
                        #raise e
 
+       def login(self):
+               print "[FritzCallFBF] Login"
+               if config.plugins.FritzCall.password.value != "":
+                       host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
+                       uri =  "/cgi-bin/webcm"
+                       parms = "login:command/password=%s" %(config.plugins.FritzCall.password.value)
+                       url = "http://%s%s" %(host, uri)
+                       getPage(url, method="POST", headers = {'Content-Type': "application/x-www-form-urlencoded",'Content-Length': str(len(parms))}, postdata=parms).addCallback(self._gotPageLogin).addErrback(self.errorLogin)
+               else:
+                       self.loginCallback()
+                       self.loginCallback = None
+
+       def errorLoad(self, error):
+               text = _("Could not load phonebook from FRITZ!Box - Error: %s") %error
+               self.notify(text)
+
        def _gotPageLoad(self, html):
-#              print "[FritzCallPhonebook] _gotPageLoad"
+               print "[FritzCallFBF] _gotPageLoad"
                # workaround: exceptions in gotPage-callback were ignored
                try:
                        self.parseFritzBoxPhonebook(html)
@@ -177,24 +135,242 @@ class FritzCallPhonebook:
                        traceback.print_exc(file=sys.stdout)
                        #raise e
 
-       def login(self):
-               print "[FritzCallPhonebook] Login"
+       def loadFritzBoxPhonebook(self):
+               print "[FritzCallFBF] loadFritzBoxPhonebook"
+               if config.plugins.FritzCall.fritzphonebook.value:
+                       print "[FritzCallFBF] loadFritzBoxPhonebook: logging in"
+                       self.loginCallback = self._loadFritzBoxPhonebook
+                       self.login()
 
-               host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
-               uri =  "/cgi-bin/webcm"
-               parms = "login:command/password=%s" %(config.plugins.FritzCall.password.value)
-               url = "http://%s%s" %(host, uri)
+       def _loadFritzBoxPhonebook(self):
+                       host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
+                       uri = "/cgi-bin/webcm"# % tuple(config.plugins.FritzCall.hostname.value)
+                       parms = urlencode({'getpage':'../html/de/menus/menu2.html', 'var:lang':'de','var:pagename':'fonbuch','var:menu':'fon'})
+                       url = "http://%s%s?%s" %(host, uri, parms)
 
-               getPage(url, method="POST", headers = {'Content-Type': "application/x-www-form-urlencoded",'Content-Length': str(len(parms))}, postdata=parms).addCallback(self._gotPageLogin).addErrback(self.errorLogin)
+                       getPage(url).addCallback(self._gotPageLoad).addErrback(self.errorLoad)
 
-       def verifyLogin(self, html):
-               # print "[FritzCallPhonebook] verifyLogin - html: %s" %html
-               found = re.match('.*<p class="errorMessage">FEHLER:&nbsp;Das angegebene Kennwort', html, re.S)
-               if not found:
-                       self.loadFritzBoxPhonebook()
+       def parseFritzBoxPhonebook(self, html):
+               print "[FritzCallFBF] parseFritzBoxPhonebook"
+
+               table = html2utf8(html)
+               if re.search('TrFonName', table):
+                       #===============================================================================
+                       #                                New Style: 7170 / 7270 (FW 54.04.58, 54.04.63-11941) 
+                       #       We expect one line with TrFonName followed by several lines with
+                       #       TrFonNr(Type,Number,Shortcut,Vanity), which all belong to the name in TrFonName.
+                       #===============================================================================
+                       # entrymask = re.compile('(TrFonName\("[^"]+", "[^"]+", "[^"]+"\);</SCRIPT>\s+[<SCRIPT type=text/javascript>TrFonNr\("[^"]+", "[^"]+", "[^"]+", "[^"]+"\);</SCRIPT>\s+]+)<SCRIPT type=text/javascript>document.write(TrFon1());</SCRIPT>', re.DOTALL)
+                       # entrymask = re.compile('(TrFonName\("[^"]+", "[^"]+", "[^"]+"\);.*?[.*?TrFonNr\("[^"]+", "[^"]+", "[^"]+", "[^"]+"\);.*?]+).*?document.write(TrFon1());', re.DOTALL)
+                       entrymask = re.compile('(TrFonName\("[^"]+", "[^"]+", "[^"]*"\);.*?)TrFon1\(\)', re.S)
+                       entries = entrymask.finditer(html)
+                       for entry in entries:
+                               # print entry.group(1)
+                               found = re.match('TrFonName\("[^"]*", "([^"]+)", "[^"]*"\);', entry.group(1))
+                               if found:
+                                       name = found.group(1)
+                               else:
+                                       continue
+                               detailmask = re.compile('TrFonNr\("([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"\);', re.S)
+                               details = detailmask.finditer(entry.group(1))
+                               for found in details:
+                                       thisname = name
+
+                                       type = found.group(1)
+                                       if config.plugins.FritzCall.showType.value:
+                                               if type == "mobile":
+                                                       thisname = thisname + " (" +_("mobile") + ")"
+                                               elif type == "home":
+                                                       thisname = thisname + " (" +_("home") + ")"
+                                               elif type == "work":
+                                                       thisname = thisname + " (" +_("work") + ")"
+
+                                       if config.plugins.FritzCall.showShortcut.value and found.group(3):
+                                               thisname = thisname + ", " + _("Shortcut") + ": " + found.group(3)
+                                       if config.plugins.FritzCall.showVanity.value and found.group(4):
+                                               thisname = thisname + ", " + _("Vanity") + ": " + found.group(4)
+
+                                       thisnumber = found.group(2).strip()
+                                       thisname = thisname.strip()
+                                       if thisnumber:
+                                               print "[FritzCallFBF] Adding '''%s''' with '''%s''' from FRITZ!Box Phonebook!" %(thisname, thisnumber)
+                                               phonebook.phonebook[thisnumber] = thisname
+                                       else:
+                                               print "[FritzCallFBF] ignoring empty number for %s" %thisname
+                                       continue
+
+               elif re.search('TrFon', table):
+                       #===============================================================================
+                       #                               Old Style: 7050 (FW 14.04.33)
+                       #       We expect one line with TrFon(No,Name,Number,Shortcut,Vanity)
+                       #===============================================================================                                
+                       entrymask = re.compile('TrFon\("[^"]*", "([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"\)', re.S)
+                       entries = entrymask.finditer(html)
+                       for found in entries:
+                               name = found.group(1).strip()
+                               thisnumber = found.group(2).strip()
+                               if config.plugins.FritzCall.showShortcut.value and found.group(3):
+                                       name = name + ", " + _("Shortcut") + ": " + found.group(3)
+                               if config.plugins.FritzCall.showVanity.value and found.group(4):
+                                       name = name + ", " +_("Vanity") +": " + found.group(4)
+                               if thisnumber:
+                                       print "[FritzCallFBF] Adding '''%s''' with '''%s''' from FRITZ!Box Phonebook!" %(name, thisnumber)
+                                       phonebook.phonebook[thisnumber] = name
+                               else:
+                                       print "[FritzCallFBF] ignoring empty number for %s" %name
+                               continue
                else:
-                       text = _("Fritz!Box Login failed! - Wrong Password!")
+                       self.notify(_("Could not parse FRITZ!Box Phonebook entry"))
+
+       def errorCalls(self, error):
+               text = _("Could not load missed calls from FRITZ!Box - Error: %s") %error
+               self.notify(text)
+
+       def _gotPageCalls(self, html):
+               def _resolveNumber(number):
+                       if number.isdigit():
+                               if config.plugins.FritzCall.internal.value and len(number) > 3 and number[0]=="0": number = number[1:]
+                               name = phonebook.search(number)
+                               if name:
+                                       found = re.match('(.*?)\n.*', name)
+                                       if found:
+                                               name = found.group(1)
+                                       number = name
+                       elif number == "":
+                               number = _("UNKNOWN")
+                       # if len(number) > 20: number = number[:20]
+                       return number
+
+               # check for error: wrong password or password not set... TODO
+               found = re.search('Melden Sie sich mit dem Kennwort der FRITZ!Box an', html)
+               if found:
+                       text = _("You need to set the password of the FRITZ!Box\nin the configuration dialog to display missed calls\n\nIt could be a communication issue, just try again.")
+                       # self.session.open(MessageBox, text, MessageBox.TYPE_ERROR, timeout=config.plugins.FritzCall.timeout.value)
                        self.notify(text)
+                       return
+
+               # print "[FritzCallFBF] _gotPageCalls:\n" + html
+               lines = html.splitlines()
+               text = ""
+               for line in lines:
+                       # print line
+                       found = re.match(".*2;([^;]*);;([^;]*);;([^;]*)", line)
+                       if found:
+                               date = found.group(1)
+                               caller = _resolveNumber(found.group(2))
+                               callee = _resolveNumber(found.group(3))
+                               while (len(caller) + len(callee)) > 40:
+                                       if len(caller) > len(callee):
+                                               caller = caller[:-1]
+                                       else:
+                                               callee = callee[:-1]
+                               found = re.match("(\d\d.\d\d.)\d\d( \d\d:\d\d)", date)
+                                if found: date = found.group(1) + found.group(2)
+                               text = text + "\n" + date + " " + caller + " -> " + callee
+
+               # print "[FritzCallFBF] _gotPageCalls result:\n" + text
+
+               if self.missedCallback is not None:
+                       # print "[FritzCallFBF] _gotPageCalls call callback with\n" + text
+                       self.missedCallback(text = text)
+                       self.missedCallback = None
+
+       def getMissedCalls(self, callback):
+               #
+               # call sequence must be:
+               # - login
+               # - getPage -> _gotPageLogin
+               # - loginCallback (_getMissedCalls)
+               # - getPage -> _getMissedCalls1
+               print "[FritzCallFBF] getMissedCalls"
+               self.missedCallback = callback
+               self.loginCallback = self._getMissedCalls
+               self.login()
+
+       def _getMissedCalls(self):
+               #
+               # we need this to fill Anrufliste.csv
+               # http://repeater1/cgi-bin/webcm?getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=fon&var:pagename=foncalls
+               #
+               print "[FritzCallFBF] _getMissedCalls"
+               host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
+               parms = urlencode({'getpage':'../html/de/menus/menu2.html', 'var:lang':'de','var:pagename':'foncalls','var:menu':'fon'})
+               url = "http://%s/cgi-bin/webcm?%s" %(host, parms)
+               getPage(url).addCallback(self._getMissedCalls1).addErrback(self.errorCalls)
+
+       def _getMissedCalls1(self, html):
+               #
+               # finally we should have successfully lgged in and filled the csv
+               #
+               print "[FritzCallFBF] _getMissedCalls1"
+               host = "%d.%d.%d.%d" %tuple(config.plugins.FritzCall.hostname.value)
+               parms = urlencode({'getpage':'../html/de/FRITZ!Box_Anrufliste.csv'})
+               url = "http://%s/cgi-bin/webcm?%s" %(host, parms)
+               getPage(url).addCallback(self._gotPageCalls).addErrback(self.errorCalls)
+
+fritzbox = FritzCallFBF()
+
+class FritzDisplayMissedCalls(Screen):
+
+       skin = """
+               <screen name="FritzDisplayMissedCalls" position="100,90" size="550,420" title="Missed calls" >
+                       <widget name="statusbar" position="0,0" size="550,22" font="Regular;22" />
+                       <widget name="list" position="0,22" size="550,398" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session, text = ""):
+               self.skin = FritzDisplayMissedCalls.skin
+               Screen.__init__(self, session)
+
+               self["setupActions"] = ActionMap(["OkCancelActions", "DirectionActions"],
+               {
+                       "down": self.pageDown,
+                       "up": self.pageUp,
+                       "right": self.pageDown,
+                       "left": self.pageUp,
+                       "cancel": self.ok,
+                       "save": self.ok,
+                       "ok": self.ok,}, -2)
+               
+               if text == "":
+                       self["statusbar"] = Label(_("Getting missed calls from FRITZ!Box..."))
+                       self["list"] = ScrollLabel("")
+                       fritzbox.getMissedCalls(self.gotMissedCalls)
+               else:
+                       self["statusbar"] = Label(_("Missed calls during Standby"))
+                       self["list"] = ScrollLabel(text)
+
+       def ok(self):
+               self.close()
+
+       def pageDown(self):
+               self["list"].pageDown()
+
+       def pageUp(self):
+               self["list"].pageUp()
+
+       def gotMissedCalls(self, text):
+               # print "[FritzDisplayMissedCalls] gotMissedCalls:\n" + text
+               self["statusbar"].setText(_("Missed calls"))
+               self["list"].setText(text)
+
+
+class FritzCallPhonebook:
+       def __init__(self):
+               self.phonebook = {}
+               self.reload()
+
+       def notify(self, text):
+               Notifications.AddNotification(MessageBox, text, type=MessageBox.TYPE_ERROR, timeout=config.plugins.FritzCall.timeout.value)
+
+       def create(self):
+               try:
+                       f = open(config.plugins.FritzCall.phonebookLocation.value, 'w')
+                       f.write("01234567890#Name, Street, Location (Keep the Spaces!!!)\n");
+                       f.close()
+                       return True
+               except IOError:
+                       return False
 
        def reload(self):
                print "[FritzCallPhonebook] reload"
@@ -222,10 +398,7 @@ class FritzCallPhonebook:
                                                print "[FritzCallPhonebook] Could not parse internal Phonebook Entry %s" %line
 
                if config.plugins.FritzCall.fritzphonebook.value:
-                       if config.plugins.FritzCall.password.value != "":
-                               self.login()
-                       else:
-                               self.loadFritzBoxPhonebook()
+                       fritzbox.loadFritzBoxPhonebook()
 
        def search(self, number):
                print "[FritzCallPhonebook] Searching for %s" %number
@@ -262,27 +435,34 @@ class FritzCallSetup(ConfigListScreen, Screen):
                <screen position="100,90" size="550,420" title="FritzCall Setup" >
                <widget name="config" position="20,10" size="510,300" scrollbarMode="showOnDemand" />
                <widget name="consideration" position="20,320" font="Regular;20" halign="center" size="510,50" />
-               <ePixmap position="135,375" zPosition="4" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
-               <ePixmap position="275,375" zPosition="4" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
-               <widget name="key_red" position="135,375" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
-               <widget name="key_green" position="275,375" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
+               <ePixmap position="5,375" zPosition="4" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
+               <ePixmap position="145,375" zPosition="4" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
+               <ePixmap position="285,375" zPosition="4" size="140,40" pixmap="skin_default/buttons/yellow.png" transparent="1" alphatest="on" />
+               <widget name="key_red" position="5,375" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
+               <widget name="key_green" position="145,375" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
+               <widget name="key_yellow" position="285,375" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
                </screen>"""
 
        def __init__(self, session, args = None):
 
                Screen.__init__(self, session)
+               self.session = session
 
-               self["consideration"] = Label(_("You need to enable the monitoring on your Fritz!Box by dialing #96*5*!"))
+               self["consideration"] = Label(_("You need to enable the monitoring on your FRITZ!Box by dialing #96*5*!"))
                self.list = []
 
                # Initialize Buttons
                self["key_red"] = Button(_("Cancel"))
                self["key_green"] = Button(_("OK"))
+               self["key_yellow"] = Button(_("Missed Calls"))
 
-               self["setupActions"] = ActionMap(["SetupActions"],
+               self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
                {
-                       "save": self.save,
                        "cancel": self.cancel,
+                       "red": self.cancel,     # not strictly needed, better for clarity
+                       "save": self.save,
+                       "green": self.save,     # not strictly needed, better for clarity
+                       "yellow": self.displayMissedCalls,
                        "ok": self.save,
                }, -2)
 
@@ -302,7 +482,7 @@ class FritzCallSetup(ConfigListScreen, Screen):
                self.list = [ ]
                self.list.append(getConfigListEntry(_("Call monitoring"), config.plugins.FritzCall.enable))
                if config.plugins.FritzCall.enable.value:
-                       self.list.append(getConfigListEntry(_("Fritz!Box FON IP address"), config.plugins.FritzCall.hostname))
+                       self.list.append(getConfigListEntry(_("FRITZ!Box FON IP address"), config.plugins.FritzCall.hostname))
 
                        self.list.append(getConfigListEntry(_("Show after Standby"), config.plugins.FritzCall.afterStandby))
 
@@ -316,10 +496,10 @@ class FritzCallSetup(ConfigListScreen, Screen):
                        if config.plugins.FritzCall.lookup.value:
                                self.list.append(getConfigListEntry(_("Country"), config.plugins.FritzCall.country))
 
-                       self.list.append(getConfigListEntry(_("Read PhoneBook from Fritz!Box"), config.plugins.FritzCall.fritzphonebook))
+                       self.list.append(getConfigListEntry(_("Password Accessing FRITZ!Box"), config.plugins.FritzCall.password))
+                       self.list.append(getConfigListEntry(_("Read PhoneBook from FRITZ!Box"), config.plugins.FritzCall.fritzphonebook))
                        if config.plugins.FritzCall.fritzphonebook.value:
-                               self.list.append(getConfigListEntry(_("Password Accessing Fritz!Box"), config.plugins.FritzCall.password))
-                               self.list.append(getConfigListEntry(_("Append type of number (home, mobile, business)"), config.plugins.FritzCall.showType))
+                               self.list.append(getConfigListEntry(_("Append type of number"), config.plugins.FritzCall.showType))
                                self.list.append(getConfigListEntry(_("Append shortcut number"), config.plugins.FritzCall.showShortcut))
                                self.list.append(getConfigListEntry(_("Append vanity name"), config.plugins.FritzCall.showVanity))
 
@@ -357,6 +537,10 @@ class FritzCallSetup(ConfigListScreen, Screen):
                        x[1].cancel()
                self.close()
 
+       def displayMissedCalls(self):
+               self.session.open(FritzDisplayMissedCalls)
+
+
 standbyMode = False
 
 class FritzCallList:
@@ -375,6 +559,7 @@ class FritzCallList:
        def display(self):
                print "[FritzCallList] display"
                global standbyMode
+               global my_global_session
                standbyMode = False
                # Standby.inStandby.onClose.remove(self.display) object does not exist anymore...
                # build screen from call list
@@ -389,32 +574,33 @@ class FritzCallList:
                                direction = "->"
                        else:
                                direction = "<-"
-                       found = re.match("(\d\d.\d\d).\d\d (\d\d:\d\d):\d\d", date)
-                       date = found.group(1) + ". " + found.group(2)
+                       found = re.match(".*(\d\d.\d\d.)\d\d( \d\d:\d\d)", date)
+                       if found: date = found.group(1) + found.group(2)
                        found = re.match(".*\((.*)\)", phone)
                        if found: phone = found.group(1)
-                       if len(phone) > 20: phone = phone[:20]
+                       if len(phone) > 20: phone = phone[:20]
 
                        if caller == _("UNKNOWN") and number != "":
                                caller = number
                        else:
                                found = re.match("(.*)\n.*", caller)
                                if found: caller = found.group(1)
-                       if len(caller) > 20: caller = caller[:20]
+                       # if len(caller) > 20: caller = caller[:20]
+                       while (len(caller) + len(phone)) > 40:
+                               if len(caller) > len(phone):
+                                       caller = caller[:-1]
+                               else:
+                                       phone = phone[:-1]
 
                        text = text + "%s %s %s %s\n" %(date, caller, direction, phone)
 
                print "[FritzCallList] display: '%s %s %s %s'" %(date, caller, direction, phone)
                # display screen
                Notifications.AddNotification(MessageBox, text, type=MessageBox.TYPE_INFO)
-               # self.session.open(FritzCallDisplayCalls)
+               # my_global_session.open(FritzDisplayMissedCalls, text) # TODO please HELP: from where can I get a session?
                self.callList = [ ]
                self.text = ""
 
-       def getList(self):
-               return self.text
-
-
 callList = FritzCallList()
 
 def notifyCall(event, date, number, caller, phone):
@@ -431,7 +617,7 @@ def notifyCall(event, date, number, caller, phone):
                global standbyMode
                if not standbyMode :
                        standbyMode = True
-                       Standby.inStandby.onClose.append(callList.display)
+                       Standby.inStandby.onHide.append(callList.display)
                # add text/timeout to call list
                callList.add(event, date, number, caller, phone)
                print "[FritzCall] notifyCall: added to callList"
@@ -712,9 +898,9 @@ class FritzProtocol(LineReceiver):
                        print "[FritzProtocol] lineReceived phone: '''%s''' number: '''%s'''" % (phone, number)
 
                        filtermsns = config.plugins.FritzCall.filtermsn.value.split(",")
-                       for msn in filtermsns:
-                               msn = msn.strip()
-                       if not config.plugins.FritzCall.filter.value or phone in filtermsns:
+                       for i in range(len(filtermsns)):
+                               filtermsns[i] = filtermsns[i].strip()
+                       if not (config.plugins.FritzCall.filter.value and phone not in filtermsns):
                                print "[FritzProtocol] lineReceived no filter hit"
                                phonename = phonebook.search(phone)                # do we have a name for the number of our side?
                                if phonename is not None:
@@ -752,20 +938,20 @@ class FritzClientFactory(ReconnectingClientFactory):
                self.hangup_ok = False
 
        def startedConnecting(self, connector):
-               Notifications.AddNotification(MessageBox, _("Connecting to Fritz!Box..."), type=MessageBox.TYPE_INFO, timeout=2)
+               Notifications.AddNotification(MessageBox, _("Connecting to FRITZ!Box..."), type=MessageBox.TYPE_INFO, timeout=2)
 
        def buildProtocol(self, addr):
-               Notifications.AddNotification(MessageBox, _("Connected to Fritz!Box!"), type=MessageBox.TYPE_INFO, timeout=4)
+               Notifications.AddNotification(MessageBox, _("Connected to FRITZ!Box!"), type=MessageBox.TYPE_INFO, timeout=4)
                self.resetDelay()
                return FritzProtocol()
 
        def clientConnectionLost(self, connector, reason):
                if not self.hangup_ok:
-                       Notifications.AddNotification(MessageBox, _("Connection to Fritz!Box! lost\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.FritzCall.timeout.value)
+                       Notifications.AddNotification(MessageBox, _("Connection to FRITZ!Box! lost\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.FritzCall.timeout.value)
                ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
 
        def clientConnectionFailed(self, connector, reason):
-               Notifications.AddNotification(MessageBox, _("Connecting to Fritz!Box failed\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.FritzCall.timeout.value)
+               Notifications.AddNotification(MessageBox, _("Connecting to FRITZ!Box failed\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.FritzCall.timeout.value)
                ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
 
 class FritzCall:
@@ -790,6 +976,9 @@ class FritzCall:
                        self.d[1].disconnect()
                        self.d = None
 
+def displayMissedCalls(session, servicelist):
+       session.open(FritzDisplayMissedCalls)
+
 def main(session):
        session.open(FritzCallSetup)
 
@@ -804,7 +993,7 @@ def autostart(reason, **kwargs):
                my_global_session = kwargs["session"]
                return
 
-       print "[Fritz!Call] - Autostart"
+       print "[FRITZ!Call] - Autostart"
        if reason == 0:
                fritz_call = FritzCall()
        elif reason == 1:
@@ -812,10 +1001,13 @@ def autostart(reason, **kwargs):
                fritz_call = None
 
 def Plugins(**kwargs):
+       what = _("Display FRITZ!box-Fon calls on screen")
+       what_missed = _("Missed calls")
        if os_path.exists("plugin.png"):
-               return [ PluginDescriptor(name="FritzCall", description=_("Display Fritzbox-Fon calls on screen"), where = PluginDescriptor.WHERE_PLUGINMENU, icon = "plugin.png", fnc=main),
-               PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart) ]
+               return [ PluginDescriptor(name="FritzCall", description=what, where = PluginDescriptor.WHERE_PLUGINMENU, icon = "plugin.png", fnc=main),
+                       PluginDescriptor(name=what_missed, description=what_missed, where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=displayMissedCalls),
+                       PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart) ]
        else:
-               return [ PluginDescriptor(name="FritzCall", description=_("Display Fritzbox-Fon calls on screen"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
-               PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart) ]
-               
+               return [ PluginDescriptor(name="FritzCall", description=what, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
+                       PluginDescriptor(name=what_missed, description=what_missed, where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=displayMissedCalls),
+                       PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart) ]