diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index 8b30df99a..05c3dbeee 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -3800,5 +3800,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "معرّف UUID للسفينة: {id}" + "Vessel UUID: {id}": "معرّف UUID للسفينة: {id}", + "Latitude must be within ±90° and longitude within ±180°": "يجب أن يكون خط العرض ضمن ±90° وخط الطول ضمن ±180°", + "Street Level is unavailable": "مستوى الشارع غير متاح", + "No street-level imagery source is configured": "لم يُعَدّ أي مصدر لصور مستوى الشارع", + "Street Level could not be enabled": "تعذّر تفعيل مستوى الشارع", + "Street Level changed while it looked for imagery": "تغيّر مستوى الشارع أثناء البحث عن الصور", + "Aim the view at a street": "وجّه العرض نحو شارع", + "{source} is not a street-level imagery source here": "{source} ليس مصدرًا لصور مستوى الشارع هنا", + "{source} needs its key": "يحتاج {source} إلى مفتاحه", + "{source} needs the {map} map, which is not available": "يحتاج {source} إلى خريطة {map}، وهي غير متاحة", + "{source} could not be switched on": "تعذّر تفعيل {source}", + "{source} is not available on this map": "{source} غير متاح على هذه الخريطة", + "{source} imagery could not be opened": "تعذّر فتح صور {source}", + "{place} has no position to look for imagery at": "لا يوجد لـ{place} موضع للبحث عن الصور فيه", + "No {source} imagery near {place}": "لا توجد صور {source} قرب {place}", + "{reason} (filters on: {filters})": "{reason} (المرشحات المفعّلة: {filters})" } diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index f5eb48d11..8effb49dd 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -3476,5 +3476,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "Schiffs-UUID: {id}" + "Vessel UUID: {id}": "Schiffs-UUID: {id}", + "Latitude must be within ±90° and longitude within ±180°": "Der Breitengrad muss innerhalb von ±90° und der Längengrad innerhalb von ±180° liegen", + "Street Level is unavailable": "Straßenebene ist nicht verfügbar", + "No street-level imagery source is configured": "Keine Quelle für Bilder auf Straßenebene konfiguriert", + "Street Level could not be enabled": "Straßenebene konnte nicht eingeschaltet werden", + "Street Level changed while it looked for imagery": "Straßenebene hat sich während der Bildersuche geändert", + "Aim the view at a street": "Die Ansicht auf eine Straße richten", + "{source} is not a street-level imagery source here": "{source} ist hier keine Quelle für Bilder auf Straßenebene", + "{source} needs its key": "{source} braucht seinen Schlüssel", + "{source} needs the {map} map, which is not available": "{source} braucht die {map}-Karte, die nicht verfügbar ist", + "{source} could not be switched on": "{source} konnte nicht eingeschaltet werden", + "{source} is not available on this map": "{source} ist auf dieser Karte nicht verfügbar", + "{source} imagery could not be opened": "Bilder von {source} konnten nicht geöffnet werden", + "{place} has no position to look for imagery at": "{place} hat keine Position, an der nach Bildern gesucht werden kann", + "No {source} imagery near {place}": "Keine Bilder von {source} in der Nähe von {place}", + "{reason} (filters on: {filters})": "{reason} (aktive Filter: {filters})" } diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index c5018af73..6e3d4df5f 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -3557,5 +3557,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID del buque: {id}" + "Vessel UUID: {id}": "UUID del buque: {id}", + "Latitude must be within ±90° and longitude within ±180°": "La latitud debe estar dentro de ±90° y la longitud dentro de ±180°", + "Street Level is unavailable": "A pie de calle no está disponible", + "No street-level imagery source is configured": "No hay ninguna fuente de imágenes a pie de calle configurada", + "Street Level could not be enabled": "No se pudo activar A pie de calle", + "Street Level changed while it looked for imagery": "A pie de calle cambió mientras buscaba imágenes", + "Aim the view at a street": "Apunta la vista a una calle", + "{source} is not a street-level imagery source here": "{source} no es una fuente de imágenes a pie de calle aquí", + "{source} needs its key": "{source} necesita su clave", + "{source} needs the {map} map, which is not available": "{source} requiere el mapa {map}, que no está disponible", + "{source} could not be switched on": "No se pudo activar {source}", + "{source} is not available on this map": "{source} no está disponible en este mapa", + "{source} imagery could not be opened": "No se pudieron abrir las imágenes de {source}", + "{place} has no position to look for imagery at": "{place} no tiene una posición donde buscar imágenes", + "No {source} imagery near {place}": "No hay imágenes de {source} cerca de {place}", + "{reason} (filters on: {filters})": "{reason} (filtros activos: {filters})" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index e0a22f57f..c9bba95fd 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -3557,5 +3557,20 @@ "ICAO: {id}": "ICAO : {id}", "NORAD: {id}": "NORAD : {id}", "MMSI: {id}": "MMSI : {id}", - "Vessel UUID: {id}": "UUID du navire : {id}" + "Vessel UUID: {id}": "UUID du navire : {id}", + "Latitude must be within ±90° and longitude within ±180°": "La latitude doit être comprise dans ±90° et la longitude dans ±180°", + "Street Level is unavailable": "Niveau rue n'est pas disponible", + "No street-level imagery source is configured": "Aucune source d'images au niveau de la rue n'est configurée", + "Street Level could not be enabled": "Impossible d'activer Niveau rue", + "Street Level changed while it looked for imagery": "Niveau rue a changé pendant la recherche d'images", + "Aim the view at a street": "Orientez la vue vers une rue", + "{source} is not a street-level imagery source here": "{source} n'est pas une source d'images au niveau de la rue ici", + "{source} needs its key": "{source} a besoin de sa clé", + "{source} needs the {map} map, which is not available": "{source} nécessite la carte {map}, qui n'est pas disponible", + "{source} could not be switched on": "Impossible d'activer {source}", + "{source} is not available on this map": "{source} n'est pas disponible sur cette carte", + "{source} imagery could not be opened": "Impossible d'ouvrir les images de {source}", + "{place} has no position to look for imagery at": "{place} n'a pas de position où chercher des images", + "No {source} imagery near {place}": "Aucune image {source} près de {place}", + "{reason} (filters on: {filters})": "{reason} (filtres actifs : {filters})" } diff --git a/src/i18n/locales/he.json b/src/i18n/locales/he.json index 1aaa9377a..77f532a8a 100644 --- a/src/i18n/locales/he.json +++ b/src/i18n/locales/he.json @@ -3557,5 +3557,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID של כלי השיט: {id}" + "Vessel UUID: {id}": "UUID של כלי השיט: {id}", + "Latitude must be within ±90° and longitude within ±180°": "קו הרוחב חייב להיות בטווח ±90° וקו האורך בטווח ±180°", + "Street Level is unavailable": "Street Level אינו זמין", + "No street-level imagery source is configured": "לא הוגדר מקור לצילומי רחוב", + "Street Level could not be enabled": "לא ניתן היה להפעיל את Street Level", + "Street Level changed while it looked for imagery": "Street Level השתנה בזמן החיפוש אחר צילומים", + "Aim the view at a street": "כוון את התצוגה אל רחוב", + "{source} is not a street-level imagery source here": "{source} אינו מקור לצילומי רחוב כאן", + "{source} needs its key": "{source} דורש את המפתח שלו", + "{source} needs the {map} map, which is not available": "{source} דורש את מפת {map}, שאינה זמינה", + "{source} could not be switched on": "לא ניתן היה להפעיל את {source}", + "{source} is not available on this map": "{source} אינו זמין במפה הזו", + "{source} imagery could not be opened": "לא ניתן היה לפתוח את הצילומים של {source}", + "{place} has no position to look for imagery at": "ל-{place} אין מיקום לחיפוש צילומים", + "No {source} imagery near {place}": "אין צילומים של {source} ליד {place}", + "{reason} (filters on: {filters})": "{reason} (מסננים פעילים: {filters})" } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index d3f081052..7c52e051d 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -3557,5 +3557,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID della nave: {id}" + "Vessel UUID: {id}": "UUID della nave: {id}", + "Latitude must be within ±90° and longitude within ±180°": "La latitudine deve essere entro ±90° e la longitudine entro ±180°", + "Street Level is unavailable": "Vista stradale non è disponibile", + "No street-level imagery source is configured": "Nessuna fonte di immagini a livello stradale configurata", + "Street Level could not be enabled": "Impossibile attivare Vista stradale", + "Street Level changed while it looked for imagery": "Vista stradale è cambiata durante la ricerca delle immagini", + "Aim the view at a street": "Punta la vista su una strada", + "{source} is not a street-level imagery source here": "{source} non è una fonte di immagini a livello stradale qui", + "{source} needs its key": "{source} richiede la sua chiave", + "{source} needs the {map} map, which is not available": "{source} richiede la mappa {map}, che non è disponibile", + "{source} could not be switched on": "Impossibile attivare {source}", + "{source} is not available on this map": "{source} non è disponibile su questa mappa", + "{source} imagery could not be opened": "Impossibile aprire le immagini di {source}", + "{place} has no position to look for imagery at": "{place} non ha una posizione in cui cercare immagini", + "No {source} imagery near {place}": "Nessuna immagine di {source} vicino a {place}", + "{reason} (filters on: {filters})": "{reason} (filtri attivi: {filters})" } diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 97ad588ac..20f962285 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -3395,5 +3395,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "船舶UUID: {id}" + "Vessel UUID: {id}": "船舶UUID: {id}", + "Latitude must be within ±90° and longitude within ±180°": "緯度は±90°、経度は±180°の範囲内で指定してください", + "Street Level is unavailable": "ストリートレベルは利用できません", + "No street-level imagery source is configured": "ストリートレベル画像のソースが設定されていません", + "Street Level could not be enabled": "ストリートレベルをオンにできませんでした", + "Street Level changed while it looked for imagery": "画像の検索中にストリートレベルが変更されました", + "Aim the view at a street": "表示を通りに向けてください", + "{source} is not a street-level imagery source here": "{source}はここではストリートレベル画像のソースではありません", + "{source} needs its key": "{source}にはキーが必要です", + "{source} needs the {map} map, which is not available": "{source}には{map}マップが必要ですが、利用できません", + "{source} could not be switched on": "{source}をオンにできませんでした", + "{source} is not available on this map": "{source}はこのマップでは利用できません", + "{source} imagery could not be opened": "{source}の画像を開けませんでした", + "{place} has no position to look for imagery at": "{place}には画像を探す位置がありません", + "No {source} imagery near {place}": "{place}の近くに{source}の画像はありません", + "{reason} (filters on: {filters})": "{reason}(有効なフィルター: {filters})" } diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 9895adb6d..698777b32 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -3557,5 +3557,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID da embarcação: {id}" + "Vessel UUID: {id}": "UUID da embarcação: {id}", + "Latitude must be within ±90° and longitude within ±180°": "A latitude deve estar dentro de ±90° e a longitude dentro de ±180°", + "Street Level is unavailable": "Nível da rua não está disponível", + "No street-level imagery source is configured": "Nenhuma fonte de imagens no nível da rua configurada", + "Street Level could not be enabled": "Não foi possível ativar Nível da rua", + "Street Level changed while it looked for imagery": "Nível da rua mudou enquanto procurava imagens", + "Aim the view at a street": "Aponte a vista para uma rua", + "{source} is not a street-level imagery source here": "{source} não é uma fonte de imagens no nível da rua aqui", + "{source} needs its key": "{source} precisa da sua chave", + "{source} needs the {map} map, which is not available": "{source} requer o mapa {map}, que não está disponível", + "{source} could not be switched on": "Não foi possível ativar {source}", + "{source} is not available on this map": "{source} não está disponível neste mapa", + "{source} imagery could not be opened": "Não foi possível abrir as imagens de {source}", + "{place} has no position to look for imagery at": "{place} não tem uma posição para buscar imagens", + "No {source} imagery near {place}": "Nenhuma imagem de {source} perto de {place}", + "{reason} (filters on: {filters})": "{reason} (filtros ativos: {filters})" } diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 46e8ad63a..031f2c429 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -3638,5 +3638,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID судна: {id}" + "Vessel UUID: {id}": "UUID судна: {id}", + "Latitude must be within ±90° and longitude within ±180°": "Широта должна быть в пределах ±90°, а долгота — в пределах ±180°", + "Street Level is unavailable": "Уличные снимки недоступны", + "No street-level imagery source is configured": "Источник уличных снимков не настроен", + "Street Level could not be enabled": "Не удалось включить уличные снимки", + "Street Level changed while it looked for imagery": "Уличные снимки изменились во время поиска", + "Aim the view at a street": "Наведите вид на улицу", + "{source} is not a street-level imagery source here": "{source} здесь не является источником уличных снимков", + "{source} needs its key": "{source}: нужен ключ", + "{source} needs the {map} map, which is not available": "{source}: нужна карта {map}, но она недоступна", + "{source} could not be switched on": "Не удалось включить {source}", + "{source} is not available on this map": "{source}: недоступно на этой карте", + "{source} imagery could not be opened": "Не удалось открыть снимки {source}", + "{place} has no position to look for imagery at": "У места «{place}» нет координат для поиска снимков", + "No {source} imagery near {place}": "Нет снимков {source} рядом с {place}", + "{reason} (filters on: {filters})": "{reason} (включены фильтры: {filters})" } diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json index a0ff6bce7..561f753b2 100644 --- a/src/i18n/locales/uk.json +++ b/src/i18n/locales/uk.json @@ -3638,5 +3638,20 @@ "ICAO: {id}": "ICAO: {id}", "NORAD: {id}": "NORAD: {id}", "MMSI: {id}": "MMSI: {id}", - "Vessel UUID: {id}": "UUID судна: {id}" + "Vessel UUID: {id}": "UUID судна: {id}", + "Latitude must be within ±90° and longitude within ±180°": "Широта має бути в межах ±90°, а довгота — у межах ±180°", + "Street Level is unavailable": "Вуличні знімки недоступні", + "No street-level imagery source is configured": "Джерело вуличних знімків не налаштовано", + "Street Level could not be enabled": "Не вдалося увімкнути вуличні знімки", + "Street Level changed while it looked for imagery": "Вуличні знімки змінилися під час пошуку", + "Aim the view at a street": "Наведіть вигляд на вулицю", + "{source} is not a street-level imagery source here": "{source} тут не є джерелом вуличних знімків", + "{source} needs its key": "{source}: потрібен ключ", + "{source} needs the {map} map, which is not available": "{source}: потрібна карта {map}, але вона недоступна", + "{source} could not be switched on": "Не вдалося увімкнути {source}", + "{source} is not available on this map": "{source}: недоступно на цій карті", + "{source} imagery could not be opened": "Не вдалося відкрити знімки {source}", + "{place} has no position to look for imagery at": "Для місця «{place}» немає координат для пошуку знімків", + "No {source} imagery near {place}": "Немає знімків {source} поблизу {place}", + "{reason} (filters on: {filters})": "{reason} (увімкнено фільтри: {filters})" } diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 3bd7c0bbd..fae3e5ca8 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -3395,5 +3395,20 @@ "ICAO: {id}": "ICAO:{id}", "NORAD: {id}": "NORAD:{id}", "MMSI: {id}": "MMSI:{id}", - "Vessel UUID: {id}": "船舶 UUID:{id}" + "Vessel UUID: {id}": "船舶 UUID:{id}", + "Latitude must be within ±90° and longitude within ±180°": "纬度须在 ±90° 以内,经度须在 ±180° 以内", + "Street Level is unavailable": "街景不可用", + "No street-level imagery source is configured": "未配置街景影像来源", + "Street Level could not be enabled": "无法开启街景", + "Street Level changed while it looked for imagery": "查找影像时街景已更改", + "Aim the view at a street": "请将视野对准街道", + "{source} is not a street-level imagery source here": "{source} 在此处不是街景影像来源", + "{source} needs its key": "{source} 需要其密钥", + "{source} needs the {map} map, which is not available": "{source} 需要 {map} 地图,但该地图不可用", + "{source} could not be switched on": "无法开启 {source}", + "{source} is not available on this map": "{source} 在此地图上不可用", + "{source} imagery could not be opened": "无法打开 {source} 影像", + "{place} has no position to look for imagery at": "{place} 没有可查找影像的位置", + "No {source} imagery near {place}": "{place} 附近没有 {source} 影像", + "{reason} (filters on: {filters})": "{reason}(已开启筛选:{filters})" } diff --git a/src/i18n/locales/zh-Hant.json b/src/i18n/locales/zh-Hant.json index 3fcd98932..e9c6c300d 100644 --- a/src/i18n/locales/zh-Hant.json +++ b/src/i18n/locales/zh-Hant.json @@ -3395,5 +3395,20 @@ "ICAO: {id}": "ICAO:{id}", "NORAD: {id}": "NORAD:{id}", "MMSI: {id}": "MMSI:{id}", - "Vessel UUID: {id}": "船舶 UUID:{id}" + "Vessel UUID: {id}": "船舶 UUID:{id}", + "Latitude must be within ±90° and longitude within ±180°": "緯度須在 ±90° 以內,經度須在 ±180° 以內", + "Street Level is unavailable": "街景不可用", + "No street-level imagery source is configured": "未配置街景影像來源", + "Street Level could not be enabled": "無法開啟街景", + "Street Level changed while it looked for imagery": "查找影像時街景已更改", + "Aim the view at a street": "請將視野對準街道", + "{source} is not a street-level imagery source here": "{source} 在此處不是街景影像來源", + "{source} needs its key": "{source} 需要其密鑰", + "{source} needs the {map} map, which is not available": "{source} 需要 {map} 地圖,但該地圖不可用", + "{source} could not be switched on": "無法開啟 {source}", + "{source} is not available on this map": "{source} 在此地圖上不可用", + "{source} imagery could not be opened": "無法打開 {source} 影像", + "{place} has no position to look for imagery at": "{place} 沒有可查找影像的位置", + "No {source} imagery near {place}": "{place} 附近沒有 {source} 影像", + "{reason} (filters on: {filters})": "{reason}(已開啟篩選:{filters})" } diff --git a/src/voice/speech.js b/src/voice/speech.js index 3e0227160..3ecb19114 100644 --- a/src/voice/speech.js +++ b/src/voice/speech.js @@ -179,9 +179,27 @@ const KNOWN_ERRORS = new Map( ), msg('Could not arrive at the requested place'), msg('The nearest airborne aircraft could not be selected'), + // show_street_level + msg('Latitude must be within ±90° and longitude within ±180°'), + msg('Street Level is unavailable'), + msg('No street-level imagery source is configured'), + msg('Street Level could not be enabled'), + msg('Street Level changed while it looked for imagery'), + msg('Aim the view at a street'), ].map((text) => [text, text]), ); +/** The imagery filters an empty street-level result names, as its chips say them. */ +function shownImageryFilters(label) { + return [ + label.includes('360°') ? '360°' : null, + label.includes('flat-photo') ? t('FLAT') : null, + label.includes('SINCE') ? t('SINCE') : null, + ] + .filter(Boolean) + .join(', '); +} + function noneWithinView(target, radius) { switch (target) { case 'flights': @@ -259,6 +277,69 @@ const ERROR_PATTERNS = [ /^No (\S+) within (\d+(?:\.\d+)?) km of the current view$/, ([, target, km]) => noneWithinView(target, shownKm(km)), ], + // show_street_level: the filter clause first, around the reason it extends. + [ + /^(.+) with the (.+ filters?) on$/, + ([, reason, filters]) => + t('{reason} (filters on: {filters})', { + reason: shownError(reason), + filters: shownImageryFilters(filters), + }), + ], + [ + /^(.+) is not a street-level imagery source here$/, + ([, source]) => + t('{source} is not a street-level imagery source here', { source }), + ], + [ + /^(.+) needs its key$/, + ([, source]) => + t('{source} needs its key', { source: translateKnown(source) }), + ], + [ + /^(.+) needs the (.+) map, which is not available$/, + ([, source, map]) => + t('{source} needs the {map} map, which is not available', { + source: translateKnown(source), + map: map === 'photoreal' ? 'Google 3D' : map, + }), + ], + [ + /^(.+) could not be switched on$/, + ([, source]) => + t('{source} could not be switched on', { + source: translateKnown(source), + }), + ], + [ + /^(.+) is not available on this map$/, + ([, source]) => + t('{source} is not available on this map', { + source: translateKnown(source), + }), + ], + [ + /^(.+) imagery could not be opened$/, + ([, source]) => + t('{source} imagery could not be opened', { + source: translateKnown(source), + }), + ], + [ + /^(.+) has no position to look for imagery at$/, + ([, place]) => + t('{place} has no position to look for imagery at', { + place: localizePlaceName(place), + }), + ], + [ + /^No (.+) imagery near (.+)$/, + ([, source, place]) => + t('No {source} imagery near {place}', { + source: translateKnown(source), + place: localizePlaceName(place), + }), + ], ]; /** A tool error as the card shows it. */ diff --git a/src/voice/speech.test.mjs b/src/voice/speech.test.mjs index 84d6f8d62..e1aa0c3ec 100644 --- a/src/voice/speech.test.mjs +++ b/src/voice/speech.test.mjs @@ -552,6 +552,55 @@ test('the street-level card says "the view centre" in the interface language', ( } }); +test('street-level failure cards are in the interface language; speech stays English', () => { + setLocale('de'); + try { + const card = (error, extra = {}) => + envelope('show_street_level', { + ok: false, + action: 'show_street_level', + providerName: 'Google Street View', + label: 'Paris', + error, + ...extra, + }); + const lines = (error, extra) => card(error, extra).display.lines; + assert.deepEqual(lines('Google Street View needs its key', { stage: 'key' }), [ + 'Google Street View braucht seinen Schlüssel', + ]); + assert.deepEqual( + lines('Google Street View needs the photoreal map, which is not available', { stage: 'map' }), + ['Google Street View braucht die Google 3D-Karte, die nicht verfügbar ist'], + ); + assert.deepEqual(lines('Mapillary could not be switched on', { stage: 'provider' }), [ + 'Mapillary konnte nicht eingeschaltet werden', + ]); + assert.deepEqual(lines('Street Level could not be enabled', { stage: 'layer' }), [ + 'Straßenebene konnte nicht eingeschaltet werden', + ]); + assert.deepEqual( + lines('Latitude must be within ±90° and longitude within ±180°', { stage: 'location' }), + ['Der Breitengrad muss innerhalb von ±90° und der Längengrad innerhalb von ±180° liegen'], + ); + assert.deepEqual(lines('Mapillary imagery could not be opened', { stage: 'imagery' }), [ + 'Bilder von Mapillary konnten nicht geöffnet werden', + ]); + // The filter clause wraps the reason, already in the interface language, + // and names the filters as their chips do. + const filtered = card('No Mapillary imagery near Paris with the 360° and SINCE filters on', { + stage: 'imagery', + noImagery: true, + filter: { label: '360° and SINCE filters' }, + }); + assert.deepEqual(filtered.display.lines, [ + 'Keine Bilder von Mapillary in der Nähe von Paris (aktive Filter: 360°, SEIT)', + ]); + assert.match(filtered.say, /with the 360° and SINCE filters on/, 'speech stays English'); + } finally { + setLocale('en'); + } +}); + test('street-level speech names the source and the place, and says which step failed', () => { const ok = envelope('show_street_level', { ok: true,