35 changed files with 4350 additions and 1324 deletions
File diff suppressed because it is too large
@ -1,52 +0,0 @@ |
|||
package org.telegram; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 1.0 |
|||
* @brief Custom messages to be sent to the user |
|||
* @date 21 of June of 2015 |
|||
*/ |
|||
public class CustomMessages { |
|||
public static final String helpWeather = "Curious about the weather?\nJust send me these commands and you'll know a lot better.\n\n" + |
|||
"|-- " + Commands.WEATHERCOMMAND + " CITY,COUNTRY : Get a 3-day weather forecast for a city.\n" + |
|||
"|-- " + Commands.CURRENTWEATHERCOMMAND + " CITY,COUNTRY : Get the current weather of a city.\n" + |
|||
"|-- Send a location to get the forecast for it."; |
|||
public static final String helpTransifex = "Tricks with words is the game that I play, give it a shot, I might make your day.\n\n" + |
|||
"To get the latest Telegram localization file for a language: \n" + |
|||
"|-- " + Commands.transifexiOSCommand + " LANG_CODE : Get the latest iOS language.\n" + |
|||
"|-- " + Commands.transifexAndroidCommand + " LANG_CODE : Get the latest android language.\n" + |
|||
"|-- " + Commands.transifexWebogram + " LANG_CODE : Get the latest webogram language.\n" + |
|||
"|-- " + Commands.transifexiOSCommand + " LANG_CODE : Get the latest iOS language.\n" + |
|||
"|-- " + Commands.transifexAndroidCommand + " LANG_CODE : Get the latest android language.\n" + |
|||
"|-- " + Commands.transifexWebogram + " LANG_CODE : Get the latest webogram language.\n" + |
|||
"|-- " + Commands.transifexTDesktop + " LANG_CODE : Get the latest Tdesktop language.\n" + |
|||
"|-- " + Commands.transifexOSX + " LANG_CODE : Get the latest OSX-App language.\n" + |
|||
"|-- " + Commands.transifexWP + " LANG_CODE : Get the latest Windows Phone language.\n\n" + |
|||
"2. To get an updated localization file for your Android beta-app: \n" + |
|||
"|-- " + Commands.transifexAndroidSupportCommand + " LANG_CODE : Get the latest Android-beta language.\n\n"; |
|||
public static final String helpFiles = "Leaving a file for some others to find? Just dock your boat here and a bay comes to mind.\n\n"+ |
|||
"Share files through a custom link: \n" + |
|||
"|-- " + Commands.startCommand + " FILEID : Get a file by id.\n" + |
|||
"|-- " + Commands.uploadCommand + " : Start your file upload.\n" + |
|||
"|-- " + Commands.deleteCommand + " : Choose one of your files to delete it.\n" + |
|||
"|-- " + Commands.listCommand + " : Show a list of your shared files.\n\n"; |
|||
public static final String helpDirections = "The road ahead, paved with good intentions, the right path ahead however is what I tend to mention.\n\n" + |
|||
"To get directions between two locations: \n" + |
|||
"|-- " + Commands.startDirectionCommand + " : Start to get directions\n"; |
|||
|
|||
public static final String sendFileToUpload = "Please send me a file you want to share. Make sure you attach it as file, not as an image or video."; |
|||
public static final String fileUploaded = "Great, your file has been uploaded. Send this link to anyone you want and they will be able to download the file:\n\n"; |
|||
public static final String deleteUploadedFile = "Please select the file you want to delete:"; |
|||
public static final String fileDeleted = "The file was deleted"; |
|||
public static final String wrongFileId = "Sorry, we can't find a file with that ID. Either a typo was made or it was deleted already."; |
|||
public static final String listOfFiles = "This your currently shared files list:"; |
|||
public static final String noFiles = "You haven't shared any file yet."; |
|||
public static final String processFinished = "The current process was cancelled."; |
|||
public static final String uploadedFileURL = "https://telegram.me/filesbot?start="; |
|||
public static final String chooseFromRecentWeather = "Please choose an option from your recent requests:"; |
|||
|
|||
public static final String initDirections = "Please reply with your departing location."; |
|||
public static final String sendDestination = "Please reply with your destination."; |
|||
public static final String youNeedReplyDirections = "I'm sorry, I can't help you unless you reply to the message I sent you."; |
|||
public static final String pleaseSendMeCityWeather = "Send me the city and country you are interested in, use this format: CITY,COUNTRY"; |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
package org.telegram.services; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 2.0 |
|||
* @brief Task to be execute periodically |
|||
* @date 28/01/15 |
|||
*/ |
|||
public abstract class CustomTimerTask { |
|||
private String taskName = ""; ///< Task name
|
|||
private int times = 1; |
|||
|
|||
/** |
|||
* Constructor |
|||
* |
|||
* @param taskName Name of the task |
|||
*/ |
|||
public CustomTimerTask(String taskName, int times) { |
|||
this.taskName = taskName; |
|||
this.times = times; |
|||
} |
|||
|
|||
/** |
|||
* Get name |
|||
* |
|||
* @return name |
|||
*/ |
|||
public String getTaskName() { |
|||
return this.taskName; |
|||
} |
|||
|
|||
/** |
|||
* Set name |
|||
* |
|||
* @param taskName new name |
|||
*/ |
|||
public void setTaskName(String taskName) { |
|||
this.taskName = taskName; |
|||
} |
|||
|
|||
/** |
|||
* Getter for the times |
|||
* |
|||
* @return Remainint times the task must be executed |
|||
*/ |
|||
public int getTimes() { |
|||
return this.times; |
|||
} |
|||
|
|||
/** |
|||
* Setter for the times |
|||
* |
|||
* @param times Number of times the task must be executed |
|||
*/ |
|||
public void setTimes(int times) { |
|||
this.times = times; |
|||
} |
|||
|
|||
public void reduceTimes() { |
|||
if (this.times > 0) { |
|||
this.times -= 1; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @abstract Should contain the functionality of the task |
|||
*/ |
|||
public abstract void execute(); |
|||
} |
|||
@ -0,0 +1,188 @@ |
|||
package org.telegram.services; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 1.0 |
|||
* @brief Enumerate of emojis with unicode chars |
|||
* @date 02 of July of 2015 |
|||
*/ |
|||
public enum Emoji { |
|||
// Emoticones group
|
|||
GRINNING_FACE_WITH_SMILING_EYES('\uD83D', '\uDE01'), |
|||
FACE_WITH_TEARS_OF_JOY('\uD83D', '\uDE02'), |
|||
SMILING_FACE_WITH_OPEN_MOUTH('\uD83D', '\uDE03'), |
|||
SMILING_FACE_WITH_OPEN_MOUTH_AND_SMILING_EYES('\uD83D', '\uDE04'), |
|||
SMILING_FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT('\uD83D', '\uDE05'), |
|||
SMILING_FACE_WITH_OPEN_MOUTH_AND_TIGHTLY_CLOSED_EYES('\uD83D', '\uDE06'), |
|||
WINKING_FACE('\uD83D', '\uDE09'), |
|||
SMILING_FACE_WITH_SMILING_EYES('\uD83D', '\uDE0A'), |
|||
FACE_SAVOURING_DELICIOUS_FOOD('\uD83D', '\uDE0B'), |
|||
RELIEVED_FACE('\uD83D', '\uDE0C'), |
|||
SMILING_FACE_WITH_HEART_SHAPED_EYES('\uD83D', '\uDE0D'), |
|||
SMIRKING_FACE('\uD83D', '\uDE0F'), |
|||
UNAMUSED_FACE('\uD83D', '\uDE12'), |
|||
FACE_WITH_COLD_SWEAT('\uD83D', '\uDE13'), |
|||
PENSIVE_FACE('\uD83D', '\uDE14'), |
|||
CONFOUNDED_FACE('\uD83D', '\uDE16'), |
|||
FACE_THROWING_A_KISS('\uD83D', '\uDE18'), |
|||
KISSING_FACE_WITH_CLOSED_EYES('\uD83D', '\uDE1A'), |
|||
FACE_WITH_STUCK_OUT_TONGUE_AND_WINKING_EYE('\uD83D', '\uDE1C'), |
|||
FACE_WITH_STUCK_OUT_TONGUE_AND_TIGHTLY_CLOSED_EYES('\uD83D', '\uDE1D'), |
|||
DISAPPOINTED_FACE('\uD83D', '\uDE1E'), |
|||
ANGRY_FACE('\uD83D', '\uDE20'), |
|||
POUTING_FACE('\uD83D', '\uDE21'), |
|||
CRYING_FACE('\uD83D', '\uDE22'), |
|||
PERSEVERING_FACE('\uD83D', '\uDE23'), |
|||
FACE_WITH_LOOK_OF_TRIUMPH('\uD83D', '\uDE24'), |
|||
DISAPPOINTED_BUT_RELIEVED_FACE('\uD83D', '\uDE25'), |
|||
FEARFUL_FACE('\uD83D', '\uDE28'), |
|||
WEARY_FACE('\uD83D', '\uDE29'), |
|||
SLEEPY_FACE('\uD83D', '\uDE2A'), |
|||
TIRED_FACE('\uD83D', '\uDE2B'), |
|||
LOUDLY_CRYING_FACE('\uD83D', '\uDE2D'), |
|||
FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT('\uD83D', '\uDE30'), |
|||
FACE_SCREAMING_IN_FEAR('\uD83D', '\uDE31'), |
|||
ASTONISHED_FACE('\uD83D', '\uDE32'), |
|||
FLUSHED_FACE('\uD83D', '\uDE33'), |
|||
DIZZY_FACE('\uD83D', '\uDE35'), |
|||
FACE_WITH_MEDICAL_MASK('\uD83D', '\uDE37'), |
|||
GRINNING_CAT_FACE_WITH_SMILING_EYES('\uD83D', '\uDE38'), |
|||
CAT_FACE_WITH_TEARS_OF_JOY('\uD83D', '\uDE39'), |
|||
SMILING_CAT_FACE_WITH_OPEN_MOUTH('\uD83D', '\uDE3A'), |
|||
SMILING_CAT_FACE_WITH_HEART_SHAPED_EYES('\uD83D', '\uDE3B'), |
|||
CAT_FACE_WITH_WRY_SMILE('\uD83D', '\uDE3C'), |
|||
KISSING_CAT_FACE_WITH_CLOSED_EYES('\uD83D', '\uDE3D'), |
|||
POUTING_CAT_FACE('\uD83D', '\uDE3E'), |
|||
CRYING_CAT_FACE('\uD83D', '\uDE3F'), |
|||
WEARY_CAT_FACE('\uD83D', '\uDE40'), |
|||
FACE_WITH_NO_GOOD_GESTURE('\uD83D', '\uDE45'), |
|||
FACE_WITH_OK_GESTURE('\uD83D', '\uDE46'), |
|||
PERSON_BOWING_DEEPLY('\uD83D', '\uDE47'), |
|||
SEE_NO_EVIL_MONKEY('\uD83D', '\uDE48'), |
|||
HEAR_NO_EVIL_MONKEY('\uD83D', '\uDE49'), |
|||
SPEAK_NO_EVIL_MONKEY('\uD83D', '\uDE4A'), |
|||
HAPPY_PERSON_RAISING_ONE_HAND('\uD83D', '\uDE4B'), |
|||
PERSON_RAISING_BOTH_HANDS_IN_CELEBRATION('\uD83D', '\uDE4C'), |
|||
PERSON_FROWNING('\uD83D', '\uDE4D'), |
|||
PERSON_WITH_POUTING_FACE('\uD83D', '\uDE4E'), |
|||
PERSON_WITH_FOLDED_HANDS('\uD83D', '\uDE4F'), |
|||
|
|||
// Dingbats group
|
|||
BLACK_SCISSORS(null, '\u2702'), |
|||
WHITE_HEAVY_CHECK_MARK(null, '\u2705'), |
|||
AIRPLANE(null, '\u2708'), |
|||
ENVELOPE(null, '\u2709'), |
|||
RAISED_FIST(null, '\u270A'), |
|||
RAISED_HAND(null, '\u270B'), |
|||
VICTORY_HAND(null, '\u270C'), |
|||
PENCIL(null, '\u270F'), |
|||
BLACK_NIB(null, '\u2712'), |
|||
HEAVY_CHECK_MARK(null, '\u2714'), |
|||
HEAVY_MULTIPLICATION_X(null, '\u2716'), |
|||
SPARKLES(null, '\u2728'), |
|||
EIGHT_SPOKED_ASTERISK(null, '\u2733'), |
|||
EIGHT_POINTED_BLACK_STAR(null, '\u2734'), |
|||
SNOWFLAKE(null, '\u2744'), |
|||
SPARKLE(null, '\u2747'), |
|||
CROSS_MARK(null, '\u274C'), |
|||
NEGATIVE_SQUARED_CROSS_MARK(null, '\u274E'), |
|||
BLACK_QUESTION_MARK_ORNAMENT(null, '\u2753'), |
|||
WHITE_QUESTION_MARK_ORNAMENT(null, '\u2754'), |
|||
WHITE_EXCLAMATION_MARK_ORNAMENT(null, '\u2755'), |
|||
HEAVY_EXCLAMATION_MARK_SYMBOL(null, '\u2757'), |
|||
HEAVY_BLACK_HEART(null, '\u2764'), |
|||
HEAVY_PLUS_SIGN(null, '\u2795'), |
|||
HEAVY_MINUS_SIGN(null, '\u2796'), |
|||
HEAVY_DIVISION_SIGN(null, '\u2797'), |
|||
BLACK_RIGHTWARDS_ARROW(null, '\u27A1'), |
|||
CURLY_LOOP(null, '\u27B0'), |
|||
|
|||
// Transport and map symbols Group
|
|||
ROCKET('\uD83D', '\uDE80'), |
|||
RAILWAY_CAR('\uD83D', '\uDE83'), |
|||
HIGH_SPEED_TRAIN('\uD83D', '\uDE84'), |
|||
HIGH_SPEED_TRAIN_WITH_BULLET_NOSE('\uD83D', '\uDE85'), |
|||
METRO('\uD83D', '\uDE87'), |
|||
STATION('\uD83D', '\uDE89'), |
|||
BUS('\uD83D', '\uDE8C'), |
|||
BUS_STOP('\uD83D', '\uDE8F'), |
|||
AMBULANCE('\uD83D', '\uDE91'), |
|||
FIRE_ENGINE('\uD83D', '\uDE92'), |
|||
POLICE_CAR('\uD83D', '\uDE93'), |
|||
TAXI('\uD83D', '\uDE95'), |
|||
AUTOMOBILE('\uD83D', '\uDE97'), |
|||
RECREATIONAL_VEHICLE('\uD83D', '\uDE99'), |
|||
DELIVERY_TRUCK('\uD83D', '\uDE9A'), |
|||
SHIP('\uD83D', '\uDEA2'), |
|||
SPEEDBOAT('\uD83D', '\uDEA4'), |
|||
HORIZONTAL_TRAFFIC_LIGHT('\uD83D', '\uDEA5'), |
|||
CONSTRUCTION_SIGN('\uD83D', '\uDEA7'), |
|||
POLICE_CARS_REVOLVING_LIGHT('\uD83D', '\uDEA8'), |
|||
TRIANGULAR_FLAG_ON_POST('\uD83D', '\uDEA9'), |
|||
DOOR('\uD83D', '\uDEAA'), |
|||
NO_ENTRY_SIGN('\uD83D', '\uDEAB'), |
|||
SMOKING_SYMBOL('\uD83D', '\uDEAC'), |
|||
NO_SMOKING_SYMBOL('\uD83D', '\uDEAD'), |
|||
BICYCLE('\uD83D', '\uDEB2'), |
|||
PEDESTRIAN('\uD83D', '\uDEB6'), |
|||
MENS_SYMBOL('\uD83D', '\uDEB9'), |
|||
WOMENS_SYMBOL('\uD83D', '\uDEBA'), |
|||
RESTROOM('\uD83D', '\uDEBB'), |
|||
BABY_SYMBOL('\uD83D', '\uDEBC'), |
|||
TOILET('\uD83D', '\uDEBD'), |
|||
WATER_CLOSET('\uD83D', '\uDEBE'), |
|||
BATH('\uD83D', '\uDEC0'), |
|||
|
|||
// Weather
|
|||
UMBRELLA_WITH_RAIN_DROPS(null, '\u2614'), |
|||
HIGH_VOLTAGE_SIGN(null, '\u26A1'), |
|||
SNOWMAN_WITHOUT_SNOW(null, '\u26C4'), |
|||
SUN_BEHIND_CLOUD(null, '\u26C5'), |
|||
CLOSED_UMBRELLA('\uD83C', '\uDF02'), |
|||
SUN_WITH_FACE('\uD83C', '\uDF1E'), |
|||
FOGGY('\uD83C', '\uDF01'), |
|||
CLOUD(null, '\u2601'), |
|||
|
|||
// Others
|
|||
LEFT_RIGHT_ARROW(null, '\u2194'), |
|||
ALARM_CLOCK(null, '\u23F0'), |
|||
SOON_WITH_RIGHTWARDS_ARROW_ABOVE('\uD83D', '\uDD1C'), |
|||
EARTH_GLOBE_EUROPE_AFRICA('\uD83C', '\uDF0D'), |
|||
GLOBE_WITH_MERIDIANS('\uD83C', '\uDF10'), |
|||
STRAIGHT_RULER('\uD83D', '\uDCCF'), |
|||
INFORMATION_SOURCE(null, '\u2139'), |
|||
BLACK_RIGHT_POINTING_DOUBLE_TRIANGLE(null, '\u23E9'), |
|||
BLACK_RIGHT_POINTING_TRIANGLE(null, '\u25B6'), |
|||
BACK_WITH_LEFTWARDS_ARROW_ABOVE('\uD83D', '\uDD19'), |
|||
WRENCH('\uD83D', '\uDD27'), |
|||
DIGIT_THREE(null, '\u0033'), |
|||
CLIPBOARD('\uD83D', '\uDCCB'), |
|||
THUMBS_UP_SIGN('\uD83D', '\uDC4D'), |
|||
WHITE_RIGHT_POINTING_BACKHAND_INDEX('\uD83D', '\uDC49'), |
|||
TEAR_OFF_CALENDAR('\uD83D', '\uDCC6'), |
|||
LARGE_ORANGE_DIAMOND('\uD83D', '\uDD36'), |
|||
HUNDRED_POINTS_SYMBOL('\uD83D', '\uDCAF'), |
|||
ROUND_PUSHPIN('\uD83D', '\uDCCD'); |
|||
|
|||
Character firstChar; |
|||
Character secondChar; |
|||
|
|||
Emoji(Character firstChar, Character secondChar) { |
|||
this.firstChar = firstChar; |
|||
this.secondChar = secondChar; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
|
|||
if (this.firstChar != null) { |
|||
sb.append(this.firstChar); |
|||
} |
|||
if (this.secondChar != null) { |
|||
sb.append(this.secondChar); |
|||
} |
|||
|
|||
return sb.toString(); |
|||
} |
|||
} |
|||
@ -0,0 +1,207 @@ |
|||
package org.telegram.services; |
|||
|
|||
import java.io.ByteArrayInputStream; |
|||
import java.io.IOException; |
|||
import java.io.InputStream; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 1.0 |
|||
* @brief Localisation |
|||
* @date 25/01/15 |
|||
*/ |
|||
public class LocalisationService { |
|||
private static LocalisationService instance = null; |
|||
private final HashMap<String, String> supportedLanguages = new HashMap<>(); |
|||
|
|||
private ResourceBundle english; |
|||
private ResourceBundle spanish; |
|||
private ResourceBundle dutch; |
|||
private ResourceBundle german; |
|||
private ResourceBundle italian; |
|||
private ResourceBundle french; |
|||
private ResourceBundle malayalam; |
|||
private ResourceBundle hindi; |
|||
private ResourceBundle portuguese; |
|||
private ResourceBundle portuguesebr; |
|||
private ResourceBundle russian; |
|||
private ResourceBundle arabic; |
|||
private ResourceBundle catalan; |
|||
private ResourceBundle galician; |
|||
private ResourceBundle persian; |
|||
private ResourceBundle turkish; |
|||
|
|||
private class CustomClassLoader extends ClassLoader { |
|||
public CustomClassLoader(ClassLoader parent) { |
|||
super(parent); |
|||
|
|||
} |
|||
|
|||
public InputStream getResourceAsStream(String name) { |
|||
InputStream utf8in = getParent().getResourceAsStream(name); |
|||
if (utf8in != null) { |
|||
try { |
|||
byte[] utf8Bytes = new byte[utf8in.available()]; |
|||
utf8in.read(utf8Bytes, 0, utf8Bytes.length); |
|||
byte[] iso8859Bytes = new String(utf8Bytes, "UTF-8").getBytes("ISO-8859-1"); |
|||
return new ByteArrayInputStream(iso8859Bytes); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
|
|||
} finally { |
|||
try { |
|||
utf8in.close(); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Singleton |
|||
* |
|||
* @return Instance of localisation service |
|||
*/ |
|||
public static LocalisationService getInstance() { |
|||
if (instance == null) { |
|||
synchronized (LocalisationService.class) { |
|||
if (instance == null) { |
|||
instance = new LocalisationService(); |
|||
} |
|||
} |
|||
} |
|||
return instance; |
|||
} |
|||
|
|||
/** |
|||
* Private constructor due to singleton |
|||
*/ |
|||
private LocalisationService() { |
|||
CustomClassLoader loader = new CustomClassLoader(Thread.currentThread().getContextClassLoader()); |
|||
english = ResourceBundle.getBundle("localisation.strings", new Locale("en", "US"), loader); |
|||
supportedLanguages.put("en", "English"); |
|||
spanish = ResourceBundle.getBundle("localisation.strings", new Locale("es", "ES"), loader); |
|||
supportedLanguages.put("es", "Español"); |
|||
portuguese = ResourceBundle.getBundle("localisation.strings", new Locale("pt", "PT"), loader); |
|||
supportedLanguages.put("pt", "Português"); |
|||
dutch = ResourceBundle.getBundle("localisation.strings", new Locale("nl", "NL"), loader); |
|||
supportedLanguages.put("nl", "Nederlands"); |
|||
/* |
|||
german = ResourceBundle.getBundle("localisation.strings", new Locale("de", "DE"), loader); |
|||
supportedLanguages.put("de", "Deutsch"); |
|||
italian = ResourceBundle.getBundle("localisation.strings", new Locale("it", "IT"), loader); |
|||
supportedLanguages.put("it", "Italian"); |
|||
french = ResourceBundle.getBundle("localisation.strings", new Locale("fr", "FR"), loader); |
|||
supportedLanguages.put("fr", "French"); |
|||
portuguesebr = ResourceBundle.getBundle("localisation.strings", new Locale("pt", "BR"), loader); |
|||
supportedLanguages.put("pt_br", "Portuguese BR");*/ |
|||
/** |
|||
malayalam = ResourceBundle.getBundle("localisation.strings", new Locale("ml", "ML"), loader); |
|||
hindi = ResourceBundle.getBundle("localisation.strings", new Locale("hi", "HI"), loader); |
|||
russian = ResourceBundle.getBundle("localisation.strings", new Locale("ru", "RU"), loader); |
|||
arabic = ResourceBundle.getBundle("localisation.strings", new Locale("ar", "AR"), loader); |
|||
catalan = ResourceBundle.getBundle("localisation.strings", new Locale("ca", "CA"), loader); |
|||
galician = ResourceBundle.getBundle("localisation.strings", new Locale("gl", "ES"), loader); |
|||
persian = ResourceBundle.getBundle("localisation.strings", new Locale("fa", "FA"), loader); |
|||
turkish = ResourceBundle.getBundle("localisation.strings", new Locale("tr", "TR"), loader); |
|||
*/ |
|||
} |
|||
|
|||
/** |
|||
* Get a string in default language (en) |
|||
* |
|||
* @param key key of the resource to fetch |
|||
* @return fetched string or error message otherwise |
|||
*/ |
|||
public String getString(String key) { |
|||
String result; |
|||
try { |
|||
result = english.getString(key); |
|||
} catch (MissingResourceException e) { |
|||
result = "String not found"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* Get a string in default language |
|||
* |
|||
* @param key key of the resource to fetch |
|||
* @return fetched string or error message otherwise |
|||
*/ |
|||
public String getString(String key, String language) { |
|||
String result; |
|||
try { |
|||
switch (language.toLowerCase()) { |
|||
case "en": |
|||
result = english.getString(key); |
|||
break; |
|||
case "es": |
|||
result = spanish.getString(key); |
|||
break; |
|||
case "pt": |
|||
result = portuguese.getString(key); |
|||
break; |
|||
case "nl": |
|||
result = dutch.getString(key); |
|||
break; |
|||
/*case "de": |
|||
result = german.getString(key); |
|||
break; |
|||
case "it": |
|||
result = italian.getString(key); |
|||
break; |
|||
case "fr": |
|||
result = french.getString(key); |
|||
break; |
|||
case "ml": |
|||
result = malayalam.getString(key); |
|||
break; |
|||
case "hi": |
|||
result = hindi.getString(key); |
|||
break; |
|||
case "pt-BR": |
|||
result = portuguesebr.getString(key); |
|||
break; |
|||
case "ru": |
|||
result = russian.getString(key); |
|||
break; |
|||
case "ar": |
|||
result = arabic.getString(key); |
|||
break; |
|||
case "ca": |
|||
result = catalan.getString(key); |
|||
break; |
|||
case "gl": |
|||
result = galician.getString(key); |
|||
break; |
|||
case "fa": |
|||
result = persian.getString(key); |
|||
break; |
|||
case "tr": |
|||
result = turkish.getString(key); |
|||
break;*/ |
|||
default: |
|||
result = english.getString(key); |
|||
break; |
|||
} |
|||
} catch (MissingResourceException e) { |
|||
result = english.getString(key); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
public HashMap<String, String> getSupportedLanguages() { |
|||
return supportedLanguages; |
|||
} |
|||
|
|||
public String getLanguageCodeByName(String language) { |
|||
return supportedLanguages.entrySet().stream().filter(x -> x.getValue().equals(language)).findFirst().get().getKey(); |
|||
} |
|||
} |
|||
@ -0,0 +1,108 @@ |
|||
package org.telegram.services; |
|||
|
|||
import java.time.*; |
|||
import java.util.concurrent.Executors; |
|||
import java.util.concurrent.ScheduledExecutorService; |
|||
import java.util.concurrent.TimeUnit; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 2.0 |
|||
* @brief Exectue a task periodically |
|||
* @date 27/01/25 |
|||
*/ |
|||
public class TimerExecutor { |
|||
private static volatile BotLogger log = BotLogger.getLogger(TimerExecutor.class.getName()); |
|||
private static volatile TimerExecutor instance; ///< Instance
|
|||
private static final ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1); ///< Thread to execute operations
|
|||
|
|||
/** |
|||
* Private constructor due to singleton |
|||
*/ |
|||
private TimerExecutor() { |
|||
} |
|||
|
|||
/** |
|||
* Singleton pattern |
|||
* |
|||
* @return Instance of the executor |
|||
*/ |
|||
public static TimerExecutor getInstance() { |
|||
final TimerExecutor currentInstance; |
|||
if (instance == null) { |
|||
synchronized (TimerExecutor.class) { |
|||
if (instance == null) { |
|||
instance = new TimerExecutor(); |
|||
} |
|||
currentInstance = instance; |
|||
} |
|||
} else { |
|||
currentInstance = instance; |
|||
} |
|||
|
|||
return currentInstance; |
|||
} |
|||
|
|||
/** |
|||
* Add a new CustomTimerTask to be executed |
|||
* |
|||
* @param task Task to execute |
|||
* @param targetHour Hour to execute it |
|||
* @param targetMin Minute to execute it |
|||
* @param targetSec Second to execute it |
|||
*/ |
|||
public void startExecutionEveryDayAt(CustomTimerTask task, int targetHour, int targetMin, int targetSec) { |
|||
log.warn("Posting new task" + task.getTaskName()); |
|||
final Runnable taskWrapper = () -> { |
|||
try { |
|||
task.execute(); |
|||
task.reduceTimes(); |
|||
startExecutionEveryDayAt(task, targetHour, targetMin, targetSec); |
|||
} catch (Exception e) { |
|||
log.severe("Bot threw an unexpected exception at TimerExecutor", e); |
|||
} |
|||
}; |
|||
if (task.getTimes() != 0) { |
|||
final long delay = computNextDilay(targetHour, targetMin, targetSec); |
|||
executorService.schedule(taskWrapper, delay, TimeUnit.SECONDS); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Find out next daily execution |
|||
* |
|||
* @param targetHour Target hour |
|||
* @param targetMin Target minute |
|||
* @param targetSec Target second |
|||
* @return time in second to wait |
|||
*/ |
|||
private long computNextDilay(int targetHour, int targetMin, int targetSec) { |
|||
final LocalDateTime localNow = LocalDateTime.now(Clock.systemUTC()); |
|||
LocalDateTime localNextTarget = localNow.withHour(targetHour).withMinute(targetMin).withSecond(targetSec); |
|||
while (localNow.compareTo(localNextTarget) > 0) { |
|||
localNextTarget = localNextTarget.plusDays(1); |
|||
} |
|||
|
|||
final Duration duration = Duration.between(localNow, localNextTarget); |
|||
return duration.getSeconds(); |
|||
} |
|||
|
|||
@Override |
|||
public void finalize() { |
|||
this.stop(); |
|||
} |
|||
|
|||
/** |
|||
* Stop the thread |
|||
*/ |
|||
public void stop() { |
|||
executorService.shutdown(); |
|||
try { |
|||
executorService.awaitTermination(1, TimeUnit.DAYS); |
|||
} catch (InterruptedException ex) { |
|||
log.severe(ex); |
|||
} catch (Exception e) { |
|||
log.severe("Bot threw an unexpected exception at TimerExecutor", e); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package org.telegram.structure; |
|||
|
|||
/** |
|||
* @author Ruben Bermudez |
|||
* @version 1.0 |
|||
* @brief Weather Alert representation |
|||
* @date 23 of July of 2015 |
|||
*/ |
|||
public class WeatherAlert { |
|||
private int id; |
|||
private int userId; |
|||
private int cityId; |
|||
|
|||
public WeatherAlert() { |
|||
} |
|||
|
|||
public int getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(int id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public int getUserId() { |
|||
return userId; |
|||
} |
|||
|
|||
public void setUserId(int userId) { |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public int getCityId() { |
|||
return cityId; |
|||
} |
|||
|
|||
public void setCityId(int cityId) { |
|||
this.cityId = cityId; |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,85 @@ |
|||
helpTransifex= Tricks with words is the game that I play, give it a shot, I might make your day.\n\nTo get the latest Telegram localization file for a language: \n|-- %s LANG_CODE : Get the latest iOS language.\n|-- %s LANG_CODE : Get the latest Android language.\n|-- %s LANG_CODE : Get the latest Webogram language.\n|-- %s LANG_CODE : Get the latest Tdesktop language.\n|-- %s LANG_CODE : Get the latest OSX-App language.\n|-- %s LANG_CODE : Get the latest Windows Phone language.\n\n2. To get an updated localization file for your Android beta-app: \n|-- %s LANG_CODE : Get the latest Android-beta language. |
|||
helpFiles= Leaving a file for some others to find? Just dock your boat here and a bay comes to mind.\n\nShare files through a custom link: \n|-- %s FILEID : Get a file by id.\n|-- %s : Start your file upload.\n|-- %s : Select one of your files to delete it.\n|-- %s : Show a list of your shared files. |
|||
helpDirections= The road ahead, paved with good intentions, the right path ahead however, is what I tend to mention.\n\nTo get directions between two locations: \n|-- %s : Start to get directions |
|||
sendFileToUpload= Please send me a file you want to share. Make sure you attach it as file, not as an image or video. |
|||
fileUploaded= Great, your file has been uploaded. Send this link to anyone you want and they will be able to download the file:\n\n |
|||
deleteUploadedFile= Please select the file you want to delete: |
|||
fileDeleted= The file was deleted |
|||
wrongFileId= Sorry, we can't find a file with that ID. Either a typo was made or it was deleted already. |
|||
listOfFiles= This your currently shared list of files: |
|||
noFiles= You haven't shared any files yet. |
|||
processFinished= The current process was cancelled. |
|||
uploadedFileURL= https://telegram.me/filesbot?start= |
|||
initDirections= Please reply to this message with your starting point. |
|||
sendDestination= Please reply to this message with your destination. |
|||
youNeedReplyDirections= I'm sorry, I can't help you unless you reply to the message I sent you. |
|||
chooselanguage= Please, select a language from the list to change to that language. |
|||
errorLanguage= We don't support that language or a typo was made. The process has been cancelled. |
|||
directionsInit= %s is %s away from %s and it takes %s to arrive there, following these directions:\n\n |
|||
directionsNotFound= Directions not found between %s and %s. |
|||
errorFetchingDirections= Error fetching directions info |
|||
directionsStep= %s during %s (%s) |
|||
languageModified= Your language setting has been updated. |
|||
|
|||
|
|||
helpWeatherMessage= Curious about the weather?\ |
|||
\nJust send me these commands and you'll know a lot better\:\ |
|||
\n\t\t%s Get the current weather for a location or city\ |
|||
\n\t\t%s Get a 3-day forecast for a location or city\ |
|||
\n\t\t%s Set current alerts\ |
|||
\n\t\t%s Select a forecast-language\ |
|||
\n\t\t%s Change your unit preferences |
|||
forecast=%sForecast |
|||
current=%sCurrent |
|||
help=%sHelp |
|||
settings=%sSettings |
|||
cancel=%sCancel |
|||
location=%sLocation |
|||
new=%sNew |
|||
languages=%sLanguages |
|||
alerts=%sAlerts |
|||
units=%sUnits |
|||
back=%sBack |
|||
delete=%sDelete |
|||
showList=%sShow list |
|||
rateMe=%sRate me |
|||
metricSystem=Metric System |
|||
imperialSystem= Imperial System |
|||
selectLanguage=Your current language is %s. Select a language from the list to change to that language. |
|||
languageUpdated=Your language setting has been updated. |
|||
errorLanguageNotFound= We don't support that language or a typo was made. Please select one from the list. |
|||
selectUnits=Your current unit setting is %s. Select an option from the list to change it. |
|||
unitsUpdated=Your unit settings have been updated. |
|||
errorUnitsNotFound= We don't support that unit system or a typo was made. Please select one from the list. |
|||
onWeatherNewCommand=Please send me the city you are interested in, please use this format: CITY,COUNTRY |
|||
onWeatherLocationCommand=Please send me the location you are interested in. |
|||
onCurrentCommandFromHistory=Select an option from your recent requests, "new" to send a new city or "location" to send me a location to get current weather. |
|||
onCurrentCommandWithoutHistory=Select "new" to send a new city or "location" to send me a location to get current weather. |
|||
onForecastCommandFromHistory=Select an option from your recent requests, "new" to send a new city or "location" to send me a location to get 3-day weather forecast. |
|||
onForecastCommandWithoutHistory=Select "new" to send a new city or "location" to send me a location to get a 3-day weather forecast. |
|||
weatherCurrent= The weather for %s is:\n\n %s |
|||
currentWeatherPartMetric=\t- Weather: %s\n\t- Cloudiness: %s\n\t- Temperature: %s ºC\n\n |
|||
currentWeatherPartImperial=\t- Weather: %s\n\t- Cloudiness: %s\n\t- Temperature: %s ºF\n\n |
|||
weatherForcast= The weather for %s will be:\n\n %s |
|||
forecastWeatherPartMetric= %s On %s \n\t- Forecast: %s\n\t- High temperature: %s ºC\n\t- Low temperature: %s ºC\n\n |
|||
forecastWeatherPartImperial= %s On %s \n\t- Forecast: %s\n\t- High temperature: %s ºF\n\t- Low temperature: %s ºF\n\n |
|||
weatherAlert= The weather for %s will be:\n\n %s |
|||
alertWeatherPartMetric=\t- Forecast: %s\n\t- High temperature: %s ºC\n\t- Low temperature: %s ºC\n\n |
|||
alertWeatherPartImperial=\t- Forecast: %s\n\t- High temperature: %s ºF\n\t- Low temperature: %s ºF\n\n |
|||
chooseOption=Please, select an option from the menu. |
|||
backToMainMenu=Process cancelled, back to main menu. |
|||
onSettingsCommand=Please, select an option:\ |
|||
\n\t\t%s Languages: Select a forecast-language\ |
|||
\n\t\t%s Units: Select your preferred units\ |
|||
\n\t\t%s Alerts: Set daily alerts\ |
|||
\n\t\t%s Back: Return to main menu |
|||
alertsMenuMessage=Here you can manage your alerts or add new ones. |
|||
chooseNewAlertCity=Which city do you want to set an alert for? Select an option from your recent requests. |
|||
newAlertSaved=%s Your alert for %s has been correctly created, you will receive the weather update twice a day. |
|||
initialAlertList=You have %d alerts:\n\n%s |
|||
partialAlertList=%s%s\n |
|||
noAlertList=I couldn't find any alert for you. |
|||
alertDeleted=The selected alert has been deleted. |
|||
cityNotFound= City not found |
|||
errorFetchingWeather= We're sorry, there was an error fetching the weather. |
|||
rateMeMessage=If you like this bot, please rate it at https://telegram.me/storebot?start=weatherbot |
|||
@ -0,0 +1,75 @@ |
|||
helpTransifex= Magia con las palabras es lo que se me da bien, quizás te alegre el día.\n\nObtén los últimos archivos de localización de Telegram en tu idioma\:\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para iOS.\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para Android.\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para Webogram.\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para Tdesktop.\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para OS X.\n|-- %s CÓDIGO_IDIOMA \: Obtén el idioma para Windows Phone.\n\n 2. Obtén un archivo de localización actualizado para tu beta de Android\:\n|-- %s CÓDIGO_IDIOMA\: Obtén el idioma para Android beta. |
|||
helpFiles= ¿Quieres compartir un archivo con alguien? Has llegado al puerto adecuado. \n\nComparte archivos usando un enlace personalizado\: \n|-- %s \: ID_ARCHIVO \: Obtener un archivo por id. \n|-- %s \: Iniciar la subida de un archivo. \n|-- %s \: Elige y elimina uno de tus archivos.\n|-- %s \: Muestra una lista de tus archivos compartidos. |
|||
helpDirections= Un viaje por delante es una buena ocasión, ¿pero no sería mejor conociendo el camino?\n\nPara obtener la ruta que debes seguir entre dos lugares\:\n|-- %s \: Comienza a obtener la ruta |
|||
sendFileToUpload= Por favor, envíame el archivo que quieres compartir. Asegúrate de adjuntarlo como archivo, no como imagen o vídeo. |
|||
fileUploaded= Perfecto, ya tengo tu archivo. Envía este link a cualquiera que desees que lo tenga y podrá descargarlo\:\n\n |
|||
deleteUploadedFile= Por favor, selecciona un archivo de la lista para eliminarlo\: |
|||
fileDeleted= El archivo fue eliminado |
|||
wrongFileId= Lo siento, no podemos encontrar el archivo con ese ID. Puede que haya un error o que el archivo haya sido eliminado. |
|||
listOfFiles= Esta es la lista actual de tus archivos compartidos\: |
|||
noFiles= Aún no has compartido ningún archivo. |
|||
processFinished= El proceso actual ha sido cancelado. |
|||
uploadedFileURL= https\://telegram.me/filesbot?start\= |
|||
initDirections= Por favor, responde a este mensaje con el lugar de salida. |
|||
sendDestination= Por favor, responde a este mensaje con el lugar de destino. |
|||
youNeedReplyDirections= Lo siento, no puedo ayudarte a menos que respondas al mensaje que te he enviado. |
|||
chooselanguage= Por favor, elige un idioma de la lista para cambiar a ese idioma. |
|||
errorLanguage= No soportamos ese idioma o ha habido un error. El proceso ha sido cancelado. |
|||
directionsInit= %s está a %s de %s y se necesita %s para llegar, siguiendo estas direcciones\:\n\n |
|||
directionsNotFound= No hemos encontrado una ruta desde %s hasta %s. |
|||
errorFetchingDirections= Ha habido un error obteniendo la ruta |
|||
directionsStep= %s durante %s (%s) |
|||
languageModified= Tus ajustes de idioma fueron actualizados. |
|||
|
|||
|
|||
helpWeatherMessage= ¿Te interesa el estado del tiempo?\nEnvíame estos comandos y te mantendré informado\:\n\t\t%s Obtén el tiempo actual \n\t\t%s Obtén el pronóstico para 3 días \n\t\t%s Establece alertas\n\t\t%s Elige un idioma\n\t\t%s Cambia las unidades |
|||
forecast=%sPronóstico |
|||
current=%sTiempo actual |
|||
help=%sAyuda |
|||
settings=%sAjustes |
|||
cancel=%sCancelar |
|||
location=%sUbicación |
|||
new=%sNueva |
|||
languages=%sIdiomas |
|||
alerts=%sAlertas |
|||
units=%sUnidades |
|||
back=%sAtrás |
|||
delete=%sEliminar |
|||
showList=%sMostrar lista |
|||
rateMe=%sPuntúame |
|||
metricSystem=Sistema métrico |
|||
imperialSystem= Sistema imperial |
|||
selectLanguage=Tu idioma actual es %s. Elige un idioma de la lista para usarlo. |
|||
languageUpdated=Tus ajustes de idioma fueron actualizados. |
|||
errorLanguageNotFound= No soportamos ese idioma o se cometió un error ortográfico. Por favor elige uno de la lista. |
|||
selectUnits=Tu sistema de unidades actual es %s. Elige una opción de la lista para cambiarlo. |
|||
unitsUpdated=Tus ajustes de unidades fueron actualizados. |
|||
errorUnitsNotFound= No soportamos ese sistema de unidades o se cometió un error ortográfico. Por favor elige uno de la lista. |
|||
onWeatherNewCommand=Por favor, envíame la ciudad en la que estas interesado, usa este formato\: CIUDAD,PAÍS |
|||
onWeatherLocationCommand=Por favor, envíame la ubicación en la que estás interesado. |
|||
onCurrentCommandFromHistory=Elige una opción de tu solicitudes recientes, "nueva" para enviar una nueva ciudad o "ubicación" para enviarme una ubicación para obtener el tiempo actual. |
|||
onCurrentCommandWithoutHistory=Elige "nueva" para enviar una nueva ciudad o "ubicación" para enviarme una ubicación para obtener el tiempo actual. |
|||
onForecastCommandFromHistory=Elige una opción de tus solicitudes recientes, "nueva" para enviar una ciudad o "ubicación" |
|||
onForecastCommandWithoutHistory=Elige "nueva" para enviar una nueva ciudad o "ubicación" |
|||
weatherCurrent= El tiempo para %s es\:\n\n%s |
|||
currentWeatherPartMetric=\t- Tiempo\: %s\n\t- Nubes\: %s\n\t-Temperatura\: %s ºC |
|||
currentWeatherPartImperial=\t- Tiempo\: %s\n\t- Nubes\: %s\n\t-Temperatura\: %s ºF |
|||
weatherForcast= El tiempo para %s será\:\n\n%s |
|||
forecastWeatherPartMetric= %s el %s\n- Pronóstico\: %s\n\t- Temperatura máxima\: %s ºC\n\t- Temperatura mínima\: %s ºC\n |
|||
forecastWeatherPartImperial= %s el %s\n- Pronóstico\: %s\n\t- Temperatura máxima\: %s ºF\n\t- Temperatura mínima\: %s ºF\n |
|||
weatherAlert= El tiempo para %s será\:\n\n%s |
|||
alertWeatherPartMetric=\t- Pronóstico\: %s\n\t- Temperatura máxima\: %s ºC\n\t- Temperatura mínima\: %s ºC\n |
|||
alertWeatherPartImperial=\t- Pronóstico\: %s\n\t- Temperatura máxima\: %s ºF\n\t- Temperatura mínima\: %s ºF\n |
|||
chooseOption=Por favor, elige una opción del menú. |
|||
backToMainMenu=Proceso cancelado, vuelta al menú principal. |
|||
onSettingsCommand=Por favor, elige una opción\:\n\t\t%s Idiomas\: elige un idioma\n\t\t%s Unidades\: cambia las unidades\n\t\t%s Alertas\: establece alertas diarias\n\t\t%s Atrás\: vuelve al menú principal |
|||
alertsMenuMessage=Aquí puedes administrar tus alertas o añadir nuevas. |
|||
chooseNewAlertCity=¿Para qué ciudad quieres establecer una alerta? Elige una opción de tus solicitudes recientes. |
|||
newAlertSaved=%s Tu alerta para %s fue añadida correctamente, recibirás actualizaciones del tiempo dos veces al día. |
|||
initialAlertList=Tienes %d alertas\:\n\n%s |
|||
partialAlertList=%s%s\n |
|||
noAlertList=No pude encontrar ninguna alerta. |
|||
alertDeleted=La alerta seleccionada fue eliminada. |
|||
cityNotFound= Ciudad no encontrada |
|||
errorFetchingWeather= Lo sentimos, hubo un error solicitando el tiempo. |
|||
rateMeMessage=Si te gusta este bot, por favor, puntúalo en https\://telegram.me/storebot?start\=weatherbot |
|||
@ -0,0 +1,75 @@ |
|||
helpTransifex= Schieten woorden tekort of heb je last van een babylonische dwaling? Probeer mij dan eens uit voor een Telegram-vertaling.\n\nOm de laatste vertaling voor Telegram te verkrijgen voor een taal\:\n|-- %s TAAL_CODE \: De meest recente iOS-vertaling.\n|-- %s TAAL_CODE \: De meest recente Android-vertaling\n|-- %s TAAL_CODE \: De meest recente Webogram-vertaling.\n|-- %s TAAL_CODE \: De meest recente Tdesktop-vertaling.\n|-- %s TAAL_CODE \: De meest recente OSX-vertaling.\n|-- %s TAAL_CODE \: De meest recente Windows Phone-vertaling.\n\n2. Alleen voor Android beta in je huidige taal\:\n|-- %s TAAL_CODE \: De meest Android-beta vertaling\n\n(TAAL_CODE voorbeeld\: nl) |
|||
helpFiles= Het downloadverbod is van kracht want Brein greep de macht, je downloads zijn nu officieel illegaal, maar een bestandje met mij delen, zodat anderen het kunnen vinden, is dat eigenlijk wel zo abnormaal?\n\nBestanden delen via een link\:\n|-- %s BESTANDSID \: Ontvang een bestand met ID.\n|-- %s \: Begin een bestandsupload.\n|-- %s \: Kies een bestand om te verwijderen.\n|-- %s \: Geef een lijst met gedeelde bestanden weer. |
|||
helpDirections= Vele wegen leiden naar Rome, maar terug naar Leiden is toch nog een hele klus, bent u het zoeken op de kaart al zat? Vraag het aan mij en ik breng u op het rechte pad\!\n\nOm een routebeschrijving tussen twee locaties te ontvangen\:\n|-- %s \: Start een routebeschrijving. |
|||
sendFileToUpload= Stuur mij het bestand dat je wilt delen. Zorg ervoor dat je het stuurt als een bestand en niet als een afbeelding of video. |
|||
fileUploaded= Je bestand is geüpload. Stuur deze link naar iedereen die je maar wilt en zij kunnen het bestand ermee downloaden\:\n\n |
|||
deleteUploadedFile= Selecteer het bestand dat je wilt verwijderen\: |
|||
fileDeleted= Het bestand is verwijderd. |
|||
wrongFileId= Sorry, ik kan het bestand met dat ID niet vinden. Mogelijk is er een typefout gemaakt of is het bestand al verwijderd. |
|||
listOfFiles= Dit zijn je gedeelde bestanden op het moment\: |
|||
noFiles= Je hebt nog geen bestanden gedeeld. |
|||
processFinished= Het huidige proces is geannuleerd. |
|||
uploadedFileURL= https\://telegram.me/filesbot?start\= |
|||
initDirections= Beantwoord dit bericht met je vertrekpunt. |
|||
sendDestination= Beantwoord dit bericht met je bestemming. |
|||
youNeedReplyDirections= Het spijt me, ik kan je niet helpen tenzij je het bericht dat ik stuurde beantwoord. |
|||
chooselanguage= Kies een taal uit de lijst om de taal te wijzigen. |
|||
errorLanguage= Deze taal ondersteunen we niet of je hebt een typefout gemaakt. Het proces is geannuleerd. |
|||
directionsInit= %s is %s verwijderd van %s en het duurt %s om er te komen met de volgende routebeschrijving\:\n\n |
|||
directionsNotFound= Routebeschrijving tussen %s en %s niet gevonden. |
|||
errorFetchingDirections= Ophalen van routebeschrijving mislukt |
|||
directionsStep= %s voor %s (%s) |
|||
languageModified= Je taalinstelling is bijgewerkt. |
|||
|
|||
|
|||
helpWeatherMessage= Zon of regen, hagel of ijs?\nVraag het aan mij en ik maak u weer wijs\!\n\n\t\t%s Om de huidige weersvoorspelling te ontvangen\n\t\t%s Voor een drie-daagse weersvoorspelling\n\t\t%s Waarschuwingen instellen\n\t\t%s Kies een weersvoorspellingstaal\n\t\t%s Kies een eenhedenstelsel |
|||
forecast=%sVoorspelling |
|||
current=%sHuidig |
|||
help=%sHelp |
|||
settings=%sInstellingen |
|||
cancel=%sAnnuleren |
|||
location=%sLocatie |
|||
new=%sNieuw |
|||
languages=%sTalen |
|||
alerts=%sWaarschuwingen |
|||
units=%sEenheden |
|||
back=%sTerug |
|||
delete=%sVerwijderen |
|||
showList=%sLijst weergeven |
|||
rateMe=%sBeoordeel mij |
|||
metricSystem=Metriek stelsel |
|||
imperialSystem= Imperiaal stelsel |
|||
selectLanguage=Je huidige taal is %s. Kies een taal van de lijst om deze instelling te wijzigen. |
|||
languageUpdated=Je taalinstelling is bijgewerkt. |
|||
errorLanguageNotFound= Deze taal ondersteunen we niet of je hebt een typefout gemaakt. Kies een taal uit de lijst. |
|||
selectUnits=Je huidige eenhedenstelsel is %s. Kies een optie van de lijst om deze instelling te wijzigen. |
|||
unitsUpdated=Je gekozen eenheid is bijgewerkt. |
|||
errorUnitsNotFound= Dit stelsel ondersteunen we helaas niet, of je hebt een typefout gemaakt. Kies een stelsel van de lijst. |
|||
onWeatherNewCommand=Stuur me de stad waarin je geïnteresseerd bent. Gebruik dit formaat\: STAD,LAND |
|||
onWeatherLocationCommand=Stuur me de locatie waarin je geïnteresseerd bent. |
|||
onCurrentCommandFromHistory=Kies een optie van je recente verzoeken, "nieuw" om een stad te sturen of "locatie" om mij een locatie te sturen en de huidige weersvoorspelling te ontvangen. |
|||
onCurrentCommandWithoutHistory=Kies "nieuw" om een stad te sturen of "locatie" om mij een locatie te sturen de huidige weersvoorspelling te ontvangen. |
|||
onForecastCommandFromHistory=Kies een optie van je recente verzoeken, "nieuw" om een stad te sturen of "locatie" om mij een locatie te sturen en een drie-daagse weersvoorspelling te ontvangen. |
|||
onForecastCommandWithoutHistory=Kies "nieuw" om een stad te sturen of "locatie" om mij een locatie te sturen en een drie-daagse weersvoorspelling te ontvangen. |
|||
weatherCurrent= De weersverwachting voor %s is\:\n\n%s |
|||
currentWeatherPartMetric=\t- Weer\: %s\n\t- Bewolking\: %s\n\t- Temperatuur\: %s ºC\n |
|||
currentWeatherPartImperial=\t- Weer\: %s\n\t- Bewolking\: %s\n\t- Temperatuur\: %s ºF\n |
|||
weatherForcast= De weersverwachting voor %s\:\n\n%s |
|||
forecastWeatherPartMetric= %s op %s \n\t- Voorspelling\: %s\n\t- Hoogste temperatuur\: %s ºC\n\t- Laagste temperatuur\: %s ºC\n |
|||
forecastWeatherPartImperial= %s on %s \n\t- Voorspelling\: %s\n\t- Hoogste temperatuur\: %s ºF\n\t- Laagste temperatuur\: %s ºF\n |
|||
weatherAlert= De weersverwachting voor %s\:\n\n%s |
|||
alertWeatherPartMetric=\t- Voorspelling\: %s\n\t- Hoogste temperatuur\: %s ºC\n\t- Laagste temperatuur\: %s ºC\n |
|||
alertWeatherPartImperial=\t- Voorspelling\: %s\n\t- Hoogste temperatuur\: %s ºF\n\t- Laagste temperatuur\: %s ºF\n |
|||
chooseOption=Selecteer een optie uit het menu. |
|||
backToMainMenu=Proces geannuleerd, terug naar het hoofdmenu. |
|||
onSettingsCommand=Maak een keuze\:\n\t\t%s Taal\: Kies een weersvoorspellings-taal\n\t\t%s Eenheid\: Wijzig je voorkeurseenheid.\n\t\t%s Alerts\: dagelijkse waarschuwingen instellen\n\t\t%s Back\: Terug naar het hoofdmenu |
|||
alertsMenuMessage=Hier kan je je waarschuwingen beheren of nieuwe toevoegen. |
|||
chooseNewAlertCity=Voor welke stad wil je een waarschuwing instellen? Kies een optie van je recente verzoeken. |
|||
newAlertSaved=%s Je waarschuwing voor %s is aangemaakt, je ontvangt twee keer per dag een weersvoorspelling. |
|||
initialAlertList=Je hebt %d waarschuwingen\:\n\n%s |
|||
partialAlertList=%s%s\n |
|||
noAlertList=Geen waarschuwingen gevonden. |
|||
alertDeleted=De geselecteerde waarschuwing is verwijderd. |
|||
cityNotFound= Stad niet gevonden. |
|||
errorFetchingWeather= Sorry, er is iets misgegaan bij het ophalen van het weer. |
|||
rateMeMessage=Als je deze bot leuk vindt dan kan je hem hier beoordelen https\://telegram.me/storebot?start\=weatherbot |
|||
@ -0,0 +1,75 @@ |
|||
helpTransifex= Para obter a última tradução para os aplicativos do Telegram em um idioma\:\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para iOS.\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para Android.\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para Webogram.\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para TDesktop.\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para OSX.\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para Windows Phone.\n\n2. Para obter a o arquivo de tradução atualizado para o seu aplicativo beta do Android\:\n|-- %s CODIGO_DO_IDIOMA\: Obter a última tradução para Android-beta. |
|||
helpFiles= Deseja compartilhar um arquivo com outras pessoas? Você está no lugar certo\!\n\nCompartilhe arquivos através de um link\:\n|-- %s IDDOARQUIVO \: Obter arquivo pelo id.\n|-- %s \: Iniciar seu upload de arquivo.\n|-- %s \: Escolher um de seus arquivos para apagar.\n|-- %s \: Mostrar lista de seus arquivos compartilhados. |
|||
helpDirections= A estrada à frente, cheia de boas intenções, o caminho logo à frente no entanto, é o que eu tendo a mencionar.\n\nPara obter localizações entre dois locais\:\n|-- %s \: Começar para receber as direções |
|||
sendFileToUpload= Por favor, envie-me o arquivo que deseja compartilhar. Certifique-se de anexá-lo como arquivo, e não como uma imagem ou vídeo. |
|||
fileUploaded= Ótimo, seu arquivo foi carregado. Envie esse link para qualquer um que quiser e eles poderão baixar o seu arquivo\:\n\n |
|||
deleteUploadedFile= Por favor, selecione o arquivo que deseja apagar\: |
|||
fileDeleted= O arquivo foi deletado |
|||
wrongFileId= Desculpe, não conseguimos achar o arquivo com esse ID. Houve algum erro ao digitar ou o arquivo já foi deletado. |
|||
listOfFiles= Essa é sua lista de arquivos compartilhados atualmente\: |
|||
noFiles= Você não compartilhou arquivos ainda. |
|||
processFinished= O processo atual foi cancelado. |
|||
uploadedFileURL= https\://telegram.me/filesbot?start\= |
|||
initDirections= Por favor, responda a essa mensagem com seu ponto de partida. |
|||
sendDestination= Por favor, responda a essa mensagem com seu destino. |
|||
youNeedReplyDirections= Me desculpe, não consigo ajudá-lo a menos que você responda a mensagem que lhe enviei. |
|||
chooselanguage= Por favor, escolha um idioma da lista para alterar para essa linguagem; |
|||
errorLanguage= Nós não temos suporte para essa linguagem ou ela foi escrita errada. Esse processo foi cancelado. |
|||
directionsInit= %s é %s distante de %s e demora %s para chegar lá, seguindo essas direções\:\n\n |
|||
directionsNotFound= Direções não encontradas entre %s e %s |
|||
errorFetchingDirections= Erro ao obter informações de direção. |
|||
directionsStep= %s durante %s (%s) |
|||
languageModified= Sua configuração de idioma foi atualizada. |
|||
|
|||
|
|||
helpWeatherMessage= Curioso sobre o clima?\nBasta me enviar esses comandos e você saberá muito mais.\n\n\t\t%s Obter o clima atual de uma localização ou cidade\n\t\t%s Obter a previsão de 3 dias de uma localização ou cidade\n\t\t%s Definir alertas atuais\n\t\t%s Selecionar um idioma para a previsão\n\t\t%s Alterar suas preferências de unidade |
|||
forecast=%sPrevisão |
|||
current=%sAtual |
|||
help=%sAjuda |
|||
settings=%sConfiguração |
|||
cancel=%sCancelar |
|||
location=%sLocalização |
|||
new=%sNovo |
|||
languages=%sIdiomas |
|||
alerts=%sAlertas |
|||
units=%sUnidades |
|||
back=%sVoltar |
|||
delete=%sApagar |
|||
showList=%sMostrar lista |
|||
rateMe=%sMe avalie |
|||
metricSystem=Sistema Métrico |
|||
imperialSystem= Sistema Imperial |
|||
selectLanguage=Seu idioma atual é %s. Selecione um idioma da lista para alterar para essa linguagem. |
|||
languageUpdated=Sua configuração de idioma foi atualizada. |
|||
errorLanguageNotFound= Nós não temos suporte para essa linguagem ou ela foi escrita errada. Por favor, selecione um idioma da lista. |
|||
selectUnits=Sua unidade atual é %s. Selecione uma opção da lista para alterar. |
|||
unitsUpdated=Sua configuração de unidade foi atualizada. |
|||
errorUnitsNotFound= Nós não temos suporte para essa unidade ou ela foi escrita errada. Por favor, selecione um tipo de unidade da lista. |
|||
onWeatherNewCommand=Envie-me a cidade e país que você está interessado, use o formato\: CIDADE,PAÍS |
|||
onWeatherLocationCommand=Por favor, selecione a localização que você está interessado. |
|||
onCurrentCommandFromHistory=Selecione uma opção de suas solicitações recentes, "novo" para enviar uma nova cidade ou "localização" para me enviar seu local e obter o clima atual. |
|||
onCurrentCommandWithoutHistory=Selecione "novo" para enviar uma nova cidade ou "localização" para me enviar a localização e obter o clima atual. |
|||
onForecastCommandFromHistory=Selecione uma opção de suas solicitações recentes, "novo" para enviar uma nova cidade ou "localização" para me enviar seu local e obter a previsão de 3 dias. |
|||
onForecastCommandWithoutHistory=Selecione "novo" para enviar uma nova cidade ou "localização" para me enviar seu local e obter a previsão de 3 dias. |
|||
weatherCurrent= O clima para %s é de\:\n\n%s |
|||
currentWeatherPartMetric=\t- Clima\: %s\n\t- Nebulosidade\: %s\n\t- Clima\: %s ºC\n\n |
|||
currentWeatherPartImperial=\t- Clima\: %s\n\t- Nebulosidade\: %s\n\t- Temperatura\: %s ºF\n\n |
|||
weatherForcast= O clima para %s será de\:\n\n%s |
|||
forecastWeatherPartMetric= %s Em %s \n\t- Previsão\: %s\n\t- Máxima\: %s ºC\n\t- Mínima\: %s ºC\n\n |
|||
forecastWeatherPartImperial= %s Em %s \n\t- Previsão\: %s\n\t- Máxima\: %s ºF\n\t- Mínima\: %s ºF\n\n |
|||
weatherAlert= O clima para %s será de\:\n\n%s |
|||
alertWeatherPartMetric=\t- Previsão\: %s\n\t- Máxima\: %s ºC\n\t- Mínima\: %s ºC\n\n |
|||
alertWeatherPartImperial=\t- Previsão\: %s\n\t- Máxima\: %s ºF\n\t- Mínima\: %s ºF\n\n |
|||
chooseOption=Por favor, selecione uma opção do menu. |
|||
backToMainMenu=Processo cancelado, de volta ao menu principal. |
|||
onSettingsCommand=Por favor, selecione uma opção\:\n\t\t%s Idiomas\: Selecione um idioma para a previsão\n\t\t%s Unidades\: Selecione sua unidade preferida\n\t\t%s Alertas\: Definir alertas diários\n\t\t%s Voltar\: Voltar ao menu principal |
|||
alertsMenuMessage=Aqui você pode alterar ou adicionar novos alertas. |
|||
chooseNewAlertCity=Para qual cidade você deseja definir um alerta? Selecione uma opção de suas solicitações recentes. |
|||
newAlertSaved=%s Seu alerta para %s foi criado corretamente, você irá receber atualizações sobre o clima duas vezes ao dia. |
|||
initialAlertList=Você tem %d alertas\:\n\n%s |
|||
partialAlertList=%s%s\n |
|||
noAlertList=Eu não consegui encontrar nenhum alerta para você. |
|||
alertDeleted=O alerta selecionado foi apagado. |
|||
cityNotFound= Cidade não encontrada |
|||
errorFetchingWeather= Desculpe, houve um erro ao obter o clima. |
|||
rateMeMessage=Se você gosta deste bot, por favor nos avalie em https\://telegram.me/storebot?start\=weatherbot |
|||
Loading…
Reference in new issue