diff --git a/MyTracks/res/layout/about.xml b/MyTracks/res/layout/about.xml index 0870154b7..56c721c37 100644 --- a/MyTracks/res/layout/about.xml +++ b/MyTracks/res/layout/about.xml @@ -119,7 +119,7 @@ limitations under the License. android:autoLink="web" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:text="@string/about_weburl" + android:text="@string/my_tracks_web_url" android:textSize="18sp" /> diff --git a/MyTracks/res/values-ca/strings.xml b/MyTracks/res/values-ca/strings.xml index f2a061922..07cae83f8 100644 --- a/MyTracks/res/values-ca/strings.xml +++ b/MyTracks/res/values-ca/strings.xml @@ -81,7 +81,6 @@ limitations under the License. No es pot escriure a un fitxer. S\'ha finalitzat la lectura a la targeta SD. S\'ha finalitzat l\'escriptura a la targeta SD. - Creat per <a href=\'http://mytracks.appspot.com\'>My Tracks</a> a l\'Android. Trieu un compte S\'ha produït un error. Proveu de nou. S\'ha prdouït un error quan s\'enviava la ruta a Google Docs. Proveu més tard. @@ -98,10 +97,6 @@ limitations under the License. Enregistrat Comparteix la ruta amb amics Envia ara - S\'ha enviat la ruta a docs.google.com. - S\'ha enviat la ruta a maps.google.com. - S\'ha creat un Google Fusion Table nou a google.com/fusiontables. - S\'ha enviat la ruta a un full de càlcul a docs.google.com. Envia a... (Part %d) Cadència diff --git a/MyTracks/res/values-de/strings.xml b/MyTracks/res/values-de/strings.xml index e5333f6c3..64270ea48 100644 --- a/MyTracks/res/values-de/strings.xml +++ b/MyTracks/res/values-de/strings.xml @@ -84,7 +84,6 @@ limitations under the License. Die Datei kann nicht geschrieben werden. Lesen von der SD-Karte beendet. Der Track wurde auf die SD-Karte geschrieben. - Erstellt von <a href=\'http://mytracks.appspot.com\'>My Tracks</a> für Android. Wähle ein Konto Google Text & Tabellen Ein Fehler ist aufgetreten. Bitte versuche es noch einmal. @@ -102,10 +101,6 @@ limitations under the License. Aufgezeichnet am Track mit Freunden teilen Jetzt senden - Dein Track wurde an docs.google.com gesendet. - Dein Track wurde auf maps.google.com gespeichert. - Eine neue Tabelle wurde auf google.com/fusiontables erstellt. - Dein Track wurde in einer neuen Tabelle bei docs.google.com gespeichert. Senden an… (Teil %d) Akkukapazität diff --git a/MyTracks/res/values-es/strings.xml b/MyTracks/res/values-es/strings.xml index 67a72e3b7..76e1d388d 100644 --- a/MyTracks/res/values-es/strings.xml +++ b/MyTracks/res/values-es/strings.xml @@ -94,7 +94,6 @@ limitations under the License. No es posible escribir al archivo. Lectura de tarjeta SD concluída. Grabación a tarjeta SD concluída. - Creado por <a href=\'http://mytracks.appspot.com\'>My Tracks</a> en Android. Elija una cuenta A ocurrido un error. Por favor, inténtelo de nuevo. Se produjo un error al enviar su recorrido a Google Docs. @@ -120,12 +119,7 @@ limitations under the License. Compartir recorrido Estado del envío: Enviar ahora - Su recorrido ha sido enviado a docs.google.com. - Su recorrido ha sido enviado a maps.google.com. Es posible que pasen unos minutos hasta que los nuevos recorridos aparezcan. - Una nueva tabla de Google Fusion ha sido creada en google.com/fusiontables. - Su recorrido ha sido enviado a una nueva hoja de cálculo de docs.google.com. - Un nuevo sitio ha sido añadido en maps.google.com. Enviar a... "(Parte %d)" Nivel de batería diff --git a/MyTracks/res/values-fi/strings.xml b/MyTracks/res/values-fi/strings.xml index 51be1ba40..beb117bfe 100644 --- a/MyTracks/res/values-fi/strings.xml +++ b/MyTracks/res/values-fi/strings.xml @@ -97,7 +97,6 @@ limitations under the License. Kirjoitusvirhe. SD-kortin luku valmis. SD-kortille kirjoitus valmis. - Created by <a href=\'http://mytracks.appspot.com\'>My Tracks</a> on Android. Valitse tili Google Docs Virhe lähetettäessä reittiä Google Docs-palveluun.. @@ -123,12 +122,7 @@ limitations under the License. Jaa reitti Lähetyksen tila: Lähetä - Reittisi on lähetetty osoitteeseen docs.google.com. - Reittisi on lähetetty osoitteeseen maps.google.com. Reitin näkyminen saattaa kestää muutaman minuutin. - Uusi Google Fusion taulukko on luotu osoitteeseen google.com/fusiontables. - Reittisi on luotu taulukoksi osoitteeseen docs.google.com. - Uusi Google My Map on luotu osoitteeseen maps.google.com. Lähetä... (Osa %d) Akku diff --git a/MyTracks/res/values-fr/strings.xml b/MyTracks/res/values-fr/strings.xml index cf7d23951..b7c56cc73 100644 --- a/MyTracks/res/values-fr/strings.xml +++ b/MyTracks/res/values-fr/strings.xml @@ -79,7 +79,6 @@ limitations under the License. Aucun emplacement externe de sauvegarde n\'a été trouvé. Assurez-vous qu\'une carte SD est insérée et que votre téléphone n\'est pas relié à un ordinateur. Impossible d\'écrire dans le fichier. Parcours enregistré sur la carte SD. - Créée par <a href=\'http://mytracks.appspot.com\'>My Tracks</a> sous Android. Choisissez un compte Il y a eu une erreur lors de l\'envoi de votre parcours à Google Docs. Réessayez plus tard SVP. Il y a eu une erreur lors de l\'envoi de votre parcours à Google Fusion Tables. Réessayez plus tard SVP. @@ -95,10 +94,6 @@ limitations under the License. Enregistré Partager des parcours. Envoyer maintenant - Votre parcours a été envoyé à docs.google.com. - Votre parcours a été envoyé à maps.google.com. - Une nouvelle table Google Fusion vient d\'être créée sur google.com/fusiontables. - Votre parcours a été envoyé dans un tableur à docs.google.com. Envoyer à (Portion %d) Cadence diff --git a/MyTracks/res/values-it/strings.xml b/MyTracks/res/values-it/strings.xml index 1843a48f7..b07cd5b63 100644 --- a/MyTracks/res/values-it/strings.xml +++ b/MyTracks/res/values-it/strings.xml @@ -77,7 +77,6 @@ limitations under the License. Nessuna memoria esterna trovata. Assicurati che la scheda SD sia inserita e che il telefono no sia montato su un computer. Impossibile scrivere su file. Finito di salvare il percorso sulla scheda SD. - Creato da <a href=\'http://mytracks.appspot.com\'>My Tracks</a> su Android. Scegli un account Google Docs Si è verificato un errore nell\'invio del percorso a Google Docs. Per favore riporva più tardi. @@ -91,9 +90,6 @@ limitations under the License. Registrato Condividi il percorso con amici Invia adesso - Il tuo percorso è stato inviato a docs.google.com. - Il tuo percorso è stato inviato a maps.google.com. - Il tuo percorso è stato inviato ad un nuovo foglio di calcolo su docs.google.com. Invia a... (Parte %d) Visualizzazione diff --git a/MyTracks/res/values-ja/strings.xml b/MyTracks/res/values-ja/strings.xml index e8eb63033..f93246845 100644 --- a/MyTracks/res/values-ja/strings.xml +++ b/MyTracks/res/values-ja/strings.xml @@ -95,7 +95,6 @@ limitations under the License. ファイルへの書き込みができません. SDカードからの読み込み終了. SDカードへの書き込み終了. - Android用<a href=\'http://mytracks.appspot.com\'>My Tracks</a>で作成しました. アカウント選択 Google Docsへのトラック送信でエラーが発生しました.しばらく待って試して下さい. Google Fusion Tablesへのトラック送信でエラーが発生しました.しばらく待って試して下さい. @@ -118,12 +117,7 @@ limitations under the License. 記録日 トラック共有 今すぐ送信 - トラックをdocs.google.comに送信しました. - トラックをmaps.google.comに送信しました. 新しいトラックが表示されるまでに数分かかることがあります. - 新しいGoogle Fusion Tableをgoogle.com/fusiontablesに作成しました. - トラックをdocs.google.comの新しいスプレッドシートに送信しました. - 新しいマイマップをmap.google.comに作成しました. 送信... (パート %d) ケイデンス diff --git a/MyTracks/res/values-pl/strings.xml b/MyTracks/res/values-pl/strings.xml index 54cffe3bd..e4d5bff58 100644 --- a/MyTracks/res/values-pl/strings.xml +++ b/MyTracks/res/values-pl/strings.xml @@ -80,7 +80,6 @@ limitations under the License. Nie można zapisać pliku. Zakończono odczytywanie z karty SD. Zakończono zapisywanie na karcie SD. - Utworzona przez <a href=\'http://mytracks.appspot.com\'>My Tracks</a> na Android. Wybierz konto Dokumenty Google Podczas przesyłania pliku do Dokumentów Google pojawił się błąd. Spróbuj ponownie później. @@ -94,9 +93,6 @@ limitations under the License. Zapisana Podziel się trasą z przyjaciółmi Wyślij teraz - Twoja trasa została wysłana do docs.google.com. - Twoja trasa został wysłana do maps.google.com. - Twoja trasa została wysłana do nowego arkusza na docs.google.com. Wyślij do... (Część %d) Podłączony diff --git a/MyTracks/res/values-pt-rBR/strings.xml b/MyTracks/res/values-pt-rBR/strings.xml index e457bfaa5..a993eae6f 100644 --- a/MyTracks/res/values-pt-rBR/strings.xml +++ b/MyTracks/res/values-pt-rBR/strings.xml @@ -75,7 +75,6 @@ limitations under the License. Nenhum armazenamento externo foi encontrado. Assegure-se de que um cartão SD esteja inserido e que seu telefone não esteja montado em um computador. Impossível gravar arquivo. Gravação no cartão SD concluída. - "Criado por <a href='http://mytracks.appspot.com'>My Tracks</a> no Android. Escolher conta Google Docs Ocorreu um erro ao enviar seu caminho para o Google Docs. Por favor tente novamente mais tarde. @@ -92,10 +91,6 @@ limitations under the License. Gravado Compartilhar caminho com amigos Enviar agora - Seu caminho foi enviado para docs.google.com. - Seu caminho foi enviado para maps.google.com. - Uma nova Fusion Table Google foi criada em google.com/fusiontables. - Seu caminho foi enviado para uma nova planilha em docs.google.com. Enviar para... "(Parte %d) Exibição diff --git a/MyTracks/res/values-ru/strings.xml b/MyTracks/res/values-ru/strings.xml index d2196a03b..773dd00c5 100644 --- a/MyTracks/res/values-ru/strings.xml +++ b/MyTracks/res/values-ru/strings.xml @@ -96,7 +96,6 @@ limitations under the License. Невозможно записать файл. Чтение с SD карты закончено. Запись на SD карту закончена. - Создано <a href=\'http://mytracks.appspot.com\'>My Tracks</a> на Android. Выбор учетной записи Google Документы Ошибка при отправке вашего трека в Google Документы. @@ -122,12 +121,7 @@ limitations under the License. Поделиться треком Статус загрузки: Отправить - Ваш трек был отправлен в docs.google.com. - Твой трек был отправлен на maps.google.com. Это может занять несколько минут, прежде чем появятся новые треки. - Новая таблица Google Fusion была создана на google.com/fusiontables. - Ваш трек был отправлен в новую электронную таблицу на docs.google.com. - Новая Google \"Мои карты\" была создана на maps.google.com. Отправить... (Часть %d) Каденс diff --git a/MyTracks/res/values-sv/strings.xml b/MyTracks/res/values-sv/strings.xml index c593a7e41..3126994e9 100644 --- a/MyTracks/res/values-sv/strings.xml +++ b/MyTracks/res/values-sv/strings.xml @@ -77,7 +77,6 @@ limitations under the License. Ingen extern lagring hittades. Se till att ett SD-kort sitter i och att telefonen inte är monterad till en dator. Kan inte skriva till filen. Slutförde skrivningen av spåret till SD-kort. - Skapad av <a href=\'http://mytracks.appspot.com\'>My Tracks</a> på Android. Välj konto Google Dokument Det uppstod ett fel i sändningen av ditt spår till Google Dokument. Försök igen senare. @@ -91,9 +90,6 @@ limitations under the License. Inspelad Dela spår med vänner Skicka nu - Ditt spår har skickats till docs.google.com. - Ditt spår har skickats till maps.google.com. - Ditt spår har skickats till ett nytt kalkylblad på docs.google.com. Skicka till... (Del %d) Visning diff --git a/MyTracks/res/values-zh-rCN/strings.xml b/MyTracks/res/values-zh-rCN/strings.xml index 362d9c557..1356200a6 100644 --- a/MyTracks/res/values-zh-rCN/strings.xml +++ b/MyTracks/res/values-zh-rCN/strings.xml @@ -90,7 +90,6 @@ limitations under the License. 无法写入文件. 从 SD 存储卡读取完毕. 轨迹已导出到 SD 存储卡. - 由 Android 上的 <a href=\'http://mytracks.appspot.com\'>My Tracks</a> 创建. 选择帐户 发送轨迹到 Google Docs 时发生错误. 请稍后重试. 发送轨迹到 Google Fusion Tables 时发生错误. 请稍后重试. @@ -111,12 +110,7 @@ limitations under the License. 分享轨迹 上传状态: 立即发送 - 你的轨迹已经发送到 docs.google.com. - 你的轨迹已经发送到 maps.google.com. 可能需要等待几分钟才能看见新的轨迹. - 已在 google.com/fusiontables 创建新 Google Fusion Table. - 你的轨迹已经作为新的电子表格发送到 docs.google.com. - 已在 maps.google.com 创建了新的 Google My Map. 发送到... (第 %d 部分) 节奏 diff --git a/MyTracks/res/values/do_not_translate.xml b/MyTracks/res/values/do_not_translate.xml index b0ae51197..5f4d8dec2 100644 --- a/MyTracks/res/values/do_not_translate.xml +++ b/MyTracks/res/values/do_not_translate.xml @@ -19,9 +19,10 @@ limitations under the License. My Tracks Track Recording Service + mytracks.appspot.com + mytracks@googlegroups.com - mytracks.appspot.com m.google.com/privacy Copyright 2009 Google Inc. Bartłomiej Niechwiej @@ -46,9 +47,9 @@ limitations under the License. - - google.com/fusiontables - maps.google.com - docs.google.com + google.com/fusiontables + maps.google.com + docs.google.com UA-7222692-2 diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml index a58959831..d4588fa5a 100644 --- a/MyTracks/res/values/strings.xml +++ b/MyTracks/res/values/strings.xml @@ -455,9 +455,10 @@ limitations under the License. - Created by <a href=\'http://mytracks.appspot.com\'>My Tracks</a> on Android. + My Tracks on Android. The two string placeholders are used to insert the html link tags around + 'My Tracks'. E.g., 'Created by <a href=\'http://mytracks.appspot.com\'>My Tracks + </a> on Android.'."> + Created by %1$sMy Tracks%2$s on Android. @@ -590,13 +591,15 @@ limitations under the License. - Your track has been sent to docs.google.com. + indicating that the track is sent to an existing spreadsheet. E.g., 'Your track has been sent + to docs.google.com.'."> + Your track has been sent to %s. - Your track has been sent to maps.google.com. + indicating that the track is sent to an existing map. E.g., 'Your track has been sent to + maps.google.com.'"> + Your track has been sent to %s. - A new Google Fusion table has been created at google.com/fusiontables. + page indicating success. E.g., 'A new Google Fusion table has been created at + google.com/fusiontables.'"> + A new Google Fusion table has been created at %s. - A new spreadsheet is created at docs.google.com. + indicating that a new spreadsheet is created. E.g., 'A new spreadsheet is created at + docs.google.com.'."> + A new spreadsheet is created at %s. - A new Google My Map has been created at maps.google.com. + indicating that a new map is created. E.g., 'A new Google My Map has been created at + maps.google.com.'."> + A new Google My Map has been created at %s. ", // Line 1 - context.getString(R.string.send_google_by_my_tracks), + getCreatedByMyTracks(context, true), // Line 2 context.getString(R.string.stat_total_distance), @@ -353,6 +353,22 @@ public class StringUtils implements DescriptionGenerator { ChartURLGenerator.getChartUrl(distances, elevations, track, context)); } + /** + * Returns the 'Created by My Tracks on Android' string. + * + * @param context the context + * @param addLink true to add a link to the My Tracks web site + */ + public static String getCreatedByMyTracks(Context context, boolean addLink) { + String format = context.getString(R.string.send_google_by_my_tracks); + if (addLink) { + String url = context.getString(R.string.my_tracks_web_url); + return String.format(format, "", ""); + } else { + return String.format(format, "", ""); + } + } + private String getSpeedString(double speed, int speedLabel, int paceLabel, boolean displaySpeed) { double speedInKph = speed * 3.6; diff --git a/MyTracksTest/src/com/google/android/apps/mytracks/services/tasks/StatusAnnouncerTaskTest.java b/MyTracksTest/src/com/google/android/apps/mytracks/services/tasks/StatusAnnouncerTaskTest.java index 4f7c2e600..48d52bc5b 100644 --- a/MyTracksTest/src/com/google/android/apps/mytracks/services/tasks/StatusAnnouncerTaskTest.java +++ b/MyTracksTest/src/com/google/android/apps/mytracks/services/tasks/StatusAnnouncerTaskTest.java @@ -478,7 +478,59 @@ public class StatusAnnouncerTaskTest extends AndroidTestCase { task.runWithStatistics(null); AndroidMock.verify(mockTask, tts); } + + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with time zero. + */ + public void testGetAnnounceTime_time_zero() { + long time = 0; // 0 seconds + assertEquals("0 minutes 0 seconds", task.getAnnounceTime(time)); + } + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with time one. + */ + public void testGetAnnounceTime_time_one() { + long time = 1 * 1000; // 1 second + assertEquals("0 minutes 1 second", task.getAnnounceTime(time)); + } + + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with singular + * numbers with the hour unit. + */ + public void testGetAnnounceTime_singular_has_hour() { + long time = (1 * 60 * 60 * 1000) + (1 * 60 * 1000) + (1 * 1000); // 1 hour 1 minute 1 second + assertEquals("1 hour 1 minute", task.getAnnounceTime(time)); + } + + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with plural numbers + * with the hour unit. + */ + public void testGetAnnounceTime_plural_has_hour() { + long time = (2 * 60 * 60 * 1000) + (2 * 60 * 1000) + (2 * 1000); // 2 hours 2 minutes 2 seconds + assertEquals("2 hours 2 minutes", task.getAnnounceTime(time)); + } + + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with singular + * numbers without the hour unit. + */ + public void testGetAnnounceTime_singular_no_hour() { + long time = (1 * 60 * 1000) + (1 * 1000); // 1 minute 1 second + assertEquals("1 minute 1 second", task.getAnnounceTime(time)); + } + + /** + * Tests {@link StatusAnnouncerTask#getAnnounceTime(long)} with plural numbers + * without the hour unit. + */ + public void testGetAnnounceTime_plural_no_hour() { + long time = (2 * 60 * 1000) + (2 * 1000); // 2 minutes 2 seconds + assertEquals("2 minutes 2 seconds", task.getAnnounceTime(time)); + } + private void startTask(int state) { AndroidMock.resetToNice(tts); AndroidMock.replay(tts);