mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
feat(tours): import KML and KMZ routes as tours, with a preview first
A route planned in Google My Maps or Google Earth can now become a tour without converting it to GPX first. The import button and a file dropped on the tours workspace take .kml and .kmz files beside .gpx, through the same preview, the same import routes and the same transaction as a GPX file. The preview shows every line of the file on its own, numbered, with its distance and heights; two lines of one placemark are numbered after its name and never joined. Heights count only where they are heights: kept for an absolute line, dropped for any other altitude mode and for the all-zero placeholder My Maps writes, so a missing height stays unknown. What the file holds besides its lines (pins, areas, overlays, links to other files) is counted in a dashed card, and nothing is fetched from elsewhere. The KML reading reuses the place import's codec. A KMZ only ever has its KML entry unpacked, counted byte by byte against the decompressed cap whatever its header claims. A file that cannot be read is refused with its reason (damaged, an archive without KML, too large unpacked), and the toast names the file and the reason. A KML or KMZ import keeps the gpx origin of a file import; its provenance names the real format from the stored file name.
This commit is contained in:
@@ -7,7 +7,7 @@ const tours: TranslationStrings = {
|
||||
'tours.mode.label': 'มุมมองการเพิ่ม',
|
||||
'tours.title': 'ทัวร์',
|
||||
'tours.empty.title': 'ยังไม่มีทัวร์',
|
||||
'tours.empty.body': 'วางแผนทัวร์หรือนำเข้าไฟล์ GPX เพื่อเริ่มต้น',
|
||||
'tours.empty.body': 'วางแผนทัวร์หรือนำเข้าไฟล์ GPX หรือ KML เพื่อเริ่มต้น',
|
||||
'tours.addToDay': 'เพิ่มไปยังวัน',
|
||||
'tours.addToDay.comingSoon': 'เพิ่มทัวร์จากรายการลงในวันของทริป',
|
||||
'tours.addToDay.pickDay': 'เลือกวัน',
|
||||
@@ -20,18 +20,18 @@ const tours: TranslationStrings = {
|
||||
'tours.caution.badge': 'ใช้ด้วยความระมัดระวัง',
|
||||
'tours.caution.tooltip': 'ข้อมูลระดับความสูงหรือค่าสถิติไม่ครบถ้วน ใช้ข้อมูลที่นำเข้าด้วยความระมัดระวัง',
|
||||
'tours.import.caution': 'นำเข้าแล้ว แต่ข้อมูลระดับความสูงหรือค่าสถิติไม่ครบถ้วน โปรดใช้ด้วยความระมัดระวัง',
|
||||
'tours.import.success': 'นำเข้าทัวร์ {count} รายการจาก GPX แล้ว',
|
||||
'tours.import.success': 'นำเข้าทัวร์ {count} รายการแล้ว',
|
||||
'tours.import.noTrackIn': 'ไม่พบแทร็กหรือเส้นทางใน {name}',
|
||||
'tours.import.errorIn': 'ไม่สามารถนำเข้า {name} ได้',
|
||||
'tours.import.button': 'นำเข้า GPX',
|
||||
'tours.import.hint': 'นำเข้าไฟล์ GPX เป็นทัวร์ของทริปนี้',
|
||||
'tours.import.unsupported': 'นำเข้าเป็นทัวร์ได้เฉพาะไฟล์ GPX เท่านั้น',
|
||||
'tours.import.button': 'นำเข้า GPX หรือ KML',
|
||||
'tours.import.hint': 'นำเข้าไฟล์ GPX, KML หรือ KMZ เป็นทัวร์ของทริปนี้',
|
||||
'tours.import.unsupported': 'นำเข้าเป็นทัวร์ได้เฉพาะไฟล์ GPX, KML และ KMZ เท่านั้น',
|
||||
'tours.import.skipped': 'ข้ามแทร็ก {count} รายการเพราะมีอยู่ในทริปนี้แล้ว',
|
||||
'tours.import.allSkipped': 'ทุกอย่างในไฟล์นั้นมีอยู่ในทริปนี้แล้ว',
|
||||
'tours.import.drop': 'วางไฟล์ GPX ที่นี่เพื่อนำเข้า',
|
||||
'tours.import.drop': 'วางไฟล์ GPX, KML หรือ KMZ ที่นี่เพื่อนำเข้า',
|
||||
'tours.import.dropHint': 'แทร็กหรือเส้นทางแต่ละรายการในไฟล์จะกลายเป็นทัวร์ของทริปนี้',
|
||||
'tours.import.dropNoPermission': 'คุณไม่สามารถเพิ่มทัวร์ลงในทริปนี้ได้',
|
||||
'tours.import.importing': 'กำลังนำเข้า GPX…',
|
||||
'tours.import.importing': 'กำลังนำเข้า…',
|
||||
'tours.days.label': 'วันในทริป',
|
||||
'tours.days.none': 'ยังไม่ได้อยู่ในวันใดของทริป',
|
||||
'tours.days.short': 'วันที่ {days}',
|
||||
@@ -89,7 +89,7 @@ const tours: TranslationStrings = {
|
||||
'tours.planner.newTour': 'วางแผนทัวร์ใหม่',
|
||||
'tours.planner.addTour': 'เพิ่มทริป',
|
||||
'tours.planner.addTourHint':
|
||||
'วางแผนทริปใหม่ นำเข้าไฟล์ GPX หรือทริปเดินเท้าจาก Google Maps หรือรับทริปมาจากการเดินทางอื่น',
|
||||
'วางแผนทริปใหม่ นำเข้าไฟล์ GPX หรือ KML หรือทริปเดินเท้าจาก Google Maps หรือรับทริปมาจากการเดินทางอื่น',
|
||||
'tours.planner.neutralTitle': 'วางแผนทัวร์',
|
||||
'tours.planner.neutralBody': 'เริ่มทัวร์ใหม่ แล้วคลิกแผนที่เพื่อวางจุดของเส้นทาง',
|
||||
'tours.planner.newTitle': 'ทัวร์ใหม่',
|
||||
@@ -222,6 +222,7 @@ const tours: TranslationStrings = {
|
||||
'tours.provenance.label': 'ที่มา',
|
||||
'tours.provenance.source': 'แหล่งข้อมูล',
|
||||
'tours.provenance.importedAt': 'นำเข้าเมื่อ',
|
||||
'tours.provenance.fileImport': 'นำเข้าจาก {format}',
|
||||
'tours.provenance.createdAt': 'สร้างเมื่อ',
|
||||
'tours.provenance.externalUpdated': 'มีการเปลี่ยนใน wanderer',
|
||||
'tours.provenance.externalUpdatedHint':
|
||||
@@ -749,12 +750,21 @@ const tours: TranslationStrings = {
|
||||
'tours.map.pisteStatic':
|
||||
'เป็นข้อมูลแผนที่ ไม่ใช่รายงานสด ไม่ได้บอกว่าที่ใดเปิดหรือเตรียมลานแล้ว หรือเรื่องหิมะและหิมะถล่ม',
|
||||
'tours.map.pisteFullKey': 'คำอธิบายฉบับเต็มบน OpenSnowMap',
|
||||
'tours.import.previewTitle': 'ตัวอย่าง GPX',
|
||||
'tours.import.previewTitle': 'ตัวอย่างการนำเข้า',
|
||||
'tours.import.previewHint': 'ยังไม่มีการบันทึกอะไร ตรวจสอบเส้นทางก่อน แล้วจึงนำเข้า',
|
||||
'tours.import.previewFiles': '{count} ไฟล์',
|
||||
'tours.import.previewTracks': '{count} แทร็ก',
|
||||
'tours.import.previewPoints': '{count} จุด',
|
||||
'tours.import.previewNoHeights': 'ไม่มีความสูงในไฟล์',
|
||||
'tours.import.previewLeftOut': 'ไม่ถูกนำเข้า',
|
||||
'tours.import.previewLeftOutHint':
|
||||
'ทัวร์สร้างจากเส้นเท่านั้น หมุด พื้นที่ เลเยอร์ซ้อน และลิงก์ไปยังไฟล์อื่นจะไม่ถูกนำเข้า และจะไม่มีการโหลดสิ่งใดจากที่อื่น',
|
||||
'tours.import.leftOutPoints': 'หมุด {count} รายการ',
|
||||
'tours.import.leftOutAreas': 'พื้นที่ {count} รายการ',
|
||||
'tours.import.leftOutOther': 'รายการอื่น {count} รายการ',
|
||||
'tours.import.unreadableIn': 'ไม่สามารถอ่าน {name} ได้: ไฟล์เสียหายหรือไม่ใช่ GPX, KML หรือ KMZ',
|
||||
'tours.import.archiveNoKmlIn': 'ไม่พบไฟล์ KML ใน {name}',
|
||||
'tours.import.archiveTooLargeIn': '{name} ใหญ่เกินไปเมื่อแตกไฟล์',
|
||||
'tours.import.previewDuplicate': 'มีอยู่ในทริปแล้ว',
|
||||
'tours.import.previewAllDuplicates': 'ทุกแทร็กมีอยู่ในทริปแล้ว จึงไม่มีอะไรให้นำเข้า',
|
||||
'tours.import.previewAs': 'นำเข้าเป็น',
|
||||
|
||||
Reference in New Issue
Block a user