tux-droid-svn Mailing List for Tux Droid CE (Page 15)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
| 2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
| 2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: remi <c2m...@c2...> - 2009-10-15 11:28:36
|
Author: remi Date: 2009-10-15 13:28:25 +0200 (Thu, 15 Oct 2009) New Revision: 5680 Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/de.wiki software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/en.wiki software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/fr.wiki software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/help.wiki software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/nl.wiki Log: * Added new help files Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/de.wiki =================================================================== --- software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/de.wiki 2009-10-15 11:27:09 UTC (rev 5679) +++ software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/de.wiki 2009-10-15 11:28:25 UTC (rev 5680) @@ -1,14 +1,25 @@ -= Hilfe = += Beschreibung = Diese Funktion verwandelt Tux Droid in ein Webradio. -Mehrere Einstellungen können in der Konfiguration geändert werden: -* Sie können das Webradio aus der Webradio-Liste auswählen, das Sie hören möchten -* Sie können auch die URL Ihres Lieblingswebradios eingeben -* Achten Sie darauf die Option "URL-Adresse verwenden" freizugeben, um die o.g. URL Ihres Lieblingswebradios zu aktivieren -* Webradio als Wecker konfigurieren += Funktionseinstellungen = +* '''Funktionsname :''' Damit können Sie die Gadget-Namen zu ändern. +* '''Wählen Sie ein Webradio :''' Sie können das Webradio aus der Webradio-Liste auswählen, das Sie hören möchten. +* '''Diese Gadget wird in die Favoritenliste aufgenommen :''' Diese Option aktivieren, um das Webradio in Ihrer Favoriten- +Liste hinzufügen. -Verwendung: -* Im Listen-Modus: Die Flügel von Tux Droid anstoßen, um zum vorhergehenden/nächsten Webradio zu wechseln -* Im Listen-Modus: Sie können das vorherige oder nächste Webradio auch über die Tasten "zurück" und "weiter" auf der Fernbedienung auswählen -* Über die "Start"-Taste der Fernbedienung können Sie das Hintergrundspiel des Webradios unterbrechen/fortsetzen -* Über die "Power"-Taste der Fernbedienung melden Sie die Webradio-Funktion ab += Hinweise = +* '''Nutzt das Webradio als Radiowecker :''' Konfigurieren Sie das Webradio als Wecker. +* '''Start um :''' Geben Sie, wenn das Webradio starten muss. +* '''Ende um :''' Geben Sie, wenn das Webradio enden muss. +* '''Meine Woche :''' Geben Sie an, an welchen Tagen das Webradio starten muss. + += Verwendung = + +=== Das Webradio steuern mit der Fernbedienung : === + +* '''"Zurück" und "Weiter"-Taste :''' Um zum vorhergehenden/nächsten Webradio zu wechseln. +* '''"Start"-Taste :''' Damit können Sie das Hintergrundspiel des Webradios unterbrechen/fortsetzen. +* '''"Power"-Taste :''' Damit können Sie die Webradio-Funktion abmelden. + +=== Das Webradio steuern mit Tux Droid : === +* '''Linker/rechten Flügel :''' Um zum vorhergehenden/nächsten Webradio zu wechseln. \ No newline at end of file Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/en.wiki =================================================================== --- software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/en.wiki 2009-10-15 11:27:09 UTC (rev 5679) +++ software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/en.wiki 2009-10-15 11:28:25 UTC (rev 5680) @@ -1,14 +1,22 @@ -= Help = -This gadget will turn Tux Droid into a webradio. += Description = +This gadget will turn your Tux Droid into a webradio. -Several settings can be changed in the configuration : -* You can select the webradio you want to listen to from the webradio list -* You can also enter your favorite webradio url -* Make sure you enable "Use address url" to activate the above url of your favorite webradio -* Configure the webradio as an alarm clock += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Select webradio :''' Select the webradio you want to listen to from the list. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. -Usage : -* When in list mode : Push Tux Droid wings to switch to the previous/next webradio -* When in list mode : The "previous" and "next" buttons on the remote control also allow you to select the previous/next webradio -* The "play" button on the remote control will pause/continue webradio playback -* The "power" button on the remote control will quit the webradio gadget \ No newline at end of file += Alerts = +* '''Use the Webradio gadget as an alarm clock :''' Enable to activate the alarm clock mode. +* '''Starting at :''' Specify when the alarm clock must go off. +* '''Stopping at :''' Specify when the alarm clock must stop. +* '''My Week :''' Choose the days for the alarm clock to go off. + += Usage = +=== Controlling Webradio with the remote control : === +* '''"Previous" and "next" buttons :''' Switch to the previous/next webradio in the list. +* '''"Play" button :''' Pause/continue webradio playback. +* '''"Power" button :''' To quit the webradio gadget. + +=== Controlling Webradio with Tux Droid : === +* '''Left/Right wing :''' Switch to the previous/next webradio in the list. \ No newline at end of file Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/fr.wiki =================================================================== --- software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/fr.wiki 2009-10-15 11:27:09 UTC (rev 5679) +++ software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/fr.wiki 2009-10-15 11:28:25 UTC (rev 5680) @@ -1,14 +1,22 @@ -= Aide = -Ce gadget transforme votre Tux Droid en lecteur de radios internet. - -Voici les options que vous trouverez dans la configuration : -* Sélectionner la radio internet que vous voulez écouter parmi une liste de radios -* Sélectionner une radio internet en indiquant directement son url -* Passer du mode "liste" au mode "url" en activant l'option "Utiliser en mode adresse" -* Utiliser Tux Droid en tant que radio réveil. - -Utilisation du gadget : -* Appuyez sur le bouton "play" de la télécommande pour mettre en pause/continuer l'écoute d'une radio -* Appuyer sur le bouton "Ok" de la télécommande ou le bouton de tête de Tux Droid pour quitter le gadget et l'écoute de la radio. -* Appuyez sur les ailes de Tux Droid pour passer en revue les radios internet (uniquement en mode "liste") -* Appuyez sur les boutons précédant/suivant de la télécommande pour passer en revue les radios internet (uniquement en mode "liste") += Description = +Ce gadget transformera votre Tux Droid en lecteur de Webradios. + += Configurations = +* '''Nom du gadget :''' Permet de modifier le nom du gadget. +* '''Sélectionner une webradio :''' Sélectionnez la webradio que vous voulez écouter depuis la liste. +* '''Favoris :''' Rend le gadget accessible par la télécommande et Tux Droid. + += Alertes = +* '''Utiliser une webradio en tant que réveil :''' Permet d'activer la fonction réveil. +* '''Démarrer à :''' Indique l'heure à laquelle l'alarme doit se déclencher. +* '''Stopper à :''' Indique l'heure à laquelle l'alarme doit s'arrêter. +* '''Ma semaine :''' Permet de choisir les jours pour lesquels l'alarme sera active. + += Utilisation = +=== Contrôler la webradio avec la télécommande :=== +* '''Boutons précédent / suivant :''' Passe à la webradio précédente / suivante de la liste. +* '''Bouton Play :''' Mets en pause / redémarre la lecture de la webradio. +* '''Bouton de stand-by :''' Quitte le gadget webradio + +=== Contrôler la webradio avec Tux Droid : === +* ''' Aile gauche / droite :''' Passe à la webradio précédente / suivante de la liste. \ No newline at end of file Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/help.wiki =================================================================== --- software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/help.wiki 2009-10-15 11:27:09 UTC (rev 5679) +++ software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/help.wiki 2009-10-15 11:28:25 UTC (rev 5680) @@ -1,14 +1,22 @@ -= Help = -This gadget will turn Tux Droid into a webradio. += Description = +This gadget will turn your Tux Droid into a webradio. -Several settings can be changed in the configuration : -* You can select the webradio you want to listen to from the webradio list -* You can also enter your favorite webradio url -* Make sure you enable "Use address url" to activate the above url of your favorite webradio -* Configure the webradio as an alarm clock += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Select webradio :''' Select the webradio you want to listen to from the list. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. -Usage : -* When in list mode : Push Tux Droid wings to switch to the previous/next webradio -* When in list mode : The "previous" and "next" buttons on the remote control also allow you to select the previous/next webradio -* The "play" button on the remote control will pause/continue webradio playback -* The "power" button on the remote control will quit the webradio gadget \ No newline at end of file += Alerts = +* '''Use the Webradio gadget as an alarm clock :''' Enable to activate the alarm clock mode. +* '''Starting at :''' Specify when the alarm clock must go off. +* '''Stopping at :''' Specify when the alarm clock must stop. +* '''My Week :''' Choose the days for the alarm clock to go off. + += Usage = +=== Controlling Webradio with the remote control : === +* '''"Previous" and "next" buttons :''' Switch to the previous/next webradio in the list. +* '''"Play" button :''' Pause/continue webradio playback. +* '''"Power" button :''' To quit the webradio gadget. + +=== Controlling Webradio with Tux Droid : === +* '''Left/Right wing :''' Switch to the previous/next webradio in the list. \ No newline at end of file Modified: software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/nl.wiki =================================================================== --- software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/nl.wiki 2009-10-15 11:27:09 UTC (rev 5679) +++ software_suite_v3/software/gadget/webradio_variations/trunk/skeleton/nl.wiki 2009-10-15 11:28:25 UTC (rev 5680) @@ -1,14 +1,23 @@ -= Help = += Beschrijving = Deze gadget verandert je Tux Droid in een webradio. -Verschillende opties kunnen aangepast worden in de configuratie : -* Kies de webradio in de lijst van beschikbare webradio's -* Je kan ook de url ingeven van je favoriete webradio -* Activeer "Gebruik adres url" als je naar de webradio wil luisteren van de hierboven ingegeven url -* Configureer de webradio gadget als een alarm klok += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Selecteer een webradio :''' Kies de webradio in de lijst van beschikbare webradio's. +* '''Plaats deze gadget in mijn Favorieten :''' Om de gadget met de afstandsbediening of via Tux Droid te starten. -Gebruik : -* Indien in lijst modus : druk op de vleugels van Tux Droid om naar de vorige/volgende webradio te luisteren -* Indien in lijst modus : druk op de "vorige" en "volgende" knoppen op de afstandsbediening om naar de vorige/volgende webradio te luisteren -* De "play" knop op de afstandsbediening zal de webradio pauzeren/afspelen -* De "power" knop op de afstandsbediening zal de webradio gadget afsluiten \ No newline at end of file += Alarmen = +* '''Gebruik de webradio als alarm klok :''' Aktiveer deze optie om de webradio als alarm klok te gebruiken. +* '''Starten om :''' Selecteer het tijdstip om de alarm klok te starten. +* '''Stoppen om :''' Selecteer het tijdstip om de alarm klok te stoppen. +* '''Mijn Week :''' Selecteer de dagen wanneer je de alarm klok automatisch wil starten. + += Gebruik = + +=== Webradio bedienen met de afstandsbediening : === +* '''"Vorige" en "volgende" knoppen :''' Om naar de vorige/volgende webradio te luisteren. +* '''"Play" knop :''' Om de webradio te pauzeren of verder te laten spelen. +* '''"Power" knop :''' Om de webradio gadget af te sluiten. + +=== Webradio bedienen via Tux Droid : === +* '''Linker/rechter vleugel :''' Druk op de vleugels van Tux Droid om naar de vorige/volgende webradio te luisteren. \ No newline at end of file |
|
From: remi <c2m...@c2...> - 2009-10-15 11:27:21
|
Author: remi
Date: 2009-10-15 13:27:09 +0200 (Thu, 15 Oct 2009)
New Revision: 5679
Modified:
software_suite_v3/software/plugin/plugin-webradio/trunk/resources/plugin.xml
Log:
* Added attribute "noAttituneAlert"
Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/plugin.xml
===================================================================
--- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/plugin.xml 2009-10-15 11:26:33 UTC (rev 5678)
+++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/plugin.xml 2009-10-15 11:27:09 UTC (rev 5679)
@@ -12,6 +12,7 @@
<iconFile>resources/icon.png</iconFile>
<uuid>8349ed52-572d-4c3f-a7b8-05c2a8aec2c6</uuid>
<platform>all</platform>
+ <noAttituneAlert>true</noAttituneAlert>
</description>
<parameters>
<parameter
|
|
From: remi <c2m...@c2...> - 2009-10-15 11:26:53
|
Author: remi Date: 2009-10-15 13:26:33 +0200 (Thu, 15 Oct 2009) New Revision: 5678 Added: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/fr.wiki Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-webradio/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-webradio/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-webradio/trunk/resources/nl.wiki Log: * Added new help files Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/de.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/de.wiki 2009-10-15 10:31:10 UTC (rev 5677) +++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/de.wiki 2009-10-15 11:26:33 UTC (rev 5678) @@ -1,3 +1,27 @@ -= Übersicht = -Dieses Plugin verwandelt Tux Droid in ein Webradio. += Beschreibung = +Diese Funktion verwandelt Tux Droid in ein Webradio. += Funktionseinstellungen = +* '''Funktionsname :''' Damit können Sie die Gadget-Namen zu ändern. +* '''Wählen Sie ein Webradio :''' Sie können das Webradio aus der Webradio-Liste auswählen, das Sie hören möchten. +* '''URL-Adresse des Webradios :''' Sie können auch die URL Ihres Lieblingswebradios eingeben. +* '''URL-Adresse verwenden :''' Achten Sie darauf die Option "URL-Adresse verwenden" freizugeben, um die o.g. URL Ihres Lieblingswebradios zu aktivieren. +* '''Diese Gadget wird in die Favoritenliste aufgenommen :''' Diese Option aktivieren, um das Webradio in Ihrer Favoriten- +Liste hinzufügen. + += Hinweise = +* '''Nutzt das Webradio als Radiowecker :''' Konfigurieren Sie das Webradio als Wecker. +* '''Start um :''' Geben Sie, wenn das Webradio starten muss. +* '''Ende um :''' Geben Sie, wenn das Webradio enden muss. +* '''Meine Woche :''' Geben Sie an, an welchen Tagen das Webradio starten muss. + += Verwendung = + +=== Das Webradio steuern mit der Fernbedienung : === + +* '''"Zurück" und "Weiter"-Taste :''' Um zum vorhergehenden/nächsten Webradio zu wechseln. +* '''"Start"-Taste :''' Damit können Sie das Hintergrundspiel des Webradios unterbrechen/fortsetzen. +* '''"Power"-Taste :''' Damit können Sie die Webradio-Funktion abmelden. + +=== Das Webradio steuern mit Tux Droid : === +* '''Linker/rechten Flügel :''' Um zum vorhergehenden/nächsten Webradio zu wechseln. \ No newline at end of file Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/en.wiki 2009-10-15 10:31:10 UTC (rev 5677) +++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/en.wiki 2009-10-15 11:26:33 UTC (rev 5678) @@ -1,2 +1,24 @@ -= Synopsis = -This plugin will turn Tux Droid into a webradio. += Description = +This gadget will turn your Tux Droid into a webradio. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Select webradio :''' Select the webradio you want to listen to from the list. +* '''Webradio address url :''' You can also enter your favorite webradio url. +* '''Use address url :''' Make sure you enable this to activate the above url of your favorite webradio. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Use the Webradio gadget as an alarm clock :''' Enable to activate the alarm clock mode. +* '''Starting at :''' Specify when the alarm clock must go off. +* '''Stopping at :''' Specify when the alarm clock must stop. +* '''My Week :''' Choose the days for the alarm clock to go off. + += Usage = +=== Controlling Webradio with the remote control : === +* '''"Previous" and "next" buttons :''' Switch to the previous/next webradio in the list. +* '''"Play" button :''' Pause/continue webradio playback. +* '''"Power" button :''' To quit the webradio gadget. + +=== Controlling Webradio with Tux Droid : === +* '''Left/Right wing :''' Switch to the previous/next webradio in the list. \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/fr.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/fr.wiki 2009-10-15 11:26:33 UTC (rev 5678) @@ -0,0 +1,24 @@ += Description = +Ce gadget transformera votre Tux Droid en lecteur de Webradios. + += Configurations = +* '''Nom du gadget :''' Permet de modifier le nom du gadget. +* '''Sélectionner une webradio :''' Sélectionnez la webradio que vous voulez écouter depuis la liste. +* '''Adresse de la radio internet :''' Vous pouvez également entrer l'adresse de votre webradio favorite. +* '''Utiliser en mode adresse :''' Assurez-vous de cocher cette option si vous voulez utiliser l'adresse de votre webradio préférée. +* '''Favoris :''' Rend le gadget accessible par la télécommande et Tux Droid. + += Alertes = +* '''Utiliser une webradio en tant que réveil :''' Permet d'activer la fonction réveil. +* '''Démarrer à :''' Indique l'heure à laquelle l'alarme doit se déclencher. +* '''Stopper à :''' Indique l'heure à laquelle l'alarme doit s'arrêter. +* '''Ma semaine :''' Permet de choisir les jours pour lesquels l'alarme sera active. + += Utilisation = +=== Contrôler la webradio avec la télécommande :=== +* '''Boutons précédent / suivant :''' Passe à la webradio précédente / suivante de la liste. +* '''Bouton Play :''' Mets en pause / redémarre la lecture de la webradio. +* '''Bouton de stand-by :''' Quitte le gadget webradio + +=== Contrôler la webradio avec Tux Droid : === +* ''' Aile gauche / droite :''' Passe à la webradio précédente / suivante de la liste. \ No newline at end of file Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/help.wiki 2009-10-15 10:31:10 UTC (rev 5677) +++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/help.wiki 2009-10-15 11:26:33 UTC (rev 5678) @@ -1,2 +1,24 @@ -= Synopsis = -This plugin will turn Tux Droid into a webradio. += Description = +This gadget will turn your Tux Droid into a webradio. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Select webradio :''' Select the webradio you want to listen to from the list. +* '''Webradio address url :''' You can also enter your favorite webradio url. +* '''Use address url :''' Make sure you enable this to activate the above url of your favorite webradio. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Use the Webradio gadget as an alarm clock :''' Enable to activate the alarm clock mode. +* '''Starting at :''' Specify when the alarm clock must go off. +* '''Stopping at :''' Specify when the alarm clock must stop. +* '''My Week :''' Choose the days for the alarm clock to go off. + += Usage = +=== Controlling Webradio with the remote control : === +* '''"Previous" and "next" buttons :''' Switch to the previous/next webradio in the list. +* '''"Play" button :''' Pause/continue webradio playback. +* '''"Power" button :''' To quit the webradio gadget. + +=== Controlling Webradio with Tux Droid : === +* '''Left/Right wing :''' Switch to the previous/next webradio in the list. \ No newline at end of file Modified: software_suite_v3/software/plugin/plugin-webradio/trunk/resources/nl.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-webradio/trunk/resources/nl.wiki 2009-10-15 10:31:10 UTC (rev 5677) +++ software_suite_v3/software/plugin/plugin-webradio/trunk/resources/nl.wiki 2009-10-15 11:26:33 UTC (rev 5678) @@ -1,2 +1,25 @@ -= Synopsis = -Deze plugin verandert je Tux Droid in een webradio. += Beschrijving = +Deze gadget verandert je Tux Droid in een webradio. + += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Selecteer een webradio :''' Kies de webradio in de lijst van beschikbare webradio's. +* '''Webradio adres url :''' Hier kan je ook de url ingeven van je favoriete webradio. +* '''Gebruik adres url :''' Activeer deze optie als je naar de webradio wil luisteren van de hierboven ingegeven url. +* '''Plaats deze gadget in mijn Favorieten :''' Om de gadget met de afstandsbediening of via Tux Droid te starten. + += Alarmen = +* '''Gebruik de webradio als alarm klok :''' Aktiveer deze optie om de webradio als alarm klok te gebruiken. +* '''Starten om :''' Selecteer het tijdstip om de alarm klok te starten. +* '''Stoppen om :''' Selecteer het tijdstip om de alarm klok te stoppen. +* '''Mijn Week :''' Selecteer de dagen wanneer je de alarm klok automatisch wil starten. + += Gebruik = + +=== Webradio bedienen met de afstandsbediening : === +* '''"Vorige" en "volgende" knoppen :''' Om naar de vorige/volgende webradio te luisteren. +* '''"Play" knop :''' Om de webradio te pauzeren of verder te laten spelen. +* '''"Power" knop :''' Om de webradio gadget af te sluiten. + +=== Webradio bedienen via Tux Droid : === +* '''Linker/rechter vleugel :''' Druk op de vleugels van Tux Droid om naar de vorige/volgende webradio te luisteren. \ No newline at end of file |
|
From: remi <c2m...@c2...> - 2009-10-15 10:31:19
|
Author: remi
Date: 2009-10-15 12:31:10 +0200 (Thu, 15 Oct 2009)
New Revision: 5677
Modified:
software_suite_v3/software/gadget/webradio_variations/trunk/build.py
Log:
* Removed dead streams
Modified: software_suite_v3/software/gadget/webradio_variations/trunk/build.py
===================================================================
--- software_suite_v3/software/gadget/webradio_variations/trunk/build.py 2009-10-15 10:15:14 UTC (rev 5676)
+++ software_suite_v3/software/gadget/webradio_variations/trunk/build.py 2009-10-15 10:31:10 UTC (rev 5677)
@@ -38,7 +38,7 @@
# Classic Hits
{
'uuid' : '1c0e3414-e75e-4ad2-a7b3-6d475ac82195',
- 'radios_list' : '977 The 80s Channel,80s Sky FM,Cafe 80s FM,Radio Nigel,Star 107.9,181.FM,1.FM,KickRadio,EYE97',
+ 'radios_list' : '977 The 80s Channel,80s Sky FM,Cafe 80s FM,Star 107.9,181.FM,1.FM,KickRadio,EYE97',
'default_radio' : '977 The 80s Channel',
'name_fr' : 'Classic Hits',
'name_en' : 'Classic Hits',
@@ -60,8 +60,8 @@
# Rock & Alternative
{
'uuid' : '0b3e82ee-e4a9-4b6b-a1b5-4955bbf16fc1',
- 'radios_list' : '1080.FM - The Planet,Hot Rocks Radio,Idobi Radio,K94 Rocks,Rockwebstation,TotalRock,181.FM - The Buzz,ChroniX Aggression,RockRadio1.com,.977 Alternative Channel,Radio.wazee',
- 'default_radio' : '1080.FM - The Planet',
+ 'radios_list' : 'Hot Rocks Radio,Idobi Radio,TotalRock,181.FM - The Buzz,ChroniX Aggression,RockRadio1.com,.977 Alternative Channel,Radio.wazee',
+ 'default_radio' : 'Hot Rocks Radio',
'name_fr' : 'Rock & Alternative ',
'name_en' : 'Rock & Alternative ',
'name_nl' : 'Rock & Alternative ',
@@ -71,7 +71,7 @@
# Pop & Tophits
{
'uuid' : '4bf3a5a7-22c2-4046-8038-58529dfad89a',
- 'radios_list' : '.977 Hitz Channel,QMR FM,Summer Radio,181 FM,SKY.fm,POP-Radio,MAXXHITS,FTV Hit Radio,ENJOY Station,M1LIVE.com',
+ 'radios_list' : '.977 Hitz Channel,QMR FM,Summer Radio,181 FM,SKY.fm,MAXXHITS,FTV Hit Radio,ENJOY Station,M1LIVE.com',
'default_radio' : '.977 Hitz Channel',
'name_fr' : 'Pop & Tophits',
'name_en' : 'Pop & Tophits',
@@ -82,7 +82,7 @@
# Hip-hop & Rap
{
'uuid' : 'c7cdbe3b-d446-4c17-9ee4-602f5063f91e',
- 'radios_list' : 'Smoothbeats,RapClassix.com,Hot 108 Jamz,Musik.Jam,DEFJAY.COM,Jelly Radio,Beatbasement,TrueHipHop.FM,Pure Party,FLOW 103',
+ 'radios_list' : 'Smoothbeats,RapClassix.com,Hot 108 Jamz,DEFJAY.COM,Jelly Radio,Beatbasement,TrueHipHop.FM,FLOW 103',
'default_radio' : 'Smoothbeats',
'name_fr' : 'Hip-hop & Rap',
'name_en' : 'Hip-hop & Rap',
|
|
From: ks156 <c2m...@c2...> - 2009-10-15 10:15:25
|
Author: ks156
Date: 2009-10-15 12:15:14 +0200 (Thu, 15 Oct 2009)
New Revision: 5676
Modified:
software_suite_v3/smart-core/smart-server/branches/user_mode/TDSConfiguration.py
software_suite_v3/smart-core/smart-server/branches/user_mode/TuxDroidServer.py
software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/de.po
software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/en.po
software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/fr.po
software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/nl.po
software_suite_v3/smart-core/smart-server/branches/user_mode/tuxhttpserver.py
software_suite_v3/smart-core/smart-server/branches/user_mode/util/logger/SimpleLogger.py
Log:
* Merged rev 5584 to 5671 from the trunk to this branch
-> 5600 : Added TTS fixes for GMail
-> 5671 : Improved the logs
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/TDSConfiguration.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/TDSConfiguration.py 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/TDSConfiguration.py 2009-10-15 10:15:14 UTC (rev 5676)
@@ -62,6 +62,9 @@
TDS_CONF_LOG_LEVEL = LOG_LEVEL_INFO
# Global log target
TDS_CONF_LOG_TARGET = LOG_TARGET_FILE
+# Activation of the global file for logs
+# All log messages will be merged into one file (Single log files are preserved)
+TDS_CONF_LOG_GLOBAL = True
# Filename of the global server log
TDS_FILENAME_TUXDROIDSERVER_LOG = "TuxDroidServer"
# Filename of the HTTP server log
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/TuxDroidServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/TuxDroidServer.py 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/TuxDroidServer.py 2009-10-15 10:15:14 UTC (rev 5676)
@@ -30,6 +30,10 @@
from TDSConfiguration import *
from TDSAutoUpdater import TDSAutoUpdater
+# Create looger object
+logger = SimpleLogger("SmartServerMain")
+logger.setLevel(TDS_CONF_LOG_LEVEL)
+logger.setTarget(TDS_CONF_LOG_TARGET)
# Define the events handler.
eventsHandler = TuxEventHandlers()
# Define the files cache manager.
@@ -58,10 +62,14 @@
"""Initialize the server.
"""
# Check for updates
+ logger.logInfo("Create auto-updater")
autoUpdater = TDSAutoUpdater()
+ logger.logInfo("Start auto-updater")
autoUpdater.start()
# Load and start the resources manager
+ logger.logInfo("Load resources manager")
resourcesManager.load(TDS_RESOURCES_PATH)
+ logger.logInfo("Serve additional files")
resourcesManager.addDirectoryToServe("/data/web_interface/server_menu/xsl/")
resourcesManager.addFileToServe(os.path.join(TDS_APPLICATION_PATH,
"data", "favicon", "favicon.ico"), "/favicon.ico")
@@ -79,18 +87,24 @@
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/css/")
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/img/")
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/js/")
+ logger.logInfo("Start resources manager")
resourcesManager.start()
# Start the clients manager
+ logger.logInfo("Start clients manager")
clientsManager.start()
def finalizeServer():
"""Finalize the server.
"""
# Stop the clients manager
+ logger.logInfo("Stop clients manager")
clientsManager.stop()
# Stop the resources manager
+ logger.logInfo("Stop resources manager")
resourcesManager.stop()
# Destroy the files cache manager
+ logger.logInfo("Destroy files cache manager")
filesCacheManager.destroy()
# Destroy the events handler
+ logger.logInfo("Destroy events handler")
eventsHandler.destroy()
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/de.po
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/de.po 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/de.po 2009-10-15 10:15:14 UTC (rev 5676)
@@ -21,3 +21,6 @@
msgid "gadget"
msgstr "kadchet"
+
+msgid "gmail"
+msgstr "g-mail"
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/en.po
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/en.po 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/en.po 2009-10-15 10:15:14 UTC (rev 5676)
@@ -18,3 +18,6 @@
msgid "facebook"
msgstr "facebook"
+
+msgid "gmail"
+msgstr "g-mail"
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/fr.po
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/fr.po 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/fr.po 2009-10-15 10:15:14 UTC (rev 5676)
@@ -27,3 +27,6 @@
msgid "login"
msgstr "loguin"
+
+msgid "gmail"
+msgstr "g-mail"
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/nl.po
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/nl.po 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/translation/tts_fixes/nl.po 2009-10-15 10:15:14 UTC (rev 5676)
@@ -18,3 +18,6 @@
msgid "facebook"
msgstr "feesboek"
+
+msgid "gmail"
+msgstr "g-mail"
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/tuxhttpserver.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/tuxhttpserver.py 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/tuxhttpserver.py 2009-10-15 10:15:14 UTC (rev 5676)
@@ -22,7 +22,22 @@
from util.system.TaskBar import refreshTaskBar
from util.misc.URLTools import URLTestRequestGet
from TDSConfiguration import *
+from util.logger import *
+logger = None
+
+def initLogger():
+ global logger
+ logger = SimpleLogger("SmartServerMain")
+ logger.setLevel(TDS_CONF_LOG_LEVEL)
+ logger.setTarget(TDS_CONF_LOG_TARGET)
+ logger.resetGlobalLogFile(TDS_CONF_LOG_GLOBAL)
+ logger.resetLog()
+ logger.logInfo("-----------------------------------------------")
+ logger.logInfo("SmartServerMain%s" % __version__)
+ logger.logInfo("Licence : %s" % __licence__)
+ logger.logInfo("-----------------------------------------------")
+
def checkServerRun():
return URLTestRequestGet("127.0.0.1", TDS_HTTP_PORT, "/", 200, 5.0)
@@ -43,16 +58,26 @@
refreshTaskBar()
def killServerAndWait():
+ logger.logInfo("Kill server")
killServer()
+ logger.logInfo("Server killed")
time.sleep(0.5)
def runServer():
+ logger.logInfo("Import initializeServer")
from TuxDroidServer import initializeServer
+ logger.logInfo("Import httpServer")
from TuxDroidServer import httpServer
+ logger.logInfo("Import finalizeServer")
from TuxDroidServer import finalizeServer
+ logger.logInfo("Initialize server")
initializeServer()
+ logger.logInfo("Start server")
httpServer.start()
+ logger.logInfo("Server stopped")
+ logger.logInfo("Finalize server")
finalizeServer()
+ logger.logInfo("Server finalized")
def usage():
print '-'*80
@@ -125,6 +150,7 @@
if __stop:
killServer()
elif __restart:
+ initLogger()
killServerAndWait()
start()
else:
@@ -132,5 +158,6 @@
print "Server is already started"
print "Uses --restart if you want to restart the server.. so, exiting."
else:
+ initLogger()
start()
Modified: software_suite_v3/smart-core/smart-server/branches/user_mode/util/logger/SimpleLogger.py
===================================================================
--- software_suite_v3/smart-core/smart-server/branches/user_mode/util/logger/SimpleLogger.py 2009-10-15 10:12:41 UTC (rev 5675)
+++ software_suite_v3/smart-core/smart-server/branches/user_mode/util/logger/SimpleLogger.py 2009-10-15 10:15:14 UTC (rev 5676)
@@ -29,6 +29,8 @@
LOG_TARGET_SHELL = 1
LOG_TARGET_BOTH = 2
LOG_TARGET_NONE = 3
+# Global log file flag
+LOG_GLOBAL_FILE = False
# ==============================================================================
# Public class
@@ -114,6 +116,21 @@
pass
# --------------------------------------------------------------------------
+ # Reset the global log file.
+ # --------------------------------------------------------------------------
+ def resetGlobalLogFile(self, activate = True):
+ """Reset the global log file.
+ """
+ global LOG_GLOBAL_FILE
+ LOG_GLOBAL_FILE = activate
+ if LOG_GLOBAL_FILE:
+ try:
+ f = open(os.path.join(self.__logPath, "all.log"), 'w')
+ f.close()
+ except:
+ pass
+
+ # --------------------------------------------------------------------------
# Put a message in the log.
# --------------------------------------------------------------------------
def __putLog(self, msgType, msgString):
@@ -132,6 +149,15 @@
f.close()
except:
pass
+ if LOG_GLOBAL_FILE:
+ try:
+ f = open(os.path.join(self.__logPath, "all.log"), 'a')
+ try:
+ f.write(message + "\n")
+ finally:
+ f.close()
+ except:
+ pass
self.__logMutex.release()
if self.__target in [LOG_TARGET_SHELL, LOG_TARGET_BOTH]:
print message
|
|
From: remi <c2m...@c2...> - 2009-10-15 10:12:52
|
Author: remi
Date: 2009-10-15 12:12:41 +0200 (Thu, 15 Oct 2009)
New Revision: 5675
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
Log:
* Plugins can now contains po files for tts fixes
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-10-15 10:11:58 UTC (rev 5674)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-10-15 10:12:41 UTC (rev 5675)
@@ -117,6 +117,9 @@
if os.path.isdir(pluginAttPath):
resourceAttituneManager.getAttitunesContainer().addDirectory(
pluginAttPath, uuid)
+ pluginTtsFixesPath = os.path.join(pluginWorkingPath, "resources",
+ "tts_fixes")
+ ttsFixer.addPoDirectory(pluginTtsFixesPath)
self.logger.logDebug("Plugin deployed [%s] to [%s]" % (
plugin.getDescription().getName(), pluginWorkingPath))
self.__publishEvents(False, ST_NAME_PS_PLUGIN_LOADED, [uuid,])
|
|
From: remi <c2m...@c2...> - 2009-10-15 10:12:23
|
Author: remi
Date: 2009-10-15 12:11:58 +0200 (Thu, 15 Oct 2009)
New Revision: 5674
Modified:
software_suite_v3/smart-core/smart-server/trunk/translation/Translation.py
Log:
* Added a method to dynamically add po directories to the translation object
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/Translation.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/Translation.py 2009-10-15 09:49:15 UTC (rev 5673)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/Translation.py 2009-10-15 10:11:58 UTC (rev 5674)
@@ -37,6 +37,27 @@
else:
self.__i18nList[language] = i18n
+ def addPoDirectory(self, directory):
+ """
+ """
+ if not os.path.isdir(directory):
+ return
+ for language in SUPPORTED_LANGUAGES_LIST:
+ if not self.__i18nList.has_key(language):
+ i18n = I18n()
+ i18n.setPoDirectory(directory)
+ i18n.setLocale(language)
+ i18n.update()
+ if i18n.getDictionnary() == {}:
+ self.__i18nList[language] = self.__i18nList["en"]
+ else:
+ self.__i18nList[language] = i18n
+ else:
+ i18n = self.__i18nList[language]
+ i18n.setPoDirectory(directory)
+ i18n.setLocale(language)
+ i18n.update()
+
def getTranslations(self, language):
"""
"""
|
|
From: remi <c2m...@c2...> - 2009-10-15 09:49:36
|
Author: remi
Date: 2009-10-15 11:49:15 +0200 (Thu, 15 Oct 2009)
New Revision: 5673
Modified:
software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* Added a global tts speak fixer object
Modified: software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py 2009-10-15 09:30:59 UTC (rev 5672)
+++ software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py 2009-10-15 09:49:15 UTC (rev 5673)
@@ -29,6 +29,7 @@
from TDSResourcesManager import *
from TDSConfiguration import *
from TDSAutoUpdater import TDSAutoUpdater
+from translation.Translation import Translation
# Create looger object
logger = SimpleLogger("SmartServerMain")
@@ -57,6 +58,8 @@
serverVersion = "%s-LINUX" % __version__
# Create the base path of the configurations if not exists
DirectoriesAndFilesTools.MKDirs(TDS_RESOURCES_CONF_PATH)
+# Define TTS fixer object.
+ttsFixer = Translation("tts_fixes")
def initializeServer():
"""Initialize the server.
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py 2009-10-15 09:30:59 UTC (rev 5672)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py 2009-10-15 09:49:15 UTC (rev 5673)
@@ -5,7 +5,6 @@
import time
-from translation.Translation import Translation
from util.string.String import String
PGU_CONTEXT_LAYER_USER = 0
@@ -45,7 +44,6 @@
self.__execStarted = False
self.__execPaused = False
self.__language = resourcePluginsServer.getPluginsContainer().getLanguage()
- self.__translations = Translation("tts_fixes")
def getPluginInterpreterContext(self):
"""
@@ -272,7 +270,7 @@
if not self.executionIsStarted():
resourceTuxDriver.closeMouth()
return
- text = self.__translations.fixeWordsInText(text, self.__language)
+ text = ttsFixer.fixeWordsInText(text, self.__language)
resourceTuxOSL.ttsSpeak(text, locutor, pitch)
if not self.executionIsStarted():
resourceTuxDriver.closeMouth()
@@ -395,7 +393,6 @@
self.__onDemandDictForThumbnailBarMutex = threading.Lock()
self.__lastRunStopActionTime = time.time()
self.__lastRunStopActionTimeMutex = threading.Lock()
- self.__translations = Translation("tts_fixes")
def insertOnDemand(self, ugc):
"""
@@ -425,13 +422,7 @@
locutor = resourcePluginsServer.getPluginsContainer().getLocutor()
pitch = resourcePluginsServer.getPluginsContainer().getPitch()
language = resourcePluginsServer.getPluginsContainer().getLanguage()
- transDict = self.__translations.getTranslations(language)
- splitedName = ugcTtsName.lower().split(" ")
- fixedName = ""
- for i, word in enumerate(splitedName):
- if transDict.has_key(word):
- splitedName[i] = transDict[word]
- fixedName += splitedName[i] + " "
+ fixedName = ttsFixer.fixeWordsInText(ugcTtsName, language)
resourceTuxDriver.openMouth()
resourceTuxOSL.ttsSpeak(fixedName, locutor, pitch)
if not eventsHandler.waitCondition(ST_NAME_TTS_SOUND_STATE, ("ON",
|
|
From: remi <c2m...@c2...> - 2009-10-15 09:31:12
|
Author: remi
Date: 2009-10-15 11:30:59 +0200 (Thu, 15 Oct 2009)
New Revision: 5672
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
Log:
* Moved Attitunes combobox for alert introductions to the alert frame
* Plugin can now avoid Attitunes combox show
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/gadget_configuration.xsl 2009-10-15 09:30:59 UTC (rev 5672)
@@ -108,38 +108,6 @@
</xsl:if>
</xsl:for-each>
<!-- GADGET ALERT ATTITUNE -->
- <xsl:if test="root/data/showAlertAttitune = 'True'">
- <div class="gadgetConfContentFrameMiddle">
- <div class="gadgetConfContentFrameSep"></div>
- <xsl:element name="input">
- <xsl:attribute name="class">text</xsl:attribute>
- <xsl:attribute name="type">hidden</xsl:attribute>
- <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_visible</xsl:attribute>
- <xsl:attribute name="value">true</xsl:attribute>
- </xsl:element>
- <span class="gadgetConfParamName">
- <xsl:value-of select="root/translations/introduction_alerts"/>
- </span>
- <span class="gadgetConfParamValue">
- <xsl:element name="select">
- <xsl:attribute name="class">select</xsl:attribute>
- <xsl:attribute name="id">req_alertAttitune</xsl:attribute>
- <xsl:attribute name="name">AlertAttitune</xsl:attribute>
- <xsl:for-each select="root/data/availableAttitunes/*">
- <xsl:element name="option">
- <xsl:attribute name="value">
- <xsl:value-of select="."/>
- </xsl:attribute>
- <xsl:if test=". = ../../alertAttitune">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <xsl:value-of select="."/>
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </span>
- </div>
- </xsl:if>
<div class="gadgetConfContentFrameBottom"></div>
<!-- ON DEMAND -->
<xsl:choose>
@@ -194,8 +162,37 @@
<span class="gadgetConfMyUseDescription">
<xsl:value-of select="description"/>
</span>
- <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True' or count(parameters/*[visible='True']) > 0">
+ <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True' or ../../showAlertAttitune='True' or count(parameters/*[visible='True']) > 0">
<div class="gadgetConfContentFrameTop"></div>
+ <!-- GADGET ALERT ATTITUNE -->
+ <xsl:if test="../../showAlertAttitune = 'True'">
+ <div class="gadgetConfContentFrameMiddle">
+ <span class="gadgetConfParamName">
+ <xsl:value-of select="../../../translations/introduction_alerts"/>
+ </span>
+ <span class="gadgetConfParamValue">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select</xsl:attribute>
+ <xsl:attribute name="id">req_alertAttitune</xsl:attribute>
+ <xsl:attribute name="name">AlertAttitune</xsl:attribute>
+ <xsl:for-each select="../../availableAttitunes/*">
+ <xsl:element name="option">
+ <xsl:attribute name="value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:if test=". = ../../alertAttitune">
+ <xsl:attribute name="selected">true</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ </span>
+ <xsl:if test="dateVisible='True' or hoursBeginVisible='True' or hoursEndVisible='True' or delayVisible='True' or weekMaskVisible='True' or count(parameters/*[visible='True']) > 0">
+ <div class="gadgetConfContentFrameSep"></div>
+ </xsl:if>
+ </div>
+ </xsl:if>
<!-- ALERT PARAMETERS -->
<xsl:for-each select="parameters/*">
<xsl:if test="visible = 'True'">
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -380,15 +380,16 @@
showAttitunes = False
ugc = resourceUgcServer.getUgcContainer().getUgcByUuid(uuid)
parentPlugin = ugc.getParentGadget().getParentPlugin()
- tasks = ugc.getTasks()
- for task in tasks:
- parentTask = parentPlugin.getTask(task.getName())
- if parentTask != None:
- parentCommand = parentPlugin.getCommand(parentTask.getCommand())
- if parentCommand != None:
- if not parentCommand.isNotifier():
- showAttitunes = True
- break
+ if parentPlugin.getDescription().hasAttituneAlert():
+ tasks = ugc.getTasks()
+ for task in tasks:
+ parentTask = parentPlugin.getTask(task.getName())
+ if parentTask != None:
+ parentCommand = parentPlugin.getCommand(parentTask.getCommand())
+ if parentCommand != None:
+ if not parentCommand.isNotifier():
+ showAttitunes = True
+ break
data['showAlertAttitune'] = showAttitunes
parentUuid = parentPlugin.getDescription().getUuid()
attitunesList = resourceAttituneManager.getAttitunesNameByObserversList([parentUuid, "userAttitunes"])
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/Plugin.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -200,6 +200,7 @@
data['description']['author'] = description.getAuthor()
data['description']['description'] = description.getDescription(language)
data['description']['platform'] = description.getPlatform()
+ data['description']['hasAttituneAlert'] = description.hasAlertAttitune()
try:
f = open(description.getHelpFile(language), "rb")
try:
Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py 2009-10-15 09:29:10 UTC (rev 5671)
+++ software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginDescription.py 2009-10-15 09:30:59 UTC (rev 5672)
@@ -36,6 +36,7 @@
self.__helpFile = None
self.__platform = None
self.__ttsName = None
+ self.__noAttituneAlert = None
self.__update(dictionary, workingPath)
# --------------------------------------------------------------------------
@@ -83,6 +84,9 @@
self.__ttsName = self.__name
if dictionary.has_key('ttsName'):
self.__ttsName = dictionary['ttsName']
+ self.__noAttituneAlert = "false"
+ if dictionary.has_key('noAttituneAlert'):
+ self.__noAttituneAlert = dictionary['noAttituneAlert']
# --------------------------------------------------------------------------
# Get the plugin name.
@@ -200,3 +204,15 @@
@return: A string. <"all"|"linux"|"windows">
"""
return self.__platform
+
+ # --------------------------------------------------------------------------
+ # Get if the alert can have attitune introduction.
+ # --------------------------------------------------------------------------
+ def hasAttituneAlert(self):
+ """Get if the alert can have attitune introduction.
+ @return: True or False.
+ """
+ if self.__noAttituneAlert == "false":
+ return True
+ else:
+ return False
|
|
From: remi <c2m...@c2...> - 2009-10-15 09:29:31
|
Author: remi
Date: 2009-10-15 11:29:10 +0200 (Thu, 15 Oct 2009)
New Revision: 5671
Modified:
software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py
software_suite_v3/smart-core/smart-server/trunk/tuxhttpserver.py
software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
Log:
* Added a global log file
* Added more log messages for server boot
Modified: software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py 2009-10-15 07:04:15 UTC (rev 5670)
+++ software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py 2009-10-15 09:29:10 UTC (rev 5671)
@@ -60,6 +60,9 @@
TDS_CONF_LOG_LEVEL = LOG_LEVEL_INFO
# Global log target
TDS_CONF_LOG_TARGET = LOG_TARGET_FILE
+# Activation of the global file for logs
+# All log messages will be merged into one file (Single log files are preserved)
+TDS_CONF_LOG_GLOBAL = True
# Filename of the global server log
TDS_FILENAME_TUXDROIDSERVER_LOG = "TuxDroidServer"
# Filename of the HTTP server log
Modified: software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py 2009-10-15 07:04:15 UTC (rev 5670)
+++ software_suite_v3/smart-core/smart-server/trunk/TuxDroidServer.py 2009-10-15 09:29:10 UTC (rev 5671)
@@ -30,6 +30,10 @@
from TDSConfiguration import *
from TDSAutoUpdater import TDSAutoUpdater
+# Create looger object
+logger = SimpleLogger("SmartServerMain")
+logger.setLevel(TDS_CONF_LOG_LEVEL)
+logger.setTarget(TDS_CONF_LOG_TARGET)
# Define the events handler.
eventsHandler = TuxEventHandlers()
# Define the files cache manager.
@@ -58,10 +62,14 @@
"""Initialize the server.
"""
# Check for updates
+ logger.logInfo("Create auto-updater")
autoUpdater = TDSAutoUpdater()
+ logger.logInfo("Start auto-updater")
autoUpdater.start()
# Load and start the resources manager
+ logger.logInfo("Load resources manager")
resourcesManager.load(TDS_RESOURCES_PATH)
+ logger.logInfo("Serve additional files")
resourcesManager.addDirectoryToServe("/data/web_interface/server_menu/xsl/")
resourcesManager.addFileToServe(os.path.join(TDS_APPLICATION_PATH,
"data", "favicon", "favicon.ico"), "/favicon.ico")
@@ -79,18 +87,24 @@
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/css/")
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/img/")
resourcesManager.addDirectoryToServe("/data/web_interface/user_01/js/")
+ logger.logInfo("Start resources manager")
resourcesManager.start()
# Start the clients manager
+ logger.logInfo("Start clients manager")
clientsManager.start()
def finalizeServer():
"""Finalize the server.
"""
# Stop the clients manager
+ logger.logInfo("Stop clients manager")
clientsManager.stop()
# Stop the resources manager
+ logger.logInfo("Stop resources manager")
resourcesManager.stop()
# Destroy the files cache manager
+ logger.logInfo("Destroy files cache manager")
filesCacheManager.destroy()
# Destroy the events handler
+ logger.logInfo("Destroy events handler")
eventsHandler.destroy()
Modified: software_suite_v3/smart-core/smart-server/trunk/tuxhttpserver.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/tuxhttpserver.py 2009-10-15 07:04:15 UTC (rev 5670)
+++ software_suite_v3/smart-core/smart-server/trunk/tuxhttpserver.py 2009-10-15 09:29:10 UTC (rev 5671)
@@ -22,7 +22,22 @@
from util.system.TaskBar import refreshTaskBar
from util.misc.URLTools import URLTestRequestGet
from TDSConfiguration import *
+from util.logger import *
+logger = None
+
+def initLogger():
+ global logger
+ logger = SimpleLogger("SmartServerMain")
+ logger.setLevel(TDS_CONF_LOG_LEVEL)
+ logger.setTarget(TDS_CONF_LOG_TARGET)
+ logger.resetGlobalLogFile(TDS_CONF_LOG_GLOBAL)
+ logger.resetLog()
+ logger.logInfo("-----------------------------------------------")
+ logger.logInfo("SmartServerMain%s" % __version__)
+ logger.logInfo("Licence : %s" % __licence__)
+ logger.logInfo("-----------------------------------------------")
+
def checkServerRun():
return URLTestRequestGet("127.0.0.1", TDS_HTTP_PORT, "/", 200, 5.0)
@@ -43,16 +58,26 @@
refreshTaskBar()
def killServerAndWait():
+ logger.logInfo("Kill server")
killServer()
+ logger.logInfo("Server killed")
time.sleep(0.5)
def runServer():
+ logger.logInfo("Import initializeServer")
from TuxDroidServer import initializeServer
+ logger.logInfo("Import httpServer")
from TuxDroidServer import httpServer
+ logger.logInfo("Import finalizeServer")
from TuxDroidServer import finalizeServer
+ logger.logInfo("Initialize server")
initializeServer()
+ logger.logInfo("Start server")
httpServer.start()
+ logger.logInfo("Server stopped")
+ logger.logInfo("Finalize server")
finalizeServer()
+ logger.logInfo("Server finalized")
def usage():
print '-'*80
@@ -124,6 +149,7 @@
if __stop:
killServer()
elif __restart:
+ initLogger()
killServerAndWait()
start()
else:
@@ -131,5 +157,6 @@
print "Server is already started"
print "Uses --restart if you want to restart the server.. so, exiting."
else:
+ initLogger()
start()
Modified: software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py 2009-10-15 07:04:15 UTC (rev 5670)
+++ software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py 2009-10-15 09:29:10 UTC (rev 5671)
@@ -27,6 +27,8 @@
LOG_TARGET_SHELL = 1
LOG_TARGET_BOTH = 2
LOG_TARGET_NONE = 3
+# Global log file flag
+LOG_GLOBAL_FILE = False
# ==============================================================================
# Public class
@@ -111,6 +113,21 @@
pass
# --------------------------------------------------------------------------
+ # Reset the global log file.
+ # --------------------------------------------------------------------------
+ def resetGlobalLogFile(self, activate = True):
+ """Reset the global log file.
+ """
+ global LOG_GLOBAL_FILE
+ LOG_GLOBAL_FILE = activate
+ if LOG_GLOBAL_FILE:
+ try:
+ f = open(os.path.join(self.__logPath, "all.log"), 'w')
+ f.close()
+ except:
+ pass
+
+ # --------------------------------------------------------------------------
# Put a message in the log.
# --------------------------------------------------------------------------
def __putLog(self, msgType, msgString):
@@ -129,6 +146,15 @@
f.close()
except:
pass
+ if LOG_GLOBAL_FILE:
+ try:
+ f = open(os.path.join(self.__logPath, "all.log"), 'a')
+ try:
+ f.write(message + "\n")
+ finally:
+ f.close()
+ except:
+ pass
self.__logMutex.release()
if self.__target in [LOG_TARGET_SHELL, LOG_TARGET_BOTH]:
print message
|
|
From: ks156 <c2m...@c2...> - 2009-10-15 07:04:29
|
Author: ks156
Date: 2009-10-15 09:04:15 +0200 (Thu, 15 Oct 2009)
New Revision: 5670
Modified:
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/de.po
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/en.po
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/fr.po
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/nl.po
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot
Log:
* Added the new strings :
* en.po and fr.po are up-to-date and fully translated
* The new string in de.po and nl.po still have to be translated.
* Removed a blank line in the template file
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/de.po
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/de.po 2009-10-15 06:54:30 UTC (rev 5669)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/de.po 2009-10-15 07:04:15 UTC (rev 5670)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Sie haben eine neue Nachricht."
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Mail gesendet von {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "Betreff der Nachricht ist: {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "Keine neue Mail."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "Ihr Benutzer"
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/en.po
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/en.po 2009-10-15 06:54:30 UTC (rev 5669)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/en.po 2009-10-15 07:04:15 UTC (rev 5670)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "You have a new message."
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Mail sent by {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "The message subject is : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "No new mail."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "your_user"
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/fr.po
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/fr.po 2009-10-15 06:54:30 UTC (rev 5669)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/fr.po 2009-10-15 07:04:15 UTC (rev 5670)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Vous avez un nouveau message"
+msgid "A new message has arrived !"
+msgstr "Un nouveau message est arrivé !"
+
+msgid "It appears you have received a new email."
+msgstr "Il semble que vous ayez reçu un message."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "Un nouveau message ? Je me demande qui peut bien penser à vous."
+
+msgid "It would appear you have received new messages."
+msgstr "Il semble que des messages soient arrivés"
+
msgid "Mail sent by {0}"
msgstr "Message envoyé par {0}"
+msgid "The message was sent by {0}"
+msgstr "Le message vous a été envoyé par {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "L'expéditeur du message est {0}"
+
msgid "The message subject is : {0}"
msgstr "Le sujet du message est : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "Le message a comme sujet : {0}"
+
msgid "No new mail."
msgstr "Aucun nouveau message"
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "Désolé, personne ne vous a envoyé de message ..."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "Pas de messages. Personne ne semble avoir pensé à vous."
+
+msgid "Your mailbox is empty."
+msgstr "Votre boîte email est vide."
+
msgid "your_user"
msgstr "votre_identifiant"
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/nl.po
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/nl.po 2009-10-15 06:54:30 UTC (rev 5669)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/nl.po 2009-10-15 07:04:15 UTC (rev 5670)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Je hebt een nieuw bericht"
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Dit bericht werd verzonden door {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "Het onderwerp is : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "Geen nieuwe mails."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "jouw_login"
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot 2009-10-15 06:54:30 UTC (rev 5669)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot 2009-10-15 07:04:15 UTC (rev 5670)
@@ -104,7 +104,6 @@
msgid "You must activate the pop3 service in your Mail account"
msgstr ""
-
msgid "Sorry, I could not connect to the mail server. Please check your internet connection or try again later."
msgstr ""
|
|
From: ks156 <c2m...@c2...> - 2009-10-15 06:54:46
|
Author: ks156
Date: 2009-10-15 08:54:30 +0200 (Thu, 15 Oct 2009)
New Revision: 5669
Modified:
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot
Log:
* Removed all ^M characters (DOS format ...)
* Synchronized the pot with the po files...
* Added the new strings
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot 2009-10-15 06:44:22 UTC (rev 5668)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/resources/plugin.pot 2009-10-15 06:54:30 UTC (rev 5669)
@@ -1,63 +1,94 @@
-msgid "Mail Gadget"
-msgstr ""
-
-msgid "Username"
-msgstr ""
-
-msgid "Server host"
-msgstr ""
-
-msgid "Server port"
-msgstr ""
-
-msgid "IMAP folder to retreive"
-msgstr ""
-
-msgid "Password"
-msgstr ""
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Check if there is any new mail"
-msgstr ""
-
-msgid "Read your mail"
-msgstr ""
-
-msgid "User parameters"
-msgstr ""
-
-msgid "Server parameters"
-msgstr ""
-
-msgid "Advanced Server parameters"
-msgstr ""
-
-msgid "Options"
-msgstr ""
-
-msgid "You have a new message."
-msgstr ""
-
-msgid "Mail sent by {0}"
-msgstr ""
-
-msgid "The message subject is : {0}"
-msgstr ""
-
-msgid "No new mail."
-msgstr ""
-
-msgid "your_user"
-msgstr ""
-
-msgid "your_secret_password"
-msgstr ""
-
-msgid "your.server.com"
+
+msgid "GMail Plugin"
msgstr ""
+msgid "Username"
+msgstr ""
+
+msgid "Server host"
+msgstr ""
+
+msgid "Server port"
+msgstr ""
+
+msgid "IMAP folder to retreive"
+msgstr ""
+
+msgid "Password"
+msgstr ""
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Check if there is any new mail"
+msgstr ""
+
+msgid "Read your mail"
+msgstr ""
+
+msgid "User parameters"
+msgstr ""
+
+msgid "Server parameters"
+msgstr ""
+
+msgid "Advanced Server parameters"
+msgstr ""
+
+msgid "Options"
+msgstr ""
+
+msgid "You have a new message."
+msgstr ""
+
+msgid "A new message has arrived !"
+msgstr ""
+
+msgid "It appears you have received a new email."
+msgstr ""
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr ""
+
+msgid "It would appear you have received new messages."
+msgstr ""
+
+msgid "Mail sent by {0}"
+msgstr ""
+
+msgid "The message was sent by {0}"
+msgstr ""
+
+msgid "The sender of the message is {0}"
+msgstr ""
+
+msgid "The message subject is : {0}"
+msgstr ""
+
+msgid "The subject of the message is : {0}"
+msgstr ""
+
+msgid "No new mail."
+msgstr ""
+
+msgid "I'm sorry, nobody sent you any messages."
+msgstr ""
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr ""
+
+msgid "Your mailbox is empty."
+msgstr ""
+
+msgid "your_user"
+msgstr ""
+
+msgid "your_secret_password"
+msgstr ""
+
+msgid "your.server.com"
+msgstr ""
+
msgid "Use sender filter"
msgstr ""
@@ -68,14 +99,26 @@
msgstr ""
msgid "Subject filter to apply"
-msgstr ""
-
-msgid "You must activate the pop3 service in your Mail account"
-msgstr ""
+msgstr ""
+msgid "You must activate the pop3 service in your Mail account"
+msgstr ""
+
msgid "Sorry, I could not connect to the mail server. Please check your internet connection or try again later."
msgstr ""
msgid "Sorry, there was an error when connecting to the mail server. Please check your email configuration."
msgstr ""
+
+msgid "Start every x"
+msgstr ""
+
+msgid "Start me every x"
+msgstr ""
+
+msgid "Start every x from full hour"
+msgstr ""
+
+msgid "Start me every x (From full hour)"
+msgstr ""
|
|
From: ks156 <c2m...@c2...> - 2009-10-15 06:44:32
|
Author: ks156 Date: 2009-10-15 08:44:22 +0200 (Thu, 15 Oct 2009) New Revision: 5668 Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java Log: * Set fileformat to unix * Reindent * Retab * Removed trailing spaces Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java =================================================================== --- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-15 06:42:25 UTC (rev 5667) +++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-15 06:44:22 UTC (rev 5668) @@ -1,389 +1,390 @@ -/* This file is part of "TuxDroid Gadget Mail". - * Copyright 2008, kysoh - * Author : Yoran Brault - * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) - * Site : http://www.kysoh.com/ - * - * "TuxDroid Gadget Mail" 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.1 of - * the License, or (at your option) any later version. - * - * "TuxDroid Gadget Mail" is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with "TuxDroid Gadget Mail"; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ - -package net.karmaLab.tuxDroid.plugins; - -import java.io.IOException; -import java.security.Security; -import java.util.Properties; -import java.util.Vector; -import java.util.Random; - -import javax.mail.Folder; -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.Store; -import javax.mail.Flags.Flag; -import javax.mail.internet.InternetAddress; - -import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; - -/** - * @author User - */ -public class MailPlugin extends SimplePlugin<Configuration> -{ - String[] newMailSentences = { - "You have a new message.", - "A new message has arrived !", - "It appears you have received a new email.", - "A new message ? I wonder who could be thinking about you.", - "It would appear you have received new messages." - }; - - String[] mailSenderSentences = { - "Mail sent by {0}", - "The message was sent by {0}", - "The sender of the message is {0}" - }; - - String[] mailSubjectSentences = { - "The message subject is : {0}", - "The subject of the message is : {0}" - }; - - String[] noNewMailSentences = { - "No new mail.", - "I'm sorry, nobody sent you any messages.", - "No messages. Nobody seems to be thinking about you.", - "Your mailbox is empty." - }; - - /** - * @param args - * @throws Exception - */ - public static void main(String[] args) throws Exception - { - new MailPlugin().boot(args, new Configuration()); - } - - /** - * - */ - @Override - public void start() - { - try - { - if (getCommand().equals("run")) - { - run(); - } - else if (getCommand().equals("check")) - { - check(); - } - else - { - run(); - } - } - catch (Exception e) {} - } - - - /** - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void check() throws MessagingException, IOException, ClassNotFoundException, Exception - { - Message messages[] = connectToMailBox(); - - if (messages == null) - { - throwResult(false); - return; - } - String sessionId = "pop.gmail.com_" + configuration().getUser(); - State stateAlert = readState(State.class, sessionId + "ALERT"); - /* Is first check ? */ - boolean firstCheck; - if (stateAlert.getLastMessages().size() == 0) - { - firstCheck = true; - stateAlert.getLastMessages().add("FIRST_CHECK_HACK"); - } - else - { - firstCheck = false; - } - /* Check if you have a new message */ - boolean newMessageAlert = false; - for (int i = messages.length - 1; i >= 0; i--) - { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { - String subject = messages[i].getSubject(); - if (subject != null) - { - if (!stateAlert.getLastMessages().contains(subject)) - { - newMessageAlert = true; - stateAlert.getLastMessages().add(subject); - } - } - } - } - if((newMessageAlert) && (!firstCheck)) - { - throwResult(true); - throwMessage(this.pickSentence(newMailSentences)); - } - else - { - throwResult(false); - } - /* Save the current referenced mails */ - writeState(stateAlert, sessionId + "ALERT"); - } - - /** - * - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void run() throws MessagingException, IOException, ClassNotFoundException - { - Message messages[] = connectToMailBox(); - if (messages == null) - { - return; - } - String sessionId = "pop.gmail.com_" + configuration().getUser(); - State stateRun = readState(State.class, sessionId + "RUN"); - /* Check for new message */ - boolean newMessageRun = false; - for (int i = messages.length - 1; i >= 0; i--) - { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { - if (!stateRun.getLastMessages().contains(messages[i].getSubject())) - { - newMessageRun = true; - break; - } - } - } - /* If new message found */ - if (newMessageRun) - { - int mailCounter = 0; - boolean notifyNoNewMail = true; - /* For all unread mails */ - for (int i = messages.length - 1; i >= 0; i--) - { - String subject; - String filteredSubject; - String sender; - String senderPersonal; - String senderAddress; - boolean seen; - boolean mailAlreadyRead; - - try - { - /* Get current mail data */ - subject = messages[i].getSubject(); - senderPersonal = ((InternetAddress) messages[i].getFrom()[0]).getPersonal(); - senderAddress = ((InternetAddress)messages[i].getFrom()[0]).getAddress(); - seen = messages[i].getFlags().contains(Flag.SEEN); - /* Pass if mail is already seen */ - if (seen) - { - continue; - } - /* Pass if subject is empty */ - if (subject == null) - { - continue; - } - /* Filtering the mail address */ - if (senderPersonal == null) - { - sender = senderAddress; - } - else - { - sender = senderPersonal; - } - if (sender.contains("<")) - { - sender = sender.substring(0, sender.indexOf("<")); - } - /* Filtering the mail subject */ - filteredSubject = subject.replace("*", " "); - filteredSubject = filteredSubject.replace("_", " "); - filteredSubject = filteredSubject.replace("{", " "); - filteredSubject = filteredSubject.replace("}", " "); - filteredSubject = filteredSubject.replace("[", " "); - filteredSubject = filteredSubject.replace("]", " "); - filteredSubject = filteredSubject.replace("/", " "); - filteredSubject = filteredSubject.replace("\\", " "); - filteredSubject = filteredSubject.replace(" ", " "); - mailAlreadyRead = false; - /* Check if the mail has already be read */ - for (int j = 0; j < stateRun.getLastMessages().size(); j++) - { - if (filteredSubject.equals(stateRun.getLastMessages().get(j))) - { - mailAlreadyRead = true; - break; - } - } - /* If the mail is not already read */ - if (!mailAlreadyRead) - { - notifyNoNewMail = false; - /* Read max 5 mails */ - mailCounter++; - if (mailCounter <= 5) - { - throwMessage(this.pickSentence(mailSenderSentences), sender); - throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject); - } - /* Referencing the current mail */ - stateRun.getLastMessages().add(filteredSubject); - } - } - catch (Exception e) - { - /* Prevent unhandled errors */ - ; - } - } - if(notifyNoNewMail) - { - throwMessage(this.pickSentence(noNewMailSentences)); - } - } - /* No new message */ - else - { - throwMessage(this.pickSentence(noNewMailSentences)); - } - /* Save the current referenced mails */ - writeState(stateRun, sessionId + "RUN"); - } - - /** - * This function return a sentences from a defined list - */ - private String pickSentence(String[] list) { - Random rand = new Random(); - return list[rand.nextInt(list.length)]; - } - - /** - * - * @return - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - private Message[] connectToMailBox() throws MessagingException, IOException, ClassNotFoundException - { - String user; - String host; - String password; - Session session; - Properties props; - int port; - String protocol; - Store store; - Folder folder; - Message messages[]; - - /* Get user data */ - user = configuration().getUser(); - password = configuration().getPassword(); - host = "pop.gmail.com"; - /* Set ssl socket */ - Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); - /* Set text decoder */ - System.setProperty("mail.mime.decodetext.strict", "false"); - /* Configure seesion */ - props = new Properties(); - session = Session.getDefaultInstance(props, null); - /* Find server port */ - port = 995; - /* Get mail protocol */ - protocol = "pop3s"; - /* Create mail store */ - store = session.getStore(protocol); - /* Connect to the mailbox */ - try - { - store.connect(host, port, user, password); - } - /* Authentification exception (login / password / protocol / etc) */ - catch (javax.mail.AuthenticationFailedException e) - { - if (!getCommand().equals("check")) - { - if (e.toString().contains("[SYS/PERM]")) - { - BareBonesBrowserLaunch.openURL("http://mail.google.com/mail/?#settings/fwdandpop"); - throwMessage("You must activate the pop3 service in your Mail account"); - } - else - { - throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); - } - } - return null; - } - /* Connection failed exception (timeout / network unreachable) */ - catch (javax.mail.MessagingException e) - { - if (!getCommand().equals("check")) - { - throwMessage("Sorry, I could not connect to the mail server. Please check your internet connection or try again later."); - } - return null; - } - /* Connect and open inbox folder */ - folder = store.getFolder("INBOX"); - folder.open(Folder.READ_ONLY); - /* Get messages */ - messages = folder.getMessages(); - return messages; - } - - @Override - protected void onPluginEvent(String arg0, String[] arg1) throws Throwable - { - // TODO Auto-generated method stub - ; - } - - @Override - protected void onPluginStop() throws Throwable - { - // TODO Auto-generated method stub - ; - } -} +/* This file is part of "TuxDroid Gadget Mail". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an + * email) + * Site : http://www.kysoh.com/ + * + * "TuxDroid Gadget Mail" 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.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Mail" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Mail"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package net.karmaLab.tuxDroid.plugins; + +import java.io.IOException; +import java.security.Security; +import java.util.Properties; +import java.util.Vector; +import java.util.Random; + +import javax.mail.Folder; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.Session; +import javax.mail.Store; +import javax.mail.Flags.Flag; +import javax.mail.internet.InternetAddress; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; + +/** + * @author User + */ +public class MailPlugin extends SimplePlugin<Configuration> +{ + String[] newMailSentences = { + "You have a new message.", + "A new message has arrived !", + "It appears you have received a new email.", + "A new message ? I wonder who could be thinking about you.", + "It would appear you have received new messages." + }; + + String[] mailSenderSentences = { + "Mail sent by {0}", + "The message was sent by {0}", + "The sender of the message is {0}" + }; + + String[] mailSubjectSentences = { + "The message subject is : {0}", + "The subject of the message is : {0}" + }; + + String[] noNewMailSentences = { + "No new mail.", + "I'm sorry, nobody sent you any messages.", + "No messages. Nobody seems to be thinking about you.", + "Your mailbox is empty." + }; + + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception + { + new MailPlugin().boot(args, new Configuration()); + } + + /** + * + */ + @Override + public void start() + { + try + { + if (getCommand().equals("run")) + { + run(); + } + else if (getCommand().equals("check")) + { + check(); + } + else + { + run(); + } + } + catch (Exception e) {} + } + + + /** + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void check() throws MessagingException, IOException, ClassNotFoundException, Exception + { + Message messages[] = connectToMailBox(); + + if (messages == null) + { + throwResult(false); + return; + } + String sessionId = "pop.gmail.com_" + configuration().getUser(); + State stateAlert = readState(State.class, sessionId + "ALERT"); + /* Is first check ? */ + boolean firstCheck; + if (stateAlert.getLastMessages().size() == 0) + { + firstCheck = true; + stateAlert.getLastMessages().add("FIRST_CHECK_HACK"); + } + else + { + firstCheck = false; + } + /* Check if you have a new message */ + boolean newMessageAlert = false; + for (int i = messages.length - 1; i >= 0; i--) + { + if (!messages[i].getFlags().contains(Flag.SEEN)) + { + String subject = messages[i].getSubject(); + if (subject != null) + { + if (!stateAlert.getLastMessages().contains(subject)) + { + newMessageAlert = true; + stateAlert.getLastMessages().add(subject); + } + } + } + } + if((newMessageAlert) && (!firstCheck)) + { + throwResult(true); + throwMessage(this.pickSentence(newMailSentences)); + } + else + { + throwResult(false); + } + /* Save the current referenced mails */ + writeState(stateAlert, sessionId + "ALERT"); + } + + /** + * + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void run() throws MessagingException, IOException, ClassNotFoundException + { + Message messages[] = connectToMailBox(); + if (messages == null) + { + return; + } + String sessionId = "pop.gmail.com_" + configuration().getUser(); + State stateRun = readState(State.class, sessionId + "RUN"); + /* Check for new message */ + boolean newMessageRun = false; + for (int i = messages.length - 1; i >= 0; i--) + { + if (!messages[i].getFlags().contains(Flag.SEEN)) + { + if (!stateRun.getLastMessages().contains(messages[i].getSubject())) + { + newMessageRun = true; + break; + } + } + } + /* If new message found */ + if (newMessageRun) + { + int mailCounter = 0; + boolean notifyNoNewMail = true; + /* For all unread mails */ + for (int i = messages.length - 1; i >= 0; i--) + { + String subject; + String filteredSubject; + String sender; + String senderPersonal; + String senderAddress; + boolean seen; + boolean mailAlreadyRead; + + try + { + /* Get current mail data */ + subject = messages[i].getSubject(); + senderPersonal = ((InternetAddress) messages[i].getFrom()[0]).getPersonal(); + senderAddress = ((InternetAddress)messages[i].getFrom()[0]).getAddress(); + seen = messages[i].getFlags().contains(Flag.SEEN); + /* Pass if mail is already seen */ + if (seen) + { + continue; + } + /* Pass if subject is empty */ + if (subject == null) + { + continue; + } + /* Filtering the mail address */ + if (senderPersonal == null) + { + sender = senderAddress; + } + else + { + sender = senderPersonal; + } + if (sender.contains("<")) + { + sender = sender.substring(0, sender.indexOf("<")); + } + /* Filtering the mail subject */ + filteredSubject = subject.replace("*", " "); + filteredSubject = filteredSubject.replace("_", " "); + filteredSubject = filteredSubject.replace("{", " "); + filteredSubject = filteredSubject.replace("}", " "); + filteredSubject = filteredSubject.replace("[", " "); + filteredSubject = filteredSubject.replace("]", " "); + filteredSubject = filteredSubject.replace("/", " "); + filteredSubject = filteredSubject.replace("\\", " "); + filteredSubject = filteredSubject.replace(" ", " "); + mailAlreadyRead = false; + /* Check if the mail has already be read */ + for (int j = 0; j < stateRun.getLastMessages().size(); j++) + { + if (filteredSubject.equals(stateRun.getLastMessages().get(j))) + { + mailAlreadyRead = true; + break; + } + } + /* If the mail is not already read */ + if (!mailAlreadyRead) + { + notifyNoNewMail = false; + /* Read max 5 mails */ + mailCounter++; + if (mailCounter <= 5) + { + throwMessage(this.pickSentence(mailSenderSentences), sender); + throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject); + } + /* Referencing the current mail */ + stateRun.getLastMessages().add(filteredSubject); + } + } + catch (Exception e) + { + /* Prevent unhandled errors */ + ; + } + } + if(notifyNoNewMail) + { + throwMessage(this.pickSentence(noNewMailSentences)); + } + } + /* No new message */ + else + { + throwMessage(this.pickSentence(noNewMailSentences)); + } + /* Save the current referenced mails */ + writeState(stateRun, sessionId + "RUN"); + } + + /** + * This function return a sentences from a defined list + */ + private String pickSentence(String[] list) { + Random rand = new Random(); + return list[rand.nextInt(list.length)]; + } + + /** + * + * @return + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + private Message[] connectToMailBox() throws MessagingException, IOException, ClassNotFoundException + { + String user; + String host; + String password; + Session session; + Properties props; + int port; + String protocol; + Store store; + Folder folder; + Message messages[]; + + /* Get user data */ + user = configuration().getUser(); + password = configuration().getPassword(); + host = "pop.gmail.com"; + /* Set ssl socket */ + Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); + /* Set text decoder */ + System.setProperty("mail.mime.decodetext.strict", "false"); + /* Configure seesion */ + props = new Properties(); + session = Session.getDefaultInstance(props, null); + /* Find server port */ + port = 995; + /* Get mail protocol */ + protocol = "pop3s"; + /* Create mail store */ + store = session.getStore(protocol); + /* Connect to the mailbox */ + try + { + store.connect(host, port, user, password); + } + /* Authentification exception (login / password / protocol / etc) */ + catch (javax.mail.AuthenticationFailedException e) + { + if (!getCommand().equals("check")) + { + if (e.toString().contains("[SYS/PERM]")) + { + BareBonesBrowserLaunch.openURL("http://mail.google.com/mail/?#settings/fwdandpop"); + throwMessage("You must activate the pop3 service in your Mail account"); + } + else + { + throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); + } + } + return null; + } + /* Connection failed exception (timeout / network unreachable) */ + catch (javax.mail.MessagingException e) + { + if (!getCommand().equals("check")) + { + throwMessage("Sorry, I could not connect to the mail server. Please check your internet connection or try again later."); + } + return null; + } + /* Connect and open inbox folder */ + folder = store.getFolder("INBOX"); + folder.open(Folder.READ_ONLY); + /* Get messages */ + messages = folder.getMessages(); + return messages; + } + + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + // TODO Auto-generated method stub + ; + } + + @Override + protected void onPluginStop() throws Throwable + { + // TODO Auto-generated method stub + ; + } +} |
|
From: ks156 <c2m...@c2...> - 2009-10-15 06:42:39
|
Author: ks156
Date: 2009-10-15 08:42:25 +0200 (Thu, 15 Oct 2009)
New Revision: 5667
Modified:
software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
Log:
* Added lists with differents sentences and updated the gadget to retrieve them
randomly
Modified: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-15 06:41:41 UTC (rev 5666)
+++ software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/plugin-gmail/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-15 06:42:25 UTC (rev 5667)
@@ -26,6 +26,7 @@
import java.security.Security;
import java.util.Properties;
import java.util.Vector;
+import java.util.Random;
import javax.mail.Folder;
import javax.mail.Message;
@@ -42,6 +43,32 @@
*/
public class MailPlugin extends SimplePlugin<Configuration>
{
+ String[] newMailSentences = {
+ "You have a new message.",
+ "A new message has arrived !",
+ "It appears you have received a new email.",
+ "A new message ? I wonder who could be thinking about you.",
+ "It would appear you have received new messages."
+ };
+
+ String[] mailSenderSentences = {
+ "Mail sent by {0}",
+ "The message was sent by {0}",
+ "The sender of the message is {0}"
+ };
+
+ String[] mailSubjectSentences = {
+ "The message subject is : {0}",
+ "The subject of the message is : {0}"
+ };
+
+ String[] noNewMailSentences = {
+ "No new mail.",
+ "I'm sorry, nobody sent you any messages.",
+ "No messages. Nobody seems to be thinking about you.",
+ "Your mailbox is empty."
+ };
+
/**
* @param args
* @throws Exception
@@ -123,7 +150,7 @@
if((newMessageAlert) && (!firstCheck))
{
throwResult(true);
- throwMessage("You have a new message.");
+ throwMessage(this.pickSentence(newMailSentences));
}
else
{
@@ -235,8 +262,8 @@
mailCounter++;
if (mailCounter <= 5)
{
- throwMessage("Mail sent by {0}", sender);
- throwMessage("The message subject is : {0}", filteredSubject);
+ throwMessage(this.pickSentence(mailSenderSentences), sender);
+ throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject);
}
/* Referencing the current mail */
stateRun.getLastMessages().add(filteredSubject);
@@ -250,18 +277,26 @@
}
if(notifyNoNewMail)
{
- throwMessage("No new mail.");
+ throwMessage(this.pickSentence(noNewMailSentences));
}
}
/* No new message */
else
{
- throwMessage("No new mail.");
+ throwMessage(this.pickSentence(noNewMailSentences));
}
/* Save the current referenced mails */
writeState(stateRun, sessionId + "RUN");
}
+ /**
+ * This function return a sentences from a defined list
+ */
+ private String pickSentence(String[] list) {
+ Random rand = new Random();
+ return list[rand.nextInt(list.length)];
+ }
+
/**
*
* @return
@@ -351,4 +386,4 @@
// TODO Auto-generated method stub
;
}
-}
\ No newline at end of file
+}
|
|
From: ks156 <c2m...@c2...> - 2009-10-15 06:41:57
|
Author: ks156 Date: 2009-10-15 08:41:41 +0200 (Thu, 15 Oct 2009) New Revision: 5666 Added: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences/ Log: * Added a new branch for the random sentences. The purpose it to add variations in the way of giving the information. Copied: software_suite_v3/software/plugin/plugin-gmail/branches/random_sentences (from rev 5665, software_suite_v3/software/plugin/plugin-gmail/trunk) |
|
From: ks156 <c2m...@c2...> - 2009-10-14 14:22:50
|
Author: ks156
Date: 2009-10-14 16:22:38 +0200 (Wed, 14 Oct 2009)
New Revision: 5665
Modified:
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po
Log:
* Added pronunciation fixes for "location" and "celsius" (EN only)
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po 2009-10-14 14:10:52 UTC (rev 5664)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po 2009-10-14 14:22:38 UTC (rev 5665)
@@ -24,46 +24,46 @@
msgstr "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
-msgstr "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr "In {0}, the weather is {1} with a temperature of {2} degrees {3}; The humidity level is {4} per cent."
msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
-msgstr "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3};"
msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
-msgstr "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr "With a temperature of {2} degrees {3}; the weather in {0} is {1}, and the humidity level is {4} per cent."
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
-msgstr "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr "In {0}, the weather is unknown with a temperature of {1} degrees {2}; The humidity level is {3} per cent."
msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
-msgstr "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2};"
msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
-msgstr "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr "With a temperature of {1} degrees {2}; the weather in {0} is unknown, and the humidity level is {3} per cent."
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
-msgstr "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
+msgstr "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees;"
msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
-msgstr "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees;"
msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
-msgstr "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr "With temperatures between {1} and {2} degrees; tomorrow's forecast is expected to be {0}."
msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
-msgstr "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees;"
msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
-msgstr "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees;"
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr "http://www.google.com/ig/api?hl=en&weather=%s"
msgid "Location could not be found. Please check the city name or enter another close by location."
-msgstr "Location could not be found. Please check the city name or enter another close by location."
+msgstr "Location could not be found. Please check the city name or enter another close by location;"
msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
msgstr "Impossible to find the specified city name. Are you sure this city really exists ?"
@@ -72,7 +72,7 @@
msgstr "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
-msgstr "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr "I'm sorry, but I cannot give you the weather for the specified location; Please try another close by city name."
msgid "Start every x from full hour"
msgstr "Regular report"
|
|
From: ks156 <c2m...@c2...> - 2009-10-14 14:11:05
|
Author: ks156 Date: 2009-10-14 16:10:52 +0200 (Wed, 14 Oct 2009) New Revision: 5664 Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po Log: * Fixed the french translation of mail -> email Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po 2009-10-14 13:53:57 UTC (rev 5663) +++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po 2009-10-14 14:10:52 UTC (rev 5664) @@ -81,7 +81,7 @@ msgstr "Pas de messages. Personne ne semble avoir pensé à vous." msgid "Your mailbox is empty." -msgstr "Votre boîte mail est vide." +msgstr "Votre boîte email est vide." msgid "your_user" msgstr "votre_identifiant" |
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:54:18
|
Author: ks156
Date: 2009-10-14 15:53:57 +0200 (Wed, 14 Oct 2009)
New Revision: 5663
Modified:
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/de.po
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/en.po
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/nl.po
Log:
* Previous commit (5662) - log :
* Updated the template file. Many string were missing, and the .po were not
synchronized with the template anymore ...
* Added the new strings :
* en.po and fr.po are up-to-date and fully translated
* The new string in de.po and nl.po still have to be translated.
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/de.po
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/de.po 2009-10-14 13:44:05 UTC (rev 5662)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/de.po 2009-10-14 13:53:57 UTC (rev 5663)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Sie haben eine neue Email."
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Mail gesendet von {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "Betreff der Email ist: {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "Keine neue Mail."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "Ihr Benutzer"
@@ -91,4 +121,3 @@
msgid "Start me every x (From full hour)"
msgstr "Prüfen Sie meine Mailbox häufig"
-
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/en.po
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/en.po 2009-10-14 13:44:05 UTC (rev 5662)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/en.po 2009-10-14 13:53:57 UTC (rev 5663)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "You have a new message."
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Mail sent by {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "The message subject is : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "No new mail."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "your_user"
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po 2009-10-14 13:44:05 UTC (rev 5662)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/fr.po 2009-10-14 13:53:57 UTC (rev 5663)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Vous avez un nouveau message"
+msgid "A new message has arrived !"
+msgstr "Un nouveau message est arrivé !"
+
+msgid "It appears you have received a new email."
+msgstr "Il semble que vous ayez reçu un message."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "Un nouveau message ? Je me demande qui peut bien penser à vous."
+
+msgid "It would appear you have received new messages."
+msgstr "Il semble que des messages soient arrivés"
+
msgid "Mail sent by {0}"
msgstr "Message envoyé par {0}"
+msgid "The message was sent by {0}"
+msgstr "Le message vous a été envoyé par {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "L'expéditeur du message est {0}"
+
msgid "The message subject is : {0}"
msgstr "Le sujet du message est : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "Le message a comme sujet : {0}"
+
msgid "No new mail."
msgstr "Aucun nouveau message"
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "Désolé, personne ne vous a envoyé de message ..."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "Pas de messages. Personne ne semble avoir pensé à vous."
+
+msgid "Your mailbox is empty."
+msgstr "Votre boîte mail est vide."
+
msgid "your_user"
msgstr "votre_identifiant"
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/nl.po
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/nl.po 2009-10-14 13:44:05 UTC (rev 5662)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/nl.po 2009-10-14 13:53:57 UTC (rev 5663)
@@ -44,15 +44,45 @@
msgid "You have a new message."
msgstr "Je hebt een nieuw bericht."
+msgid "A new message has arrived !"
+msgstr "A new message has arrived !"
+
+msgid "It appears you have received a new email."
+msgstr "It appears you have received a new email."
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr "A new message ? I wonder who could be thinking about you."
+
+msgid "It would appear you have received new messages."
+msgstr "It would appear you have received new messages."
+
msgid "Mail sent by {0}"
msgstr "Dit bericht werd verzonden door {0}"
+msgid "The message was sent by {0}"
+msgstr "The message was sent by {0}"
+
+msgid "The sender of the message is {0}"
+msgstr "The sender of the message is {0}"
+
msgid "The message subject is : {0}"
msgstr "Het onderwerp is : {0}"
+msgid "The subject of the message is : {0}"
+msgstr "The subject of the message is : {0}"
+
msgid "No new mail."
msgstr "Geen nieuwe mails."
+msgid "I'm sorry, nobody sent you any messages."
+msgstr "I'm sorry, nobody sent you any messages."
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr "No messages. Nobody seems to be thinking about you."
+
+msgid "Your mailbox is empty."
+msgstr "Your mailbox is empty."
+
msgid "your_user"
msgstr "jouw_login"
|
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:53:07
|
Author: ks156 Date: 2009-10-14 15:30:33 +0200 (Wed, 14 Oct 2009) New Revision: 5661 Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java Log: * Changed the file format to Unix. Bouh ! Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java =================================================================== --- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:29:19 UTC (rev 5660) +++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:30:33 UTC (rev 5661) @@ -1,485 +1,485 @@ -/* This file is part of "TuxDroid Gadget Mail". - * Copyright 2008, kysoh - * Author : Yoran Brault - * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an - * email) - * Site : http://www.kysoh.com/ - * - * "TuxDroid Gadget Mail" 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.1 of - * the License, or (at your option) any later version. - * - * "TuxDroid Gadget Mail" is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with "TuxDroid Gadget Mail"; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ - -package net.karmaLab.tuxDroid.plugins; - -import java.io.IOException; -import java.security.Security; -import java.util.Properties; -import java.util.Vector; -import java.util.Random; - -import javax.mail.Folder; -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.Store; -import javax.mail.Flags.Flag; -import javax.mail.internet.InternetAddress; - -import java.net.Socket; -import java.net.UnknownHostException; -import java.net.InetSocketAddress; - -import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; - -/** - * @author User - */ -public class MailPlugin extends SimplePlugin<Configuration> -{ - - String[] newMailSentences = { - "You have a new message.", - "A new message has arrived !", - "It appears you have received a new email.", - "A new message ? I wonder who could be thinking about you.", - "It would appear you have received new messages." - }; - - String[] mailSenderSentences = { - "Mail sent by {0}", - "The message was sent by {0}", - "The sender of the message is {0}" - }; - - String[] mailSubjectSentences = { - "The message subject is : {0}", - "The subject of the message is : {0}" - }; - - String[] noNewMailSentences = { - "No new mail.", - "I'm sorry, nobody sent you any messages.", - "No messages. Nobody seems to be thinking about you.", - "Your mailbox is empty." - }; - - /** - * @param args - * @throws Exception - */ - public static void main(String[] args) throws Exception - { - new MailPlugin().boot(args, new Configuration()); - } - - /** - * - */ - @Override - public void start() throws Exception - { - if (getCommand().equals("run")) - { - run(); - } - else if (getCommand().equals("check")) - { - check(); - } - else - { - run(); - } - } - - - /** - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void check() throws MessagingException, IOException, ClassNotFoundException, Exception - { - Message messages[] = connectToMailBox(); - - if (messages == null) - { - throwResult(false); - return; - } - String sessionId = configuration().getHost() + "_" + configuration().getUser(); - State stateAlert = readState(State.class, sessionId + "ALERT"); - /* Is first check ? */ - boolean firstCheck; - if (stateAlert.getLastMessages().size() == 0) - { - firstCheck = true; - stateAlert.getLastMessages().add("FIRST_CHECK_HACK"); - } - else - { - firstCheck = false; - } - /* Check if you have a new message */ - boolean newMessageAlert = false; - for (int i = messages.length - 1; i >= 0; i--) - { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { - String subject = messages[i].getSubject(); - if (subject != null) - { - if (!stateAlert.getLastMessages().contains(subject)) - { - newMessageAlert = true; - stateAlert.getLastMessages().add(subject); - } - } - } - } - if((newMessageAlert) && (!firstCheck)) - { - throwResult(true); - throwMessage(this.pickSentence(newMailSentences)); - } - else - { - throwResult(false); - } - /* Save the current referenced mails */ - writeState(stateAlert, sessionId + "ALERT"); - } - - /** - * - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void run() throws MessagingException, IOException, ClassNotFoundException - { - Message messages[] = connectToMailBox(); - if (messages == null) - { - return; - } - String sessionId = configuration().getHost() + "_" + configuration().getUser(); - State stateRun = readState(State.class, sessionId + "RUN"); - /* Check for new message */ - boolean newMessageRun = false; - for (int i = messages.length - 1; i >= 0; i--) - { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { - if (!stateRun.getLastMessages().contains(messages[i].getSubject())) - { - newMessageRun = true; - break; - } - } - } - /* If new message found */ - if (newMessageRun) - { - int mailCounter = 0; - boolean notifyNoNewMail = true; - /* For all unread mails */ - for (int i = messages.length - 1; i >= 0; i--) - { - String subject; - String filteredSubject; - String sender; - String senderPersonal; - String senderAddress; - boolean seen; - boolean mailAlreadyRead; - - try - { - /* Get current mail data */ - subject = messages[i].getSubject(); - senderPersonal = ((InternetAddress) messages[i].getFrom()[0]).getPersonal(); - senderAddress = ((InternetAddress)messages[i].getFrom()[0]).getAddress(); - seen = messages[i].getFlags().contains(Flag.SEEN); - /* Pass if mail is already seen */ - if (seen) - { - continue; - } - /* Pass if subject is empty */ - if (subject == null) - { - continue; - } - /* Filtering the mail address */ - if (senderPersonal == null) - { - sender = senderAddress; - } - else - { - sender = senderPersonal; - } - if (sender.contains("<")) - { - sender = sender.substring(0, sender.indexOf("<")); - } - /* Filtering the mail subject */ - filteredSubject = subject.replace("*", " "); - filteredSubject = filteredSubject.replace("_", " "); - filteredSubject = filteredSubject.replace("{", " "); - filteredSubject = filteredSubject.replace("}", " "); - filteredSubject = filteredSubject.replace("[", " "); - filteredSubject = filteredSubject.replace("]", " "); - filteredSubject = filteredSubject.replace("/", " "); - filteredSubject = filteredSubject.replace("\\", " "); - filteredSubject = filteredSubject.replace(" ", " "); - mailAlreadyRead = false; - /* Check if the mail has already be read */ - for (int j = 0; j < stateRun.getLastMessages().size(); j++) - { - if (filteredSubject.equals(stateRun.getLastMessages().get(j))) - { - mailAlreadyRead = true; - break; - } - } - /* If the mail is not already read */ - if (!mailAlreadyRead) - { - notifyNoNewMail = false; - /* Read max 5 mails */ - mailCounter++; - if (mailCounter <= 5) - { - throwMessage(this.pickSentence(mailSenderSentences), sender); - throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject); - } - /* Referencing the current mail */ - stateRun.getLastMessages().add(filteredSubject); - } - } - catch (Exception e) - { - /* Prevent unhandled errors */ - ; - } - } - if(notifyNoNewMail) - { - throwMessage(this.pickSentence(noNewMailSentences)); - } - } - /* No new message */ - else - { - throwMessage(this.pickSentence(noNewMailSentences)); - } - /* Save the current referenced mails */ - writeState(stateRun, sessionId + "RUN"); - } - - /** - * This function return a sentences from a defined list - */ - private String pickSentence(String[] list) { - Random rand = new Random(); - return list[rand.nextInt(list.length)]; - } - - /** - * Check if the mail server is responding to the x port. - * @param host Server host - * @param port Server port - * @return true or false - */ - private boolean checkMailServer(String host, Integer port) - { - Socket socket = new Socket(); - try - { - socket.connect(new InetSocketAddress(host, port), 1000); - } - catch (UnknownHostException e) - { - socket = null; - return false; - } - catch (IOException e) - { - socket = null; - return false; - } - socket = null; - return true; - } - - /** - * Find the server mail port. - * @param host Server host - * @return Server port or -1. - */ - private int findMailServerPort(String host) - { - int port1; - int port2; - int port3; - int port4; - - if ((host.startsWith("pop")) || (host.startsWith("POP"))) - { - port1 = 110; - port2 = 995; - port3 = 143; - port4 = 993; - } - else - { - port1 = 143; - port2 = 993; - port3 = 110; - port4 = 995; - } - if (checkMailServer(host, port1)) - { - return port1; - } - else if (checkMailServer(host, port2)) - { - return port2; - } - else if (checkMailServer(host, port3)) - { - return port3; - } - else if (checkMailServer(host, port4)) - { - return port4; - } - else - { - return -1; - } - } - - /** - * Get the mail server protocol from a port. - * @param port Mail server port. - * @return The mail server protocol. - */ - private String portToProtocol(int port) - { - switch (port) - { - case 110: - return "pop3"; - case 995: - return "pop3s"; - case 143: - return "imap"; - case 993: - return "imaps"; - default: - return "pop3"; - } - } - - /** - * - * @return - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - private Message[] connectToMailBox() throws MessagingException, IOException, ClassNotFoundException - { - String user; - String host; - String password; - Session session; - Properties props; - int port; - String protocol; - Store store; - Folder folder; - Message messages[]; - - /* Get user data */ - user = configuration().getUser(); - password = configuration().getPassword(); - host = configuration().getHost(); - /* Set ssl socket */ - Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); - /* Set text decoder */ - System.setProperty("mail.mime.decodetext.strict", "false"); - /* Configure seesion */ - props = new Properties(); - session = Session.getDefaultInstance(props, null); - /* Find server port */ - port = findMailServerPort(host); - if (port == -1) - { - throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); - return null; - } - /* Get mail protocol */ - protocol = portToProtocol(port); - /* Create mail store */ - store = session.getStore(protocol); - /* Connect to the mailbox */ - try - { - store.connect(host, port, user, password); - } - /* Authentification exception (login / password / protocol / etc) */ - catch (javax.mail.AuthenticationFailedException e) - { - if (!getCommand().equals("check")) - { - throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); - } - return null; - } - /* Connection failed exception (timeout / network unreachable) */ - catch (javax.mail.MessagingException e) - { - if (!getCommand().equals("check")) - { - throwMessage("Sorry, I could not connect to the mail server. Please check your internet connection or try again later."); - } - return null; - } - /* Connect and open inbox folder */ - folder = store.getFolder("INBOX"); - folder.open(Folder.READ_ONLY); - /* Get messages */ - messages = folder.getMessages(); - return messages; - } - - @Override - protected void onPluginEvent(String arg0, String[] arg1) throws Throwable - { - // TODO Auto-generated method stub - ; - } - - @Override - protected void onPluginStop() throws Throwable - { - // TODO Auto-generated method stub - ; - } -} +/* This file is part of "TuxDroid Gadget Mail". + * Copyright 2008, kysoh + * Author : Yoran Brault + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an + * email) + * Site : http://www.kysoh.com/ + * + * "TuxDroid Gadget Mail" 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.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid Gadget Mail" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid Gadget Mail"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package net.karmaLab.tuxDroid.plugins; + +import java.io.IOException; +import java.security.Security; +import java.util.Properties; +import java.util.Vector; +import java.util.Random; + +import javax.mail.Folder; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.Session; +import javax.mail.Store; +import javax.mail.Flags.Flag; +import javax.mail.internet.InternetAddress; + +import java.net.Socket; +import java.net.UnknownHostException; +import java.net.InetSocketAddress; + +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; + +/** + * @author User + */ +public class MailPlugin extends SimplePlugin<Configuration> +{ + + String[] newMailSentences = { + "You have a new message.", + "A new message has arrived !", + "It appears you have received a new email.", + "A new message ? I wonder who could be thinking about you.", + "It would appear you have received new messages." + }; + + String[] mailSenderSentences = { + "Mail sent by {0}", + "The message was sent by {0}", + "The sender of the message is {0}" + }; + + String[] mailSubjectSentences = { + "The message subject is : {0}", + "The subject of the message is : {0}" + }; + + String[] noNewMailSentences = { + "No new mail.", + "I'm sorry, nobody sent you any messages.", + "No messages. Nobody seems to be thinking about you.", + "Your mailbox is empty." + }; + + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception + { + new MailPlugin().boot(args, new Configuration()); + } + + /** + * + */ + @Override + public void start() throws Exception + { + if (getCommand().equals("run")) + { + run(); + } + else if (getCommand().equals("check")) + { + check(); + } + else + { + run(); + } + } + + + /** + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void check() throws MessagingException, IOException, ClassNotFoundException, Exception + { + Message messages[] = connectToMailBox(); + + if (messages == null) + { + throwResult(false); + return; + } + String sessionId = configuration().getHost() + "_" + configuration().getUser(); + State stateAlert = readState(State.class, sessionId + "ALERT"); + /* Is first check ? */ + boolean firstCheck; + if (stateAlert.getLastMessages().size() == 0) + { + firstCheck = true; + stateAlert.getLastMessages().add("FIRST_CHECK_HACK"); + } + else + { + firstCheck = false; + } + /* Check if you have a new message */ + boolean newMessageAlert = false; + for (int i = messages.length - 1; i >= 0; i--) + { + if (!messages[i].getFlags().contains(Flag.SEEN)) + { + String subject = messages[i].getSubject(); + if (subject != null) + { + if (!stateAlert.getLastMessages().contains(subject)) + { + newMessageAlert = true; + stateAlert.getLastMessages().add(subject); + } + } + } + } + if((newMessageAlert) && (!firstCheck)) + { + throwResult(true); + throwMessage(this.pickSentence(newMailSentences)); + } + else + { + throwResult(false); + } + /* Save the current referenced mails */ + writeState(stateAlert, sessionId + "ALERT"); + } + + /** + * + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void run() throws MessagingException, IOException, ClassNotFoundException + { + Message messages[] = connectToMailBox(); + if (messages == null) + { + return; + } + String sessionId = configuration().getHost() + "_" + configuration().getUser(); + State stateRun = readState(State.class, sessionId + "RUN"); + /* Check for new message */ + boolean newMessageRun = false; + for (int i = messages.length - 1; i >= 0; i--) + { + if (!messages[i].getFlags().contains(Flag.SEEN)) + { + if (!stateRun.getLastMessages().contains(messages[i].getSubject())) + { + newMessageRun = true; + break; + } + } + } + /* If new message found */ + if (newMessageRun) + { + int mailCounter = 0; + boolean notifyNoNewMail = true; + /* For all unread mails */ + for (int i = messages.length - 1; i >= 0; i--) + { + String subject; + String filteredSubject; + String sender; + String senderPersonal; + String senderAddress; + boolean seen; + boolean mailAlreadyRead; + + try + { + /* Get current mail data */ + subject = messages[i].getSubject(); + senderPersonal = ((InternetAddress) messages[i].getFrom()[0]).getPersonal(); + senderAddress = ((InternetAddress)messages[i].getFrom()[0]).getAddress(); + seen = messages[i].getFlags().contains(Flag.SEEN); + /* Pass if mail is already seen */ + if (seen) + { + continue; + } + /* Pass if subject is empty */ + if (subject == null) + { + continue; + } + /* Filtering the mail address */ + if (senderPersonal == null) + { + sender = senderAddress; + } + else + { + sender = senderPersonal; + } + if (sender.contains("<")) + { + sender = sender.substring(0, sender.indexOf("<")); + } + /* Filtering the mail subject */ + filteredSubject = subject.replace("*", " "); + filteredSubject = filteredSubject.replace("_", " "); + filteredSubject = filteredSubject.replace("{", " "); + filteredSubject = filteredSubject.replace("}", " "); + filteredSubject = filteredSubject.replace("[", " "); + filteredSubject = filteredSubject.replace("]", " "); + filteredSubject = filteredSubject.replace("/", " "); + filteredSubject = filteredSubject.replace("\\", " "); + filteredSubject = filteredSubject.replace(" ", " "); + mailAlreadyRead = false; + /* Check if the mail has already be read */ + for (int j = 0; j < stateRun.getLastMessages().size(); j++) + { + if (filteredSubject.equals(stateRun.getLastMessages().get(j))) + { + mailAlreadyRead = true; + break; + } + } + /* If the mail is not already read */ + if (!mailAlreadyRead) + { + notifyNoNewMail = false; + /* Read max 5 mails */ + mailCounter++; + if (mailCounter <= 5) + { + throwMessage(this.pickSentence(mailSenderSentences), sender); + throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject); + } + /* Referencing the current mail */ + stateRun.getLastMessages().add(filteredSubject); + } + } + catch (Exception e) + { + /* Prevent unhandled errors */ + ; + } + } + if(notifyNoNewMail) + { + throwMessage(this.pickSentence(noNewMailSentences)); + } + } + /* No new message */ + else + { + throwMessage(this.pickSentence(noNewMailSentences)); + } + /* Save the current referenced mails */ + writeState(stateRun, sessionId + "RUN"); + } + + /** + * This function return a sentences from a defined list + */ + private String pickSentence(String[] list) { + Random rand = new Random(); + return list[rand.nextInt(list.length)]; + } + + /** + * Check if the mail server is responding to the x port. + * @param host Server host + * @param port Server port + * @return true or false + */ + private boolean checkMailServer(String host, Integer port) + { + Socket socket = new Socket(); + try + { + socket.connect(new InetSocketAddress(host, port), 1000); + } + catch (UnknownHostException e) + { + socket = null; + return false; + } + catch (IOException e) + { + socket = null; + return false; + } + socket = null; + return true; + } + + /** + * Find the server mail port. + * @param host Server host + * @return Server port or -1. + */ + private int findMailServerPort(String host) + { + int port1; + int port2; + int port3; + int port4; + + if ((host.startsWith("pop")) || (host.startsWith("POP"))) + { + port1 = 110; + port2 = 995; + port3 = 143; + port4 = 993; + } + else + { + port1 = 143; + port2 = 993; + port3 = 110; + port4 = 995; + } + if (checkMailServer(host, port1)) + { + return port1; + } + else if (checkMailServer(host, port2)) + { + return port2; + } + else if (checkMailServer(host, port3)) + { + return port3; + } + else if (checkMailServer(host, port4)) + { + return port4; + } + else + { + return -1; + } + } + + /** + * Get the mail server protocol from a port. + * @param port Mail server port. + * @return The mail server protocol. + */ + private String portToProtocol(int port) + { + switch (port) + { + case 110: + return "pop3"; + case 995: + return "pop3s"; + case 143: + return "imap"; + case 993: + return "imaps"; + default: + return "pop3"; + } + } + + /** + * + * @return + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + private Message[] connectToMailBox() throws MessagingException, IOException, ClassNotFoundException + { + String user; + String host; + String password; + Session session; + Properties props; + int port; + String protocol; + Store store; + Folder folder; + Message messages[]; + + /* Get user data */ + user = configuration().getUser(); + password = configuration().getPassword(); + host = configuration().getHost(); + /* Set ssl socket */ + Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); + /* Set text decoder */ + System.setProperty("mail.mime.decodetext.strict", "false"); + /* Configure seesion */ + props = new Properties(); + session = Session.getDefaultInstance(props, null); + /* Find server port */ + port = findMailServerPort(host); + if (port == -1) + { + throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); + return null; + } + /* Get mail protocol */ + protocol = portToProtocol(port); + /* Create mail store */ + store = session.getStore(protocol); + /* Connect to the mailbox */ + try + { + store.connect(host, port, user, password); + } + /* Authentification exception (login / password / protocol / etc) */ + catch (javax.mail.AuthenticationFailedException e) + { + if (!getCommand().equals("check")) + { + throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); + } + return null; + } + /* Connection failed exception (timeout / network unreachable) */ + catch (javax.mail.MessagingException e) + { + if (!getCommand().equals("check")) + { + throwMessage("Sorry, I could not connect to the mail server. Please check your internet connection or try again later."); + } + return null; + } + /* Connect and open inbox folder */ + folder = store.getFolder("INBOX"); + folder.open(Folder.READ_ONLY); + /* Get messages */ + messages = folder.getMessages(); + return messages; + } + + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + // TODO Auto-generated method stub + ; + } + + @Override + protected void onPluginStop() throws Throwable + { + // TODO Auto-generated method stub + ; + } +} |
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:44:20
|
Author: ks156
Date: 2009-10-14 15:44:05 +0200 (Wed, 14 Oct 2009)
New Revision: 5662
Modified:
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/plugin.pot
Log:
* Updated the
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/plugin.pot
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/plugin.pot 2009-10-14 13:30:33 UTC (rev 5661)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/resources/plugin.pot 2009-10-14 13:44:05 UTC (rev 5662)
@@ -1,4 +1,5 @@
-msgid "Mail Gadget"
+
+msgid "Mail Plugin"
msgstr ""
msgid "Username"
@@ -40,15 +41,45 @@
msgid "You have a new message."
msgstr ""
+msgid "A new message has arrived !"
+msgstr ""
+
+msgid "It appears you have received a new email."
+msgstr ""
+
+msgid "A new message ? I wonder who could be thinking about you."
+msgstr ""
+
+msgid "It would appear you have received new messages."
+msgstr ""
+
msgid "Mail sent by {0}"
msgstr ""
+msgid "The message was sent by {0}"
+msgstr ""
+
+msgid "The sender of the message is {0}"
+msgstr ""
+
msgid "The message subject is : {0}"
msgstr ""
+msgid "The subject of the message is : {0}"
+msgstr ""
+
msgid "No new mail."
msgstr ""
+msgid "I'm sorry, nobody sent you any messages."
+msgstr ""
+
+msgid "No messages. Nobody seems to be thinking about you."
+msgstr ""
+
+msgid "Your mailbox is empty."
+msgstr ""
+
msgid "your_user"
msgstr ""
@@ -75,3 +106,15 @@
msgid "Sorry, there was an error when connecting to the mail server. Please check your email configuration."
msgstr ""
+
+msgid "Start every x"
+msgstr ""
+
+msgid "Start me every x"
+msgstr ""
+
+msgid "Start every x from full hour"
+msgstr ""
+
+msgid "Start me every x (From full hour)"
+msgstr ""
|
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:29:31
|
Author: ks156
Date: 2009-10-14 15:29:19 +0200 (Wed, 14 Oct 2009)
New Revision: 5660
Modified:
software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
Log:
* Added lists with differents sentences and updated the gadget to retrieve them
randomly
Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:27:23 UTC (rev 5659)
+++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:29:19 UTC (rev 5660)
@@ -27,6 +27,7 @@
import java.security.Security;
import java.util.Properties;
import java.util.Vector;
+import java.util.Random;
import javax.mail.Folder;
import javax.mail.Message;
@@ -47,6 +48,33 @@
*/
public class MailPlugin extends SimplePlugin<Configuration>
{
+
+ String[] newMailSentences = {
+ "You have a new message.",
+ "A new message has arrived !",
+ "It appears you have received a new email.",
+ "A new message ? I wonder who could be thinking about you.",
+ "It would appear you have received new messages."
+ };
+
+ String[] mailSenderSentences = {
+ "Mail sent by {0}",
+ "The message was sent by {0}",
+ "The sender of the message is {0}"
+ };
+
+ String[] mailSubjectSentences = {
+ "The message subject is : {0}",
+ "The subject of the message is : {0}"
+ };
+
+ String[] noNewMailSentences = {
+ "No new mail.",
+ "I'm sorry, nobody sent you any messages.",
+ "No messages. Nobody seems to be thinking about you.",
+ "Your mailbox is empty."
+ };
+
/**
* @param args
* @throws Exception
@@ -124,7 +152,7 @@
if((newMessageAlert) && (!firstCheck))
{
throwResult(true);
- throwMessage("You have a new message.");
+ throwMessage(this.pickSentence(newMailSentences));
}
else
{
@@ -236,8 +264,8 @@
mailCounter++;
if (mailCounter <= 5)
{
- throwMessage("Mail sent by {0}", sender);
- throwMessage("The message subject is : {0}", filteredSubject);
+ throwMessage(this.pickSentence(mailSenderSentences), sender);
+ throwMessage(this.pickSentence(mailSubjectSentences), filteredSubject);
}
/* Referencing the current mail */
stateRun.getLastMessages().add(filteredSubject);
@@ -251,19 +279,27 @@
}
if(notifyNoNewMail)
{
- throwMessage("No new mail.");
+ throwMessage(this.pickSentence(noNewMailSentences));
}
}
/* No new message */
else
{
- throwMessage("No new mail.");
+ throwMessage(this.pickSentence(noNewMailSentences));
}
/* Save the current referenced mails */
writeState(stateRun, sessionId + "RUN");
}
/**
+ * This function return a sentences from a defined list
+ */
+ private String pickSentence(String[] list) {
+ Random rand = new Random();
+ return list[rand.nextInt(list.length)];
+ }
+
+ /**
* Check if the mail server is responding to the x port.
* @param host Server host
* @param port Server port
|
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:27:35
|
Author: ks156 Date: 2009-10-14 15:27:23 +0200 (Wed, 14 Oct 2009) New Revision: 5659 Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java Log: * Re-indented, remove trailing spaces, etc etc. Modified: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java =================================================================== --- software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:23:08 UTC (rev 5658) +++ software_suite_v3/software/plugin/plugin-email/branches/random_sentences/plugin-email/src/net/karmaLab/tuxDroid/plugins/MailPlugin.java 2009-10-14 13:27:23 UTC (rev 5659) @@ -1,7 +1,8 @@ /* This file is part of "TuxDroid Gadget Mail". * Copyright 2008, kysoh * Author : Yoran Brault - * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) + * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an + * email) * Site : http://www.kysoh.com/ * * "TuxDroid Gadget Mail" is free software; you can redistribute it and/or @@ -46,52 +47,52 @@ */ public class MailPlugin extends SimplePlugin<Configuration> { - /** - * @param args - * @throws Exception - */ - public static void main(String[] args) throws Exception + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { - new MailPlugin().boot(args, new Configuration()); - } + new MailPlugin().boot(args, new Configuration()); + } /** - * - */ - @Override - public void start() throws Exception + * + */ + @Override + public void start() throws Exception { - if (getCommand().equals("run")) + if (getCommand().equals("run")) { - run(); - } - else if (getCommand().equals("check")) + run(); + } + else if (getCommand().equals("check")) { - check(); - } + check(); + } else { run(); } - } + } /** - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void check() throws MessagingException, IOException, ClassNotFoundException, Exception + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void check() throws MessagingException, IOException, ClassNotFoundException, Exception { - Message messages[] = connectToMailBox(); + Message messages[] = connectToMailBox(); - if (messages == null) - { - throwResult(false); - return; - } + if (messages == null) + { + throwResult(false); + return; + } String sessionId = configuration().getHost() + "_" + configuration().getUser(); - State stateAlert = readState(State.class, sessionId + "ALERT"); + State stateAlert = readState(State.class, sessionId + "ALERT"); /* Is first check ? */ boolean firstCheck; if (stateAlert.getLastMessages().size() == 0) @@ -104,11 +105,11 @@ firstCheck = false; } /* Check if you have a new message */ - boolean newMessageAlert = false; - for (int i = messages.length - 1; i >= 0; i--) - { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { + boolean newMessageAlert = false; + for (int i = messages.length - 1; i >= 0; i--) + { + if (!messages[i].getFlags().contains(Flag.SEEN)) + { String subject = messages[i].getSubject(); if (subject != null) { @@ -118,8 +119,8 @@ stateAlert.getLastMessages().add(subject); } } - } - } + } + } if((newMessageAlert) && (!firstCheck)) { throwResult(true); @@ -129,46 +130,46 @@ { throwResult(false); } - /* Save the current referenced mails */ - writeState(stateAlert, sessionId + "ALERT"); - } + /* Save the current referenced mails */ + writeState(stateAlert, sessionId + "ALERT"); + } - /** - * - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ - public void run() throws MessagingException, IOException, ClassNotFoundException + /** + * + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ + public void run() throws MessagingException, IOException, ClassNotFoundException { - Message messages[] = connectToMailBox(); - if (messages == null) - { - return; - } + Message messages[] = connectToMailBox(); + if (messages == null) + { + return; + } String sessionId = configuration().getHost() + "_" + configuration().getUser(); - State stateRun = readState(State.class, sessionId + "RUN"); + State stateRun = readState(State.class, sessionId + "RUN"); /* Check for new message */ - boolean newMessageRun = false; + boolean newMessageRun = false; for (int i = messages.length - 1; i >= 0; i--) { - if (!messages[i].getFlags().contains(Flag.SEEN)) - { - if (!stateRun.getLastMessages().contains(messages[i].getSubject())) - { - newMessageRun = true; - break; - } - } - } - /* If new message found */ - if (newMessageRun) - { - int mailCounter = 0; + if (!messages[i].getFlags().contains(Flag.SEEN)) + { + if (!stateRun.getLastMessages().contains(messages[i].getSubject())) + { + newMessageRun = true; + break; + } + } + } + /* If new message found */ + if (newMessageRun) + { + int mailCounter = 0; boolean notifyNoNewMail = true; - /* For all unread mails */ - for (int i = messages.length - 1; i >= 0; i--) - { + /* For all unread mails */ + for (int i = messages.length - 1; i >= 0; i--) + { String subject; String filteredSubject; String sender; @@ -247,20 +248,20 @@ /* Prevent unhandled errors */ ; } - } - if(notifyNoNewMail) - { - throwMessage("No new mail."); - } - } - /* No new message */ - else - { - throwMessage("No new mail."); - } - /* Save the current referenced mails */ - writeState(stateRun, sessionId + "RUN"); - } + } + if(notifyNoNewMail) + { + throwMessage("No new mail."); + } + } + /* No new message */ + else + { + throwMessage("No new mail."); + } + /* Save the current referenced mails */ + writeState(stateRun, sessionId + "RUN"); + } /** * Check if the mail server is responding to the x port. @@ -272,19 +273,19 @@ { Socket socket = new Socket(); try - { + { socket.connect(new InetSocketAddress(host, port), 1000); - } - catch (UnknownHostException e) - { - socket = null; - return false; - } - catch (IOException e) - { - socket = null; - return false; - } + } + catch (UnknownHostException e) + { + socket = null; + return false; + } + catch (IOException e) + { + socket = null; + return false; + } socket = null; return true; } @@ -359,13 +360,13 @@ } } - /** - * - * @return - * @throws MessagingException - * @throws IOException - * @throws ClassNotFoundException - */ + /** + * + * @return + * @throws MessagingException + * @throws IOException + * @throws ClassNotFoundException + */ private Message[] connectToMailBox() throws MessagingException, IOException, ClassNotFoundException { String user; @@ -384,14 +385,14 @@ password = configuration().getPassword(); host = configuration().getHost(); /* Set ssl socket */ - Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); - /* Set text decoder */ - System.setProperty("mail.mime.decodetext.strict", "false"); + Security.setProperty("ssl.SocketFactory.provider", "net.karmaLab.tuxDroid.plugins.DummySSLSocketFactory"); + /* Set text decoder */ + System.setProperty("mail.mime.decodetext.strict", "false"); /* Configure seesion */ - props = new Properties(); - session = Session.getDefaultInstance(props, null); + props = new Properties(); + session = Session.getDefaultInstance(props, null); /* Find server port */ - port = findMailServerPort(host); + port = findMailServerPort(host); if (port == -1) { throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); @@ -404,20 +405,20 @@ /* Connect to the mailbox */ try { - store.connect(host, port, user, password); - } - /* Authentification exception (login / password / protocol / etc) */ - catch (javax.mail.AuthenticationFailedException e) - { + store.connect(host, port, user, password); + } + /* Authentification exception (login / password / protocol / etc) */ + catch (javax.mail.AuthenticationFailedException e) + { if (!getCommand().equals("check")) { throwMessage("Sorry, there was an error when connecting to the mail server. Please check your email configuration."); } return null; - } - /* Connection failed exception (timeout / network unreachable) */ - catch (javax.mail.MessagingException e) - { + } + /* Connection failed exception (timeout / network unreachable) */ + catch (javax.mail.MessagingException e) + { if (!getCommand().equals("check")) { throwMessage("Sorry, I could not connect to the mail server. Please check your internet connection or try again later."); @@ -426,23 +427,23 @@ } /* Connect and open inbox folder */ folder = store.getFolder("INBOX"); - folder.open(Folder.READ_ONLY); + folder.open(Folder.READ_ONLY); /* Get messages */ - messages = folder.getMessages(); + messages = folder.getMessages(); return messages; } - @Override - protected void onPluginEvent(String arg0, String[] arg1) throws Throwable - { - // TODO Auto-generated method stub - ; - } + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable + { + // TODO Auto-generated method stub + ; + } - @Override - protected void onPluginStop() throws Throwable - { - // TODO Auto-generated method stub - ; - } -} \ No newline at end of file + @Override + protected void onPluginStop() throws Throwable + { + // TODO Auto-generated method stub + ; + } +} |
|
From: ks156 <c2m...@c2...> - 2009-10-14 13:23:18
|
Author: ks156 Date: 2009-10-14 15:23:08 +0200 (Wed, 14 Oct 2009) New Revision: 5658 Added: software_suite_v3/software/plugin/plugin-email/branches/random_sentences/ Log: * Added a new branch for the random sentences. The purpose it to add variations in the way of giving the information. Copied: software_suite_v3/software/plugin/plugin-email/branches/random_sentences (from rev 5657, software_suite_v3/software/plugin/plugin-email/trunk) |
|
From: ks156 <c2m...@c2...> - 2009-10-14 12:46:27
|
Author: ks156
Date: 2009-10-14 14:18:07 +0200 (Wed, 14 Oct 2009)
New Revision: 5657
Modified:
software_suite_v3/software/plugin/plugin-clock/branches/random_sentences/resources/fr.po
Log:
* Changed a french sentence to avoid pronunciation problems
Modified: software_suite_v3/software/plugin/plugin-clock/branches/random_sentences/resources/fr.po
===================================================================
--- software_suite_v3/software/plugin/plugin-clock/branches/random_sentences/resources/fr.po 2009-10-14 12:05:43 UTC (rev 5656)
+++ software_suite_v3/software/plugin/plugin-clock/branches/random_sentences/resources/fr.po 2009-10-14 12:18:07 UTC (rev 5657)
@@ -14,7 +14,7 @@
msgstr "Au prochain top, il sera exactement {0} heures {1} ... TOP !"
msgid "It's {1} hours and {0} minutes ... oops, I mean {0} hours {1} minutes"
-msgstr "Il est {1} heures et {0} minutes ... oups, {0} heures et {1} minutes"
+msgstr "Il est {1} heures et {0} minutes. euh ... {0} heures et {1} minutes"
msgid "Current time is {0} o'clock"
msgstr "Il est {0} heures."
|
|
From: ks156 <c2m...@c2...> - 2009-10-14 12:05:56
|
Author: ks156
Date: 2009-10-14 14:05:43 +0200 (Wed, 14 Oct 2009)
New Revision: 5656
Modified:
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/de.po
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/fr.po
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/nl.po
software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/plugin.pot
Log:
* Updated plugin.pot with the new string
* Updated en.po and fr.po with the translations
* Updated de.po and nl.po with the new string. The translation still have to be
done
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/de.po
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/de.po 2009-10-14 11:36:01 UTC (rev 5655)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/de.po 2009-10-14 12:05:43 UTC (rev 5656)
@@ -23,15 +23,57 @@
msgid "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgstr "Das Wetter in {0} ist derzeit \"{1}\" mit einer Temperatur von {2} Grad {3}; die Luftfeuchtigkeit beträgt {4} Prozent."
+msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+
+msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+
+msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr "Das Wetter in {0} ist derzeit \"unbekannt\" bei einer Temperatur von {1} Grad {2}; die Luftfeuchtigkeit beträgt {3} Prozent."
+msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+
+msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+
+msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
msgstr "Das Wetter für morgen. \"{0}\" Temperaturen zwischen {1} und {2} Grad."
+msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+
+msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr "http://www.google.com/ig/api?hl=de&weather=%s"
+msgid "Location could not be found. Please check the city name or enter another close by location."
+msgstr "Ort nicht gefunden. Prüfen Sie den Namen der Stadt oder geben Sie den einer anderen in Nähe an."
+
+msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
+msgstr "Impossible to find the specified city name. Are you sure this city really exists ?"
+
+msgid "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+msgstr "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+
+msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+
msgid "Start every x from full hour"
msgstr "Regelmäßiger Bericht"
@@ -43,8 +85,3 @@
msgid "Start me daily"
msgstr "Berichte mir täglich"
-
-msgid "Location could not be found. Please check the city name or enter another close by location."
-msgstr "Ort nicht gefunden. Prüfen Sie den Namen der Stadt oder geben Sie den einer anderen in Nähe an."
-
-
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po 2009-10-14 11:36:01 UTC (rev 5655)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/en.po 2009-10-14 12:05:43 UTC (rev 5656)
@@ -23,15 +23,57 @@
msgid "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgstr "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
+msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+
+msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+
+msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
+msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+
+msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+
+msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
msgstr "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
+msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+
+msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr "http://www.google.com/ig/api?hl=en&weather=%s"
+msgid "Location could not be found. Please check the city name or enter another close by location."
+msgstr "Location could not be found. Please check the city name or enter another close by location."
+
+msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
+msgstr "Impossible to find the specified city name. Are you sure this city really exists ?"
+
+msgid "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+msgstr "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+
+msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+
msgid "Start every x from full hour"
msgstr "Regular report"
@@ -43,7 +85,3 @@
msgid "Start me daily"
msgstr "Give me a daily report"
-
-msgid "Location could not be found. Please check the city name or enter another close by location."
-msgstr "Location could not be found. Please check the city name or enter another close by location."
-
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/fr.po
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/fr.po 2009-10-14 11:36:01 UTC (rev 5655)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/fr.po 2009-10-14 12:05:43 UTC (rev 5656)
@@ -23,15 +23,57 @@
msgid "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgstr "La météo actuelle à {0} est \"{1}\" avec une température de {2} degrés {3}. Le taux d'humidité est de {4} pour cent."
+msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr "A {0}, la météo est {1} avec une température de {2} degrés {3}. Le taux d'humidité est de {4} pour cent."
+
+msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr "La météo est actuellement {1} à {0} avec un taux d'humidité de {4} pour cent. La température est d'environs {2} degrés {3}."
+
+msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr "Avec une température de {2} degrés {3}, la météo à {0} est {1}, et le taux 'hulidité est de {4} pour cent."
+
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr "La météo actuelle à {0} est \"inconnue\" avec une température de {1} degrés {2}. Le taux d'humidité est de {3} pour cent."
+msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr "A {0}, la météo est inconnue avec une température de {1} degrés {2}. Le taux d'humidité est de {3} pour cent."
+
+msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr "La météo est actuellement inconnue à {0} avec un taux d'humidité de {3} pour cent. La température est d'environs {1} degrés {2}."
+
+msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr "Avec une température de {1} degrés {2}, la météo à {0} est inconnue, et le taux d'hulidité est de {3} pour cent."
+
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
msgstr "Les prévisions pour demain : \"{0}\" avec des température de {1} à {2} degrés."
+msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Demain, la météo sera {0} avec des températures comprises entre {1} et {2} degrés."
+
+msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr "Avec des températures comprises entre {1} et {2} degrés, les prévisions pour demain sont {0}."
+
+msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "La météo demain sera {0} avec des températures comprises entre {1} et {2} degrés."
+
+msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr "Demain, la météo sera {0} avec des températures allant de {1} jusqu'à {2} degrés."
+
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr "http://www.google.com/ig/api?hl=fr&weather=%s"
+msgid "Location could not be found. Please check the city name or enter another close by location."
+msgstr "La localité ne peut être trouvée. Veuillez vérifier le nom de la ville ou choisir un endroit proche de celle-ci."
+
+msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
+msgstr "Impossible de trouver la ville spécifiée. Etes-vous sur que cette ville existe réellement ?"
+
+msgid "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+msgstr "La ville que vous avez spécifié ne peut être trouvée dans mes bases de données. Assurez-vous que cette ville existe, ou spécifiez une autre ville proche."
+
+msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr "Je suis désolé, mais je ne peux pas vous donner la météo pour cette localité. Veuillez essayer une localité proche de celle-ci."
+
msgid "Start every x from full hour"
msgstr "Rapport régulier"
@@ -43,7 +85,3 @@
msgid "Start me daily"
msgstr "Me faire un rapport quotidiennement"
-
-msgid "Location could not be found. Please check the city name or enter another close by location."
-msgstr "La localité ne peut être trouvée. Veuillez vérifier le nom de la ville ou choisir un endroit proche de celle-ci."
-
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/nl.po
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/nl.po 2009-10-14 11:36:01 UTC (rev 5655)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/nl.po 2009-10-14 12:05:43 UTC (rev 5656)
@@ -23,15 +23,57 @@
msgid "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgstr "Het weer vandaag in {0} is "{1}" met een temperatuur van {2} graden {3}. De vochtigheidsgraad is {4} percent."
+msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+
+msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+
+msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr "Het weer vandaag in {0} is "onbekend" met een temperatuur van {2} graden {3}. De vochtigheidsgraad is {4} percent."
+msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+
+msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+
+msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
msgstr "De weersverwachtingen voor morgen : "{0}" met temperaturen van {1} tot {2} graden."
+msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+
+msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+
+msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr "http://www.google.com/ig/api?hl=nl&weather=%s"
+msgid "Location could not be found. Please check the city name or enter another close by location."
+msgstr "Locatie werd niet gevonden. Gelieve de ingegeven stadsnaam te controleren of een andere nabij gelegen stad in te geven."
+
+msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
+msgstr "Impossible to find the specified city name. Are you sure this city really exists ?"
+
+msgid "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+msgstr "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+
+msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+
msgid "Start every x from full hour"
msgstr "Start op vaste tijdstippen"
@@ -43,7 +85,3 @@
msgid "Start me daily"
msgstr "Start mij dagelijks"
-
-msgid "Location could not be found. Please check the city name or enter another close by location."
-msgstr "Locatie werd niet gevonden. Gelieve de ingegeven stadsnaam te controleren of een andere nabij gelegen stad in te geven."
-
Modified: software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/plugin.pot
===================================================================
--- software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/plugin.pot 2009-10-14 11:36:01 UTC (rev 5655)
+++ software_suite_v3/software/plugin/plugin-weather/branches/random_sentences/plugin-weather/resources/plugin.pot 2009-10-14 12:05:43 UTC (rev 5656)
@@ -19,18 +19,57 @@
msgid "Current weather at {0} is \"{1}\" with a temperature of {2} degrees {3}; Humidity level is {4} percent."
msgstr ""
+msgid "In {0}, the weather is {1} with a temperature of {2} degrees {3}. The humidity level is {4} per cent."
+msgstr ""
+
+msgid "The weather is currently {1} in {0} with a humidity of {4} per cent. The temperature is around {2} degrees {3}."
+msgstr ""
+
+msgid "With a temperature of {2} degrees {3}, the weather in {0} is {1}, and the humidity level is {4} per cent."
+msgstr ""
+
msgid "Current weather at {0} is \"unknown\" with a temperature of {1} degrees {2}; Humidity level is {3} percent."
msgstr ""
+msgid "In {0}, the weather is unknown with a temperature of {1} degrees {2}. The humidity level is {3} per cent."
+msgstr ""
+
+msgid "The weather is currently unknown in {0} with a humidity of {3} per cent. The temperature is around {1} degrees {2}."
+msgstr ""
+
+msgid "With a temperature of {1} degrees {2}, the weather in {0} is unknown, and the humidity level is {3} per cent."
+msgstr ""
+
msgid "Tomorrow's forecast. \"{0}\" temperatures from {1} to {2} degrees."
msgstr ""
+msgid "Tomorrow, the weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr ""
+
+msgid "With temperatures between {1} and {2} degrees, tomorrow's forecast is expected to be {0}."
+msgstr ""
+
+msgid "Tomorrow's weather will be {0} with temperatures between {1} and {2} degrees."
+msgstr ""
+
+msgid "Tomorrow, the weather will be {0} with temperatures from {1} up to {2} degrees."
+msgstr ""
+
msgid "http://www.google.com/ig/api?hl=en&weather=%s"
msgstr ""
msgid "Location could not be found. Please check the city name or enter another close by location."
msgstr ""
+msgid "Impossible to find the specified city name. Are you sure this city really exists ?"
+msgstr ""
+
+msgid "The city you specified could not be found in my database. Make sure the city name exists, or specify another close by city name."
+msgstr ""
+
+msgid "I'm sorry, but I cannot give you the weather for the specified location. Please try another close by city name."
+msgstr ""
+
msgid "Start every x from full hour"
msgstr ""
|