From 196537e0f84a84863c77de1c8d309cd79b804dcd Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:10:56 +0300 Subject: [PATCH 01/17] [omim] Ordered core's tts languages. --- sound/tts/languages.hpp | 59 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/sound/tts/languages.hpp b/sound/tts/languages.hpp index 382a633d7d..c8f809fea3 100644 --- a/sound/tts/languages.hpp +++ b/sound/tts/languages.hpp @@ -13,37 +13,38 @@ namespace turns { namespace sound { -array const kLanguageList = +array, 28> const kLanguageList = {{ - "ar", - "cs", - "da", - "de", - "el", - "en", - "es", - "fi", - "fr", - "hi", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "nl", - "pl", - "pt", - "ro", - "ru", - "sk", - "sv", - "sw", - "th", - "tr", - "zh-Hans", - "zh-Hant" + {"en", "English"}, + {"ru", "Русский"}, + {"es", "Español"}, + {"de", "Deutsch"}, + {"fr", "Français"}, + {"zh-Hant", "中文繁體"}, + {"zh-Hans", "中文简体"}, + {"pt", "Português"}, + {"th", "ภาษาไทย"}, + {"tr", "Türkçe"}, + {"ar", "العربية"}, + {"cs", "Čeština"}, + {"da", "Dansk"}, + {"el", "Ελληνικά"}, + {"fi", "Suomi"}, + {"hi", "हिंदी"}, + {"hr", "Hrvatski"}, + {"hu", "Magyar"}, + {"id", "Indonesia"}, + {"it", "Italiano"}, + {"ja", "日本語"}, + {"ko", "한국어"}, + {"nl", "Nederlands"}, + {"pl", "Polski"}, + {"ro", "Română"}, + {"sk", "Slovenčina"}, + {"sv", "Svenska"}, + {"sw", "Kiswahili"} }}; } // namespace sound } // namespace turns } // namespace routing + From b96b4710849b3a58c895ddb9855911d14668318d Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:37:19 +0300 Subject: [PATCH 02/17] [ios] Added unique tts strings. --- strings.txt | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/strings.txt b/strings.txt index da267c86dc..2ea521cf02 100644 --- a/strings.txt +++ b/strings.txt @@ -5248,6 +5248,66 @@ en = TTS unavailable ru = Голосовые подсказки недоступны + [pref_tts_other_section_title] + tags = ios + en = Other + ru = Другой + fr = Autre + da = Andet + id = Lainnya + ko = 다른 언어 + sv = Övrigt + tr = Diğer + uk = Інша + vi = Khác + hu = Egyéb + de = Weitere + fi = Egyéb + cs = Ostatní + it = Altro + nb = Andre + zh-Hant = 其他 + zh-Hans = 其他 + th = อื่น ๆ + ja = その他 + ro = Alta + ar = آخر + sk = Iný + es = Otros + pl = Inny + nl = Andere + pt = Outro + + [pref_tts_how_to_set_up_voice] + tags = ios + en = How to set up voice + ru = Как настроить голос + fr = Comment configurer la voix + da = Sådan indstiller du tale + id = Cara mengatur suara + ko = 음성 설정 방법 + sv = Hur man ställer in ljud + tr = Ses nasıl ayarlanır + uk = Як налаштувати голосовий контроль + vi = Làm thế nào để thiết lập tiếng nói + hu = Így állítsd be a hangot + de = Navi-Stimme einstellen + fi = Így állítsd be a hangot + cs = Jak nastavit hlas + it = Come impostare la voce + nb = Slik installerer du stemme + zh-Hant = 如何設置語音 + zh-Hans = 如何设置语音 + th = วิธีตั้งค่าเสียง + ja = 音声設定の仕方 + ro = Modalitatea de configurare a vocii + ar = كيفية ضبط الصوت + sk = Ako nastaviť hlas + es = Cómo configurar la voz + pl = Jak skonfigurować usługę głosową + nl = Hoe stel je de stem in + pt = Como configurar a voz + [placepage_distance] en = Distance fr = Distance From ece2d3991c52b5081baad45a590176b9424bd933 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:38:08 +0300 Subject: [PATCH 03/17] [ios] Generated unique tts strings. --- android/res/values-ar/strings.xml | 2 ++ android/res/values-cs/strings.xml | 2 ++ android/res/values-da/strings.xml | 2 ++ android/res/values-de/strings.xml | 2 ++ android/res/values-es/strings.xml | 2 ++ android/res/values-fi/strings.xml | 2 ++ android/res/values-fr/strings.xml | 2 ++ android/res/values-hu/strings.xml | 2 ++ android/res/values-in/strings.xml | 2 ++ android/res/values-it/strings.xml | 2 ++ android/res/values-ja/strings.xml | 2 ++ android/res/values-ko/strings.xml | 2 ++ android/res/values-nb/strings.xml | 2 ++ android/res/values-nl/strings.xml | 2 ++ android/res/values-pl/strings.xml | 2 ++ android/res/values-pt/strings.xml | 2 ++ android/res/values-ro/strings.xml | 2 ++ android/res/values-ru/strings.xml | 2 ++ android/res/values-sk/strings.xml | 2 ++ android/res/values-sv/strings.xml | 2 ++ android/res/values-th/strings.xml | 2 ++ android/res/values-tr/strings.xml | 2 ++ android/res/values-uk/strings.xml | 2 ++ android/res/values-vi/strings.xml | 2 ++ android/res/values-zh-rTW/strings.xml | 2 ++ android/res/values-zh/strings.xml | 2 ++ android/res/values/strings.xml | 2 ++ iphone/Maps/ar.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/cs.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/da.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/de.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/en.lproj/Localizable.strings | 4 ++++ iphone/Maps/es.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/fi.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/fr.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/hu.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/id.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/it.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/ja.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/ko.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/nb.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/nl.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/pl.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/pt.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/ro.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/ru.lproj/Localizable.strings | 4 ++++ iphone/Maps/sk.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/sv.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/th.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/tr.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/uk.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/vi.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/zh-Hans.lproj/Localizable.strings | 16 ++++++++++++++++ iphone/Maps/zh-Hant.lproj/Localizable.strings | 16 ++++++++++++++++ 54 files changed, 462 insertions(+) diff --git a/android/res/values-ar/strings.xml b/android/res/values-ar/strings.xml index 83844faafe..238e240772 100644 --- a/android/res/values-ar/strings.xml +++ b/android/res/values-ar/strings.xml @@ -310,6 +310,8 @@ بحث أزرار التكبير عرض على الشاشة + آخر + كيفية ضبط الصوت المسافة الإحداثيات لم يتم فرزها diff --git a/android/res/values-cs/strings.xml b/android/res/values-cs/strings.xml index ec08a7751f..6bbbcbd137 100644 --- a/android/res/values-cs/strings.xml +++ b/android/res/values-cs/strings.xml @@ -307,6 +307,8 @@ Vyhledávání Tlačítka přiblížení/oddálení Zobrazit na obrazovce + Ostatní + Jak nastavit hlas Vzdálenost Souřadnice Nezařazené diff --git a/android/res/values-da/strings.xml b/android/res/values-da/strings.xml index e4047476d5..e894e21a30 100644 --- a/android/res/values-da/strings.xml +++ b/android/res/values-da/strings.xml @@ -308,6 +308,8 @@ Søg Zoom knapper Vis på skærmen + Andet + Sådan indstiller du tale Afstand Koordinater Usorteret diff --git a/android/res/values-de/strings.xml b/android/res/values-de/strings.xml index f581363fdc..106778a1d8 100644 --- a/android/res/values-de/strings.xml +++ b/android/res/values-de/strings.xml @@ -301,6 +301,8 @@ Suche Zoom-Tasten Auf dem Bildschirm anzeigen + Weitere + Navi-Stimme einstellen Distanz Koordinaten Unsortiert diff --git a/android/res/values-es/strings.xml b/android/res/values-es/strings.xml index 153d643692..2d68861a06 100644 --- a/android/res/values-es/strings.xml +++ b/android/res/values-es/strings.xml @@ -299,6 +299,8 @@ Buscar Botones de zoom Visualización en la pantalla + Otros + Cómo configurar la voz Distancia Coordenadas Sin clasificar diff --git a/android/res/values-fi/strings.xml b/android/res/values-fi/strings.xml index 65e60c7c08..7a447d6f33 100644 --- a/android/res/values-fi/strings.xml +++ b/android/res/values-fi/strings.xml @@ -306,6 +306,8 @@ Haku Zoomauspainikkeet Näytä ruudulla + Egyéb + Így állítsd be a hangot Etäisyys Koordinaatit Järjestelemätön diff --git a/android/res/values-fr/strings.xml b/android/res/values-fr/strings.xml index 10d20c28a6..c710500ae2 100644 --- a/android/res/values-fr/strings.xml +++ b/android/res/values-fr/strings.xml @@ -311,6 +311,8 @@ Rechercher Boutons de zoom Afficher à l\'écran + Autre + Comment configurer la voix Distance Coordonnées Non trié diff --git a/android/res/values-hu/strings.xml b/android/res/values-hu/strings.xml index 09303ac00c..4d9f943611 100644 --- a/android/res/values-hu/strings.xml +++ b/android/res/values-hu/strings.xml @@ -307,6 +307,8 @@ Keresés Nagyítás/kicsinyítés gombok Mutassa a kijelzőn + Egyéb + Így állítsd be a hangot Távolság Koordináták Osztályozatlan diff --git a/android/res/values-in/strings.xml b/android/res/values-in/strings.xml index b7fc23a1a8..20aeaa59a1 100644 --- a/android/res/values-in/strings.xml +++ b/android/res/values-in/strings.xml @@ -306,6 +306,8 @@ Cari Tombol perbesaran Tampilkan pada layar + Lainnya + Cara mengatur suara Jarak Koordinat Tidak diurutkan diff --git a/android/res/values-it/strings.xml b/android/res/values-it/strings.xml index 14045c2008..5bfae77b8d 100644 --- a/android/res/values-it/strings.xml +++ b/android/res/values-it/strings.xml @@ -303,6 +303,8 @@ Cerca Pulsanti per lo zoom Condividi la mia location + Altro + Come impostare la voce Distanza Coordinate Non classificato diff --git a/android/res/values-ja/strings.xml b/android/res/values-ja/strings.xml index 090b039836..927e131570 100644 --- a/android/res/values-ja/strings.xml +++ b/android/res/values-ja/strings.xml @@ -297,6 +297,8 @@ 検索 ズームボタン 画面上に表示 + その他 + 音声設定の仕方 距離 コーディネート 未分類 diff --git a/android/res/values-ko/strings.xml b/android/res/values-ko/strings.xml index a676eeed6b..5e77430483 100644 --- a/android/res/values-ko/strings.xml +++ b/android/res/values-ko/strings.xml @@ -296,6 +296,8 @@ 검색 확대/축소 버튼 화면에 표시 + 다른 언어 + 음성 설정 방법 거리 좌표 분류되지 않음 diff --git a/android/res/values-nb/strings.xml b/android/res/values-nb/strings.xml index 0a97634fa6..dd751476ca 100644 --- a/android/res/values-nb/strings.xml +++ b/android/res/values-nb/strings.xml @@ -306,6 +306,8 @@ Søk Zoom-knapper Vis på skjermen + Andre + Slik installerer du stemme Avstand Koordinater Usortert diff --git a/android/res/values-nl/strings.xml b/android/res/values-nl/strings.xml index 8675d19e62..f7993b07bf 100644 --- a/android/res/values-nl/strings.xml +++ b/android/res/values-nl/strings.xml @@ -298,6 +298,8 @@ Zoek Zoomknoppen Weergave op het scherm + Andere + Hoe stel je de stem in Afstand Coördinaten Ongeclassificeerd diff --git a/android/res/values-pl/strings.xml b/android/res/values-pl/strings.xml index 2f4e391193..8eb2dedaee 100644 --- a/android/res/values-pl/strings.xml +++ b/android/res/values-pl/strings.xml @@ -307,6 +307,8 @@ Szukaj Przyciski powiększania Wyświetl na ekranie + Inny + Jak skonfigurować usługę głosową Dystans Współrzędne Niesklasyfikowane diff --git a/android/res/values-pt/strings.xml b/android/res/values-pt/strings.xml index 83cce6a4dc..ec8c689630 100644 --- a/android/res/values-pt/strings.xml +++ b/android/res/values-pt/strings.xml @@ -303,6 +303,8 @@ Pesquisar Botões de zoom Mostrar no ecrã + Outro + Como configurar a voz Distância Coordenadas Não classificado diff --git a/android/res/values-ro/strings.xml b/android/res/values-ro/strings.xml index 5866f0bf60..3fb8aa9e9a 100644 --- a/android/res/values-ro/strings.xml +++ b/android/res/values-ro/strings.xml @@ -306,6 +306,8 @@ Căutare Butoane zoom Afișare pe ecran + Alta + Modalitatea de configurare a vocii Distanță Coordonate Nesortate diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml index 210c47c15e..b39c164010 100644 --- a/android/res/values-ru/strings.xml +++ b/android/res/values-ru/strings.xml @@ -335,6 +335,8 @@ Язык подсказок Голосовые подсказки недоступны + Другой + Как настроить голос Расстояние Координаты Без категории diff --git a/android/res/values-sk/strings.xml b/android/res/values-sk/strings.xml index f73c2a89d4..71ff09c471 100644 --- a/android/res/values-sk/strings.xml +++ b/android/res/values-sk/strings.xml @@ -305,6 +305,8 @@ Vyhľadávanie Tlačítka priblíženia/oddialenia Zobraziť na obrazovke + Iný + Ako nastaviť hlas Vzdialenosť Súradnice Nezaradené diff --git a/android/res/values-sv/strings.xml b/android/res/values-sv/strings.xml index c2082f1c7d..325a4ec187 100644 --- a/android/res/values-sv/strings.xml +++ b/android/res/values-sv/strings.xml @@ -306,6 +306,8 @@ Sök Zoom-knappar Visa på skärmen + Övrigt + Hur man ställer in ljud Avstånd Koordinater Osorterade diff --git a/android/res/values-th/strings.xml b/android/res/values-th/strings.xml index 7dc94b6314..0ae9f7bc74 100644 --- a/android/res/values-th/strings.xml +++ b/android/res/values-th/strings.xml @@ -308,6 +308,8 @@ ค้นหา ปุ่มซูม แสดงบนหน้าจอ + อื่น ๆ + วิธีตั้งค่าเสียง ระยะห่าง พิกัด ไม่เรียงลำดับ diff --git a/android/res/values-tr/strings.xml b/android/res/values-tr/strings.xml index d18c5acfaf..e8d1a446a7 100644 --- a/android/res/values-tr/strings.xml +++ b/android/res/values-tr/strings.xml @@ -310,6 +310,8 @@ Ara Yakınlaştırma butonları Ekranda göster + Diğer + Ses nasıl ayarlanır Mesafe Koordinatlar Sıralanmamış diff --git a/android/res/values-uk/strings.xml b/android/res/values-uk/strings.xml index 7ffadd9583..40d8929329 100644 --- a/android/res/values-uk/strings.xml +++ b/android/res/values-uk/strings.xml @@ -311,6 +311,8 @@ Пошук Кнопки трансфокації Відображення на екрані + Інша + Як налаштувати голосовий контроль Відстань Координати Без категорії diff --git a/android/res/values-vi/strings.xml b/android/res/values-vi/strings.xml index 4b801010f1..505bdb5d9e 100644 --- a/android/res/values-vi/strings.xml +++ b/android/res/values-vi/strings.xml @@ -306,6 +306,8 @@ Tìm kiếm Nút Phóng to/Thu nhỏ Hiển thị trên màn hình + Khác + Làm thế nào để thiết lập tiếng nói Khoảng cách Tọa độ Chưa phân loại diff --git a/android/res/values-zh-rTW/strings.xml b/android/res/values-zh-rTW/strings.xml index c47ec19e43..53b90a1a56 100644 --- a/android/res/values-zh-rTW/strings.xml +++ b/android/res/values-zh-rTW/strings.xml @@ -290,6 +290,8 @@ 搜尋 縮放按鈕 在螢幕上顯示 + 其他 + 如何設置語音 距离 坐标 未分类的 diff --git a/android/res/values-zh/strings.xml b/android/res/values-zh/strings.xml index bfcc25f081..06b9d92ee3 100644 --- a/android/res/values-zh/strings.xml +++ b/android/res/values-zh/strings.xml @@ -306,6 +306,8 @@ 搜索 缩放按钮 在屏幕上显示 + 其他 + 如何设置语音 距离 坐标 未分类 diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index df42fc3646..e3cb0d8449 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -337,6 +337,8 @@ Voice language TTS unavailable + Other + How to set up voice Distance Coordinates Unsorted diff --git a/iphone/Maps/ar.lproj/Localizable.strings b/iphone/Maps/ar.lproj/Localizable.strings index 82cb038eef..7f3b41dfdb 100644 --- a/iphone/Maps/ar.lproj/Localizable.strings +++ b/iphone/Maps/ar.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "آخر"; + +"pref_tts_how_to_set_up_voice" = "كيفية ضبط الصوت"; + "placepage_distance" = "المسافة"; "placepage_coordinates" = "الإحداثيات"; diff --git a/iphone/Maps/cs.lproj/Localizable.strings b/iphone/Maps/cs.lproj/Localizable.strings index f52bd328cf..dfc6105e55 100644 --- a/iphone/Maps/cs.lproj/Localizable.strings +++ b/iphone/Maps/cs.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Ostatní"; + +"pref_tts_how_to_set_up_voice" = "Jak nastavit hlas"; + "placepage_distance" = "Vzdálenost"; "placepage_coordinates" = "Souřadnice"; diff --git a/iphone/Maps/da.lproj/Localizable.strings b/iphone/Maps/da.lproj/Localizable.strings index 3eececf365..5c597cbcfb 100644 --- a/iphone/Maps/da.lproj/Localizable.strings +++ b/iphone/Maps/da.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Andet"; + +"pref_tts_how_to_set_up_voice" = "Sådan indstiller du tale"; + "placepage_distance" = "Afstand"; "placepage_coordinates" = "Koordinater"; diff --git a/iphone/Maps/de.lproj/Localizable.strings b/iphone/Maps/de.lproj/Localizable.strings index 053f2b3c0b..6c7e20112b 100644 --- a/iphone/Maps/de.lproj/Localizable.strings +++ b/iphone/Maps/de.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Weitere"; + +"pref_tts_how_to_set_up_voice" = "Navi-Stimme einstellen"; + "placepage_distance" = "Distanz"; "placepage_coordinates" = "Koordinaten"; diff --git a/iphone/Maps/en.lproj/Localizable.strings b/iphone/Maps/en.lproj/Localizable.strings index 68b7c72667..fec43d8546 100644 --- a/iphone/Maps/en.lproj/Localizable.strings +++ b/iphone/Maps/en.lproj/Localizable.strings @@ -520,6 +520,10 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +"pref_tts_other_section_title" = "Other"; + +"pref_tts_how_to_set_up_voice" = "How to set up voice"; + "placepage_distance" = "Distance"; "placepage_coordinates" = "Coordinates"; diff --git a/iphone/Maps/es.lproj/Localizable.strings b/iphone/Maps/es.lproj/Localizable.strings index fbef8a77a3..32ca47080d 100644 --- a/iphone/Maps/es.lproj/Localizable.strings +++ b/iphone/Maps/es.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Otros"; + +"pref_tts_how_to_set_up_voice" = "Cómo configurar la voz"; + "placepage_distance" = "Distancia"; "placepage_coordinates" = "Coordenadas"; diff --git a/iphone/Maps/fi.lproj/Localizable.strings b/iphone/Maps/fi.lproj/Localizable.strings index f8df817753..7f2a63db3a 100644 --- a/iphone/Maps/fi.lproj/Localizable.strings +++ b/iphone/Maps/fi.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Egyéb"; + +"pref_tts_how_to_set_up_voice" = "Így állítsd be a hangot"; + "placepage_distance" = "Etäisyys"; "placepage_coordinates" = "Koordinaatit"; diff --git a/iphone/Maps/fr.lproj/Localizable.strings b/iphone/Maps/fr.lproj/Localizable.strings index c4cbe38ac1..bebad79441 100644 --- a/iphone/Maps/fr.lproj/Localizable.strings +++ b/iphone/Maps/fr.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Autre"; + +"pref_tts_how_to_set_up_voice" = "Comment configurer la voix"; + "placepage_distance" = "Distance"; "placepage_coordinates" = "Coordonnées"; diff --git a/iphone/Maps/hu.lproj/Localizable.strings b/iphone/Maps/hu.lproj/Localizable.strings index 7669ee9294..00ec1040ef 100644 --- a/iphone/Maps/hu.lproj/Localizable.strings +++ b/iphone/Maps/hu.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Egyéb"; + +"pref_tts_how_to_set_up_voice" = "Így állítsd be a hangot"; + "placepage_distance" = "Távolság"; "placepage_coordinates" = "Koordináták"; diff --git a/iphone/Maps/id.lproj/Localizable.strings b/iphone/Maps/id.lproj/Localizable.strings index f43090708d..05a59ef8d9 100644 --- a/iphone/Maps/id.lproj/Localizable.strings +++ b/iphone/Maps/id.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Lainnya"; + +"pref_tts_how_to_set_up_voice" = "Cara mengatur suara"; + "placepage_distance" = "Jarak"; "placepage_coordinates" = "Koordinat"; diff --git a/iphone/Maps/it.lproj/Localizable.strings b/iphone/Maps/it.lproj/Localizable.strings index d433b9b6c6..1d228ecf93 100644 --- a/iphone/Maps/it.lproj/Localizable.strings +++ b/iphone/Maps/it.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Altro"; + +"pref_tts_how_to_set_up_voice" = "Come impostare la voce"; + "placepage_distance" = "Distanza"; "placepage_coordinates" = "Coordinate"; diff --git a/iphone/Maps/ja.lproj/Localizable.strings b/iphone/Maps/ja.lproj/Localizable.strings index a5c89e5b83..bedddfdacc 100644 --- a/iphone/Maps/ja.lproj/Localizable.strings +++ b/iphone/Maps/ja.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "その他"; + +"pref_tts_how_to_set_up_voice" = "音声設定の仕方"; + "placepage_distance" = "距離"; "placepage_coordinates" = "コーディネート"; diff --git a/iphone/Maps/ko.lproj/Localizable.strings b/iphone/Maps/ko.lproj/Localizable.strings index fce2cedd25..aebc0dbc82 100644 --- a/iphone/Maps/ko.lproj/Localizable.strings +++ b/iphone/Maps/ko.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "다른 언어"; + +"pref_tts_how_to_set_up_voice" = "음성 설정 방법"; + "placepage_distance" = "거리"; "placepage_coordinates" = "좌표"; diff --git a/iphone/Maps/nb.lproj/Localizable.strings b/iphone/Maps/nb.lproj/Localizable.strings index 67789293c8..14e9c68bed 100644 --- a/iphone/Maps/nb.lproj/Localizable.strings +++ b/iphone/Maps/nb.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Andre"; + +"pref_tts_how_to_set_up_voice" = "Slik installerer du stemme"; + "placepage_distance" = "Avstand"; "placepage_coordinates" = "Koordinater"; diff --git a/iphone/Maps/nl.lproj/Localizable.strings b/iphone/Maps/nl.lproj/Localizable.strings index 1f84074fda..a72327d73a 100644 --- a/iphone/Maps/nl.lproj/Localizable.strings +++ b/iphone/Maps/nl.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Andere"; + +"pref_tts_how_to_set_up_voice" = "Hoe stel je de stem in"; + "placepage_distance" = "Afstand"; "placepage_coordinates" = "Coördinaten"; diff --git a/iphone/Maps/pl.lproj/Localizable.strings b/iphone/Maps/pl.lproj/Localizable.strings index 39ea1f91bd..7130069391 100644 --- a/iphone/Maps/pl.lproj/Localizable.strings +++ b/iphone/Maps/pl.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Inny"; + +"pref_tts_how_to_set_up_voice" = "Jak skonfigurować usługę głosową"; + "placepage_distance" = "Dystans"; "placepage_coordinates" = "Współrzędne"; diff --git a/iphone/Maps/pt.lproj/Localizable.strings b/iphone/Maps/pt.lproj/Localizable.strings index cdfa5a1402..ff789a8772 100644 --- a/iphone/Maps/pt.lproj/Localizable.strings +++ b/iphone/Maps/pt.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Outro"; + +"pref_tts_how_to_set_up_voice" = "Como configurar a voz"; + "placepage_distance" = "Distância"; "placepage_coordinates" = "Coordenadas"; diff --git a/iphone/Maps/ro.lproj/Localizable.strings b/iphone/Maps/ro.lproj/Localizable.strings index 9eacbf903d..b9f051d863 100644 --- a/iphone/Maps/ro.lproj/Localizable.strings +++ b/iphone/Maps/ro.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Alta"; + +"pref_tts_how_to_set_up_voice" = "Modalitatea de configurare a vocii"; + "placepage_distance" = "Distanță"; "placepage_coordinates" = "Coordonate"; diff --git a/iphone/Maps/ru.lproj/Localizable.strings b/iphone/Maps/ru.lproj/Localizable.strings index 12c4efc498..c800495fba 100644 --- a/iphone/Maps/ru.lproj/Localizable.strings +++ b/iphone/Maps/ru.lproj/Localizable.strings @@ -520,6 +520,10 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "Голосовые подсказки недоступны"; +"pref_tts_other_section_title" = "Другой"; + +"pref_tts_how_to_set_up_voice" = "Как настроить голос"; + "placepage_distance" = "Расстояние"; "placepage_coordinates" = "Координаты"; diff --git a/iphone/Maps/sk.lproj/Localizable.strings b/iphone/Maps/sk.lproj/Localizable.strings index 7f426a289e..b398674e59 100644 --- a/iphone/Maps/sk.lproj/Localizable.strings +++ b/iphone/Maps/sk.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Iný"; + +"pref_tts_how_to_set_up_voice" = "Ako nastaviť hlas"; + "placepage_distance" = "Vzdialenosť"; "placepage_coordinates" = "Súradnice"; diff --git a/iphone/Maps/sv.lproj/Localizable.strings b/iphone/Maps/sv.lproj/Localizable.strings index 21026db40e..d7dd821489 100644 --- a/iphone/Maps/sv.lproj/Localizable.strings +++ b/iphone/Maps/sv.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Övrigt"; + +"pref_tts_how_to_set_up_voice" = "Hur man ställer in ljud"; + "placepage_distance" = "Avstånd"; "placepage_coordinates" = "Koordinater"; diff --git a/iphone/Maps/th.lproj/Localizable.strings b/iphone/Maps/th.lproj/Localizable.strings index 80a303e02f..b0a3679094 100644 --- a/iphone/Maps/th.lproj/Localizable.strings +++ b/iphone/Maps/th.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "อื่น ๆ"; + +"pref_tts_how_to_set_up_voice" = "วิธีตั้งค่าเสียง"; + "placepage_distance" = "ระยะห่าง"; "placepage_coordinates" = "พิกัด"; diff --git a/iphone/Maps/tr.lproj/Localizable.strings b/iphone/Maps/tr.lproj/Localizable.strings index 10ced27489..0399dca60a 100644 --- a/iphone/Maps/tr.lproj/Localizable.strings +++ b/iphone/Maps/tr.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Diğer"; + +"pref_tts_how_to_set_up_voice" = "Ses nasıl ayarlanır"; + "placepage_distance" = "Mesafe"; "placepage_coordinates" = "Koordinatlar"; diff --git a/iphone/Maps/uk.lproj/Localizable.strings b/iphone/Maps/uk.lproj/Localizable.strings index 731114b8b2..0afcc07cef 100644 --- a/iphone/Maps/uk.lproj/Localizable.strings +++ b/iphone/Maps/uk.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Інша"; + +"pref_tts_how_to_set_up_voice" = "Як налаштувати голосовий контроль"; + "placepage_distance" = "Відстань"; "placepage_coordinates" = "Координати"; diff --git a/iphone/Maps/vi.lproj/Localizable.strings b/iphone/Maps/vi.lproj/Localizable.strings index 391017d590..b820694377 100644 --- a/iphone/Maps/vi.lproj/Localizable.strings +++ b/iphone/Maps/vi.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "Khác"; + +"pref_tts_how_to_set_up_voice" = "Làm thế nào để thiết lập tiếng nói"; + "placepage_distance" = "Khoảng cách"; "placepage_coordinates" = "Tọa độ"; diff --git a/iphone/Maps/zh-Hans.lproj/Localizable.strings b/iphone/Maps/zh-Hans.lproj/Localizable.strings index 0a997aff5a..e3b222b543 100644 --- a/iphone/Maps/zh-Hans.lproj/Localizable.strings +++ b/iphone/Maps/zh-Hans.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "其他"; + +"pref_tts_how_to_set_up_voice" = "如何设置语音"; + "placepage_distance" = "距离"; "placepage_coordinates" = "坐标"; diff --git a/iphone/Maps/zh-Hant.lproj/Localizable.strings b/iphone/Maps/zh-Hant.lproj/Localizable.strings index ac5e3f36da..cf2cbe5a68 100644 --- a/iphone/Maps/zh-Hant.lproj/Localizable.strings +++ b/iphone/Maps/zh-Hant.lproj/Localizable.strings @@ -508,6 +508,22 @@ /* «Map style» entry value */ "pref_map_style_modern_light" = "Modern light"; +/* Settings «Route» category: «Tts enabled» title */ +"pref_tts_enable_title" = "Voice instructions"; + +/* Settings «Route» category: «Tts enabled» summary */ +"pref_tts_enable_summary" = "Turn instructions"; + +/* Settings «Route» category: «Tts language» title */ +"pref_tts_language_title" = "Voice language"; + +/* Settings «Route» category: «Tts unavailable» subtitle */ +"pref_tts_unavailable" = "TTS unavailable"; + +"pref_tts_other_section_title" = "其他"; + +"pref_tts_how_to_set_up_voice" = "如何設置語音"; + "placepage_distance" = "距离"; "placepage_coordinates" = "坐标"; From 9b1d0ee7161982e1ffe9dc5ee0fd093b0295b7fc Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:08:17 +0300 Subject: [PATCH 04/17] [ios] Added tumbler image for turn tts on/off. --- .../ic_voice_off.imageset/Contents.json | 23 ++++++++++++++++++ .../ic_voice_off.imageset/ic_voice_off.png | Bin 0 -> 507 bytes .../ic_voice_off.imageset/ic_voice_off@2x.png | Bin 0 -> 968 bytes .../ic_voice_off.imageset/ic_voice_off@3x.png | Bin 0 -> 1549 bytes .../ic_voice_off_press.imageset/Contents.json | 23 ++++++++++++++++++ .../ic_voice_off_press.png | Bin 0 -> 469 bytes .../ic_voice_off_press@2x.png | Bin 0 -> 888 bytes .../ic_voice_off_press@3x.png | Bin 0 -> 1468 bytes .../ic_voice_on.imageset/Contents.json | 23 ++++++++++++++++++ .../ic_voice_on.imageset/ic_voice_on.png | Bin 0 -> 731 bytes .../ic_voice_on.imageset/ic_voice_on@2x.png | Bin 0 -> 1487 bytes .../ic_voice_on.imageset/ic_voice_on@3x.png | Bin 0 -> 2225 bytes 12 files changed, 69 insertions(+) create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off@2x.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off@3x.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/ic_voice_off_press.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/ic_voice_off_press@2x.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/ic_voice_off_press@3x.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@2x.png create mode 100644 iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@3x.png diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/Contents.json new file mode 100644 index 0000000000..bad9e044ea --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_voice_off.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_off@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_off@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off.png new file mode 100644 index 0000000000000000000000000000000000000000..304bbec20bd06afe0c58d7c0da95eb9b9670495f GIT binary patch literal 507 zcmVPx$wMj%lR9Fe^mdh>#K@^7DWnmEa5GyQ%h!?P8H!N6@NZ5!s@C>u{5)uiCL_C1a z>@BckVQeIJZV^QA{ZSnw)0wH7ZX$6`@};Y)t4{y(_o=RlA`5fC954sW0dv3{FbB+m z)DEveU*oIgbIH1&RjWBHM{DDC03%$|haOvCXu+B2m<1*N!9hb*q zNSe@1cTRF0yK?#-bedIjsL1_z(_PZ;fi2Ki;S}@(4&VvAB27)|0a`x|vyk+*3XErZ z(uF$A^DCmn$Qg`64$7n4;qvji+gS+K!*AgT`XD}3Xhwflu*B(K*$L?LCAU?VhmhvW x!t&ng3Iq_yF_@IAp-DoAdwx002ovPDHLkV1gh+;xhmM literal 0 HcmV?d00001 diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off@2x.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off.imageset/ic_voice_off@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6724d2d1b6d8f44129e826e05027c70b488afed4 GIT binary patch literal 968 zcmeAS@N?(olHy`uVBq!ia0vp^5g^RL1|$oo8khhn#^NA%Cx&(BWL`2bFgJO+IEGX( zzMXkG`>KP;vDd4&F34~UTo}?FIKe(jT^x)9-Q|w*e zn>soo1X$#M{MdJor$=$}5wmooi|-GVt6R>rE`C=2-0z%%w_(!u)RXQO90g2AT{CpLxA%YI`l4;^zb#^BPD=9u3&uXD%@;m3WUlA&mZwmnt)IgSLnX`eZfivmLv#j@_1b%U=0^r5D~F`094&S_8kb*SQNftdCuOG5M!)dG+;$HYtZ}*+05@ zopn@8v-}|2@q=l~{H?ycPwb?AgYX+_2{K zImc)5ZA+_ed6~b^vQy7-_d=VP9b#!et>q$SJQX_FZj^iD@tWXeHGh6zmPzr`c)obP z_leLKmMKZo8p3D0#H_z4kn;cbvx1v5p9($XU)G!Kw2$%U>DF##u9&iK`pnOM{CV2& ze4ndi^%TE9fvz@syB6+zcX!qq>G>-onf@h7RaQP`FSz-1=Q_3Nto1uPm~IMvkT&0R zLN#4)zVh$W%n#$5KV@&SOz}Rj-C%)PPxO1G9p@kD@A@ccbiZ$gg!J}J{TV-uO;{uU zOjtPgj`x@CT({VE&h*}KZpX?8>+<-I$UjmmVK*{7Z8L-Me)EhY({10}Jk-T2y-+ZZ zU+b334x5?$)n^_odTamB%cei~Phss8Rn@TZZ5Gxr*1lhEqNbr(dwFD^&i# zRmJf%)cqf7-D8&p$5?H1{u%R2ujb6=$=gEm zic%;1+Hu0Cd3~AN<}TYQ%YJ5GJ3py=mGsF;))^Zb6Sr*D&wkJ8waQ(m`j-g=PDqgGTl=CShFns<}QB9q5DuWi+=ZH+pM(d1EP zW1i)4Y{VrJiMTHMWOdVyP-)08a_;Z@zdwGDzrTNcult`u>S`Nn0{{SBZ!bjP*3$or z=Ju@)Kx9>Jjao_|(j8DgWI6)?Z0qwzoWP{1eJb|N{@KHjfy8&bm!@UIEKnVmRK<*t!+yEooq&2L>xa_7d6BLbWAzuR@(b9k$(?G7|(2*A^f-?{K;c~d06OQR`k zbF5Gb%^bK+tEQ3spJ~m_= zLK((T_T+_KIFR-=hE4eF?%BdSaEAVll z&na0X9CMKEhUsUtg&$DnH+O#6^|38kU>tSlkgHwEpAHR^JA#V9L)dIrE9q(Sv%0`- zz7RT--7dIP(-Zd-^FS|9S=9pK`iT54PMN^|SVRmdwOf^*_wVmSI?+us&Pco#24&4( zmQ@1Z%1^}#XPj`t_u<}+!lVR0vKX0(UUTKI53&(Z`eJ%;GJMSFY)m4=FB*E(Ji=!6 z>TBP?JllANN9>6OD0fO6+2q!_8kj%=N&gUxNw1ypXr50IP}O6v60VAq3a|5m5D-D6l>o2u7{M1-~O9b zXx{dkZs$UI|czZJ`%153(98k11+1X&)d>>|)TQz2zcLKBlz7DI1Ew z|HP-D=4`1imUmacQUvqE(MJ71B<6jpWtVA6)=R=X7q2NeRET=uQAT9Lpl!AMIJSRG zB8}3;lbZ^!$=1#pb)iEDp(aymGZ4{S@Tl6xD|AA*h(@hmEs}fUY}c#*))UP%HjO%9 z&t1mA<=9tEv?Btd825C4Yeh0qhm$_O(mP94O%kYP@OQPVl%97L+e9^M@-q<9Kx6s7 zD-`tMDh)S|vsc7KeiW-StT}6OQ-tqmjc0wWOh2lVR0QCYr7k3pHq|~|Gqd_~Dh;gB zP;no;>x-*H3<-c^aRo-0Q+<(K)hsS(MJcM)aUuAwqF zN6fin0{-ZSsCb5#?s|>e3L~XNJ`K#1ZNC1pDrY!Q5@wzIx*yq#<0I;8nboBVi|^;P g|5@~EfyTEVtc{us!RzGEEx!Z2Jx(F&-6LuL0(bA8%>V!Z literal 0 HcmV?d00001 diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/Contents.json new file mode 100644 index 0000000000..0b48e65ba9 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_voice_off_press.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_off_press@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_off_press@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/ic_voice_off_press.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_off_press.imageset/ic_voice_off_press.png new file mode 100644 index 0000000000000000000000000000000000000000..da680dd784bc43eff373c2fd0d562e90589b1e62 GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0vp^Iv~u!1|;QLq8Nb`V{wqX6T`Z5GB1Jbeoq(2kOpw#r*zQ6C2i-ksG~N0E-wx(?4G_v9nceNA!lZ14%40gw3eUOr9L|%Fyp&<#J8Qj;a?QGf zH76`jtk}BTz~5+zR>iC=vqT-wP*cxYVr!;FwW$8+{Ps%oZd5@x&uIfmE}0~mb_vZq z(Y}YQTQsjf6p>T(+O^R2Hp}@&uIs#47nkmOaD2PKhNCz5?iiIhtX*RE%4y0LL!DV0 zS*9mFeZ%Z?kk99U?Hq?KYgpaY*KyROyRx2>{(9Ka zA7`RI+}*x9cQWsx&t^BCSKpJf+PygSZprnOX~9KN{So<_t=hY0`_+f3A7y+IvV&=^ zS^5XAz^tmWZ`SSKS17%leePAkRPLg8Y-tN?)``om+jVWvv_%PbL-gXBszUlLug}+w zU|ltT_kw%VZofKRoKdu?;OBb}>A=~SpCScZgY}2?GCx>6l1)!^FrFAZUHx3v IIVCg!0F7m<7#KMm7>HpWsCQ2|-eYr5H~PHEx4e~qEZJ{AXZq2RaBteX z`~~~MEB${hw_LxiAmoY;Uqkn$)tAZ)WUl^Xe3_nkHOTnEUZwKjszuEY*7f~bwJMvn zCT2>WCvWAoAn62t=I|xc(|xz5*7!EqHd_Ftav zE4<&|B(>i{ev1@~>3XpOy3P>c(|b z??jho?BDY?vg!4CpSY__`B(Ip{&A5~nkbmlJl}Kfk@-`sHWgjC_vWM8g&UtdWS2e7 z&lH>}rhM-WXLI)QqV`zxr4@W1)=f8WZ95fv_e0_f-{9^2GD_1v9$o)IdZoHc{w|)4 z%d%yO{mFKo~hdw{(EK^`GCpWL)*uxWU#HU!K)O}zF%Ridv95ij#e3{``u2m7auhgVUb4zUf{8RNIGOuf|+`2ctU`s=uVE@Vf zez*RXIcb~!oc4I*z~n4+gzf4})}MVnyJF`~TsGaaO{v3n)!yQwe(4QtOts=I^S?~~ zbeNaNB1GXrx?@g|JNQ zMV2d7toggEPMm(t-D&2Xhmv-ve6Q>JyUV6WL&^8_pC$1V-%l;qZF_#|u=`I7?XH8F zwi~`K__mZ;G)$zKKiWa>J$Gft*)1N;2K}r&6=7?1+NR{MZ>)&ktMh7;M9{CwzaN?( z?45Q_w@YD9-iFo1Qg4k4LQdZG4T+2tDNXWt9wpKqwBYpri7XdY+dbdahO6(*voP#T znj=xunf^&Y|Ea}hL7iJtPUj>JF&}sRX|{9z2d&RD4sGsVw(dgG4&{8Qj#nQ}MNAP> zx|O3o{hz<;9?kqLO`C!>n*)*x)E09r;=7@9@`G=1+!6TLhFXrip%FxVwApW42e)Q=iS*v&V1Yig&z@ zKFj%vmQ6cqy;L*PB2b|t$<+7T?zIw^Vx78_x)k=Qdl`STcjt+hJ|*HO63Fs#A7j)N zXUn7yIgeKD$(*Y+MI&Z~#tPCyIuGQ%R1`*rtmUq9e&otky)3vNzYwmaDPnAEnoRtnM&9@D`n>|@+@9N6< zdAmASm1v%e-CABD{zNf~?P>DKMO;cx^Y7GiKkvDt{53Nw+R^9py}5DPLDLO6Iry*r zv0F6XXn&!pZsYSZ$z7@Ybx!Fd?+ls$g6aAb`DxV)7tXhTt?RP!pUr{K3(h_6ds_F= z_J-IZ|E3KVHVZx{T+nS@zG3pV1`ekWzf#0np8uJ*GH1qu1db%8jEnvs+h*<-*e)dI zChaVcn{hTEs$4Nns9wEXe9~=KC60ryHrEC{j5#Tnb1q#(#4*KT)>oA{sdCrdS3kIK z^L?gT(w$K-?RLvI&NI=X&wB50M~2>SjxgYV@;Gi<=%jx)1y~ zT*t=nqaBKW=UoeWuVehV+w$I_ZI!EDEiK@ocaeouKxTM8FyHid`PR_q75%{Cn8DN4 K&t;ucLK6VNC|uG2 literal 0 HcmV?d00001 diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/Contents.json new file mode 100644 index 0000000000..5f40fc7e62 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_voice_on.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_on@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_voice_on@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on.png new file mode 100644 index 0000000000000000000000000000000000000000..3bd8f5933dcb667ae10f6b613ca6c26586a91f7b GIT binary patch literal 731 zcmV<10wn#3P)Px%l}SWFR7ef&R6S@DaTI^=F0ImhTnbA4B8lLj9YjS$5L84R9CTDE6vb+65QI9q zxCKE+o3x-Q#lfPpi$g6P8fYEVq2iF3B8Xe>l3PrB&-d=U^1mdl4P8X?AMU+-zxVZf z|91z_Ih_gocN0jB*N!A|=6oWzJVQj-ir^z6?eHXpTVYx&<9fDa&b&t}t3@C>4g{z7 zPuP8pzEZ4^wL9p|Cjtl}JCcy^jXJCs2@`hj=wBKDb$_Q(fc4Hs9m> zQaUm#aR}aL#LGUd<_Q!mXJWIJOgt5j7?J1>Bf1^C_aWk2HK3JVx*K26b-aME?I!zE zYScW*qde#O624Jmn9#;YKIT+j{uq>Hy-W2*y=zY;9saW%9&+F%#p+dSj(z)ip6`~1 zjf-kbfT0Tbx^!F_jy=_NkUJ{*_VuJ=+evP2FXJ@~Y4;ob{#wuvDBUsUyJH5gJWjbb z#MMY|Pu0hL$#?kK9j}hpDz~GHzI{tFnKv)-Kl1#Rl5~PQ6ZmH*@EeAU=@?C}bD{tM N002ovPDHLkV1h)EO}hX9 literal 0 HcmV?d00001 diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@2x.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..72b85055209e8580af2cbac77fb2569b1a794187 GIT binary patch literal 1487 zcmV;=1u*)FP)Px)iAh93RA>e5SzT-tRTRE=cDG`Gb~dz1A=++Jf)5ytqKU-d4+g5?0evCH2e2X7 zU3fDAL>_FE#5B=IyKVVdF&eZc8XvIHl0d@)(by;?CJNDZn+SqccXr!uyFd4MZkk!n zozAq=vOB)ayv#Z0o_o&yzWaA(mofkG8SokK8SokK8SokK8SokK8Tfw~;9jL|?KKVn zhc_@E*El~o9@Ecwk-O>uH=Zz7XAA5U1K4Q-;*8G$gS8X;BmbHoby>rzdbFz z=}i{f0<|Ilak+$|iFA)(YzP4EU6ADt4dY$`B@6&!W<83{M!92v(L^pfS;|}# zzz*Rus>rD<_uR%osG;MXi0L2W>3f#iaHTxg)}P)^ZB{vGH8|;Q$EVhWikjk|X9e8! zbA7;=?$mF&cJn~t({K&@?xp=hLG5t9C|3;^9-&r!`@Gg4^H~(}v45Ti>WR{k)6kO&fienV?1~ zKX4Kn#BAmVoE>DS;^3_5nB2$mo-@JCJHRpPb%0gSr?fLJ(}wAPGFz#Q%8meYh0NQS zterYnQy%T&1rG2x&4Dwub`mnLQd{%thI5Rw8EV7I0hg`);|P!gd)~fF^{hc2=wh5t z(hMNrC8}TA#dBEBUZgfW;M%B8Wk-NG^&6<87xHiMhFhFNlIFs@;OTCxj1(J#39923 zTBqu_HKpTivy{}JYFqU*jcLm4;4%#*2WHmLjCfsKS9H!-0+5FAPR3$ES)wv?PzdD& z$Ai!6qqNh}E;57E%{y5W>>g{jqNXW_58iD})Caed6>zzE5r7=Y^!^b{l#6Pa9rs|N z^R?QWbR_siVOf%JgSJ!I5g@YkD|Pfjmemp#6`eE}F2@VqTqPTQTBr}wpzKN7<_Hj- zhNz<#a;aGAw-yx|gD+|B&4X|^`Y5xkaW+PMsO$)^zA5|`t`Aucdh*Ch1~2-Env7p> z)b!KT_UB}F8(!?zkKM1S50xDOVr@4S)WVOW^8oIHTeMR(WLe4R_4*Fn8Y5wNV+{-8~!nGfnv#^=m@pid!(i0PYhD^R8kpD7IxUS#TRu z##tQswNyN!d;_*8vJVzOTvqRB{@KKST>(wAE1y5K!75+v3fmpUpSPXJeJ=|6Gk76y zw)RbM6LuO*ZV&+_6#JbWa;p#%4;a%U~k)m3w} z*LXq*HlR3T(TYDk9#U*JN<{#gamQkjVJ#SV7*F3}(^iSMVDP&9EtST?6ZgYZyzWP8 zvy&?dP$s}%oo}XM;SNn>Z{itOv`e~NTclp^#C1PH`i-t@(hm^bQLH#XnF*IEjK?DH z;-3&t;lNUM*>QQfE(PVmV_qQ``^G9>vvdBt&@QrSs|r9f1R8t)d%%8WfNqOY1^;HYyU9qOT96-H&3)L9mA^sh|Gqp9vq8D2EEDbXYm>E8SokK p8SokK8SokK8SokK8K?>a{{dlo)&CxXwfz79002ovPDHLkV1jQ9)-M16 literal 0 HcmV?d00001 diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@3x.png b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_voice_on.imageset/ic_voice_on@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..048b5529ed2f7d6e86758154620a11b171c2836e GIT binary patch literal 2225 zcmai$`9Bj51IIT-8k1wlk!pI_$hq9d&=7L;rSPqgV+|uBxf0nNYiJsBgtADEFe4*! zG$y{JFO#bpMwr_2bsta9>-qh8e)zoKf5Q8d?&4$%2FZf}007wT0_u<7cKgqSg?>{p zSiJMMfDwP#S^;YRQv4182nXAtEZw4k+`<^Fo3&!^&6(BQGVY|BQW~YT<`hF&34;=o zI?V$;7pk-sC0uE$*-kyRA5iB@+vOj=VQ{5cOrf zl)I|X;Tk>9T^`tO>Rm0%&m(VeHVS7AN}g^F9zDHu=`aLnZ6V?Ezm?P_Rf;#T4DB>3 zlvIsc%Z{~T4%+(ZIpw*=I+96>4MOyuq*n~|YZ1ryCjIm+cVBsE8_-a4hyszkN>@g2DLRec##0lRz-lW~^@OCA{Rd1b>@u>j*H`wLAuQmWb%h zMz?$jKf@H35yixu-;vB-+LEu~kBC0xiwi@XS5OB|OhVT?gN0woj6L0Z`Y|&}USk6) zWZR76#2}ksVKgGNF;b)1wc8sdBVm6)$^mB4Q=0wry;O$Ohxs1-l`mrdGFKiT_KEiA zwb6{nt-LZu5TO*sGlxZl!=iL0*-!HWSu~ogGi*8pYbz?osCW1({-i+~)hyqWN+YgsH zQ%g>Yo^?i58l(0U(JAS*1ShE$asfdXca>r>46zDVh9591Y{o%PW+0BH>7wrGx^JoF zYg-Gx>C%gq3rE*fBNdmv#vPdyq+32O;w0qM_pCMAHTk?k#JML$vL}1}ImX z8@_8EGBYHx=hr&0&Die@dC7WsWqiM!jLl-@PW$IE+ws#D5Tm~_1B{gSGY`5UayK6{ zefY4z$7Uf93wUzF{}{kuyp`)J1Fm&#>E?YS{s6&pQ$4clH7=NT<|nbb%*-m)W(KXJ zI`f7=))@-c#^wh2;7u1w@(Qk;q3IqR?{0CR4{kpPk%#M)`mpzC+tiFYEA%A(RQENsYfC7CUv4x?0m znN{-nY(v+KP>7l`KvM#!TnN&A5nh@3$ett?$}YXIN^TJ#4B(VY5Qx_}oy5}A zerLg5T)TP$?S5fqHi#tVxql|xB%n62iyF_qxHunX7&HaiL4!gljWk-*nh8m4GBV(XF`Xtk6=ku7gxjK@$rug})BW z&|+3?Vm17j9IZHF4yYCUmqZk*{l2pISd+zsm`I_Sfl1L2|`WT=KE99R94g zGm>X~PinL=2db=R&sy!MKp86Go@0mnLZ7;F&7Zb z>hNcAZ7Tw7y=`MvH|%$=Rxt%RdpPWD5q)|5E=P80$EF;mWMyb@P0(eiWJ<{<`h$@2ly7AZ{lIoW3|I9GdNO}Z z5*|$B53b8}_2s@B;eE1-Z}z;wY*kYX$@&UCE=1e?vHmMpK2znm53O-5%{D63U@hx| zkJW~q!2v7~bytu@F)=E23UY%c8~7+Xmy_R$DEv z%&h?g&-u<_-tTcA)e9=`;2U;7meq-*f!`_?w*hI`pek^?;!o1UuW#Dx{PEFwy^>WQ zb*mc4d;3ZB26yTr{#Dzd`71vqsFB&`M?R7601912#K)kvHx7abq*zbg@zL3h;En#Z z&vSyne(-iXVV$x3K)o{M0D8W%>S+;HnrYqK;q)byAfkF;dJ>Sa+ji|PO^$uG*~dcT zJe&0OsuW>&!LRnsWcK_lm_=3EkH=Hbj@LKUIDJ_nw}NFAVFu)rJDOETH7y)!dc7xV zc- Date: Thu, 12 Nov 2015 15:12:26 +0300 Subject: [PATCH 05/17] [ios] TTS xibs and storyboard. --- .../MWMLandscapeNavigationDashboard.xib | 154 +++++++++-------- .../Dashboard/MWMNiPadNavigationDashboard.xib | 48 +++++- .../MWMPortraitNavigationDashboard.xib | 40 ++++- iphone/Maps/Mapsme.storyboard | 162 +++++++++++++++++- 4 files changed, 325 insertions(+), 79 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib index 5ec02830a5..8c9c367433 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMLandscapeNavigationDashboard.xib @@ -50,8 +50,69 @@ + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - + - - - + + + @@ -217,6 +217,20 @@ + @@ -224,6 +238,8 @@ + + @@ -237,6 +253,7 @@ + @@ -245,5 +262,8 @@ + + + diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib index 0b9614bc9e..12fae2121a 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNiPadNavigationDashboard.xib @@ -1,5 +1,5 @@ - + @@ -31,6 +31,7 @@ + @@ -96,7 +116,8 @@ + + @@ -161,6 +187,7 @@ + @@ -169,7 +196,9 @@ + + @@ -190,6 +219,7 @@ + @@ -207,6 +237,7 @@ + @@ -214,6 +245,9 @@ + + + diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMPortraitNavigationDashboard.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMPortraitNavigationDashboard.xib index 159e490c5e..da8bfc2260 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMPortraitNavigationDashboard.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMPortraitNavigationDashboard.xib @@ -1,5 +1,5 @@ - + @@ -31,6 +31,7 @@ + @@ -172,6 +199,7 @@ + @@ -179,6 +207,7 @@ + @@ -197,6 +226,7 @@ + @@ -215,6 +245,7 @@ + @@ -223,5 +254,8 @@ + + + diff --git a/iphone/Maps/Mapsme.storyboard b/iphone/Maps/Mapsme.storyboard index 48aec185ca..a85e91642d 100644 --- a/iphone/Maps/Mapsme.storyboard +++ b/iphone/Maps/Mapsme.storyboard @@ -1,5 +1,5 @@ - + @@ -17,6 +17,7 @@ + @@ -33,6 +34,7 @@ + @@ -50,7 +52,8 @@ - + + @@ -61,11 +64,13 @@ + @@ -73,6 +78,7 @@ + @@ -86,6 +92,7 @@ + @@ -101,6 +109,7 @@ + @@ -110,6 +119,7 @@ + @@ -124,11 +134,13 @@ + @@ -136,8 +148,10 @@ + + @@ -154,5 +168,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9c5202e67f13b559c61605fffa3b2754ae06171f Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:13:55 +0300 Subject: [PATCH 06/17] [ios] Removed "?sound" hook. --- .../Search/Console/MWMConsole.mm | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm index 4878b5ee01..62a9d2dc5c 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/Console/MWMConsole.mm @@ -3,9 +3,6 @@ #include "Framework.h" -extern NSString * const kMwmTextToSpeechEnable; -extern NSString * const kMwmTextToSpeechDisable; - @implementation MWMConsole + (BOOL)performCommand:(NSString *)cmd @@ -13,9 +10,6 @@ extern NSString * const kMwmTextToSpeechDisable; if ([self performMapStyle:cmd]) return YES; - if ([self performSound:cmd]) - return YES; - return NO; } @@ -35,21 +29,4 @@ extern NSString * const kMwmTextToSpeechDisable; return YES; } -+ (BOOL)performSound:(NSString *)cmd -{ - // Hook for shell command on change map style - BOOL const sound = [cmd isEqualToString:@"?sound"]; - BOOL const nosound = sound ? NO : [cmd isEqualToString:@"?nosound"]; - - if (!sound && !nosound) - return NO; - - if (sound) - [[NSNotificationCenter defaultCenter] postNotificationName:kMwmTextToSpeechEnable object:nil]; - if (nosound) - [[NSNotificationCenter defaultCenter] postNotificationName:kMwmTextToSpeechDisable object:nil]; - - return YES; -} - @end From a4f980fc55f24a232b96fa2f52f28a74c1f16601 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:15:59 +0300 Subject: [PATCH 07/17] [ios] Implemented TTS UI. --- iphone/Maps/Classes/Common.h | 18 -- .../MWMMapViewControlsManager.h | 1 - .../MWMMapViewControlsManager.mm | 5 - .../MWMNavigationDashboardEntity.mm | 9 +- .../MWMNavigationDashboardManager.h | 1 - .../MWMNavigationDashboardManager.mm | 44 +++-- .../Sound/MWMTextToSpeech.h | 25 ++- .../Sound/MWMTextToSpeech.mm | 159 +++++++++++++++--- .../Views/Dashboard/MWMNavigationDashboard.h | 1 + iphone/Maps/Classes/MapViewController.mm | 3 +- iphone/Maps/Classes/MapsAppDelegate.mm | 17 +- iphone/Maps/MWMTTSLanguageViewController.h | 5 + iphone/Maps/MWMTTSLanguageViewController.mm | 39 +++++ iphone/Maps/MWMTTSSettingsViewController.h | 7 + iphone/Maps/MWMTTSSettingsViewController.mm | 134 +++++++++++++++ .../Maps/Settings/SettingsViewController.mm | 35 +++- 16 files changed, 429 insertions(+), 74 deletions(-) create mode 100644 iphone/Maps/MWMTTSLanguageViewController.h create mode 100644 iphone/Maps/MWMTTSLanguageViewController.mm create mode 100644 iphone/Maps/MWMTTSSettingsViewController.h create mode 100644 iphone/Maps/MWMTTSSettingsViewController.mm diff --git a/iphone/Maps/Classes/Common.h b/iphone/Maps/Classes/Common.h index da29738e69..1af14cdf67 100644 --- a/iphone/Maps/Classes/Common.h +++ b/iphone/Maps/Classes/Common.h @@ -72,24 +72,6 @@ static inline NSString * formattedSize(uint64_t size) return [sizeString uppercaseString]; } -static inline NSString * bcp47ToTwineLanguage(NSString const * bcp47LangName) -{ - if (bcp47LangName == nil || [bcp47LangName length] < 2) - return nil; - - if ([bcp47LangName isEqualToString:@"zh-CN"] || [bcp47LangName isEqualToString:@"zh-CHS"] - || [bcp47LangName isEqualToString:@"zh-SG"]) - { - return @"zh-Hans"; // Chinese simplified - } - - if ([bcp47LangName hasPrefix:@"zh"]) - return @"zh-Hant"; // Chinese traditional - - // Taking two first symbols of a language name. For example ru-RU -> ru - return [bcp47LangName substringToIndex:2]; -} - // Use only for screen dimensions CGFloat comparison static inline BOOL equalScreenDimensions(CGFloat left, CGFloat right) { diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h index e42b88fd06..ef500fbcd8 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h @@ -37,7 +37,6 @@ #pragma mark - MWMNavigationDashboardManager - (void)setupRoutingDashboard:(location::FollowingInfo const &)info; -- (void)playTurnNotifications; - (void)routingHidden; - (void)routingReady; - (void)routingPrepare; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index e41aede8af..49c1b7e8d7 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -322,11 +322,6 @@ extern NSString * const kAlohalyticsTapEventKey; [self.menuController setStreetName:@(info.m_sourceName.c_str())]; } -- (void)playTurnNotifications -{ - [self.navigationManager playTurnNotifications]; -} - - (void)handleRoutingError { self.navigationManager.state = MWMNavigationDashboardStateError; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardEntity.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardEntity.mm index f2ccba4de9..6ca8d33254 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardEntity.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardEntity.mm @@ -51,8 +51,13 @@ using namespace routing::turns; // _lanes = info.m_lanes; _nextTurnImage = image(info.m_nextTurn, true); } - _turnImage = image(info.m_turn, false); - if (info.m_turn == TurnDirection::EnterRoundAbout || info.m_turn == TurnDirection::LeaveRoundAbout) + + TurnDirection const turn = info.m_turn; + _turnImage = image(turn, false); + BOOL const isRound = turn == TurnDirection::EnterRoundAbout || + turn == TurnDirection::StayOnRoundAbout || + turn == TurnDirection::LeaveRoundAbout; + if (isRound) _roundExitNumber = info.m_exitNum; else _roundExitNumber = 0; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h index c899cec6bf..3a7fac40f7 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h @@ -43,7 +43,6 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState) - (instancetype)initWithParentView:(UIView *)view delegate:(id)delegate; - (void)setupDashboard:(location::FollowingInfo const &)info; - (void)updateDashboard; -- (void)playTurnNotifications; - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation; - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm index 1bcf69f72e..5379048afc 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm @@ -32,7 +32,6 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa @property (weak, nonatomic) UIView * ownerView; @property (nonatomic) MWMNavigationDashboardEntity * entity; -@property (nonatomic) MWMTextToSpeech * tts; //@property (nonatomic) MWMLanesPanel * lanesPanel; @property (nonatomic) MWMNextTurnPanel * nextTurnPanel; @property (nonatomic) MWMRouteHelperPanelsDrawer * drawer; @@ -78,12 +77,26 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa _navigationDashboard = isPortrait ? _navigationDashboardPortrait : _navigationDashboardLandscape; _navigationDashboardPortrait.delegate = _navigationDashboardLandscape.delegate = delegate; } - _tts = [[MWMTextToSpeech alloc] init]; _helperPanels = [NSMutableArray array]; } return self; } +- (void)changedTTSStatus:(NSNotification *)notification +{ + if (self.state != MWMNavigationDashboardStateNavigation) + return; + NSDictionary * userInfo = notification.userInfo; + BOOL const enabled = userInfo[@"on"].boolValue; + self.navigationDashboardPortrait.soundButton.selected = enabled; + self.navigationDashboardLandscape.soundButton.selected = enabled; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + #pragma mark - Layout - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation @@ -142,12 +155,6 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa [self updateDashboard]; } -- (void)playTurnNotifications -{ - if (self.state == MWMNavigationDashboardStateNavigation) - [self.tts playTurnNotifications]; -} - - (void)handleError { [self.routePreview stateError]; @@ -192,10 +199,7 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa return; case 1: if (![self.helperPanels.firstObject isKindOfClass:panel.class]) - { [self.helperPanels addObject:panel]; - return; - } return; case 2: for (MWMRouteHelperPanel * p in self.helperPanels) @@ -272,6 +276,17 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa [self.delegate didCancelRouting]; } +- (IBAction)soundTap:(UIButton *)sender +{ + BOOL const isEnable = !sender.selected; + MWMTextToSpeech * tts = [MWMTextToSpeech tts]; + if (isEnable) + [tts enable]; + else + [tts disable]; + sender.selected = isEnable; +} + #pragma mark - MWMNavigationGo - (IBAction)navigationGoPressed:(UIButton *)sender @@ -316,6 +331,13 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa - (void)showStateNavigation { [self.routePreview remove]; + MWMTextToSpeech * tts = [MWMTextToSpeech tts]; + BOOL const isNeedToEnable = tts.isNeedToEnable; + self.navigationDashboardPortrait.soundButton.selected = isNeedToEnable; + self.navigationDashboardLandscape.soundButton.selected = isNeedToEnable; + if (isNeedToEnable) { + [tts enable]; + } [self.navigationDashboard addToView:self.ownerView]; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h index f73d9e1572..ca82cbc650 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h @@ -1,14 +1,33 @@ -#import - #include "std/string.hpp" #include "std/vector.hpp" @interface MWMTextToSpeech : NSObject -- (instancetype)init; ++ (instancetype)tts; + +- (vector>)availableLanguages; +- (NSString *)savedLanguage; +- (void)setNotificationsLocale:(string const &)locale; +- (BOOL)isNeedToEnable; +- (void)setNeedToEnable:(BOOL)need; - (BOOL)isEnable; - (void)enable; - (void)disable; - (void)playTurnNotifications; +- (instancetype)init __attribute__((unavailable("call tts instead"))); +- (instancetype)copy __attribute__((unavailable("call tts instead"))); +- (instancetype)copyWithZone:(NSZone *)zone __attribute__((unavailable("call tts instead"))); ++ (instancetype)alloc __attribute__((unavailable("call tts instead"))); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable("call tts instead"))); ++ (instancetype)new __attribute__((unavailable("call tts instead"))); + @end + +namespace tts +{ + +string bcp47ToTwineLanguage(NSString const * bcp47LangName); +string translatedTwine(string const & twine); + +} // namespace tts diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 2e83c4a241..5183a7075c 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -1,21 +1,38 @@ -#import #import "Common.h" +#import #import "MWMTextToSpeech.h" #include "Framework.h" +#include "sound/tts/languages.hpp" -extern NSString * const kMwmTextToSpeechEnable = @"MWMTEXTTOSPEECH_ENABLE"; -extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; +extern NSString * const kUserDefaultsTTSLanguage = @"UserDefaultsTTSLanguage"; +extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnableTTS"; @interface MWMTextToSpeech() +{ + vector> _availableLanguages; +} + @property (nonatomic) AVSpeechSynthesizer * speechSynthesizer; @property (nonatomic) AVSpeechSynthesisVoice * speechVoice; @property (nonatomic) float speechRate; + @end @implementation MWMTextToSpeech -- (instancetype)init ++ (instancetype)tts +{ + static dispatch_once_t onceToken; + static MWMTextToSpeech * tts = nil; + dispatch_once(&onceToken, ^ + { + tts = [[super alloc] initTTS]; + }); + return tts; +} + +- (instancetype)initTTS { self = [super init]; if (self) @@ -27,27 +44,40 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; LOG(LWARNING, ("[ setCategory]] error.", [err localizedDescription])); if (![audioSession setActive:YES error:&err]) LOG(LWARNING, ("[[AVAudioSession sharedInstance] setActive]] error.", [err localizedDescription])); - + + _availableLanguages = availableLanguages(); + + NSString * saved = self.savedLanguage; + + string preferedLanguage ; + if (saved.length) + preferedLanguage = saved.UTF8String; + else + preferedLanguage = tts::bcp47ToTwineLanguage([AVSpeechSynthesisVoice currentLanguageCode]); + + pair const lan {preferedLanguage, tts::translatedTwine(preferedLanguage)}; + if (find(_availableLanguages.begin(), _availableLanguages.end(), lan) != _availableLanguages.end()) + [self setNotificationsLocale:preferedLanguage]; + else + [self setNotificationsLocale:"en"]; // Before 9.0 version iOS has an issue with speechRate. AVSpeechUtteranceDefaultSpeechRate does not work correctly. // It's a work around for iOS 7.x and 8.x. - self.speechRate = isIOSVersionLessThan(@"7.1.1") ? 0.3 : (isIOSVersionLessThan(@"9.0.0") ? 0.15 : AVSpeechUtteranceDefaultSpeechRate); - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(enable) - name:kMwmTextToSpeechEnable - object:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(disable) - name:kMwmTextToSpeechDisable - object:nil]; + _speechRate = isIOSVersionLessThan(@"7.1.1") ? 0.3 : (isIOSVersionLessThan(@"9.0.0") ? 0.15 : AVSpeechUtteranceDefaultSpeechRate); } return self; } --(void)dealloc +- (vector>)availableLanguages { - [[NSNotificationCenter defaultCenter] removeObserver:self]; + return _availableLanguages; +} + +- (void)setNotificationsLocale:(string const &)locale +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setObject:@(locale.c_str()) forKey:kUserDefaultsTTSLanguage]; + GetFramework().SetTurnNotificationsLocale(locale); + [ud synchronize]; } - (BOOL)isValid @@ -55,16 +85,32 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; return _speechSynthesizer != nil && _speechVoice != nil; } +- (BOOL)isNeedToEnable +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:kUserDafaultsNeedToEnableTTS]; +} + +- (void)setNeedToEnable:(BOOL)need +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setBool:need forKey:kUserDafaultsNeedToEnableTTS]; + [ud synchronize]; +} + - (void)enable { - if (![self isValid]) - [self createSynthesizer]; - - GetFramework().EnableTurnNotifications(true); + [self setNeedToEnable:YES]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ + { + if (![self isValid]) + [self createSynthesizer]; + GetFramework().EnableTurnNotifications(true); + }); } - (void)disable { + [self setNeedToEnable:NO]; GetFramework().EnableTurnNotifications(false); } @@ -73,13 +119,17 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; return GetFramework().AreTurnNotificationsEnabled() ? YES : NO; } +- (NSString *)savedLanguage +{ + return [[NSUserDefaults standardUserDefaults] stringForKey:kUserDefaultsTTSLanguage]; +} + - (void)createSynthesizer { self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; - + [self createVoice:self.savedLanguage]; // TODO(vbykoianko) Use [NSLocale preferredLanguages] instead of [AVSpeechSynthesisVoice currentLanguageCode]. // [AVSpeechSynthesisVoice currentLanguageCode] is used now because of we need a language code in BCP-47. - [self createVoice:[AVSpeechSynthesisVoice currentLanguageCode]]; } - (void)createVoice:(NSString *)locale @@ -113,13 +163,13 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; } self.speechVoice = [AVSpeechSynthesisVoice voiceWithLanguage:locale]; - NSString const * twineLang = bcp47ToTwineLanguage(locale); - if (twineLang == nil) + string const twineLang = tts::bcp47ToTwineLanguage(locale); + if (twineLang.empty()) { LOG(LERROR, ("Cannot convert UI locale or default locale to twine language. MWMTestToSpeech is invalid.")); return; // self is not valid. } - GetFramework().SetTurnNotificationsLocale([twineLang UTF8String]); + GetFramework().SetTurnNotificationsLocale(twineLang); } - (void)speakOneString:(NSString *)textToSpeak @@ -150,4 +200,59 @@ extern NSString * const kMwmTextToSpeechDisable = @"MWMTEXTTOSPEECH_DISABLE"; [self speakOneString:@(text.c_str())]; } +static vector> availableLanguages() +{ + NSArray * voices = [AVSpeechSynthesisVoice speechVoices]; + vector native(voices.count); + for (AVSpeechSynthesisVoice * v in voices) + native.push_back(tts::bcp47ToTwineLanguage(v.language)); + + sort(native.begin(), native.end()); + using namespace routing::turns::sound; + vector> result; + for (auto const & p : kLanguageList) + { + if (find(native.begin(), native.end(), p.first) != native.end()) + result.push_back(p); + } + return result; +} + @end + +namespace tts +{ + +string bcp47ToTwineLanguage(NSString const * bcp47LangName) +{ + if (bcp47LangName == nil || [bcp47LangName length] < 2) + return nil; + + if ([bcp47LangName isEqualToString:@"zh-CN"] || [bcp47LangName isEqualToString:@"zh-CHS"] + || [bcp47LangName isEqualToString:@"zh-SG"]) + { + return "zh-Hans"; // Chinese simplified + } + + if ([bcp47LangName hasPrefix:@"zh"]) + return "zh-Hant"; // Chinese traditional + + // Taking two first symbols of a language name. For example ru-RU -> ru + return [[bcp47LangName substringToIndex:2] UTF8String]; +} + +string translatedTwine(string const & twine) +{ + auto const & list = routing::turns::sound::kLanguageList; + auto const it = find_if(list.begin(), list.end(), [&twine](pair const & pair) + { + return pair.first == twine; + }); + + if (it != list.end()) + return it->second; + else + return ""; +} + +} // namespace tts \ No newline at end of file diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.h index f26d0ddad4..9b1c4afa89 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/Dashboard/MWMNavigationDashboard.h @@ -12,6 +12,7 @@ @property (weak, nonatomic) IBOutlet UILabel * arrivalsTimeLabel; @property (weak, nonatomic) IBOutlet UILabel * roundRoadLabel; @property (weak, nonatomic) IBOutlet UILabel * streetLabel; +@property (weak, nonatomic) IBOutlet UIButton * soundButton; @property (weak, nonatomic) IBOutlet UISlider * progress; - (void)configureWithEntity:(MWMNavigationDashboardEntity *)entity; diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 0f1ec7580b..ba57e11d99 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -6,6 +6,7 @@ #import "MWMAPIBar.h" #import "MWMMapViewControlsManager.h" #import "RouteState.h" +#import "MWMTextToSpeech.h" #import "UIFont+MapsMeFonts.h" #import "UIViewController+Navigation.h" @@ -143,7 +144,7 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) if (res.IsValid()) [self.controlsManager setupRoutingDashboard:res]; - [self.controlsManager playTurnNotifications]; + [[MWMTextToSpeech tts] playTurnNotifications]; } - (void)onCompassUpdate:(location::CompassInfo const &)info diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 0f8fed86a4..0e625ba65c 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -47,6 +47,8 @@ static NSString * const kBundleVersion = @"BundleVersion"; extern string const kCountryCodeKey; extern string const kUniqueIdKey; extern string const kLanguageKey; +extern NSString * const kUserDefaultsTTSLanguage; +extern NSString * const kUserDafaultsNeedToEnableTTS; /// Adds needed localized strings to C++ code /// @TODO Refactor localization mechanism to make it simpler @@ -202,11 +204,13 @@ void InitLocalizedStrings() [self incrementSessionCount]; [self showAlertIfRequired]; } - + Framework & f = GetFramework(); application.applicationIconBadgeNumber = f.GetCountryTree().GetActiveMapLayout().GetOutOfDateCount(); f.GetLocationState()->InvalidatePosition(); + [self enableTTSForTheFirstTime]; + return returnValue; } @@ -529,6 +533,17 @@ void InitLocalizedStrings() [RouteState remove]; } +#pragma mark - TTS + +- (void)enableTTSForTheFirstTime +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + if ([ud stringForKey:kUserDefaultsTTSLanguage].length) + return; + [ud setBool:YES forKey:kUserDafaultsNeedToEnableTTS]; + [ud synchronize]; +} + #pragma mark - Standby - (void)enableStandby diff --git a/iphone/Maps/MWMTTSLanguageViewController.h b/iphone/Maps/MWMTTSLanguageViewController.h new file mode 100644 index 0000000000..1530c6f92a --- /dev/null +++ b/iphone/Maps/MWMTTSLanguageViewController.h @@ -0,0 +1,5 @@ +#import "TableViewController.h" + +@interface MWMTTSLanguageViewController : TableViewController + +@end diff --git a/iphone/Maps/MWMTTSLanguageViewController.mm b/iphone/Maps/MWMTTSLanguageViewController.mm new file mode 100644 index 0000000000..65aae4345c --- /dev/null +++ b/iphone/Maps/MWMTTSLanguageViewController.mm @@ -0,0 +1,39 @@ +#import "MWMTextToSpeech.h" +#import "MWMTTSLanguageViewController.h" +#import "MWMTTSSettingsViewController.h" +#import "SelectableCell.h" + +static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings"; + +@implementation MWMTTSLanguageViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_tts_other_section_title"); +} + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SelectableCell *)sender +{ + if (![segue.identifier isEqualToString:kUnwingSegueIdentifier]) + return; + MWMTTSSettingsViewController * dest = segue.destinationViewController; + NSUInteger const row = [self.tableView indexPathForCell:sender].row; + [dest setAdditionalTTSLanguage:[[MWMTextToSpeech tts] availableLanguages][row]]; +} + +#pragma mark - UITableViewDataSource && UITableViewDelegate + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return [[MWMTextToSpeech tts] availableLanguages].size(); +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + SelectableCell * cell = (SelectableCell *)[tableView dequeueReusableCellWithIdentifier:[SelectableCell className]]; + cell.titleLabel.text = @([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str()); + return cell; +} + +@end diff --git a/iphone/Maps/MWMTTSSettingsViewController.h b/iphone/Maps/MWMTTSSettingsViewController.h new file mode 100644 index 0000000000..29035fbe6d --- /dev/null +++ b/iphone/Maps/MWMTTSSettingsViewController.h @@ -0,0 +1,7 @@ +#import "TableViewController.h" + +@interface MWMTTSSettingsViewController : TableViewController + +- (void)setAdditionalTTSLanguage:(std::pair const &)l; + +@end diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm new file mode 100644 index 0000000000..86545a8acd --- /dev/null +++ b/iphone/Maps/MWMTTSSettingsViewController.mm @@ -0,0 +1,134 @@ +#import +#import "LinkCell.h" +#import "MWMTextToSpeech.h" +#import "MWMTTSSettingsViewController.h" +#import "SelectableCell.h" + +static NSString * kSelectTTSLanguageSegueName = @"TTSLanguage"; + +using namespace std; + +@interface MWMTTSSettingsViewController () +{ + pair _additionalTTSLanguage; + vector> _languages; +} + +@property (nonatomic) BOOL isLocaleLanguageAbsent; + +@end + +@implementation MWMTTSSettingsViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_tts_language_title"); + MWMTextToSpeech * tts = [MWMTextToSpeech tts]; + + _languages.reserve(3); + auto const & v = tts.availableLanguages; + pair const standart = v.front(); + _languages.push_back(standart); + + using namespace tts; + string const current = bcp47ToTwineLanguage([AVSpeechSynthesisVoice currentLanguageCode]); + if (current != standart.first && !current.empty()) + { + string const translated = translatedTwine(current); + pair const cur {current, translated}; + if (translated.empty() || find(v.begin(), v.end(), cur) != v.end()) + _languages.push_back(cur); + else + self.isLocaleLanguageAbsent = YES; + } + string const savedLanguage = tts.savedLanguage.UTF8String; + if (savedLanguage != current && savedLanguage != standart.first && !savedLanguage.empty()) + _languages.push_back({savedLanguage, translatedTwine(savedLanguage)}); +} + +- (IBAction)unwind:(id)sender +{ + size_t const size = _languages.size(); + switch (size) + { + case 1: + _languages.push_back(_additionalTTSLanguage); + break; + case 2: + if (self.isLocaleLanguageAbsent) + _languages[size - 1] = _additionalTTSLanguage; + else + _languages.push_back(_additionalTTSLanguage); + break; + case 3: + _languages[size - 1] = _additionalTTSLanguage; + break; + default: + NSAssert(false, @"Incorrect language's count"); + break; + } + [self.tableView reloadData]; +} + +- (void)setAdditionalTTSLanguage:(pair const &)l +{ + [[MWMTextToSpeech tts] setNotificationsLocale:l.first]; + _additionalTTSLanguage = l; +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 2; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + if (section == 0) + return _languages.size() + 1; + else + return 1; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (indexPath.section == 0 && indexPath.row != _languages.size()) + { + SelectableCell * cell = (SelectableCell *)[tableView dequeueReusableCellWithIdentifier:[SelectableCell className]]; + pair const p = _languages[indexPath.row]; + cell.titleLabel.text = @(p.second.c_str()); + BOOL const isSelected = [@(p.first.c_str()) isEqualToString:[[MWMTextToSpeech tts] savedLanguage]]; + cell.accessoryType = isSelected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; + return cell; + } + else + { + LinkCell * cell = (LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; + cell.titleLabel.text = indexPath.section == 0 ? L(@"pref_tts_other_section_title") : L(@"pref_tts_how_to_set_up_voice"); + return cell; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (indexPath.section == 0) + { + if (indexPath.row == _languages.size()) + { + [self performSegueWithIdentifier:kSelectTTSLanguageSegueName sender:nil]; + } + else + { + [[MWMTextToSpeech tts] setNotificationsLocale:_languages[indexPath.row].first]; + [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; + } + } + else + { +#warning need to add help + } +} + +@end diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index 9fbcb7eefa..d21999f3ca 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -1,4 +1,3 @@ - #import "SettingsViewController.h" #import "SwitchCell.h" #import "SelectableCell.h" @@ -8,6 +7,7 @@ #import "MapsAppDelegate.h" #import "Statistics.h" #import "MWMMapViewControlsManager.h" +#import "MWMTextToSpeech.h" #include "Framework.h" @@ -16,14 +16,16 @@ #include "platform/preferred_languages.hpp" extern char const * kStatisticsEnabledSettingsKey; +extern NSString * const kTTSStatusWasChangedNotification = @"TTFStatusWasChangedFromSettingsNotification"; typedef NS_ENUM(NSUInteger, Section) { SectionMetrics, SectionZoomButtons, + SectionRouting, SectionCalibration, SectionStatistics, - SectionCount + SectionCount // Must be latest value! }; @interface SettingsViewController () @@ -60,7 +62,7 @@ typedef NS_ENUM(NSUInteger, Section) - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (section == SectionMetrics) + if (section == SectionMetrics || section == SectionRouting) return 2; else return 1; @@ -110,7 +112,23 @@ typedef NS_ENUM(NSUInteger, Section) customCell.titleLabel.text = L(@"pref_calibration_title"); customCell.delegate = self; } - + else if (indexPath.section == SectionRouting) + { + if (indexPath.row == 0) + { + cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]]; + SwitchCell * customCell = (SwitchCell *)cell; + customCell.switchButton.on = [[MWMTextToSpeech tts] isNeedToEnable]; + customCell.titleLabel.text = L(@"pref_tts_enable_title"); + customCell.delegate = self; + } + else + { + cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; + LinkCell * customCell = (LinkCell *)cell; + customCell.titleLabel.text = L(@"pref_tts_language_title"); + } + } return cell; } @@ -144,6 +162,13 @@ typedef NS_ENUM(NSUInteger, Section) { Settings::Set("CompassCalibrationEnabled", (bool)value); } + else if (indexPath.section == SectionRouting) + { + [[MWMTextToSpeech tts] setNeedToEnable:value]; + [[NSNotificationCenter defaultCenter] postNotificationName:kTTSStatusWasChangedNotification + object:nil + userInfo:@{@"on" : @(value)}]; + } } Settings::Units unitsForIndex(NSInteger index) @@ -166,6 +191,8 @@ Settings::Units unitsForIndex(NSInteger index) { if (section == SectionMetrics) return L(@"measurement_units"); + else if (section == SectionRouting) + return L(@"prefs_group_route"); else return nil; } From 6442186334f04127722b15249732c15661325506 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 15:17:17 +0300 Subject: [PATCH 08/17] [ios] Added TTS changes to project file. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 2102512f7b..be23c69c40 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -243,6 +243,7 @@ F63732961AE9431E00A03764 /* MWMBasePlacePageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63732951AE9431E00A03764 /* MWMBasePlacePageView.mm */; }; F63774E71B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F63774E61B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib */; }; F63774EA1B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */; }; + F63BA3711BCD5B520044C504 /* MWMTTSLanguageViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */; }; F64A37D01B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64A37CF1B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.mm */; }; F64F19991AB81A00006EAF7E /* MWMAlertViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F19821AB81A00006EAF7E /* MWMAlertViewController.mm */; }; F64F199A1AB81A00006EAF7E /* MWMAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F19831AB81A00006EAF7E /* MWMAlertViewController.xib */; }; @@ -263,6 +264,7 @@ F6588E371B15D87A00EE1E58 /* MWMBookmarkColorCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6588E351B15D87A00EE1E58 /* MWMBookmarkColorCell.mm */; }; F6588E381B15D87A00EE1E58 /* MWMBookmarkColorCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6588E361B15D87A00EE1E58 /* MWMBookmarkColorCell.xib */; }; F6671C6B1BA2EFD500548008 /* libFlurry_7.1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */; }; + F668F6561BCD4507002D6FFC /* MWMTTSSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */; }; F66A8FA81B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F66A8FA71B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm */; }; F66A8FAC1B09F137001B9C97 /* MWMiPadPlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F66A8FAB1B09F137001B9C97 /* MWMiPadPlacePage.mm */; }; F66A8FB01B09F268001B9C97 /* MWMPlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F66A8FAF1B09F268001B9C97 /* MWMPlacePage.mm */; }; @@ -729,6 +731,8 @@ F63774E61B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMRoutingDisclaimerAlert.xib; sourceTree = ""; }; F63774E81B59376F00BCF54D /* MWMRoutingDisclaimerAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRoutingDisclaimerAlert.h; sourceTree = ""; }; F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRoutingDisclaimerAlert.mm; sourceTree = ""; }; + F63BA36F1BCD5B520044C504 /* MWMTTSLanguageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSLanguageViewController.h; sourceTree = ""; }; + F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSLanguageViewController.mm; sourceTree = ""; }; F63BA3721BCE6F770044C504 /* MWMRoutePoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MWMRoutePoint.h; path = APIBar/MWMRoutePoint.h; sourceTree = ""; }; F63BA3731BCE70D60044C504 /* MWMRoutingProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRoutingProtocol.h; sourceTree = ""; }; F64A37CE1B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRouteHelperPanelsDrawer.h; sourceTree = ""; }; @@ -763,6 +767,8 @@ F6588E351B15D87A00EE1E58 /* MWMBookmarkColorCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBookmarkColorCell.mm; sourceTree = ""; }; F6588E361B15D87A00EE1E58 /* MWMBookmarkColorCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkColorCell.xib; sourceTree = ""; }; F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry_7.1.0.a; path = Statistics/libFlurry_7.1.0.a; sourceTree = ""; }; + F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSSettingsViewController.h; sourceTree = ""; }; + F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSSettingsViewController.mm; sourceTree = ""; }; F66A8FA61B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMiPhoneLandscapePlacePage.h; sourceTree = ""; }; F66A8FA71B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMiPhoneLandscapePlacePage.mm; sourceTree = ""; }; F66A8FAA1B09F137001B9C97 /* MWMiPadPlacePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMiPadPlacePage.h; sourceTree = ""; }; @@ -2138,6 +2144,10 @@ 978F924D183BB5D6000D6C7C /* Cells */, 978F923F183B660F000D6C7C /* SettingsViewController.h */, 978F9239183B660F000D6C7C /* SettingsViewController.mm */, + F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */, + F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */, + F63BA36F1BCD5B520044C504 /* MWMTTSLanguageViewController.h */, + F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */, 97508421199522D300A7457D /* SettingsAndMoreVC.h */, 97508422199522D300A7457D /* SettingsAndMoreVC.mm */, 978D4A231996B0EC00D72CA7 /* CommunityVC.h */, @@ -2542,6 +2552,7 @@ 349A35851B53E967009677EE /* MWMDownloadMapRequestView.mm in Sources */, F64F19991AB81A00006EAF7E /* MWMAlertViewController.mm in Sources */, FAFCB63613366E78001A5C59 /* WebViewController.mm in Sources */, + F63BA3711BCD5B520044C504 /* MWMTTSLanguageViewController.mm in Sources */, F6FE2C0F1B03A006009814AA /* MWMPlacePageNavigationBar.mm in Sources */, F64A37D01B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.mm in Sources */, 340F24631B14910500F874CD /* RouteState.mm in Sources */, @@ -2574,6 +2585,7 @@ 340E10601B944DAB00D975D5 /* MWMSearchHistoryManager.mm in Sources */, F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.mm in Sources */, FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */, + F668F6561BCD4507002D6FFC /* MWMTTSSettingsViewController.mm in Sources */, F6ED135B1B18AA930095C6DE /* MWMExtendedPlacePageView.mm in Sources */, 34B16C451B72655D000D3A0D /* MWMPedestrianShareAlert.mm in Sources */, 347BAC6E1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.mm in Sources */, From 2df36d58d3624578af15bf24c9a84ec7d643559c Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 16:36:23 +0300 Subject: [PATCH 09/17] [ios] Fixed @igrechuhin comments. (TTS) --- .../MWMNavigationDashboardManager.mm | 8 ++------ .../NavigationDashboard/Sound/MWMTextToSpeech.mm | 4 ++-- iphone/Maps/MWMTTSSettingsViewController.mm | 9 +++++---- iphone/Maps/Settings/SettingsViewController.mm | 14 +++++++------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm index 5379048afc..324e0f0283 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm @@ -335,9 +335,9 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa BOOL const isNeedToEnable = tts.isNeedToEnable; self.navigationDashboardPortrait.soundButton.selected = isNeedToEnable; self.navigationDashboardLandscape.soundButton.selected = isNeedToEnable; - if (isNeedToEnable) { + if (isNeedToEnable) [tts enable]; - } + [self.navigationDashboard addToView:self.ownerView]; } @@ -346,13 +346,9 @@ static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDa switch (GetFramework().GetRouter()) { case routing::RouterType::Pedestrian: -// self.routePreview.pedestrianProgressView.state = MWMCircularProgressStateSelected; -// self.routePreview.vehicleProgressView.state = MWMCircularProgressStateNormal; self.activeRouteTypeButton = self.routePreview.pedestrianProgressView; break; case routing::RouterType::Vehicle: -// self.routePreview.vehicleProgressView.state = MWMCircularProgressStateSelected; -// self.routePreview.pedestrianProgressView.state = MWMCircularProgressStateNormal; self.activeRouteTypeButton = self.routePreview.vehicleProgressView; break; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 5183a7075c..7eeb831512 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -49,7 +49,7 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl NSString * saved = self.savedLanguage; - string preferedLanguage ; + string preferedLanguage; if (saved.length) preferedLanguage = saved.UTF8String; else @@ -226,7 +226,7 @@ namespace tts string bcp47ToTwineLanguage(NSString const * bcp47LangName) { if (bcp47LangName == nil || [bcp47LangName length] < 2) - return nil; + return ""; if ([bcp47LangName isEqualToString:@"zh-CN"] || [bcp47LangName isEqualToString:@"zh-CHS"] || [bcp47LangName isEqualToString:@"zh-SG"]) diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm index 86545a8acd..62ce35236e 100644 --- a/iphone/Maps/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/MWMTTSSettingsViewController.mm @@ -81,7 +81,8 @@ using namespace std; - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 2; + return 1; +// return 2; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section @@ -125,10 +126,10 @@ using namespace std; [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; } } - else - { #warning need to add help - } +// else +// { +// } } @end diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index d21999f3ca..d82c5aa3b0 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -1,13 +1,13 @@ -#import "SettingsViewController.h" -#import "SwitchCell.h" -#import "SelectableCell.h" -#import "LinkCell.h" -#import "WebViewController.h" -#import "MapViewController.h" #import "MapsAppDelegate.h" -#import "Statistics.h" +#import "MapViewController.h" #import "MWMMapViewControlsManager.h" #import "MWMTextToSpeech.h" +#import "SelectableCell.h" +#import "SettingsViewController.h" +#import "Statistics.h" +#import "SwitchCell.h" +#import "LinkCell.h" +#import "WebViewController.h" #include "Framework.h" From 66078b262b92fe2bedda52e69699e7ccbcf0a644 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Thu, 12 Nov 2015 17:43:51 +0300 Subject: [PATCH 10/17] [ios] Fixed @bykoianko comments. (TTS) --- .../NavigationDashboard/Sound/MWMTextToSpeech.mm | 6 +++--- iphone/Maps/MWMTTSSettingsViewController.mm | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 7eeb831512..59fc742a3f 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -226,16 +226,16 @@ namespace tts string bcp47ToTwineLanguage(NSString const * bcp47LangName) { if (bcp47LangName == nil || [bcp47LangName length] < 2) - return ""; + return string(""); if ([bcp47LangName isEqualToString:@"zh-CN"] || [bcp47LangName isEqualToString:@"zh-CHS"] || [bcp47LangName isEqualToString:@"zh-SG"]) { - return "zh-Hans"; // Chinese simplified + return string("zh-Hans"); // Chinese simplified } if ([bcp47LangName hasPrefix:@"zh"]) - return "zh-Hant"; // Chinese traditional + return string("zh-Hant"); // Chinese traditional // Taking two first symbols of a language name. For example ru-RU -> ru return [[bcp47LangName substringToIndex:2] UTF8String]; diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm index 62ce35236e..f2fe698902 100644 --- a/iphone/Maps/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/MWMTTSSettingsViewController.mm @@ -28,6 +28,7 @@ using namespace std; _languages.reserve(3); auto const & v = tts.availableLanguages; + NSAssert(!v.empty(), @"Vector can't be empty!"); pair const standart = v.front(); _languages.push_back(standart); From 6d0be997e49bf8e7f15c86644f66b52e90a28822 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 13:11:54 +0300 Subject: [PATCH 11/17] [ios] Fixed incorrect synthesizer's locale. --- .../Sound/MWMTextToSpeech.h | 2 +- .../Sound/MWMTextToSpeech.mm | 26 +++++++++---------- iphone/Maps/MWMTTSSettingsViewController.mm | 4 +-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h index ca82cbc650..509b277a37 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h @@ -7,7 +7,7 @@ - (vector>)availableLanguages; - (NSString *)savedLanguage; -- (void)setNotificationsLocale:(string const &)locale; +- (void)setNotificationsLocale:(NSString *)locale; - (BOOL)isNeedToEnable; - (void)setNeedToEnable:(BOOL)need; - (BOOL)isEnable; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 59fc742a3f..640cef11ff 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -57,9 +57,9 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl pair const lan {preferedLanguage, tts::translatedTwine(preferedLanguage)}; if (find(_availableLanguages.begin(), _availableLanguages.end(), lan) != _availableLanguages.end()) - [self setNotificationsLocale:preferedLanguage]; + [self setNotificationsLocale:@(preferedLanguage.c_str())]; else - [self setNotificationsLocale:"en"]; + [self setNotificationsLocale:@"en"]; // Before 9.0 version iOS has an issue with speechRate. AVSpeechUtteranceDefaultSpeechRate does not work correctly. // It's a work around for iOS 7.x and 8.x. _speechRate = isIOSVersionLessThan(@"7.1.1") ? 0.3 : (isIOSVersionLessThan(@"9.0.0") ? 0.15 : AVSpeechUtteranceDefaultSpeechRate); @@ -72,12 +72,12 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl return _availableLanguages; } -- (void)setNotificationsLocale:(string const &)locale +- (void)setNotificationsLocale:(NSString *)locale { NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setObject:@(locale.c_str()) forKey:kUserDefaultsTTSLanguage]; - GetFramework().SetTurnNotificationsLocale(locale); + [ud setObject:locale forKey:kUserDefaultsTTSLanguage]; [ud synchronize]; + [self createVoice:locale]; } - (BOOL)isValid @@ -100,12 +100,9 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl - (void)enable { [self setNeedToEnable:YES]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ - { - if (![self isValid]) - [self createSynthesizer]; - GetFramework().EnableTurnNotifications(true); - }); + if (![self isValid]) + [self createSynthesizer]; + GetFramework().EnableTurnNotifications(true); } - (void)disable @@ -126,8 +123,11 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl - (void)createSynthesizer { - self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; - [self createVoice:self.savedLanguage]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ + { + self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; + [self createVoice:self.savedLanguage]; + }); // TODO(vbykoianko) Use [NSLocale preferredLanguages] instead of [AVSpeechSynthesisVoice currentLanguageCode]. // [AVSpeechSynthesisVoice currentLanguageCode] is used now because of we need a language code in BCP-47. } diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm index f2fe698902..e1f4544057 100644 --- a/iphone/Maps/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/MWMTTSSettingsViewController.mm @@ -74,7 +74,7 @@ using namespace std; - (void)setAdditionalTTSLanguage:(pair const &)l { - [[MWMTextToSpeech tts] setNotificationsLocale:l.first]; + [[MWMTextToSpeech tts] setNotificationsLocale:@(l.first.c_str())]; _additionalTTSLanguage = l; } @@ -123,7 +123,7 @@ using namespace std; } else { - [[MWMTextToSpeech tts] setNotificationsLocale:_languages[indexPath.row].first]; + [[MWMTextToSpeech tts] setNotificationsLocale:@(_languages[indexPath.row].first.c_str())]; [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; } } From e98c37d8217e478a31c8104f8fd3816f1a246809 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 13:43:39 +0300 Subject: [PATCH 12/17] [ios] Added comment to pref_tts_other_section_title string. --- strings.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/strings.txt b/strings.txt index 2ea521cf02..140cbd2ec3 100644 --- a/strings.txt +++ b/strings.txt @@ -5250,6 +5250,7 @@ [pref_tts_other_section_title] tags = ios + comment = Title for "Other" section in TTS settings. en = Other ru = Другой fr = Autre From d8f6468ec2b41c232c496d789a491ae7e9602dda Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 13:44:22 +0300 Subject: [PATCH 13/17] [ios] Generate comments for pref_tts_other_section_title string. --- android/res/values-ar/strings.xml | 1 + android/res/values-cs/strings.xml | 1 + android/res/values-da/strings.xml | 1 + android/res/values-de/strings.xml | 1 + android/res/values-es/strings.xml | 1 + android/res/values-fi/strings.xml | 1 + android/res/values-fr/strings.xml | 1 + android/res/values-hu/strings.xml | 1 + android/res/values-in/strings.xml | 1 + android/res/values-it/strings.xml | 1 + android/res/values-ja/strings.xml | 1 + android/res/values-ko/strings.xml | 1 + android/res/values-nb/strings.xml | 1 + android/res/values-nl/strings.xml | 1 + android/res/values-pl/strings.xml | 1 + android/res/values-pt/strings.xml | 1 + android/res/values-ro/strings.xml | 1 + android/res/values-ru/strings.xml | 1 + android/res/values-sk/strings.xml | 1 + android/res/values-sv/strings.xml | 1 + android/res/values-th/strings.xml | 1 + android/res/values-tr/strings.xml | 1 + android/res/values-uk/strings.xml | 1 + android/res/values-vi/strings.xml | 1 + android/res/values-zh-rTW/strings.xml | 1 + android/res/values-zh/strings.xml | 1 + android/res/values/strings.xml | 1 + iphone/Maps/ar.lproj/Localizable.strings | 1 + iphone/Maps/cs.lproj/Localizable.strings | 1 + iphone/Maps/da.lproj/Localizable.strings | 1 + iphone/Maps/de.lproj/Localizable.strings | 1 + iphone/Maps/en.lproj/Localizable.strings | 1 + iphone/Maps/es.lproj/Localizable.strings | 1 + iphone/Maps/fi.lproj/Localizable.strings | 1 + iphone/Maps/fr.lproj/Localizable.strings | 1 + iphone/Maps/hu.lproj/Localizable.strings | 1 + iphone/Maps/id.lproj/Localizable.strings | 1 + iphone/Maps/it.lproj/Localizable.strings | 1 + iphone/Maps/ja.lproj/Localizable.strings | 1 + iphone/Maps/ko.lproj/Localizable.strings | 1 + iphone/Maps/nb.lproj/Localizable.strings | 1 + iphone/Maps/nl.lproj/Localizable.strings | 1 + iphone/Maps/pl.lproj/Localizable.strings | 1 + iphone/Maps/pt.lproj/Localizable.strings | 1 + iphone/Maps/ro.lproj/Localizable.strings | 1 + iphone/Maps/ru.lproj/Localizable.strings | 1 + iphone/Maps/sk.lproj/Localizable.strings | 1 + iphone/Maps/sv.lproj/Localizable.strings | 1 + iphone/Maps/th.lproj/Localizable.strings | 1 + iphone/Maps/tr.lproj/Localizable.strings | 1 + iphone/Maps/uk.lproj/Localizable.strings | 1 + iphone/Maps/vi.lproj/Localizable.strings | 1 + iphone/Maps/zh-Hans.lproj/Localizable.strings | 1 + iphone/Maps/zh-Hant.lproj/Localizable.strings | 1 + 54 files changed, 54 insertions(+) diff --git a/android/res/values-ar/strings.xml b/android/res/values-ar/strings.xml index 238e240772..afe09081b4 100644 --- a/android/res/values-ar/strings.xml +++ b/android/res/values-ar/strings.xml @@ -310,6 +310,7 @@ بحث أزرار التكبير عرض على الشاشة + آخر كيفية ضبط الصوت المسافة diff --git a/android/res/values-cs/strings.xml b/android/res/values-cs/strings.xml index 6bbbcbd137..e1ecb076f4 100644 --- a/android/res/values-cs/strings.xml +++ b/android/res/values-cs/strings.xml @@ -307,6 +307,7 @@ Vyhledávání Tlačítka přiblížení/oddálení Zobrazit na obrazovce + Ostatní Jak nastavit hlas Vzdálenost diff --git a/android/res/values-da/strings.xml b/android/res/values-da/strings.xml index e894e21a30..efb85a09e0 100644 --- a/android/res/values-da/strings.xml +++ b/android/res/values-da/strings.xml @@ -308,6 +308,7 @@ Søg Zoom knapper Vis på skærmen + Andet Sådan indstiller du tale Afstand diff --git a/android/res/values-de/strings.xml b/android/res/values-de/strings.xml index 106778a1d8..431695521b 100644 --- a/android/res/values-de/strings.xml +++ b/android/res/values-de/strings.xml @@ -301,6 +301,7 @@ Suche Zoom-Tasten Auf dem Bildschirm anzeigen + Weitere Navi-Stimme einstellen Distanz diff --git a/android/res/values-es/strings.xml b/android/res/values-es/strings.xml index 2d68861a06..3d20945ce1 100644 --- a/android/res/values-es/strings.xml +++ b/android/res/values-es/strings.xml @@ -299,6 +299,7 @@ Buscar Botones de zoom Visualización en la pantalla + Otros Cómo configurar la voz Distancia diff --git a/android/res/values-fi/strings.xml b/android/res/values-fi/strings.xml index 7a447d6f33..2c0ddf2dbb 100644 --- a/android/res/values-fi/strings.xml +++ b/android/res/values-fi/strings.xml @@ -306,6 +306,7 @@ Haku Zoomauspainikkeet Näytä ruudulla + Egyéb Így állítsd be a hangot Etäisyys diff --git a/android/res/values-fr/strings.xml b/android/res/values-fr/strings.xml index c710500ae2..ce3fcd4703 100644 --- a/android/res/values-fr/strings.xml +++ b/android/res/values-fr/strings.xml @@ -311,6 +311,7 @@ Rechercher Boutons de zoom Afficher à l\'écran + Autre Comment configurer la voix Distance diff --git a/android/res/values-hu/strings.xml b/android/res/values-hu/strings.xml index 4d9f943611..eb22a44c09 100644 --- a/android/res/values-hu/strings.xml +++ b/android/res/values-hu/strings.xml @@ -307,6 +307,7 @@ Keresés Nagyítás/kicsinyítés gombok Mutassa a kijelzőn + Egyéb Így állítsd be a hangot Távolság diff --git a/android/res/values-in/strings.xml b/android/res/values-in/strings.xml index 20aeaa59a1..e07c687ee9 100644 --- a/android/res/values-in/strings.xml +++ b/android/res/values-in/strings.xml @@ -306,6 +306,7 @@ Cari Tombol perbesaran Tampilkan pada layar + Lainnya Cara mengatur suara Jarak diff --git a/android/res/values-it/strings.xml b/android/res/values-it/strings.xml index 5bfae77b8d..24ada73be1 100644 --- a/android/res/values-it/strings.xml +++ b/android/res/values-it/strings.xml @@ -303,6 +303,7 @@ Cerca Pulsanti per lo zoom Condividi la mia location + Altro Come impostare la voce Distanza diff --git a/android/res/values-ja/strings.xml b/android/res/values-ja/strings.xml index 927e131570..15a82b0dcb 100644 --- a/android/res/values-ja/strings.xml +++ b/android/res/values-ja/strings.xml @@ -297,6 +297,7 @@ 検索 ズームボタン 画面上に表示 + その他 音声設定の仕方 距離 diff --git a/android/res/values-ko/strings.xml b/android/res/values-ko/strings.xml index 5e77430483..9e70f9f752 100644 --- a/android/res/values-ko/strings.xml +++ b/android/res/values-ko/strings.xml @@ -296,6 +296,7 @@ 검색 확대/축소 버튼 화면에 표시 + 다른 언어 음성 설정 방법 거리 diff --git a/android/res/values-nb/strings.xml b/android/res/values-nb/strings.xml index dd751476ca..f985c82aa6 100644 --- a/android/res/values-nb/strings.xml +++ b/android/res/values-nb/strings.xml @@ -306,6 +306,7 @@ Søk Zoom-knapper Vis på skjermen + Andre Slik installerer du stemme Avstand diff --git a/android/res/values-nl/strings.xml b/android/res/values-nl/strings.xml index f7993b07bf..2d2993170a 100644 --- a/android/res/values-nl/strings.xml +++ b/android/res/values-nl/strings.xml @@ -298,6 +298,7 @@ Zoek Zoomknoppen Weergave op het scherm + Andere Hoe stel je de stem in Afstand diff --git a/android/res/values-pl/strings.xml b/android/res/values-pl/strings.xml index 8eb2dedaee..a45e02376d 100644 --- a/android/res/values-pl/strings.xml +++ b/android/res/values-pl/strings.xml @@ -307,6 +307,7 @@ Szukaj Przyciski powiększania Wyświetl na ekranie + Inny Jak skonfigurować usługę głosową Dystans diff --git a/android/res/values-pt/strings.xml b/android/res/values-pt/strings.xml index ec8c689630..6baf3aeb53 100644 --- a/android/res/values-pt/strings.xml +++ b/android/res/values-pt/strings.xml @@ -303,6 +303,7 @@ Pesquisar Botões de zoom Mostrar no ecrã + Outro Como configurar a voz Distância diff --git a/android/res/values-ro/strings.xml b/android/res/values-ro/strings.xml index 3fb8aa9e9a..7b9ecd6148 100644 --- a/android/res/values-ro/strings.xml +++ b/android/res/values-ro/strings.xml @@ -306,6 +306,7 @@ Căutare Butoane zoom Afișare pe ecran + Alta Modalitatea de configurare a vocii Distanță diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml index b39c164010..439720af11 100644 --- a/android/res/values-ru/strings.xml +++ b/android/res/values-ru/strings.xml @@ -335,6 +335,7 @@ Язык подсказок Голосовые подсказки недоступны + Другой Как настроить голос Расстояние diff --git a/android/res/values-sk/strings.xml b/android/res/values-sk/strings.xml index 71ff09c471..83aa1fd588 100644 --- a/android/res/values-sk/strings.xml +++ b/android/res/values-sk/strings.xml @@ -305,6 +305,7 @@ Vyhľadávanie Tlačítka priblíženia/oddialenia Zobraziť na obrazovke + Iný Ako nastaviť hlas Vzdialenosť diff --git a/android/res/values-sv/strings.xml b/android/res/values-sv/strings.xml index 325a4ec187..a0afc2c447 100644 --- a/android/res/values-sv/strings.xml +++ b/android/res/values-sv/strings.xml @@ -306,6 +306,7 @@ Sök Zoom-knappar Visa på skärmen + Övrigt Hur man ställer in ljud Avstånd diff --git a/android/res/values-th/strings.xml b/android/res/values-th/strings.xml index 0ae9f7bc74..06266e5eea 100644 --- a/android/res/values-th/strings.xml +++ b/android/res/values-th/strings.xml @@ -308,6 +308,7 @@ ค้นหา ปุ่มซูม แสดงบนหน้าจอ + อื่น ๆ วิธีตั้งค่าเสียง ระยะห่าง diff --git a/android/res/values-tr/strings.xml b/android/res/values-tr/strings.xml index e8d1a446a7..77ae9929b7 100644 --- a/android/res/values-tr/strings.xml +++ b/android/res/values-tr/strings.xml @@ -310,6 +310,7 @@ Ara Yakınlaştırma butonları Ekranda göster + Diğer Ses nasıl ayarlanır Mesafe diff --git a/android/res/values-uk/strings.xml b/android/res/values-uk/strings.xml index 40d8929329..7d72a41751 100644 --- a/android/res/values-uk/strings.xml +++ b/android/res/values-uk/strings.xml @@ -311,6 +311,7 @@ Пошук Кнопки трансфокації Відображення на екрані + Інша Як налаштувати голосовий контроль Відстань diff --git a/android/res/values-vi/strings.xml b/android/res/values-vi/strings.xml index 505bdb5d9e..97407de9cb 100644 --- a/android/res/values-vi/strings.xml +++ b/android/res/values-vi/strings.xml @@ -306,6 +306,7 @@ Tìm kiếm Nút Phóng to/Thu nhỏ Hiển thị trên màn hình + Khác Làm thế nào để thiết lập tiếng nói Khoảng cách diff --git a/android/res/values-zh-rTW/strings.xml b/android/res/values-zh-rTW/strings.xml index 53b90a1a56..a2a795bc3a 100644 --- a/android/res/values-zh-rTW/strings.xml +++ b/android/res/values-zh-rTW/strings.xml @@ -290,6 +290,7 @@ 搜尋 縮放按鈕 在螢幕上顯示 + 其他 如何設置語音 距离 diff --git a/android/res/values-zh/strings.xml b/android/res/values-zh/strings.xml index 06b9d92ee3..9b5e90c44c 100644 --- a/android/res/values-zh/strings.xml +++ b/android/res/values-zh/strings.xml @@ -306,6 +306,7 @@ 搜索 缩放按钮 在屏幕上显示 + 其他 如何设置语音 距离 diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index e3cb0d8449..4389117b90 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -337,6 +337,7 @@ Voice language TTS unavailable + Other How to set up voice Distance diff --git a/iphone/Maps/ar.lproj/Localizable.strings b/iphone/Maps/ar.lproj/Localizable.strings index 7f3b41dfdb..a75072d987 100644 --- a/iphone/Maps/ar.lproj/Localizable.strings +++ b/iphone/Maps/ar.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "آخر"; "pref_tts_how_to_set_up_voice" = "كيفية ضبط الصوت"; diff --git a/iphone/Maps/cs.lproj/Localizable.strings b/iphone/Maps/cs.lproj/Localizable.strings index dfc6105e55..644113862b 100644 --- a/iphone/Maps/cs.lproj/Localizable.strings +++ b/iphone/Maps/cs.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Ostatní"; "pref_tts_how_to_set_up_voice" = "Jak nastavit hlas"; diff --git a/iphone/Maps/da.lproj/Localizable.strings b/iphone/Maps/da.lproj/Localizable.strings index 5c597cbcfb..daa0ff472e 100644 --- a/iphone/Maps/da.lproj/Localizable.strings +++ b/iphone/Maps/da.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Andet"; "pref_tts_how_to_set_up_voice" = "Sådan indstiller du tale"; diff --git a/iphone/Maps/de.lproj/Localizable.strings b/iphone/Maps/de.lproj/Localizable.strings index 6c7e20112b..9b7aae98e1 100644 --- a/iphone/Maps/de.lproj/Localizable.strings +++ b/iphone/Maps/de.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Weitere"; "pref_tts_how_to_set_up_voice" = "Navi-Stimme einstellen"; diff --git a/iphone/Maps/en.lproj/Localizable.strings b/iphone/Maps/en.lproj/Localizable.strings index fec43d8546..8568090454 100644 --- a/iphone/Maps/en.lproj/Localizable.strings +++ b/iphone/Maps/en.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Other"; "pref_tts_how_to_set_up_voice" = "How to set up voice"; diff --git a/iphone/Maps/es.lproj/Localizable.strings b/iphone/Maps/es.lproj/Localizable.strings index 32ca47080d..07738224fd 100644 --- a/iphone/Maps/es.lproj/Localizable.strings +++ b/iphone/Maps/es.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Otros"; "pref_tts_how_to_set_up_voice" = "Cómo configurar la voz"; diff --git a/iphone/Maps/fi.lproj/Localizable.strings b/iphone/Maps/fi.lproj/Localizable.strings index 7f2a63db3a..38abf00d0c 100644 --- a/iphone/Maps/fi.lproj/Localizable.strings +++ b/iphone/Maps/fi.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Egyéb"; "pref_tts_how_to_set_up_voice" = "Így állítsd be a hangot"; diff --git a/iphone/Maps/fr.lproj/Localizable.strings b/iphone/Maps/fr.lproj/Localizable.strings index bebad79441..0288dcd08a 100644 --- a/iphone/Maps/fr.lproj/Localizable.strings +++ b/iphone/Maps/fr.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Autre"; "pref_tts_how_to_set_up_voice" = "Comment configurer la voix"; diff --git a/iphone/Maps/hu.lproj/Localizable.strings b/iphone/Maps/hu.lproj/Localizable.strings index 00ec1040ef..8bec39e641 100644 --- a/iphone/Maps/hu.lproj/Localizable.strings +++ b/iphone/Maps/hu.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Egyéb"; "pref_tts_how_to_set_up_voice" = "Így állítsd be a hangot"; diff --git a/iphone/Maps/id.lproj/Localizable.strings b/iphone/Maps/id.lproj/Localizable.strings index 05a59ef8d9..b1379859f0 100644 --- a/iphone/Maps/id.lproj/Localizable.strings +++ b/iphone/Maps/id.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Lainnya"; "pref_tts_how_to_set_up_voice" = "Cara mengatur suara"; diff --git a/iphone/Maps/it.lproj/Localizable.strings b/iphone/Maps/it.lproj/Localizable.strings index 1d228ecf93..49d56e9391 100644 --- a/iphone/Maps/it.lproj/Localizable.strings +++ b/iphone/Maps/it.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Altro"; "pref_tts_how_to_set_up_voice" = "Come impostare la voce"; diff --git a/iphone/Maps/ja.lproj/Localizable.strings b/iphone/Maps/ja.lproj/Localizable.strings index bedddfdacc..a062b2ef0a 100644 --- a/iphone/Maps/ja.lproj/Localizable.strings +++ b/iphone/Maps/ja.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "その他"; "pref_tts_how_to_set_up_voice" = "音声設定の仕方"; diff --git a/iphone/Maps/ko.lproj/Localizable.strings b/iphone/Maps/ko.lproj/Localizable.strings index aebc0dbc82..9683ecba6c 100644 --- a/iphone/Maps/ko.lproj/Localizable.strings +++ b/iphone/Maps/ko.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "다른 언어"; "pref_tts_how_to_set_up_voice" = "음성 설정 방법"; diff --git a/iphone/Maps/nb.lproj/Localizable.strings b/iphone/Maps/nb.lproj/Localizable.strings index 14e9c68bed..7ef527ec6e 100644 --- a/iphone/Maps/nb.lproj/Localizable.strings +++ b/iphone/Maps/nb.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Andre"; "pref_tts_how_to_set_up_voice" = "Slik installerer du stemme"; diff --git a/iphone/Maps/nl.lproj/Localizable.strings b/iphone/Maps/nl.lproj/Localizable.strings index a72327d73a..5a0831eb03 100644 --- a/iphone/Maps/nl.lproj/Localizable.strings +++ b/iphone/Maps/nl.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Andere"; "pref_tts_how_to_set_up_voice" = "Hoe stel je de stem in"; diff --git a/iphone/Maps/pl.lproj/Localizable.strings b/iphone/Maps/pl.lproj/Localizable.strings index 7130069391..a834443a4b 100644 --- a/iphone/Maps/pl.lproj/Localizable.strings +++ b/iphone/Maps/pl.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Inny"; "pref_tts_how_to_set_up_voice" = "Jak skonfigurować usługę głosową"; diff --git a/iphone/Maps/pt.lproj/Localizable.strings b/iphone/Maps/pt.lproj/Localizable.strings index ff789a8772..d62ff65b8e 100644 --- a/iphone/Maps/pt.lproj/Localizable.strings +++ b/iphone/Maps/pt.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Outro"; "pref_tts_how_to_set_up_voice" = "Como configurar a voz"; diff --git a/iphone/Maps/ro.lproj/Localizable.strings b/iphone/Maps/ro.lproj/Localizable.strings index b9f051d863..3e5a0ea761 100644 --- a/iphone/Maps/ro.lproj/Localizable.strings +++ b/iphone/Maps/ro.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Alta"; "pref_tts_how_to_set_up_voice" = "Modalitatea de configurare a vocii"; diff --git a/iphone/Maps/ru.lproj/Localizable.strings b/iphone/Maps/ru.lproj/Localizable.strings index c800495fba..19aff45fb0 100644 --- a/iphone/Maps/ru.lproj/Localizable.strings +++ b/iphone/Maps/ru.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "Голосовые подсказки недоступны"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Другой"; "pref_tts_how_to_set_up_voice" = "Как настроить голос"; diff --git a/iphone/Maps/sk.lproj/Localizable.strings b/iphone/Maps/sk.lproj/Localizable.strings index b398674e59..7cac44cf19 100644 --- a/iphone/Maps/sk.lproj/Localizable.strings +++ b/iphone/Maps/sk.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Iný"; "pref_tts_how_to_set_up_voice" = "Ako nastaviť hlas"; diff --git a/iphone/Maps/sv.lproj/Localizable.strings b/iphone/Maps/sv.lproj/Localizable.strings index d7dd821489..9a2ebbc856 100644 --- a/iphone/Maps/sv.lproj/Localizable.strings +++ b/iphone/Maps/sv.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Övrigt"; "pref_tts_how_to_set_up_voice" = "Hur man ställer in ljud"; diff --git a/iphone/Maps/th.lproj/Localizable.strings b/iphone/Maps/th.lproj/Localizable.strings index b0a3679094..e0506f3e92 100644 --- a/iphone/Maps/th.lproj/Localizable.strings +++ b/iphone/Maps/th.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "อื่น ๆ"; "pref_tts_how_to_set_up_voice" = "วิธีตั้งค่าเสียง"; diff --git a/iphone/Maps/tr.lproj/Localizable.strings b/iphone/Maps/tr.lproj/Localizable.strings index 0399dca60a..265a125c1d 100644 --- a/iphone/Maps/tr.lproj/Localizable.strings +++ b/iphone/Maps/tr.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Diğer"; "pref_tts_how_to_set_up_voice" = "Ses nasıl ayarlanır"; diff --git a/iphone/Maps/uk.lproj/Localizable.strings b/iphone/Maps/uk.lproj/Localizable.strings index 0afcc07cef..f2c77df617 100644 --- a/iphone/Maps/uk.lproj/Localizable.strings +++ b/iphone/Maps/uk.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Інша"; "pref_tts_how_to_set_up_voice" = "Як налаштувати голосовий контроль"; diff --git a/iphone/Maps/vi.lproj/Localizable.strings b/iphone/Maps/vi.lproj/Localizable.strings index b820694377..0e49e6dbaf 100644 --- a/iphone/Maps/vi.lproj/Localizable.strings +++ b/iphone/Maps/vi.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "Khác"; "pref_tts_how_to_set_up_voice" = "Làm thế nào để thiết lập tiếng nói"; diff --git a/iphone/Maps/zh-Hans.lproj/Localizable.strings b/iphone/Maps/zh-Hans.lproj/Localizable.strings index e3b222b543..8945a20c52 100644 --- a/iphone/Maps/zh-Hans.lproj/Localizable.strings +++ b/iphone/Maps/zh-Hans.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "其他"; "pref_tts_how_to_set_up_voice" = "如何设置语音"; diff --git a/iphone/Maps/zh-Hant.lproj/Localizable.strings b/iphone/Maps/zh-Hant.lproj/Localizable.strings index cf2cbe5a68..ac4a51f335 100644 --- a/iphone/Maps/zh-Hant.lproj/Localizable.strings +++ b/iphone/Maps/zh-Hant.lproj/Localizable.strings @@ -520,6 +520,7 @@ /* Settings «Route» category: «Tts unavailable» subtitle */ "pref_tts_unavailable" = "TTS unavailable"; +/* Title for "Other" section in TTS settings. */ "pref_tts_other_section_title" = "其他"; "pref_tts_how_to_set_up_voice" = "如何設置語音"; From df36ddffbe38380a99a188129f7f662608a45972 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 14:03:53 +0300 Subject: [PATCH 14/17] [ios] Fixed bug with changing volume while app in foreground. --- .../Sound/MWMTextToSpeech.h | 2 +- .../Sound/MWMTextToSpeech.mm | 20 ++++++++++--------- iphone/Maps/Classes/MapsAppDelegate.mm | 2 ++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h index 509b277a37..0b7d931c61 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.h @@ -4,7 +4,7 @@ @interface MWMTextToSpeech : NSObject + (instancetype)tts; - ++ (void)activateAudioSession; - (vector>)availableLanguages; - (NSString *)savedLanguage; - (void)setNotificationsLocale:(NSString *)locale; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 640cef11ff..f5335cf22c 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -37,18 +37,9 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl self = [super init]; if (self) { - // Activating audio session. - NSError * err = nil; - AVAudioSession * audioSession = [AVAudioSession sharedInstance]; - if (![audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&err]) - LOG(LWARNING, ("[ setCategory]] error.", [err localizedDescription])); - if (![audioSession setActive:YES error:&err]) - LOG(LWARNING, ("[[AVAudioSession sharedInstance] setActive]] error.", [err localizedDescription])); - _availableLanguages = availableLanguages(); NSString * saved = self.savedLanguage; - string preferedLanguage; if (saved.length) preferedLanguage = saved.UTF8String; @@ -67,6 +58,17 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl return self; } ++ (void)activateAudioSession +{ + // Activating audio session. + NSError * err = nil; + AVAudioSession * audioSession = [AVAudioSession sharedInstance]; + if (![audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&err]) + LOG(LWARNING, ("[ setCategory]] error.", [err localizedDescription])); + if (![audioSession setActive:YES error:&err]) + LOG(LWARNING, ("[[AVAudioSession sharedInstance] setActive]] error.", [err localizedDescription])); +} + - (vector>)availableLanguages { return _availableLanguages; diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 0e625ba65c..9ca8cbd0af 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -5,6 +5,7 @@ #import "MapsAppDelegate.h" #import "MapViewController.h" #import "MWMAlertViewController.h" +#import "MWMTextToSpeech.h" #import "MWMWatchEventInfo.h" #import "Preferences.h" #import "RouteState.h" @@ -210,6 +211,7 @@ void InitLocalizedStrings() f.GetLocationState()->InvalidatePosition(); [self enableTTSForTheFirstTime]; + [MWMTextToSpeech activateAudioSession]; return returnValue; } From 1516affa16ee533f23788307bf28fdc195cba4a6 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 17:35:50 +0300 Subject: [PATCH 15/17] [ios] Added IsOnRoute() checking before tts playing. --- iphone/Maps/Classes/MapViewController.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index ba57e11d99..1420c64bc5 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -143,8 +143,9 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction) if (res.IsValid()) [self.controlsManager setupRoutingDashboard:res]; - - [[MWMTextToSpeech tts] playTurnNotifications]; + + if (frm.IsOnRoute()) + [[MWMTextToSpeech tts] playTurnNotifications]; } - (void)onCompassUpdate:(location::CompassInfo const &)info From 9ab3a30dd99016cf927ffdbe4920e6e623cbdfbd Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 17:57:37 +0300 Subject: [PATCH 16/17] [ios] Fixed @deathbaba comments. (TTS) --- .../CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm | 1 - iphone/Maps/MWMTTSSettingsViewController.mm | 1 - iphone/Maps/Settings/SettingsViewController.mm | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index f5335cf22c..66d96cdd26 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -60,7 +60,6 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl + (void)activateAudioSession { - // Activating audio session. NSError * err = nil; AVAudioSession * audioSession = [AVAudioSession sharedInstance]; if (![audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&err]) diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm index e1f4544057..1b729f1244 100644 --- a/iphone/Maps/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/MWMTTSSettingsViewController.mm @@ -83,7 +83,6 @@ using namespace std; - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; -// return 2; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index d82c5aa3b0..0a71675e81 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -25,7 +25,7 @@ typedef NS_ENUM(NSUInteger, Section) SectionRouting, SectionCalibration, SectionStatistics, - SectionCount // Must be latest value! + SectionCount // Must be the latest value! }; @interface SettingsViewController () From 463302691eea2fc3bc80ca1aa6e9d179ea1d7505 Mon Sep 17 00:00:00 2001 From: "v.mikhaylenko" Date: Fri, 13 Nov 2015 18:10:00 +0300 Subject: [PATCH 17/17] [ios] Added return if AVAudioSession setCategory:withOptions:error failed. --- .../CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm index 66d96cdd26..ec02e619ab 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Sound/MWMTextToSpeech.mm @@ -63,7 +63,10 @@ extern NSString * const kUserDafaultsNeedToEnableTTS = @"UserDefaultsNeedToEnabl NSError * err = nil; AVAudioSession * audioSession = [AVAudioSession sharedInstance]; if (![audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&err]) + { LOG(LWARNING, ("[ setCategory]] error.", [err localizedDescription])); + return; + } if (![audioSession setActive:YES error:&err]) LOG(LWARNING, ("[[AVAudioSession sharedInstance] setActive]] error.", [err localizedDescription])); }