[tuxdroid-svn] r5727 - in software_suite_v3/software/plugin/plugin-twitter/branches/random_sentence
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-10-19 10:42:36
|
Author: ks156
Date: 2009-10-19 12:42:10 +0200 (Mon, 19 Oct 2009)
New Revision: 5727
Modified:
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/de.po
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/en.po
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/fr.po
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/nl.po
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/plugin.pot
software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/src/TwitterPlugin.java
Log:
* Added more sentences
* Updated the translation files :
* pot is up-to-date
* en / fr are fully translated
* nl / de still have to be translated
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/de.po
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/de.po 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/de.po 2009-10-19 10:42:10 UTC (rev 5727)
@@ -43,18 +43,78 @@
msgid "There is a new Tweet available."
msgstr "Sie haben eine neue Freund Aktualisierung."
+msgid "You have a new Tweet"
+msgstr "You have a new Tweet"
+
+msgid "You have a new Tweet on your Twitter"
+msgstr "You have a new Tweet on your Twitter"
+
+msgid "I found a new Tweet on your Twitter account"
+msgstr "I found a new Tweet on your Twitter account"
+
+msgid "There is a new Tweet on your Twitter page"
+msgstr "There is a new Tweet on your Twitter page"
+
msgid "You have {0} new Tweets."
msgstr "Sie haben {0} Freund Aktualisierungen."
+msgid "There are {0} new Tweets available"
+msgstr "There are {0} new Tweets available"
+
+msgid "You have {0} new Tweets on your Twitter"
+msgstr "You have {0} new Tweets on your Twitter"
+
+msgid "I found {0} new Tweets on your Twitter account"
+msgstr "I found {0} new Tweets on your Twitter account"
+
+msgid "There are {0} new Tweets on your Twitter page"
+msgstr "There are {0} new Tweets on your Twitter page"
+
msgid "You don't have any new Tweets."
msgstr "Sie haben keine Freund Aktualisierungen."
+msgid "I couldn't find any new Tweets"
+msgstr "I couldn't find any new Tweets"
+
+msgid "There are no new Tweets available"
+msgstr "There are no new Tweets available"
+
+msgid "No new Tweets detected"
+msgstr "No new Tweets detected"
+
+msgid "I couldn't detect any new Tweets"
+msgstr "I couldn't detect any new Tweets"
+
msgid "You don't have any messages"
msgstr "Sie haben keine Nachrichten."
+msgid "You have no private messages"
+msgstr "You have no private messages"
+
+msgid "I couldn't find any new messages"
+msgstr "I couldn't find any new messages"
+
+msgid "There are no new private messages"
+msgstr "There are no new private messages"
+
+msgid "No private messages detected"
+msgstr "No private messages detected"
+
msgid "You don't have any replies"
msgstr "Sie haben keine Antworten."
+msgid "You have no new replies"
+msgstr "You have no new replies"
+
+msgid "There are no replies"
+msgstr "There are no replies"
+
+msgid "I could not find any replies"
+msgstr "I could not find any replies"
+
+msgid "There are no new replies detected"
+msgstr "There are no new replies detected"
+
msgid "Your new Tweet was not set, please, try again later"
msgstr "Ihre neue Tweet wurde nicht hinzugefügt, versuchen Sie es später."
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/en.po
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/en.po 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/en.po 2009-10-19 10:42:10 UTC (rev 5727)
@@ -43,18 +43,78 @@
msgid "There is a new Tweet available."
msgstr "There is a new Tweet available."
+msgid "You have a new Tweet"
+msgstr "You have a new Tweet"
+
+msgid "You have a new Tweet on your Twitter"
+msgstr "You have a new Tweet on your Twitter"
+
+msgid "I found a new Tweet on your Twitter account"
+msgstr "I found a new Tweet on your Twitter account"
+
+msgid "There is a new Tweet on your Twitter page"
+msgstr "There is a new Tweet on your Twitter page"
+
msgid "You have {0} new Tweets."
msgstr "You have {0} new Tweets."
+msgid "There are {0} new Tweets available"
+msgstr "There are {0} new Tweets available"
+
+msgid "You have {0} new Tweets on your Twitter"
+msgstr "You have {0} new Tweets on your Twitter"
+
+msgid "I found {0} new Tweets on your Twitter account"
+msgstr "I found {0} new Tweets on your Twitter account"
+
+msgid "There are {0} new Tweets on your Twitter page"
+msgstr "There are {0} new Tweets on your Twitter page"
+
msgid "You don't have any new Tweets."
msgstr "You don't have any new Tweets."
+msgid "I couldn't find any new Tweets"
+msgstr "I couldn't find any new Tweets"
+
+msgid "There are no new Tweets available"
+msgstr "There are no new Tweets available"
+
+msgid "No new Tweets detected"
+msgstr "No new Tweets detected"
+
+msgid "I couldn't detect any new Tweets"
+msgstr "I couldn't detect any new Tweets"
+
msgid "You don't have any messages"
msgstr "You don't have any messages."
+msgid "You have no private messages"
+msgstr "You have no private messages"
+
+msgid "I couldn't find any new messages"
+msgstr "I couldn't find any new messages"
+
+msgid "There are no new private messages"
+msgstr "There are no new private messages"
+
+msgid "No private messages detected"
+msgstr "No private messages detected"
+
msgid "You don't have any replies"
msgstr "You don't have any replies."
+msgid "You have no new replies"
+msgstr "You have no new replies"
+
+msgid "There are no replies"
+msgstr "There are no replies"
+
+msgid "I could not find any replies"
+msgstr "I could not find any replies"
+
+msgid "There are no new replies detected"
+msgstr "There are no new replies detected"
+
msgid "Your new Tweet was not set, please, try again later"
msgstr "Your new Tweet was not set, please, try again later."
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/fr.po
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/fr.po 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/fr.po 2009-10-19 10:42:10 UTC (rev 5727)
@@ -43,18 +43,78 @@
msgid "There is a new Tweet available."
msgstr "Un ami à publié un nouveau Tweet"
+msgid "You have a new Tweet"
+msgstr "Vous avez un nouveau Tweet"
+
+msgid "You have a new Tweet on your Twitter"
+msgstr "Vous avez un nouveau Tweet sur Twitter"
+
+msgid "I found a new Tweet on your Twitter account"
+msgstr "J'ai trouvé un nouveau Tweet sur votre compte Twitter"
+
+msgid "There is a new Tweet on your Twitter page"
+msgstr "Il y a un nouveau Tweet sur votre page Twitter"
+
msgid "You have {0} new Tweets."
msgstr "{0} de vos amis ont publié un nouveau Tweet"
+msgid "There are {0} new Tweets available"
+msgstr "Il y a {0} nouveaux Tweets disponibles"
+
+msgid "You have {0} new Tweets on your Twitter"
+msgstr "Vous avez {0} nouveaux Tweets sur Twitter"
+
+msgid "I found {0} new Tweets on your Twitter account"
+msgstr "J'ai trouvé {0} nouveaux Tweets sur votre compte Twitter"
+
+msgid "There are {0} new Tweets on your Twitter page"
+msgstr "Il y a {0} nouveaux Tweets sur votre page Twitter"
+
msgid "You don't have any new Tweets."
msgstr "Vos amis n'ont pas publié de Tweets"
+msgid "I couldn't find any new Tweets"
+msgstr "Je n'ai pas trouvé de nouveaux Tweets "
+
+msgid "There are no new Tweets available"
+msgstr "Il n'y a pas de nouveaux Tweets disponibles"
+
+msgid "No new Tweets detected"
+msgstr "Aucun nouveau Tweet détecté"
+
+msgid "I couldn't detect any new Tweets"
+msgstr "Je n'ai pas détecté de nouveaux Tweets"
+
msgid "You don't have any messages"
msgstr "Vous n'avez pas de nouveau messages"
+msgid "You have no private messages"
+msgstr "Vous n'avez pas de messages privés"
+
+msgid "I couldn't find any new messages"
+msgstr "Je n'ai pas trouvé de nouveaux messages"
+
+msgid "There are no new private messages"
+msgstr "Il n'y a pas de nouveaux messages privés"
+
+msgid "No private messages detected"
+msgstr "Aucun message privé détecté"
+
msgid "You don't have any replies"
msgstr "Vous n'avez pas de nouvelles réponses"
+msgid "You have no new replies"
+msgstr "Vous n'avez pas de réponses"
+
+msgid "There are no replies"
+msgstr "Il n'y a pas de réponses"
+
+msgid "I could not find any replies"
+msgstr "Je n'ai pas trouvé de réponses"
+
+msgid "There are no new replies detected"
+msgstr "Aucune nouvelles réponses détectées"
+
msgid "Your new Tweet was not set, please, try again later"
msgstr "Votre Tweet n'a pas été publié, s'il vous plait, essayez à nouveau."
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/nl.po
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/nl.po 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/nl.po 2009-10-19 10:42:10 UTC (rev 5727)
@@ -43,18 +43,78 @@
msgid "There is a new Tweet available."
msgstr "Er is een nieuwe Tweet beschikbaar."
+msgid "You have a new Tweet"
+msgstr "You have a new Tweet"
+
+msgid "You have a new Tweet on your Twitter"
+msgstr "You have a new Tweet on your Twitter"
+
+msgid "I found a new Tweet on your Twitter account"
+msgstr "I found a new Tweet on your Twitter account"
+
+msgid "There is a new Tweet on your Twitter page"
+msgstr "There is a new Tweet on your Twitter page"
+
msgid "You have {0} new Tweets."
msgstr "Je hebt {0} nieuwe Tweets."
+msgid "There are {0} new Tweets available"
+msgstr "There are {0} new Tweets available"
+
+msgid "You have {0} new Tweets on your Twitter"
+msgstr "You have {0} new Tweets on your Twitter"
+
+msgid "I found {0} new Tweets on your Twitter account"
+msgstr "I found {0} new Tweets on your Twitter account"
+
+msgid "There are {0} new Tweets on your Twitter page"
+msgstr "There are {0} new Tweets on your Twitter page"
+
msgid "You don't have any new Tweets."
msgstr "Je hebt geen nieuwe Tweets."
+msgid "I couldn't find any new Tweets"
+msgstr "I couldn't find any new Tweets"
+
+msgid "There are no new Tweets available"
+msgstr "There are no new Tweets available"
+
+msgid "No new Tweets detected"
+msgstr "No new Tweets detected"
+
+msgid "I couldn't detect any new Tweets"
+msgstr "I couldn't detect any new Tweets"
+
msgid "You don't have any messages"
msgstr "Je hebt geen nieuwe berichten."
+msgid "You have no private messages"
+msgstr "You have no private messages"
+
+msgid "I couldn't find any new messages"
+msgstr "I couldn't find any new messages"
+
+msgid "There are no new private messages"
+msgstr "There are no new private messages"
+
+msgid "No private messages detected"
+msgstr "No private messages detected"
+
msgid "You don't have any replies"
msgstr "Je hebt geen nieuwe antwoorden."
+msgid "You have no new replies"
+msgstr "You have no new replies"
+
+msgid "There are no replies"
+msgstr "There are no replies"
+
+msgid "I could not find any replies"
+msgstr "I could not find any replies"
+
+msgid "There are no new replies detected"
+msgstr "There are no new replies detected"
+
msgid "Your new Tweet was not set, please, try again later"
msgstr "Je nieuwe Tweet werd niet geplaatst, probeer later opnieuw."
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/plugin.pot
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/plugin.pot 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/resources/plugin.pot 2009-10-19 10:42:10 UTC (rev 5727)
@@ -43,18 +43,78 @@
msgid "There is a new Tweet available."
msgstr ""
+msgid "You have a new Tweet"
+msgstr ""
+
+msgid "You have a new Tweet on your Twitter"
+msgstr ""
+
+msgid "I found a new Tweet on your Twitter account"
+msgstr ""
+
+msgid "There is a new Tweet on your Twitter page"
+msgstr ""
+
msgid "You have {0} new Tweets."
msgstr ""
+msgid "There are {0} new Tweets available"
+msgstr ""
+
+msgid "You have {0} new Tweets on your Twitter"
+msgstr ""
+
+msgid "I found {0} new Tweets on your Twitter account"
+msgstr ""
+
+msgid "There are {0} new Tweets on your Twitter page"
+msgstr ""
+
msgid "You don't have any new Tweets."
msgstr ""
+msgid "I couldn't find any new Tweets"
+msgstr ""
+
+msgid "There are no new Tweets available"
+msgstr ""
+
+msgid "No new Tweets detected"
+msgstr ""
+
+msgid "I couldn't detect any new Tweets"
+msgstr ""
+
msgid "You don't have any messages"
msgstr ""
+msgid "You have no private messages"
+msgstr ""
+
+msgid "I couldn't find any new messages"
+msgstr ""
+
+msgid "There are no new private messages"
+msgstr ""
+
+msgid "No private messages detected"
+msgstr ""
+
msgid "You don't have any replies"
msgstr ""
+msgid "You have no new replies"
+msgstr ""
+
+msgid "There are no replies"
+msgstr ""
+
+msgid "I could not find any replies"
+msgstr ""
+
+msgid "There are no new replies detected"
+msgstr ""
+
msgid "Your new Tweet was not set, please, try again later"
msgstr ""
Modified: software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/src/TwitterPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/src/TwitterPlugin.java 2009-10-19 09:17:32 UTC (rev 5726)
+++ software_suite_v3/software/plugin/plugin-twitter/branches/random_sentences/plugin-twitter/src/TwitterPlugin.java 2009-10-19 10:42:10 UTC (rev 5727)
@@ -23,6 +23,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Vector;
+import java.util.Random;
import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin;
import winterwell.jtwitter.Twitter;
@@ -43,6 +44,46 @@
private boolean throwed = false;
+ String[] newSingleTweetSentences = {
+ "There is a new Tweet available.",
+ "You have a new Tweet",
+ "You have a new Tweet on your Twitter",
+ "I found a new Tweet on your Twitter account",
+ "There is a new Tweet on your Twitter page"
+ };
+
+ String[] newMultipleTweetSentences = {
+ "You have {0} new Tweets.",
+ "There are {0} new Tweets available",
+ "You have {0} new Tweets on your Twitter",
+ "I found {0} new Tweets on your Twitter account",
+ "There are {0} new Tweets on your Twitter page"
+ };
+
+ String[] noNewTweetSentences = {
+ "You don't have any new Tweets.",
+ "I couldn't find any new Tweets",
+ "There are no new Tweets available",
+ "No new Tweets detected",
+ "I couldn't detect any new Tweets"
+ };
+
+ String[] noNewMessageSentences = {
+ "You don't have any messages",
+ "You have no private messages",
+ "I couldn't find any new messages",
+ "There are no new private messages",
+ "No private messages detected"
+ };
+
+ String[] noNewReplySentences = {
+ "You don't have any replies",
+ "You have no new replies",
+ "There are no replies",
+ "I could not find any replies",
+ "There are no new replies detected"
+ };
+
/***
This function set the new user status.
Préconditions :
@@ -258,18 +299,18 @@
if ( updateCount == 1 )
{
throwRes();
- throwMessage("There is a new Tweet available.");
+ throwMessage(pickSentence(newSingleTweetSentences));
}
else if ( updateCount > 1 )
{
throwRes();
- throwMessage("You have {0} new Tweets.", String.valueOf(updateCount));
+ throwMessage(pickSentence(newMultipleTweetSentences), String.valueOf(updateCount));
}
else
{
if ( ! this.getCommand().equalsIgnoreCase("check") )
{
- throwMessage("You don't have any new Tweets.");
+ throwMessage(pickSentence(noNewTweetSentences));
}
}
}
@@ -296,7 +337,7 @@
{
if ( ! this.getCommand().equalsIgnoreCase("check") )
{
- throwMessage("You don't have any messages");
+ throwMessage(pickSentence(noNewMessageSentences));
}
}
@@ -315,7 +356,7 @@
{
if ( ! this.getCommand().equalsIgnoreCase("check") )
{
- throwMessage("You don't have any replies");
+ throwMessage(pickSentence(noNewReplySentences));
}
}
@@ -349,6 +390,13 @@
}
+ /**
+ * This function return a sentences from a defined list
+ */
+ private String pickSentence(String[] list) {
+ Random rand = new Random();
+ return list[rand.nextInt(list.length)];
+ }
/***
* Sort a typ string list.
|