From c9ef51098111234a5b8041a0148ea72aedb0a4b6 Mon Sep 17 00:00:00 2001 From: Rubenlagu Date: Mon, 20 Jul 2015 02:29:40 +0200 Subject: [PATCH] 1. Added portuguese localization 2. Updates english and spanish localizations --- .../services/LocalisationService.java | 11 ++++--- .../resources/localisation/strings.properties | 2 +- .../localisation/strings_es.properties | 4 +-- .../localisation/strings_pt.properties | 31 +++++++++++++++++++ 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/localisation/strings_pt.properties diff --git a/src/main/java/org/telegram/services/LocalisationService.java b/src/main/java/org/telegram/services/LocalisationService.java index 64fe2e3..6b51c33 100644 --- a/src/main/java/org/telegram/services/LocalisationService.java +++ b/src/main/java/org/telegram/services/LocalisationService.java @@ -89,10 +89,11 @@ public class LocalisationService { supportedLanguages.put("en", "English"); spanish = ResourceBundle.getBundle("localisation.strings", new Locale("es", "ES"), loader); supportedLanguages.put("es", "Español"); - /*german = ResourceBundle.getBundle("localisation.strings", new Locale("de", "DE"), loader); - supportedLanguages.put("de", "Deutsch"); portuguese = ResourceBundle.getBundle("localisation.strings", new Locale("pt", "PT"), loader); - supportedLanguages.put("pt", "Portuguese"); + supportedLanguages.put("pt", "Português"); + /* + german = ResourceBundle.getBundle("localisation.strings", new Locale("de", "DE"), loader); + supportedLanguages.put("de", "Deutsch"); dutch = ResourceBundle.getBundle("localisation.strings", new Locale("nl", "NL"), loader); supportedLanguages.put("nl", "Dutch"); italian = ResourceBundle.getBundle("localisation.strings", new Locale("it", "IT"), loader); @@ -146,10 +147,10 @@ public class LocalisationService { case "es": result = spanish.getString(key); break; - /*case "pt": + case "pt": result = portuguese.getString(key); break; - case "nl": + /*case "nl": result = dutch.getString(key); break; case "de": diff --git a/src/main/resources/localisation/strings.properties b/src/main/resources/localisation/strings.properties index 9d1dacd..1226e14 100644 --- a/src/main/resources/localisation/strings.properties +++ b/src/main/resources/localisation/strings.properties @@ -23,7 +23,7 @@ directionsNotFound= Directions not found between %s and %s. errorFetchingDirections= Error fetching directions info directionsStep= %s during %s (%s) weatherForcast= The weather for %s will be:\n %s Thank you for using our Weather Bot. -weatherCurrent= The weather for %s will be:\n %s Thank you for using our Weather Bot. +weatherCurrent= The weather for %s is:\n %s Thank you for using our Weather Bot. cityNotFound= City not found errorFetchingWeather= We are sorry, there was an error fetching the weather. currentWeatherPart= |-- Weather: %s\n|-- Cloudiness: %s\n |-- Temperature: %s ºC\n\n diff --git a/src/main/resources/localisation/strings_es.properties b/src/main/resources/localisation/strings_es.properties index d0028ee..e4f95e8 100644 --- a/src/main/resources/localisation/strings_es.properties +++ b/src/main/resources/localisation/strings_es.properties @@ -23,9 +23,9 @@ directionsNotFound= No hemos encontrado una ruta desde %s hasta %s. errorFetchingDirections= Ha habido un error obteniendo la ruta directionsStep= %s durante %s (%s) weatherForcast= El tiempo para %s será\:\n%s Gracias por usar nuestro Bot del tiempo. -weatherCurrent= El tiempo para %s será\:\n%s Gracias por usar nuestro Bot del tiempo. +weatherCurrent= El tiempo para %s es\:\n%s Gracias por usar nuestro Bot del tiempo. cityNotFound= Ciudad no encontrada errorFetchingWeather= Lo siento, ha habido un error obteniendo el tiempo. currentWeatherPart= |-- Tiempo\: %s\n|-- Nubes\: %s\n|-- Temperatura\: %s ºC\n -forecastWeatherPart= * El %s \n|--Pronóstico\: %s\n|--Temperatura máxima\: %s ºC\n|--Temperatura mínima\: %s ºC\n\n +forecastWeatherPart= * El %s \n\t|--Pronóstico\: %s\n\t|--Temperatura máxima\: %s ºC\n\t|--Temperatura mínima\: %s ºC\n\n languageModified= Tu idioma ha sido modificado. \ No newline at end of file diff --git a/src/main/resources/localisation/strings_pt.properties b/src/main/resources/localisation/strings_pt.properties new file mode 100644 index 0000000..2f92d9a --- /dev/null +++ b/src/main/resources/localisation/strings_pt.properties @@ -0,0 +1,31 @@ +helpWeather= Curioso sobre o clima?\nBasta me enviar esses comandos e você saberá muito mais.\n\n|-- %s CIDADE,PAÍS \: Obter a previsão do tempo dos próximos 3 dias para uma cidade.\n|-- %s CIDADE,PAÍS \: Obter o clima atual da cidade.\n\n|-- Ou envie a localização para obter a previsão. +helpTransifex= Magia com palavras é o que eu faço, espero alegrar seu dia.\n\nPara 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\= +chooseFromRecentWeather= Por favor, escolha uma opção de suas solicitações recentes\: +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. +pleaseSendMeCityWeather= Envie-me a cidade e país que você está interessado, use o formato\: CIDADE,PAÍS +chooselanguage= Por favor, escolha um idioma da lista para alterar a linguagem do bot. +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) +weatherForcast= O clima para %s será de\:\n%s Obrigado por usar o Weather Bot +weatherCurrent= O clima para %s é de\:\n%s Obrigado por usar o Weather Bot +cityNotFound= Cidade não encontrada +errorFetchingWeather= Desculpe, houve um erro ao obter as informações sobre o clima. +currentWeatherPart= |-- Clima\: %s\n|-- Nebulosidade\: %s\n|-- Temperatura\: %s ºC\n\n +forecastWeatherPart= * Em %s\n\t|--Clima\: %s\n\t|--Máxima\: %s ºC\n\t|--Mínima\: %s ºC\n\n +languageModified= Seu idioma foi atualizado. \ No newline at end of file