Email for professionals and teams
Import a Google Takeout export from the import page or a script (#184)
Kevin Kyburz4a9ad7fdb3f4
diff --git a/public/locales/ar.json b/public/locales/ar.jsonindex 4c476bb..06b7e27 100644--- a/public/locales/ar.json+++ b/public/locales/ar.json@@ -2003,6 +2003,29 @@"importPage.useTls": "استخدام TLS","importPage.imapNote": "يستورد IMAP أقسام المصدر المحددة تلقائيًا. تُكتشف المجلدات من الحساب المصدر وتُستورد إلى مجلدات Mailflare الجديدة أو الموجودة المطابقة.","importPage.importSources": "استيراد المصادر المحددة",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "ملفات Takeout",+ "importPage.takeoutHint": "اختر ملفات .zip من Google Takeout أو ملف .mbox الموجود داخلها. تتم قراءتها في متصفحك، ولا يُرفع سوى الرسائل.",+ "importPage.takeoutKeepOpen": "أبقِ هذه العلامة مفتوحة حتى ينتهي الاستيراد. إذا توقف، اختر الملفات نفسها مرة أخرى وسيستأنف من حيث توقف.",+ "importPage.takeoutFolders": "إنشاء مجلدات من تصنيفات Gmail",+ "importPage.takeoutSkipSpam": "تخطي البريد العشوائي",+ "importPage.takeoutSkipTrash": "تخطي المهملات",+ "importPage.takeoutIgnoreLabels": "التصنيفات المراد تجاهلها",+ "importPage.takeoutIgnoreHint": "مفصولة بفواصل. أنهِ التصنيف بـ / لتجاهل كل التصنيفات التي تحته أيضًا.",+ "importPage.takeoutPreview": "معاينة",+ "importPage.takeoutStart": "استيراد",+ "importPage.takeoutStop": "إيقاف",+ "importPage.takeoutReading": "جارٍ قراءة {source} ({index}/{count})",+ "importPage.takeoutCounts": "تمت قراءة {read} رسالة، واستيراد {imported}، وتخطي {skipped}",+ "importPage.takeoutResumed": "المتابعة بعد الرسالة {count}.",+ "importPage.takeoutNoMbox": "لم يُعثر على ملف .mbox في {files}.",+ "importPage.takeoutUnsupported": "لا يستطيع هذا المتصفح فك ضغط ملفات zip. فك ضغط الأرشيف واختر ملف .mbox بدلًا من ذلك.",+ "importPage.takeoutPreviewResult": "سيتم استيراد {count} رسالة:",+ "importPage.takeoutStopped": "توقف الاستيراد. اختر الملفات نفسها مرة أخرى للمتابعة.",+ "importPage.takeoutFolder": "المجلد {name}",+ "importPage.takeoutTooLarge": "تم تخطي {count} رسالة يزيد حجمها عن 24 ميغابايت.",+ "importPage.takeoutIgnored": "تم تخطي {count} رسالة من البريد العشوائي أو المهملات.",+ "importPage.takeoutFailed": "تعذر استيراد {count} رسالة:","layout.resizeMenu": "تغيير حجم القائمة اليسرى","nav.loadingPage": "جارٍ تحميل الصفحة","message.blockRemote": "حظر المحتوى الخارجي",diff --git a/public/locales/bn.json b/public/locales/bn.jsonindex 7025ff4..7a7f9d3 100644--- a/public/locales/bn.json+++ b/public/locales/bn.json@@ -1941,6 +1941,29 @@"importPage.useTls": "TLS ব্যবহার করুন","importPage.imapNote": "IMAP নির্বাচিত উৎস বিভাগগুলো স্বয়ংক্রিয়ভাবে ইমপোর্ট করে। উৎস অ্যাকাউন্ট থেকে ফোল্ডার খুঁজে বের করা হয় এবং মিলে যাওয়া নতুন বা বিদ্যমান Mailflare ফোল্ডারে ইমপোর্ট করা হয়।","importPage.importSources": "নির্বাচিত উৎস ইমপোর্ট করুন",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ফাইল",+ "importPage.takeoutHint": "Google Takeout-এর .zip ফাইল বা তার ভেতরের .mbox বেছে নিন। এগুলো আপনার ব্রাউজারে পড়া হয়; শুধু বার্তাগুলো আপলোড হয়।",+ "importPage.takeoutKeepOpen": "ইমপোর্ট শেষ না হওয়া পর্যন্ত এই ট্যাবটি খোলা রাখুন। থেমে গেলে একই ফাইল আবার বেছে নিন, যেখানে থেমেছিল সেখান থেকে চলবে।",+ "importPage.takeoutFolders": "Gmail লেবেল থেকে ফোল্ডার তৈরি করুন",+ "importPage.takeoutSkipSpam": "স্প্যাম বাদ দিন",+ "importPage.takeoutSkipTrash": "ট্র্যাশ বাদ দিন",+ "importPage.takeoutIgnoreLabels": "উপেক্ষা করার লেবেল",+ "importPage.takeoutIgnoreHint": "কমা দিয়ে আলাদা করুন। নিচের সব লেবেলও উপেক্ষা করতে লেবেলের শেষে / দিন।",+ "importPage.takeoutPreview": "প্রিভিউ",+ "importPage.takeoutStart": "ইমপোর্ট করুন",+ "importPage.takeoutStop": "থামান",+ "importPage.takeoutReading": "{source} পড়া হচ্ছে ({index}/{count})",+ "importPage.takeoutCounts": "{read}টি বার্তা পড়া হয়েছে, {imported}টি ইমপোর্ট হয়েছে, {skipped}টি বাদ গেছে",+ "importPage.takeoutResumed": "বার্তা {count}-এর পর থেকে চলছে।",+ "importPage.takeoutNoMbox": "{files}-এ কোনো .mbox ফাইল পাওয়া যায়নি।",+ "importPage.takeoutUnsupported": "এই ব্রাউজার zip ফাইল খুলতে পারে না। আর্কাইভটি আনজিপ করে .mbox ফাইল বেছে নিন।",+ "importPage.takeoutPreviewResult": "{count}টি বার্তা ইমপোর্ট হবে:",+ "importPage.takeoutStopped": "ইমপোর্ট থামানো হয়েছে। চালিয়ে যেতে একই ফাইল আবার বেছে নিন।",+ "importPage.takeoutFolder": "ফোল্ডার {name}",+ "importPage.takeoutTooLarge": "24 MB-এর বড় {count}টি বার্তা বাদ দেওয়া হয়েছে।",+ "importPage.takeoutIgnored": "স্প্যাম বা ট্র্যাশের {count}টি বার্তা বাদ দেওয়া হয়েছে।",+ "importPage.takeoutFailed": "{count}টি বার্তা ইমপোর্ট করা যায়নি:","layout.resizeMenu": "বাম মেনুর আকার পরিবর্তন করুন","nav.loadingPage": "পৃষ্ঠা লোড হচ্ছে","message.blockRemote": "দূরবর্তী বিষয়বস্তু ব্লক করুন",diff --git a/public/locales/de.json b/public/locales/de.jsonindex 24903c8..6a36212 100644--- a/public/locales/de.json+++ b/public/locales/de.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS verwenden","importPage.imapNote": "IMAP importiert die ausgewählten Quellbereiche automatisch. Ordner werden im Quellkonto erkannt und in passende neue oder vorhandene Mailflare-Ordner importiert.","importPage.importSources": "Ausgewählte Quellen importieren",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout-Dateien",+ "importPage.takeoutHint": "Wählen Sie die .zip-Dateien aus Google Takeout oder die .mbox darin. Sie werden im Browser gelesen, hochgeladen werden nur die Nachrichten.",+ "importPage.takeoutKeepOpen": "Lassen Sie diesen Tab offen, bis der Import fertig ist. Bricht er ab, wählen Sie dieselben Dateien erneut aus – er macht dort weiter, wo er aufgehört hat.",+ "importPage.takeoutFolders": "Ordner aus Gmail-Labels anlegen",+ "importPage.takeoutSkipSpam": "Spam überspringen",+ "importPage.takeoutSkipTrash": "Papierkorb überspringen",+ "importPage.takeoutIgnoreLabels": "Ignorierte Labels",+ "importPage.takeoutIgnoreHint": "Durch Kommas getrennt. Endet ein Label mit /, werden auch alle Labels darunter ignoriert.",+ "importPage.takeoutPreview": "Vorschau",+ "importPage.takeoutStart": "Importieren",+ "importPage.takeoutStop": "Stoppen",+ "importPage.takeoutReading": "Lese {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} Nachrichten gelesen, {imported} importiert, {skipped} übersprungen",+ "importPage.takeoutResumed": "Fortsetzung nach Nachricht {count}.",+ "importPage.takeoutNoMbox": "Keine .mbox-Datei in {files} gefunden.",+ "importPage.takeoutUnsupported": "Dieser Browser kann keine Zip-Dateien entpacken. Entpacken Sie das Archiv und wählen Sie stattdessen die .mbox-Datei.",+ "importPage.takeoutPreviewResult": "{count} Nachrichten würden importiert:",+ "importPage.takeoutStopped": "Import gestoppt. Wählen Sie dieselben Dateien erneut aus, um fortzufahren.",+ "importPage.takeoutFolder": "Ordner {name}",+ "importPage.takeoutTooLarge": "{count} Nachrichten über 24 MB wurden übersprungen.",+ "importPage.takeoutIgnored": "{count} Spam- oder Papierkorb-Nachrichten wurden übersprungen.",+ "importPage.takeoutFailed": "{count} Nachrichten konnten nicht importiert werden:","layout.resizeMenu": "Linkes Menü in der Größe ändern","nav.loadingPage": "Seite wird geladen","message.blockRemote": "Externe Inhalte blockieren",diff --git a/public/locales/es.json b/public/locales/es.jsonindex 8768520..dc14e09 100644--- a/public/locales/es.json+++ b/public/locales/es.json@@ -1958,6 +1958,29 @@"importPage.useTls": "Usar TLS","importPage.imapNote": "IMAP importa automáticamente las secciones de origen seleccionadas. Las carpetas se descubren en la cuenta de origen y se importan a carpetas de Mailflare nuevas o existentes que coincidan.","importPage.importSources": "Importar los orígenes seleccionados",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Archivos de Takeout",+ "importPage.takeoutHint": "Elige los archivos .zip de Google Takeout o el .mbox que contienen. Se leen en tu navegador; solo se suben los mensajes.",+ "importPage.takeoutKeepOpen": "Mantén esta pestaña abierta hasta que termine la importación. Si se detiene, vuelve a elegir los mismos archivos y continuará donde se quedó.",+ "importPage.takeoutFolders": "Crear carpetas a partir de las etiquetas de Gmail",+ "importPage.takeoutSkipSpam": "Omitir spam",+ "importPage.takeoutSkipTrash": "Omitir papelera",+ "importPage.takeoutIgnoreLabels": "Etiquetas a ignorar",+ "importPage.takeoutIgnoreHint": "Separadas por comas. Termina una etiqueta con / para ignorar también todas las que están debajo.",+ "importPage.takeoutPreview": "Vista previa",+ "importPage.takeoutStart": "Importar",+ "importPage.takeoutStop": "Detener",+ "importPage.takeoutReading": "Leyendo {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} mensajes leídos, {imported} importados, {skipped} omitidos",+ "importPage.takeoutResumed": "Continuando después del mensaje {count}.",+ "importPage.takeoutNoMbox": "No se encontró ningún archivo .mbox en {files}.",+ "importPage.takeoutUnsupported": "Este navegador no puede descomprimir archivos zip. Descomprime el archivo y elige el archivo .mbox.",+ "importPage.takeoutPreviewResult": "Se importarían {count} mensajes:",+ "importPage.takeoutStopped": "Importación detenida. Vuelve a elegir los mismos archivos para continuar.",+ "importPage.takeoutFolder": "Carpeta {name}",+ "importPage.takeoutTooLarge": "Se omitieron {count} mensajes de más de 24 MB.",+ "importPage.takeoutIgnored": "Se omitieron {count} mensajes de spam o de la papelera.",+ "importPage.takeoutFailed": "No se pudieron importar {count} mensajes:","layout.resizeMenu": "Cambiar el tamaño del menú lateral","nav.loadingPage": "Cargando página","message.blockRemote": "Bloquear contenido remoto",diff --git a/public/locales/fa.json b/public/locales/fa.jsonindex 266fc6c..25ed695 100644--- a/public/locales/fa.json+++ b/public/locales/fa.json@@ -1943,6 +1943,29 @@"importPage.useTls": "استفاده از TLS","importPage.imapNote": "IMAP بخشهای منبع انتخابشده را بهطور خودکار درونریزی میکند. پوشهها از حساب منبع کشف میشوند و در پوشههای جدید یا موجود مطابق Mailflare درونریزی میشوند.","importPage.importSources": "درونریزی منابع انتخابشده",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "فایلهای Takeout",+ "importPage.takeoutHint": "فایلهای .zip از Google Takeout یا فایل .mbox داخل آنها را انتخاب کنید. آنها در مرورگر شما خوانده میشوند و فقط پیامها بارگذاری میشوند.",+ "importPage.takeoutKeepOpen": "این زبانه را تا پایان درونریزی باز نگه دارید. اگر متوقف شد، همان فایلها را دوباره انتخاب کنید تا از همانجا ادامه دهد.",+ "importPage.takeoutFolders": "ساخت پوشه از برچسبهای Gmail",+ "importPage.takeoutSkipSpam": "رد کردن هرزنامه",+ "importPage.takeoutSkipTrash": "رد کردن سطل زباله",+ "importPage.takeoutIgnoreLabels": "برچسبهای نادیدهگرفته",+ "importPage.takeoutIgnoreHint": "با کاما جدا کنید. برچسب را با / تمام کنید تا همه برچسبهای زیر آن هم نادیده گرفته شوند.",+ "importPage.takeoutPreview": "پیشنمایش",+ "importPage.takeoutStart": "درونریزی",+ "importPage.takeoutStop": "توقف",+ "importPage.takeoutReading": "در حال خواندن {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} پیام خوانده شد، {imported} درونریزی شد، {skipped} رد شد",+ "importPage.takeoutResumed": "ادامه پس از پیام {count}.",+ "importPage.takeoutNoMbox": "هیچ فایل .mbox در {files} پیدا نشد.",+ "importPage.takeoutUnsupported": "این مرورگر نمیتواند فایلهای zip را باز کند. بایگانی را از حالت فشرده خارج کنید و فایل .mbox را انتخاب کنید.",+ "importPage.takeoutPreviewResult": "{count} پیام درونریزی میشود:",+ "importPage.takeoutStopped": "درونریزی متوقف شد. برای ادامه، همان فایلها را دوباره انتخاب کنید.",+ "importPage.takeoutFolder": "پوشه {name}",+ "importPage.takeoutTooLarge": "{count} پیام بزرگتر از ۲۴ مگابایت رد شد.",+ "importPage.takeoutIgnored": "{count} پیام هرزنامه یا سطل زباله رد شد.",+ "importPage.takeoutFailed": "{count} پیام درونریزی نشد:","layout.resizeMenu": "تغییر اندازه منوی چپ","nav.loadingPage": "در حال بارگذاری صفحه","message.blockRemote": "مسدود کردن محتوای راه دور",diff --git a/public/locales/fr.json b/public/locales/fr.jsonindex e78b7ec..d3696ad 100644--- a/public/locales/fr.json+++ b/public/locales/fr.json@@ -1958,6 +1958,29 @@"importPage.useTls": "Utiliser TLS","importPage.imapNote": "IMAP importe automatiquement les sections source sélectionnées. Les dossiers sont découverts sur le compte source et importés dans des dossiers Mailflare correspondants, nouveaux ou existants.","importPage.importSources": "Importer les sources sélectionnées",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Fichiers Takeout",+ "importPage.takeoutHint": "Choisissez les fichiers .zip de Google Takeout, ou le .mbox qu'ils contiennent. Ils sont lus dans votre navigateur ; seuls les messages sont envoyés.",+ "importPage.takeoutKeepOpen": "Gardez cet onglet ouvert jusqu'à la fin de l'importation. Si elle s'interrompt, choisissez à nouveau les mêmes fichiers pour reprendre là où elle s'est arrêtée.",+ "importPage.takeoutFolders": "Créer des dossiers à partir des libellés Gmail",+ "importPage.takeoutSkipSpam": "Ignorer le spam",+ "importPage.takeoutSkipTrash": "Ignorer la corbeille",+ "importPage.takeoutIgnoreLabels": "Libellés à ignorer",+ "importPage.takeoutIgnoreHint": "Séparés par des virgules. Terminez un libellé par / pour ignorer aussi tous les libellés en dessous.",+ "importPage.takeoutPreview": "Aperçu",+ "importPage.takeoutStart": "Importer",+ "importPage.takeoutStop": "Arrêter",+ "importPage.takeoutReading": "Lecture de {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} messages lus, {imported} importés, {skipped} ignorés",+ "importPage.takeoutResumed": "Reprise après le message {count}.",+ "importPage.takeoutNoMbox": "Aucun fichier .mbox trouvé dans {files}.",+ "importPage.takeoutUnsupported": "Ce navigateur ne peut pas décompresser les fichiers zip. Décompressez l'archive et choisissez plutôt le fichier .mbox.",+ "importPage.takeoutPreviewResult": "{count} messages seraient importés :",+ "importPage.takeoutStopped": "Importation arrêtée. Choisissez à nouveau les mêmes fichiers pour continuer.",+ "importPage.takeoutFolder": "Dossier {name}",+ "importPage.takeoutTooLarge": "{count} messages de plus de 24 Mo ont été ignorés.",+ "importPage.takeoutIgnored": "{count} messages de spam ou de la corbeille ont été ignorés.",+ "importPage.takeoutFailed": "{count} messages n'ont pas pu être importés :","layout.resizeMenu": "Redimensionner le menu de gauche","nav.loadingPage": "Chargement de la page","message.blockRemote": "Bloquer le contenu distant",diff --git a/public/locales/gu.json b/public/locales/gu.jsonindex f878d77..a800ccc 100644--- a/public/locales/gu.json+++ b/public/locales/gu.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS વાપરો","importPage.imapNote": "IMAP પસંદ કરેલા સ્રોત વિભાગો આપમેળે આયાત કરે છે. સ્રોત એકાઉન્ટમાંથી ફોલ્ડર શોધાય છે અને મેળ ખાતા નવા કે હાલના Mailflare ફોલ્ડરમાં આયાત થાય છે.","importPage.importSources": "પસંદ કરેલા સ્રોત આયાત કરો",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ફાઇલો",+ "importPage.takeoutHint": "Google Takeoutની .zip ફાઇલો અથવા તેની અંદરની .mbox પસંદ કરો. તે તમારા બ્રાઉઝરમાં વંચાય છે; ફક્ત સંદેશાઓ અપલોડ થાય છે.",+ "importPage.takeoutKeepOpen": "આયાત પૂર્ણ થાય ત્યાં સુધી આ ટૅબ ખુલ્લું રાખો. જો તે અટકે, તો એ જ ફાઇલો ફરી પસંદ કરો, તે જ્યાં અટક્યું હતું ત્યાંથી ચાલુ રહેશે.",+ "importPage.takeoutFolders": "Gmail લેબલમાંથી ફોલ્ડર બનાવો",+ "importPage.takeoutSkipSpam": "સ્પામ છોડો",+ "importPage.takeoutSkipTrash": "ટ્રેશ છોડો",+ "importPage.takeoutIgnoreLabels": "અવગણવાના લેબલ",+ "importPage.takeoutIgnoreHint": "અલ્પવિરામથી અલગ કરો. નીચેના બધા લેબલ પણ અવગણવા માટે લેબલને / થી સમાપ્ત કરો.",+ "importPage.takeoutPreview": "પૂર્વાવલોકન",+ "importPage.takeoutStart": "આયાત કરો",+ "importPage.takeoutStop": "રોકો",+ "importPage.takeoutReading": "{source} વંચાઈ રહ્યું છે ({index}/{count})",+ "importPage.takeoutCounts": "{read} સંદેશા વંચાયા, {imported} આયાત થયા, {skipped} છોડ્યા",+ "importPage.takeoutResumed": "સંદેશ {count} પછીથી ચાલુ.",+ "importPage.takeoutNoMbox": "{files}માં કોઈ .mbox ફાઇલ મળી નથી.",+ "importPage.takeoutUnsupported": "આ બ્રાઉઝર zip ફાઇલો ખોલી શકતું નથી. આર્કાઇવ અનઝિપ કરો અને .mbox ફાઇલ પસંદ કરો.",+ "importPage.takeoutPreviewResult": "{count} સંદેશા આયાત થશે:",+ "importPage.takeoutStopped": "આયાત રોકાયું. ચાલુ રાખવા માટે એ જ ફાઇલો ફરી પસંદ કરો.",+ "importPage.takeoutFolder": "ફોલ્ડર {name}",+ "importPage.takeoutTooLarge": "24 MBથી મોટા {count} સંદેશા છોડવામાં આવ્યા.",+ "importPage.takeoutIgnored": "સ્પામ અથવા ટ્રેશના {count} સંદેશા છોડવામાં આવ્યા.",+ "importPage.takeoutFailed": "{count} સંદેશા આયાત થઈ શક્યા નથી:","layout.resizeMenu": "ડાબા મેનૂનું કદ બદલો","nav.loadingPage": "પૃષ્ઠ લોડ થઈ રહ્યું છે","message.blockRemote": "રિમોટ સામગ્રી બ્લૉક કરો",diff --git a/public/locales/ha.json b/public/locales/ha.jsonindex e9bd631..07c13c6 100644--- a/public/locales/ha.json+++ b/public/locales/ha.json@@ -1943,6 +1943,29 @@"importPage.useTls": "Yi amfani da TLS","importPage.imapNote": "IMAP yana shigo da sassan tushen da aka zaɓa kai-tsaye. Ana gano manyan fayiloli daga asusun tushe a shigo da su zuwa manyan fayilolin Mailflare sababbi ko da ke akwai masu dacewa.","importPage.importSources": "Shigo da tushen da aka zaɓa",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Fayilolin Takeout",+ "importPage.takeoutHint": "Zaɓi fayilolin .zip daga Google Takeout, ko fayil ɗin .mbox da ke cikinsu. Ana karanta su a cikin burauzarka; saƙonni kaɗai ake lodawa.",+ "importPage.takeoutKeepOpen": "Bar wannan shafin a buɗe har sai shigo da kaya ya ƙare. Idan ya tsaya, sake zaɓar fayiloli iri ɗaya kuma zai ci gaba daga inda ya tsaya.",+ "importPage.takeoutFolders": "Ƙirƙiri manyan fayiloli daga lakabin Gmail",+ "importPage.takeoutSkipSpam": "Tsallake saƙon banza",+ "importPage.takeoutSkipTrash": "Tsallake kwandon shara",+ "importPage.takeoutIgnoreLabels": "Lakabin da za a yi watsi da su",+ "importPage.takeoutIgnoreHint": "A raba da wakafi. Ƙare lakabi da / don yin watsi da duk lakabin da ke ƙarƙashinsa.",+ "importPage.takeoutPreview": "Duba kafin",+ "importPage.takeoutStart": "Shigo da",+ "importPage.takeoutStop": "Tsaya",+ "importPage.takeoutReading": "Ana karanta {source} ({index}/{count})",+ "importPage.takeoutCounts": "An karanta saƙonni {read}, an shigo da {imported}, an tsallake {skipped}",+ "importPage.takeoutResumed": "Ana ci gaba bayan saƙo na {count}.",+ "importPage.takeoutNoMbox": "Ba a sami fayil ɗin .mbox a cikin {files} ba.",+ "importPage.takeoutUnsupported": "Wannan burauzar ba za ta iya buɗe fayilolin zip ba. Buɗe ma'ajiyar sannan ka zaɓi fayil ɗin .mbox.",+ "importPage.takeoutPreviewResult": "Za a shigo da saƙonni {count}:",+ "importPage.takeoutStopped": "An dakatar da shigo da kaya. Sake zaɓar fayiloli iri ɗaya don ci gaba.",+ "importPage.takeoutFolder": "Babban fayil {name}",+ "importPage.takeoutTooLarge": "An tsallake saƙonni {count} da suka wuce MB 24.",+ "importPage.takeoutIgnored": "An tsallake saƙonnin banza ko na kwandon shara {count}.",+ "importPage.takeoutFailed": "Ba a iya shigo da saƙonni {count} ba:","layout.resizeMenu": "Canza girman menu na hagu","nav.loadingPage": "Ana loda shafi","message.blockRemote": "Toshe abun ciki na nesa",diff --git a/public/locales/hi.json b/public/locales/hi.jsonindex 0a27d7f..3564df3 100644--- a/public/locales/hi.json+++ b/public/locales/hi.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS का उपयोग करें","importPage.imapNote": "IMAP चुने गए स्रोत अनुभाग अपने-आप इंपोर्ट करता है। फ़ोल्डर स्रोत खाते से खोजे जाते हैं और मेल खाते नए या मौजूदा Mailflare फ़ोल्डर में इंपोर्ट किए जाते हैं।","importPage.importSources": "चुने हुए स्रोत इंपोर्ट करें",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout फ़ाइलें",+ "importPage.takeoutHint": "Google Takeout की .zip फ़ाइलें या उनके अंदर की .mbox चुनें। ये आपके ब्राउज़र में पढ़ी जाती हैं; केवल संदेश अपलोड होते हैं।",+ "importPage.takeoutKeepOpen": "आयात पूरा होने तक यह टैब खुला रखें। अगर यह रुक जाए, तो वही फ़ाइलें फिर से चुनें, यह वहीं से जारी रहेगा।",+ "importPage.takeoutFolders": "Gmail लेबल से फ़ोल्डर बनाएँ",+ "importPage.takeoutSkipSpam": "स्पैम छोड़ें",+ "importPage.takeoutSkipTrash": "ट्रैश छोड़ें",+ "importPage.takeoutIgnoreLabels": "अनदेखे किए जाने वाले लेबल",+ "importPage.takeoutIgnoreHint": "अल्पविराम से अलग करें। किसी लेबल के अंत में / लगाएँ ताकि उसके नीचे के सभी लेबल भी अनदेखे हों।",+ "importPage.takeoutPreview": "पूर्वावलोकन",+ "importPage.takeoutStart": "आयात करें",+ "importPage.takeoutStop": "रोकें",+ "importPage.takeoutReading": "{source} पढ़ा जा रहा है ({index}/{count})",+ "importPage.takeoutCounts": "{read} संदेश पढ़े गए, {imported} आयात हुए, {skipped} छोड़े गए",+ "importPage.takeoutResumed": "संदेश {count} के बाद से जारी।",+ "importPage.takeoutNoMbox": "{files} में कोई .mbox फ़ाइल नहीं मिली।",+ "importPage.takeoutUnsupported": "यह ब्राउज़र zip फ़ाइलें नहीं खोल सकता। संग्रह को अनज़िप करें और .mbox फ़ाइल चुनें।",+ "importPage.takeoutPreviewResult": "{count} संदेश आयात होंगे:",+ "importPage.takeoutStopped": "आयात रोका गया। जारी रखने के लिए वही फ़ाइलें फिर से चुनें।",+ "importPage.takeoutFolder": "फ़ोल्डर {name}",+ "importPage.takeoutTooLarge": "24 MB से बड़े {count} संदेश छोड़े गए।",+ "importPage.takeoutIgnored": "स्पैम या ट्रैश के {count} संदेश छोड़े गए।",+ "importPage.takeoutFailed": "{count} संदेश आयात नहीं हो सके:","layout.resizeMenu": "बायाँ मेन्यू आकार बदलें","nav.loadingPage": "पृष्ठ लोड हो रहा है","message.blockRemote": "बाहरी सामग्री ब्लॉक करें",diff --git a/public/locales/id.json b/public/locales/id.jsonindex 5ba533e..b4b00ae 100644--- a/public/locales/id.json+++ b/public/locales/id.json@@ -1928,6 +1928,29 @@"importPage.useTls": "Gunakan TLS","importPage.imapNote": "IMAP mengimpor bagian sumber yang dipilih secara otomatis. Folder ditemukan dari akun sumber dan diimpor ke folder Mailflare baru atau yang sudah ada yang sesuai.","importPage.importSources": "Impor sumber yang dipilih",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "File Takeout",+ "importPage.takeoutHint": "Pilih file .zip dari Google Takeout, atau file .mbox di dalamnya. File dibaca di browser Anda; hanya pesan yang diunggah.",+ "importPage.takeoutKeepOpen": "Biarkan tab ini terbuka sampai impor selesai. Jika berhenti, pilih file yang sama lagi dan impor akan berlanjut dari titik terakhir.",+ "importPage.takeoutFolders": "Buat folder dari label Gmail",+ "importPage.takeoutSkipSpam": "Lewati spam",+ "importPage.takeoutSkipTrash": "Lewati sampah",+ "importPage.takeoutIgnoreLabels": "Label yang diabaikan",+ "importPage.takeoutIgnoreHint": "Dipisahkan koma. Akhiri label dengan / untuk juga mengabaikan semua label di bawahnya.",+ "importPage.takeoutPreview": "Pratinjau",+ "importPage.takeoutStart": "Impor",+ "importPage.takeoutStop": "Hentikan",+ "importPage.takeoutReading": "Membaca {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} pesan dibaca, {imported} diimpor, {skipped} dilewati",+ "importPage.takeoutResumed": "Melanjutkan setelah pesan {count}.",+ "importPage.takeoutNoMbox": "Tidak ada file .mbox di {files}.",+ "importPage.takeoutUnsupported": "Browser ini tidak dapat mengekstrak file zip. Ekstrak arsip lalu pilih file .mbox.",+ "importPage.takeoutPreviewResult": "{count} pesan akan diimpor:",+ "importPage.takeoutStopped": "Impor dihentikan. Pilih file yang sama lagi untuk melanjutkan.",+ "importPage.takeoutFolder": "Folder {name}",+ "importPage.takeoutTooLarge": "{count} pesan di atas 24 MB dilewati.",+ "importPage.takeoutIgnored": "{count} pesan spam atau sampah dilewati.",+ "importPage.takeoutFailed": "{count} pesan tidak dapat diimpor:","layout.resizeMenu": "Ubah ukuran menu kiri","nav.loadingPage": "Memuat halaman","message.blockRemote": "Blokir konten jarak jauh",diff --git a/public/locales/it.json b/public/locales/it.jsonindex b8d93dd..bb047ab 100644--- a/public/locales/it.json+++ b/public/locales/it.json@@ -1958,6 +1958,29 @@"importPage.useTls": "Usa TLS","importPage.imapNote": "L'importazione IMAP importa automaticamente le sezioni di origine selezionate. Le cartelle vengono rilevate dall'account di origine e importate in cartelle Mailflare nuove o esistenti corrispondenti.","importPage.importSources": "Importa le origini selezionate",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "File di Takeout",+ "importPage.takeoutHint": "Scegli i file .zip di Google Takeout o il file .mbox al loro interno. Vengono letti nel browser; vengono caricati solo i messaggi.",+ "importPage.takeoutKeepOpen": "Tieni aperta questa scheda finché l'importazione non termina. Se si interrompe, scegli di nuovo gli stessi file e riprenderà da dove si era fermata.",+ "importPage.takeoutFolders": "Crea cartelle dalle etichette di Gmail",+ "importPage.takeoutSkipSpam": "Salta lo spam",+ "importPage.takeoutSkipTrash": "Salta il cestino",+ "importPage.takeoutIgnoreLabels": "Etichette da ignorare",+ "importPage.takeoutIgnoreHint": "Separate da virgole. Termina un'etichetta con / per ignorare anche tutte quelle sottostanti.",+ "importPage.takeoutPreview": "Anteprima",+ "importPage.takeoutStart": "Importa",+ "importPage.takeoutStop": "Interrompi",+ "importPage.takeoutReading": "Lettura di {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} messaggi letti, {imported} importati, {skipped} saltati",+ "importPage.takeoutResumed": "Ripresa dopo il messaggio {count}.",+ "importPage.takeoutNoMbox": "Nessun file .mbox trovato in {files}.",+ "importPage.takeoutUnsupported": "Questo browser non può decomprimere i file zip. Decomprimi l'archivio e scegli invece il file .mbox.",+ "importPage.takeoutPreviewResult": "Verrebbero importati {count} messaggi:",+ "importPage.takeoutStopped": "Importazione interrotta. Scegli di nuovo gli stessi file per continuare.",+ "importPage.takeoutFolder": "Cartella {name}",+ "importPage.takeoutTooLarge": "{count} messaggi oltre 24 MB sono stati saltati.",+ "importPage.takeoutIgnored": "{count} messaggi di spam o del cestino sono stati saltati.",+ "importPage.takeoutFailed": "Impossibile importare {count} messaggi:","layout.resizeMenu": "Ridimensiona il menu a sinistra","nav.loadingPage": "Caricamento della pagina","message.blockRemote": "Blocca contenuti remoti",diff --git a/public/locales/ja.json b/public/locales/ja.jsonindex c1f5020..39d6afd 100644--- a/public/locales/ja.json+++ b/public/locales/ja.json@@ -1928,6 +1928,29 @@"importPage.useTls": "TLS を使用","importPage.imapNote": "IMAP では、選択したソースのセクションが自動的にインポートされます。フォルダはソースのアカウントから検出され、対応する新規または既存の Mailflare フォルダにインポートされます。","importPage.importSources": "選択したソースをインポート",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ファイル",+ "importPage.takeoutHint": "Google Takeout の .zip ファイル、またはその中の .mbox を選択してください。ファイルはブラウザで読み込まれ、アップロードされるのはメッセージだけです。",+ "importPage.takeoutKeepOpen": "インポートが終わるまでこのタブを開いたままにしてください。中断した場合は同じファイルをもう一度選ぶと、続きから再開します。",+ "importPage.takeoutFolders": "Gmail のラベルからフォルダを作成",+ "importPage.takeoutSkipSpam": "迷惑メールをスキップ",+ "importPage.takeoutSkipTrash": "ゴミ箱をスキップ",+ "importPage.takeoutIgnoreLabels": "無視するラベル",+ "importPage.takeoutIgnoreHint": "カンマ区切り。ラベルの末尾に / を付けると、その下のラベルもすべて無視します。",+ "importPage.takeoutPreview": "プレビュー",+ "importPage.takeoutStart": "インポート",+ "importPage.takeoutStop": "停止",+ "importPage.takeoutReading": "{source} を読み込み中 ({index}/{count})",+ "importPage.takeoutCounts": "{read} 件読み込み、{imported} 件インポート、{skipped} 件スキップ",+ "importPage.takeoutResumed": "{count} 件目の後から再開しています。",+ "importPage.takeoutNoMbox": "{files} に .mbox ファイルが見つかりません。",+ "importPage.takeoutUnsupported": "このブラウザは zip ファイルを展開できません。アーカイブを展開して .mbox ファイルを選択してください。",+ "importPage.takeoutPreviewResult": "{count} 件のメッセージがインポートされます:",+ "importPage.takeoutStopped": "インポートを停止しました。続けるには同じファイルをもう一度選択してください。",+ "importPage.takeoutFolder": "フォルダ {name}",+ "importPage.takeoutTooLarge": "24 MB を超える {count} 件のメッセージをスキップしました。",+ "importPage.takeoutIgnored": "迷惑メールまたはゴミ箱の {count} 件のメッセージをスキップしました。",+ "importPage.takeoutFailed": "{count} 件のメッセージをインポートできませんでした:","layout.resizeMenu": "左メニューのサイズを変更","nav.loadingPage": "ページを読み込み中","message.blockRemote": "外部コンテンツをブロック",diff --git a/public/locales/kn.json b/public/locales/kn.jsonindex e63c75f..7e9116c 100644--- a/public/locales/kn.json+++ b/public/locales/kn.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS ಬಳಸಿ","importPage.imapNote": "IMAP ಆಯ್ಕೆ ಮಾಡಿದ ಮೂಲ ವಿಭಾಗಗಳನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆಮದು ಮಾಡುತ್ತದೆ. ಫೋಲ್ಡರ್ಗಳನ್ನು ಮೂಲ ಖಾತೆಯಿಂದ ಪತ್ತೆಹಚ್ಚಿ ಹೊಂದುವ ಹೊಸ ಅಥವಾ ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ Mailflare ಫೋಲ್ಡರ್ಗಳಿಗೆ ಆಮದು ಮಾಡಲಾಗುತ್ತದೆ.","importPage.importSources": "ಆಯ್ಕೆ ಮಾಡಿದ ಮೂಲಗಳನ್ನು ಆಮದು ಮಾಡಿ",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ಫೈಲ್ಗಳು",+ "importPage.takeoutHint": "Google Takeout ನ .zip ಫೈಲ್ಗಳನ್ನು ಅಥವಾ ಅವುಗಳೊಳಗಿನ .mbox ಅನ್ನು ಆಯ್ಕೆಮಾಡಿ. ಅವುಗಳನ್ನು ನಿಮ್ಮ ಬ್ರೌಸರ್ನಲ್ಲಿ ಓದಲಾಗುತ್ತದೆ; ಸಂದೇಶಗಳನ್ನು ಮಾತ್ರ ಅಪ್ಲೋಡ್ ಮಾಡಲಾಗುತ್ತದೆ.",+ "importPage.takeoutKeepOpen": "ಆಮದು ಮುಗಿಯುವವರೆಗೆ ಈ ಟ್ಯಾಬ್ ತೆರೆದಿಡಿ. ಅದು ನಿಂತರೆ, ಅದೇ ಫೈಲ್ಗಳನ್ನು ಮತ್ತೆ ಆಯ್ಕೆಮಾಡಿ; ನಿಂತಲ್ಲಿಂದಲೇ ಮುಂದುವರಿಯುತ್ತದೆ.",+ "importPage.takeoutFolders": "Gmail ಲೇಬಲ್ಗಳಿಂದ ಫೋಲ್ಡರ್ಗಳನ್ನು ರಚಿಸಿ",+ "importPage.takeoutSkipSpam": "ಸ್ಪ್ಯಾಮ್ ಬಿಟ್ಟುಬಿಡಿ",+ "importPage.takeoutSkipTrash": "ಕಸದಬುಟ್ಟಿ ಬಿಟ್ಟುಬಿಡಿ",+ "importPage.takeoutIgnoreLabels": "ನಿರ್ಲಕ್ಷಿಸಬೇಕಾದ ಲೇಬಲ್ಗಳು",+ "importPage.takeoutIgnoreHint": "ಅಲ್ಪವಿರಾಮದಿಂದ ಬೇರ್ಪಡಿಸಿ. ಕೆಳಗಿನ ಎಲ್ಲಾ ಲೇಬಲ್ಗಳನ್ನೂ ನಿರ್ಲಕ್ಷಿಸಲು ಲೇಬಲ್ ಅನ್ನು / ನಿಂದ ಕೊನೆಗೊಳಿಸಿ.",+ "importPage.takeoutPreview": "ಪೂರ್ವವೀಕ್ಷಣೆ",+ "importPage.takeoutStart": "ಆಮದು ಮಾಡಿ",+ "importPage.takeoutStop": "ನಿಲ್ಲಿಸಿ",+ "importPage.takeoutReading": "{source} ಓದಲಾಗುತ್ತಿದೆ ({index}/{count})",+ "importPage.takeoutCounts": "{read} ಸಂದೇಶಗಳನ್ನು ಓದಲಾಗಿದೆ, {imported} ಆಮದು, {skipped} ಬಿಡಲಾಗಿದೆ",+ "importPage.takeoutResumed": "ಸಂದೇಶ {count} ರ ನಂತರದಿಂದ ಮುಂದುವರಿಯುತ್ತಿದೆ.",+ "importPage.takeoutNoMbox": "{files} ನಲ್ಲಿ ಯಾವುದೇ .mbox ಫೈಲ್ ಕಂಡುಬಂದಿಲ್ಲ.",+ "importPage.takeoutUnsupported": "ಈ ಬ್ರೌಸರ್ zip ಫೈಲ್ಗಳನ್ನು ತೆರೆಯಲು ಸಾಧ್ಯವಿಲ್ಲ. ಆರ್ಕೈವ್ ಅನ್ನು ಅನ್ಜಿಪ್ ಮಾಡಿ ಮತ್ತು .mbox ಫೈಲ್ ಆಯ್ಕೆಮಾಡಿ.",+ "importPage.takeoutPreviewResult": "{count} ಸಂದೇಶಗಳನ್ನು ಆಮದು ಮಾಡಲಾಗುತ್ತದೆ:",+ "importPage.takeoutStopped": "ಆಮದು ನಿಲ್ಲಿಸಲಾಗಿದೆ. ಮುಂದುವರಿಸಲು ಅದೇ ಫೈಲ್ಗಳನ್ನು ಮತ್ತೆ ಆಯ್ಕೆಮಾಡಿ.",+ "importPage.takeoutFolder": "ಫೋಲ್ಡರ್ {name}",+ "importPage.takeoutTooLarge": "24 MB ಗಿಂತ ದೊಡ್ಡ {count} ಸಂದೇಶಗಳನ್ನು ಬಿಡಲಾಗಿದೆ.",+ "importPage.takeoutIgnored": "ಸ್ಪ್ಯಾಮ್ ಅಥವಾ ಕಸದಬುಟ್ಟಿಯ {count} ಸಂದೇಶಗಳನ್ನು ಬಿಡಲಾಗಿದೆ.",+ "importPage.takeoutFailed": "{count} ಸಂದೇಶಗಳನ್ನು ಆಮದು ಮಾಡಲಾಗಲಿಲ್ಲ:","layout.resizeMenu": "ಎಡ ಮೆನುವಿನ ಗಾತ್ರ ಬದಲಿಸಿ","nav.loadingPage": "ಪುಟ ಲೋಡ್ ಆಗುತ್ತಿದೆ","message.blockRemote": "ರಿಮೋಟ್ ವಿಷಯವನ್ನು ನಿರ್ಬಂಧಿಸಿ",diff --git a/public/locales/ko.json b/public/locales/ko.jsonindex a072621..fac8099 100644--- a/public/locales/ko.json+++ b/public/locales/ko.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS 사용","importPage.imapNote": "IMAP은 선택한 소스 섹션을 자동으로 가져옵니다. 폴더는 소스 계정에서 검색되어 일치하는 새 Mailflare 폴더 또는 기존 폴더로 가져옵니다.","importPage.importSources": "선택한 소스 가져오기",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout 파일",+ "importPage.takeoutHint": "Google Takeout의 .zip 파일 또는 그 안의 .mbox를 선택하세요. 파일은 브라우저에서 읽히며 메시지만 업로드됩니다.",+ "importPage.takeoutKeepOpen": "가져오기가 끝날 때까지 이 탭을 열어 두세요. 중단되면 같은 파일을 다시 선택하면 멈춘 곳부터 이어집니다.",+ "importPage.takeoutFolders": "Gmail 라벨로 폴더 만들기",+ "importPage.takeoutSkipSpam": "스팸 건너뛰기",+ "importPage.takeoutSkipTrash": "휴지통 건너뛰기",+ "importPage.takeoutIgnoreLabels": "무시할 라벨",+ "importPage.takeoutIgnoreHint": "쉼표로 구분합니다. 라벨 끝에 /를 붙이면 그 아래 라벨도 모두 무시합니다.",+ "importPage.takeoutPreview": "미리보기",+ "importPage.takeoutStart": "가져오기",+ "importPage.takeoutStop": "중지",+ "importPage.takeoutReading": "{source} 읽는 중 ({index}/{count})",+ "importPage.takeoutCounts": "메시지 {read}개 읽음, {imported}개 가져옴, {skipped}개 건너뜀",+ "importPage.takeoutResumed": "{count}번째 메시지 이후부터 계속합니다.",+ "importPage.takeoutNoMbox": "{files}에서 .mbox 파일을 찾을 수 없습니다.",+ "importPage.takeoutUnsupported": "이 브라우저는 zip 파일을 풀 수 없습니다. 압축을 풀고 .mbox 파일을 선택하세요.",+ "importPage.takeoutPreviewResult": "메시지 {count}개를 가져옵니다:",+ "importPage.takeoutStopped": "가져오기를 중지했습니다. 계속하려면 같은 파일을 다시 선택하세요.",+ "importPage.takeoutFolder": "폴더 {name}",+ "importPage.takeoutTooLarge": "24MB를 넘는 메시지 {count}개를 건너뛰었습니다.",+ "importPage.takeoutIgnored": "스팸 또는 휴지통 메시지 {count}개를 건너뛰었습니다.",+ "importPage.takeoutFailed": "메시지 {count}개를 가져오지 못했습니다:","layout.resizeMenu": "왼쪽 메뉴 크기 조절","nav.loadingPage": "페이지 불러오는 중","message.blockRemote": "원격 콘텐츠 차단",diff --git a/public/locales/ml.json b/public/locales/ml.jsonindex bc48856..fe28c88 100644--- a/public/locales/ml.json+++ b/public/locales/ml.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS ഉപയോഗിക്കുക","importPage.imapNote": "IMAP തിരഞ്ഞെടുത്ത ഉറവിട വിഭാഗങ്ങൾ സ്വയമേവ ഇറക്കുമതി ചെയ്യുന്നു. ഫോൾഡറുകൾ ഉറവിട അക്കൗണ്ടിൽ നിന്ന് കണ്ടെത്തി യോജിച്ച പുതിയതോ നിലവിലുള്ളതോ ആയ Mailflare ഫോൾഡറുകളിലേക്ക് ഇറക്കുമതി ചെയ്യുന്നു.","importPage.importSources": "തിരഞ്ഞെടുത്ത ഉറവിടങ്ങൾ ഇറക്കുമതി ചെയ്യുക",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ഫയലുകൾ",+ "importPage.takeoutHint": "Google Takeout-ലെ .zip ഫയലുകളോ അവയ്ക്കുള്ളിലെ .mbox-ഓ തിരഞ്ഞെടുക്കുക. അവ നിങ്ങളുടെ ബ്രൗസറിൽ വായിക്കുന്നു; സന്ദേശങ്ങൾ മാത്രം അപ്ലോഡ് ചെയ്യുന്നു.",+ "importPage.takeoutKeepOpen": "ഇറക്കുമതി പൂർത്തിയാകുന്നതുവരെ ഈ ടാബ് തുറന്നുവയ്ക്കുക. നിന്നുപോയാൽ, അതേ ഫയലുകൾ വീണ്ടും തിരഞ്ഞെടുക്കുക; നിന്നിടത്തുനിന്ന് തുടരും.",+ "importPage.takeoutFolders": "Gmail ലേബലുകളിൽ നിന്ന് ഫോൾഡറുകൾ സൃഷ്ടിക്കുക",+ "importPage.takeoutSkipSpam": "സ്പാം ഒഴിവാക്കുക",+ "importPage.takeoutSkipTrash": "ട്രാഷ് ഒഴിവാക്കുക",+ "importPage.takeoutIgnoreLabels": "അവഗണിക്കേണ്ട ലേബലുകൾ",+ "importPage.takeoutIgnoreHint": "കോമ ഉപയോഗിച്ച് വേർതിരിക്കുക. താഴെയുള്ള എല്ലാ ലേബലുകളും അവഗണിക്കാൻ ലേബൽ / ൽ അവസാനിപ്പിക്കുക.",+ "importPage.takeoutPreview": "പ്രിവ്യൂ",+ "importPage.takeoutStart": "ഇറക്കുമതി ചെയ്യുക",+ "importPage.takeoutStop": "നിർത്തുക",+ "importPage.takeoutReading": "{source} വായിക്കുന്നു ({index}/{count})",+ "importPage.takeoutCounts": "{read} സന്ദേശങ്ങൾ വായിച്ചു, {imported} ഇറക്കുമതി ചെയ്തു, {skipped} ഒഴിവാക്കി",+ "importPage.takeoutResumed": "സന്ദേശം {count}-ന് ശേഷം തുടരുന്നു.",+ "importPage.takeoutNoMbox": "{files}-ൽ .mbox ഫയൽ കണ്ടെത്തിയില്ല.",+ "importPage.takeoutUnsupported": "ഈ ബ്രൗസറിന് zip ഫയലുകൾ തുറക്കാനാകില്ല. ആർക്കൈവ് അൺസിപ്പ് ചെയ്ത് .mbox ഫയൽ തിരഞ്ഞെടുക്കുക.",+ "importPage.takeoutPreviewResult": "{count} സന്ദേശങ്ങൾ ഇറക്കുമതി ചെയ്യും:",+ "importPage.takeoutStopped": "ഇറക്കുമതി നിർത്തി. തുടരാൻ അതേ ഫയലുകൾ വീണ്ടും തിരഞ്ഞെടുക്കുക.",+ "importPage.takeoutFolder": "ഫോൾഡർ {name}",+ "importPage.takeoutTooLarge": "24 MB-യിൽ കൂടുതലുള്ള {count} സന്ദേശങ്ങൾ ഒഴിവാക്കി.",+ "importPage.takeoutIgnored": "സ്പാമിലെയോ ട്രാഷിലെയോ {count} സന്ദേശങ്ങൾ ഒഴിവാക്കി.",+ "importPage.takeoutFailed": "{count} സന്ദേശങ്ങൾ ഇറക്കുമതി ചെയ്യാനായില്ല:","layout.resizeMenu": "ഇടത് മെനുവിന്റെ വലിപ്പം മാറ്റുക","nav.loadingPage": "പേജ് ലോഡ് ചെയ്യുന്നു","message.blockRemote": "വിദൂര ഉള്ളടക്കം തടയുക",diff --git a/public/locales/mr.json b/public/locales/mr.jsonindex 207254e..ad75ea7 100644--- a/public/locales/mr.json+++ b/public/locales/mr.json@@ -1941,6 +1941,29 @@"importPage.useTls": "TLS वापरा","importPage.imapNote": "IMAP निवडलेले स्रोत विभाग आपोआप आयात करते. स्रोत खात्यातून फोल्डर शोधले जातात आणि जुळणाऱ्या नवीन किंवा विद्यमान Mailflare फोल्डरमध्ये आयात केले जातात.","importPage.importSources": "निवडलेले स्रोत आयात करा",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout फाइल्स",+ "importPage.takeoutHint": "Google Takeout च्या .zip फाइल्स किंवा त्यातील .mbox निवडा. त्या तुमच्या ब्राउझरमध्ये वाचल्या जातात; फक्त संदेश अपलोड होतात.",+ "importPage.takeoutKeepOpen": "आयात पूर्ण होईपर्यंत हा टॅब उघडा ठेवा. ते थांबल्यास, त्याच फाइल्स पुन्हा निवडा; जिथे थांबले तिथून पुढे सुरू राहील.",+ "importPage.takeoutFolders": "Gmail लेबलवरून फोल्डर तयार करा",+ "importPage.takeoutSkipSpam": "स्पॅम वगळा",+ "importPage.takeoutSkipTrash": "कचरा वगळा",+ "importPage.takeoutIgnoreLabels": "दुर्लक्ष करायची लेबल्स",+ "importPage.takeoutIgnoreHint": "स्वल्पविरामाने वेगळे करा. खालील सर्व लेबल्सकडेही दुर्लक्ष करण्यासाठी लेबलच्या शेवटी / लावा.",+ "importPage.takeoutPreview": "पूर्वावलोकन",+ "importPage.takeoutStart": "आयात करा",+ "importPage.takeoutStop": "थांबवा",+ "importPage.takeoutReading": "{source} वाचत आहे ({index}/{count})",+ "importPage.takeoutCounts": "{read} संदेश वाचले, {imported} आयात केले, {skipped} वगळले",+ "importPage.takeoutResumed": "संदेश {count} नंतरपासून सुरू.",+ "importPage.takeoutNoMbox": "{files} मध्ये .mbox फाइल सापडली नाही.",+ "importPage.takeoutUnsupported": "हा ब्राउझर zip फाइल्स उघडू शकत नाही. संग्रह अनझिप करा आणि .mbox फाइल निवडा.",+ "importPage.takeoutPreviewResult": "{count} संदेश आयात होतील:",+ "importPage.takeoutStopped": "आयात थांबवली. सुरू ठेवण्यासाठी त्याच फाइल्स पुन्हा निवडा.",+ "importPage.takeoutFolder": "फोल्डर {name}",+ "importPage.takeoutTooLarge": "24 MB पेक्षा मोठे {count} संदेश वगळले.",+ "importPage.takeoutIgnored": "स्पॅम किंवा कचऱ्यातील {count} संदेश वगळले.",+ "importPage.takeoutFailed": "{count} संदेश आयात करता आले नाहीत:","layout.resizeMenu": "डावा मेनू आकार बदला","nav.loadingPage": "पृष्ठ लोड होत आहे","message.blockRemote": "रिमोट मजकूर ब्लॉक करा",diff --git a/public/locales/ms.json b/public/locales/ms.jsonindex 9594a49..40ecdf9 100644--- a/public/locales/ms.json+++ b/public/locales/ms.json@@ -1943,6 +1943,29 @@"importPage.useTls": "Gunakan TLS","importPage.imapNote": "IMAP mengimport bahagian sumber yang dipilih secara automatik. Folder ditemui daripada akaun sumber dan diimport ke dalam folder Mailflare baharu atau sedia ada yang sepadan.","importPage.importSources": "Import sumber yang dipilih",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Fail Takeout",+ "importPage.takeoutHint": "Pilih fail .zip daripada Google Takeout, atau fail .mbox di dalamnya. Fail dibaca dalam pelayar anda; hanya mesej yang dimuat naik.",+ "importPage.takeoutKeepOpen": "Biarkan tab ini terbuka sehingga import selesai. Jika ia berhenti, pilih fail yang sama sekali lagi dan ia akan bersambung dari tempat ia berhenti.",+ "importPage.takeoutFolders": "Cipta folder daripada label Gmail",+ "importPage.takeoutSkipSpam": "Langkau spam",+ "importPage.takeoutSkipTrash": "Langkau sampah",+ "importPage.takeoutIgnoreLabels": "Label untuk diabaikan",+ "importPage.takeoutIgnoreHint": "Dipisahkan dengan koma. Akhiri label dengan / untuk turut mengabaikan semua label di bawahnya.",+ "importPage.takeoutPreview": "Pratonton",+ "importPage.takeoutStart": "Import",+ "importPage.takeoutStop": "Henti",+ "importPage.takeoutReading": "Membaca {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} mesej dibaca, {imported} diimport, {skipped} dilangkau",+ "importPage.takeoutResumed": "Bersambung selepas mesej {count}.",+ "importPage.takeoutNoMbox": "Tiada fail .mbox ditemui dalam {files}.",+ "importPage.takeoutUnsupported": "Pelayar ini tidak dapat menyahzip fail zip. Nyahzip arkib dan pilih fail .mbox.",+ "importPage.takeoutPreviewResult": "{count} mesej akan diimport:",+ "importPage.takeoutStopped": "Import dihentikan. Pilih fail yang sama sekali lagi untuk meneruskan.",+ "importPage.takeoutFolder": "Folder {name}",+ "importPage.takeoutTooLarge": "{count} mesej melebihi 24 MB telah dilangkau.",+ "importPage.takeoutIgnored": "{count} mesej spam atau sampah telah dilangkau.",+ "importPage.takeoutFailed": "{count} mesej tidak dapat diimport:","layout.resizeMenu": "Ubah saiz menu kiri","nav.loadingPage": "Memuatkan halaman","message.blockRemote": "Sekat kandungan jauh",diff --git a/public/locales/nl.json b/public/locales/nl.jsonindex 6e3cd87..2f39052 100644--- a/public/locales/nl.json+++ b/public/locales/nl.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS gebruiken","importPage.imapNote": "IMAP importeert geselecteerde bronsecties automatisch. Mappen worden ontdekt in het bronaccount en geïmporteerd in overeenkomende nieuwe of bestaande Mailflare-mappen.","importPage.importSources": "Geselecteerde bronnen importeren",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout-bestanden",+ "importPage.takeoutHint": "Kies de .zip-bestanden van Google Takeout, of het .mbox-bestand daarin. Ze worden in je browser gelezen; alleen de berichten worden geüpload.",+ "importPage.takeoutKeepOpen": "Houd dit tabblad open tot de import klaar is. Stopt hij, kies dan dezelfde bestanden opnieuw en hij gaat verder waar hij was gebleven.",+ "importPage.takeoutFolders": "Mappen maken van Gmail-labels",+ "importPage.takeoutSkipSpam": "Spam overslaan",+ "importPage.takeoutSkipTrash": "Prullenbak overslaan",+ "importPage.takeoutIgnoreLabels": "Te negeren labels",+ "importPage.takeoutIgnoreHint": "Gescheiden door komma's. Eindig een label met / om ook alle labels eronder te negeren.",+ "importPage.takeoutPreview": "Voorbeeld",+ "importPage.takeoutStart": "Importeren",+ "importPage.takeoutStop": "Stoppen",+ "importPage.takeoutReading": "{source} lezen ({index}/{count})",+ "importPage.takeoutCounts": "{read} berichten gelezen, {imported} geïmporteerd, {skipped} overgeslagen",+ "importPage.takeoutResumed": "Verder na bericht {count}.",+ "importPage.takeoutNoMbox": "Geen .mbox-bestand gevonden in {files}.",+ "importPage.takeoutUnsupported": "Deze browser kan geen zip-bestanden uitpakken. Pak het archief uit en kies in plaats daarvan het .mbox-bestand.",+ "importPage.takeoutPreviewResult": "{count} berichten zouden worden geïmporteerd:",+ "importPage.takeoutStopped": "Import gestopt. Kies dezelfde bestanden opnieuw om verder te gaan.",+ "importPage.takeoutFolder": "Map {name}",+ "importPage.takeoutTooLarge": "{count} berichten groter dan 24 MB zijn overgeslagen.",+ "importPage.takeoutIgnored": "{count} spam- of prullenbakberichten zijn overgeslagen.",+ "importPage.takeoutFailed": "{count} berichten konden niet worden geïmporteerd:","layout.resizeMenu": "Formaat van linkermenu aanpassen","nav.loadingPage": "Pagina laden","message.blockRemote": "Externe inhoud blokkeren",diff --git a/public/locales/pa.json b/public/locales/pa.jsonindex 3fb5aa8..e77c432 100644--- a/public/locales/pa.json+++ b/public/locales/pa.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS ਵਰਤੋ","importPage.imapNote": "IMAP ਚੁਣੇ ਸਰੋਤ ਭਾਗਾਂ ਨੂੰ ਆਪਣੇ-ਆਪ ਆਯਾਤ ਕਰਦਾ ਹੈ। ਫੋਲਡਰ ਸਰੋਤ ਖਾਤੇ ਤੋਂ ਖੋਜੇ ਜਾਂਦੇ ਹਨ ਅਤੇ ਮੇਲ ਖਾਂਦੇ ਨਵੇਂ ਜਾਂ ਮੌਜੂਦਾ Mailflare ਫੋਲਡਰਾਂ ਵਿੱਚ ਆਯਾਤ ਕੀਤੇ ਜਾਂਦੇ ਹਨ।","importPage.importSources": "ਚੁਣੇ ਸਰੋਤ ਆਯਾਤ ਕਰੋ",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ਫ਼ਾਈਲਾਂ",+ "importPage.takeoutHint": "Google Takeout ਦੀਆਂ .zip ਫ਼ਾਈਲਾਂ ਜਾਂ ਉਹਨਾਂ ਅੰਦਰਲੀ .mbox ਚੁਣੋ। ਇਹ ਤੁਹਾਡੇ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਪੜ੍ਹੀਆਂ ਜਾਂਦੀਆਂ ਹਨ; ਸਿਰਫ਼ ਸੁਨੇਹੇ ਅੱਪਲੋਡ ਹੁੰਦੇ ਹਨ।",+ "importPage.takeoutKeepOpen": "ਆਯਾਤ ਪੂਰਾ ਹੋਣ ਤੱਕ ਇਹ ਟੈਬ ਖੁੱਲ੍ਹੀ ਰੱਖੋ। ਜੇ ਇਹ ਰੁਕ ਜਾਵੇ, ਤਾਂ ਉਹੀ ਫ਼ਾਈਲਾਂ ਦੁਬਾਰਾ ਚੁਣੋ; ਇਹ ਉੱਥੋਂ ਹੀ ਜਾਰੀ ਰਹੇਗਾ।",+ "importPage.takeoutFolders": "Gmail ਲੇਬਲਾਂ ਤੋਂ ਫੋਲਡਰ ਬਣਾਓ",+ "importPage.takeoutSkipSpam": "ਸਪੈਮ ਛੱਡੋ",+ "importPage.takeoutSkipTrash": "ਰੱਦੀ ਛੱਡੋ",+ "importPage.takeoutIgnoreLabels": "ਅਣਡਿੱਠੇ ਕਰਨ ਵਾਲੇ ਲੇਬਲ",+ "importPage.takeoutIgnoreHint": "ਕਾਮੇ ਨਾਲ ਵੱਖ ਕਰੋ। ਹੇਠਲੇ ਸਾਰੇ ਲੇਬਲ ਵੀ ਅਣਡਿੱਠੇ ਕਰਨ ਲਈ ਲੇਬਲ ਦੇ ਅੰਤ ਵਿੱਚ / ਲਗਾਓ।",+ "importPage.takeoutPreview": "ਝਲਕ",+ "importPage.takeoutStart": "ਆਯਾਤ ਕਰੋ",+ "importPage.takeoutStop": "ਰੋਕੋ",+ "importPage.takeoutReading": "{source} ਪੜ੍ਹਿਆ ਜਾ ਰਿਹਾ ਹੈ ({index}/{count})",+ "importPage.takeoutCounts": "{read} ਸੁਨੇਹੇ ਪੜ੍ਹੇ, {imported} ਆਯਾਤ ਹੋਏ, {skipped} ਛੱਡੇ",+ "importPage.takeoutResumed": "ਸੁਨੇਹੇ {count} ਤੋਂ ਬਾਅਦ ਜਾਰੀ।",+ "importPage.takeoutNoMbox": "{files} ਵਿੱਚ ਕੋਈ .mbox ਫ਼ਾਈਲ ਨਹੀਂ ਮਿਲੀ।",+ "importPage.takeoutUnsupported": "ਇਹ ਬ੍ਰਾਊਜ਼ਰ zip ਫ਼ਾਈਲਾਂ ਨਹੀਂ ਖੋਲ੍ਹ ਸਕਦਾ। ਆਰਕਾਈਵ ਨੂੰ ਅਨਜ਼ਿਪ ਕਰੋ ਅਤੇ .mbox ਫ਼ਾਈਲ ਚੁਣੋ।",+ "importPage.takeoutPreviewResult": "{count} ਸੁਨੇਹੇ ਆਯਾਤ ਹੋਣਗੇ:",+ "importPage.takeoutStopped": "ਆਯਾਤ ਰੋਕਿਆ ਗਿਆ। ਜਾਰੀ ਰੱਖਣ ਲਈ ਉਹੀ ਫ਼ਾਈਲਾਂ ਦੁਬਾਰਾ ਚੁਣੋ।",+ "importPage.takeoutFolder": "ਫੋਲਡਰ {name}",+ "importPage.takeoutTooLarge": "24 MB ਤੋਂ ਵੱਡੇ {count} ਸੁਨੇਹੇ ਛੱਡੇ ਗਏ।",+ "importPage.takeoutIgnored": "ਸਪੈਮ ਜਾਂ ਰੱਦੀ ਦੇ {count} ਸੁਨੇਹੇ ਛੱਡੇ ਗਏ।",+ "importPage.takeoutFailed": "{count} ਸੁਨੇਹੇ ਆਯਾਤ ਨਹੀਂ ਹੋ ਸਕੇ:","layout.resizeMenu": "ਖੱਬੇ ਮੀਨੂ ਦਾ ਆਕਾਰ ਬਦਲੋ","nav.loadingPage": "ਪੰਨਾ ਲੋਡ ਹੋ ਰਿਹਾ ਹੈ","message.blockRemote": "ਰਿਮੋਟ ਸਮੱਗਰੀ ਬਲੌਕ ਕਰੋ",diff --git a/public/locales/pl.json b/public/locales/pl.jsonindex 9b314dd..04cc61f 100644--- a/public/locales/pl.json+++ b/public/locales/pl.json@@ -1973,6 +1973,29 @@"importPage.useTls": "Użyj TLS","importPage.imapNote": "IMAP automatycznie importuje wybrane sekcje źródłowe. Foldery są wykrywane na koncie źródłowym i importowane do pasujących nowych lub istniejących folderów Mailflare.","importPage.importSources": "Importuj wybrane źródła",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Pliki Takeout",+ "importPage.takeoutHint": "Wybierz pliki .zip z Google Takeout lub plik .mbox z ich wnętrza. Są odczytywane w przeglądarce; przesyłane są tylko wiadomości.",+ "importPage.takeoutKeepOpen": "Nie zamykaj tej karty, dopóki import się nie zakończy. Jeśli się przerwie, wybierz ponownie te same pliki, a import będzie kontynuowany od miejsca przerwania.",+ "importPage.takeoutFolders": "Utwórz foldery z etykiet Gmail",+ "importPage.takeoutSkipSpam": "Pomiń spam",+ "importPage.takeoutSkipTrash": "Pomiń kosz",+ "importPage.takeoutIgnoreLabels": "Etykiety do pominięcia",+ "importPage.takeoutIgnoreHint": "Oddzielone przecinkami. Zakończ etykietę znakiem /, aby pominąć także wszystkie etykiety pod nią.",+ "importPage.takeoutPreview": "Podgląd",+ "importPage.takeoutStart": "Importuj",+ "importPage.takeoutStop": "Zatrzymaj",+ "importPage.takeoutReading": "Odczyt {source} ({index}/{count})",+ "importPage.takeoutCounts": "Odczytano {read} wiadomości, zaimportowano {imported}, pominięto {skipped}",+ "importPage.takeoutResumed": "Kontynuacja po wiadomości {count}.",+ "importPage.takeoutNoMbox": "Nie znaleziono pliku .mbox w {files}.",+ "importPage.takeoutUnsupported": "Ta przeglądarka nie potrafi rozpakować plików zip. Rozpakuj archiwum i wybierz plik .mbox.",+ "importPage.takeoutPreviewResult": "Zostałoby zaimportowanych {count} wiadomości:",+ "importPage.takeoutStopped": "Import zatrzymany. Wybierz ponownie te same pliki, aby kontynuować.",+ "importPage.takeoutFolder": "Folder {name}",+ "importPage.takeoutTooLarge": "Pominięto {count} wiadomości większych niż 24 MB.",+ "importPage.takeoutIgnored": "Pominięto {count} wiadomości ze spamu lub kosza.",+ "importPage.takeoutFailed": "Nie udało się zaimportować {count} wiadomości:","layout.resizeMenu": "Zmień rozmiar lewego menu","nav.loadingPage": "Ładowanie strony","message.blockRemote": "Blokuj zawartość zdalną",diff --git a/public/locales/pt-BR.json b/public/locales/pt-BR.jsonindex f981c4d..6b15089 100644--- a/public/locales/pt-BR.json+++ b/public/locales/pt-BR.json@@ -1958,6 +1958,29 @@"importPage.useTls": "Usar TLS","importPage.imapNote": "O IMAP importa automaticamente as seções de origem selecionadas. As pastas são descobertas na conta de origem e importadas para pastas novas ou existentes do Mailflare.","importPage.importSources": "Importar as origens selecionadas",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Arquivos do Takeout",+ "importPage.takeoutHint": "Escolha os arquivos .zip do Google Takeout ou o .mbox dentro deles. Eles são lidos no seu navegador; apenas as mensagens são enviadas.",+ "importPage.takeoutKeepOpen": "Mantenha esta aba aberta até a importação terminar. Se ela parar, escolha os mesmos arquivos novamente e ela continuará de onde parou.",+ "importPage.takeoutFolders": "Criar pastas a partir dos marcadores do Gmail",+ "importPage.takeoutSkipSpam": "Ignorar spam",+ "importPage.takeoutSkipTrash": "Ignorar lixeira",+ "importPage.takeoutIgnoreLabels": "Marcadores a ignorar",+ "importPage.takeoutIgnoreHint": "Separados por vírgulas. Termine um marcador com / para ignorar também todos os marcadores abaixo dele.",+ "importPage.takeoutPreview": "Prévia",+ "importPage.takeoutStart": "Importar",+ "importPage.takeoutStop": "Parar",+ "importPage.takeoutReading": "Lendo {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} mensagens lidas, {imported} importadas, {skipped} ignoradas",+ "importPage.takeoutResumed": "Continuando após a mensagem {count}.",+ "importPage.takeoutNoMbox": "Nenhum arquivo .mbox encontrado em {files}.",+ "importPage.takeoutUnsupported": "Este navegador não consegue descompactar arquivos zip. Descompacte o arquivo e escolha o arquivo .mbox.",+ "importPage.takeoutPreviewResult": "{count} mensagens seriam importadas:",+ "importPage.takeoutStopped": "Importação interrompida. Escolha os mesmos arquivos novamente para continuar.",+ "importPage.takeoutFolder": "Pasta {name}",+ "importPage.takeoutTooLarge": "{count} mensagens acima de 24 MB foram ignoradas.",+ "importPage.takeoutIgnored": "{count} mensagens de spam ou da lixeira foram ignoradas.",+ "importPage.takeoutFailed": "Não foi possível importar {count} mensagens:","layout.resizeMenu": "Redimensionar menu lateral","nav.loadingPage": "Carregando página","message.blockRemote": "Bloquear conteúdo remoto",diff --git a/public/locales/pt-PT.json b/public/locales/pt-PT.jsonindex ee839c2..eeabfcc 100644--- a/public/locales/pt-PT.json+++ b/public/locales/pt-PT.json@@ -1958,6 +1958,29 @@"importPage.useTls": "Usar TLS","importPage.imapNote": "O IMAP importa automaticamente as seções de origem selecionadas. As pastas são descobertas na conta de origem e importadas para pastas novas ou existentes do Mailflare.","importPage.importSources": "Importar as origens selecionadas",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Ficheiros do Takeout",+ "importPage.takeoutHint": "Escolha os ficheiros .zip do Google Takeout ou o .mbox dentro deles. São lidos no seu navegador; apenas as mensagens são carregadas.",+ "importPage.takeoutKeepOpen": "Mantenha este separador aberto até a importação terminar. Se parar, escolha novamente os mesmos ficheiros e continuará onde ficou.",+ "importPage.takeoutFolders": "Criar pastas a partir das etiquetas do Gmail",+ "importPage.takeoutSkipSpam": "Ignorar spam",+ "importPage.takeoutSkipTrash": "Ignorar lixo",+ "importPage.takeoutIgnoreLabels": "Etiquetas a ignorar",+ "importPage.takeoutIgnoreHint": "Separadas por vírgulas. Termine uma etiqueta com / para ignorar também todas as etiquetas abaixo dela.",+ "importPage.takeoutPreview": "Pré-visualizar",+ "importPage.takeoutStart": "Importar",+ "importPage.takeoutStop": "Parar",+ "importPage.takeoutReading": "A ler {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} mensagens lidas, {imported} importadas, {skipped} ignoradas",+ "importPage.takeoutResumed": "A continuar após a mensagem {count}.",+ "importPage.takeoutNoMbox": "Nenhum ficheiro .mbox encontrado em {files}.",+ "importPage.takeoutUnsupported": "Este navegador não consegue descomprimir ficheiros zip. Descomprima o arquivo e escolha o ficheiro .mbox.",+ "importPage.takeoutPreviewResult": "Seriam importadas {count} mensagens:",+ "importPage.takeoutStopped": "Importação interrompida. Escolha novamente os mesmos ficheiros para continuar.",+ "importPage.takeoutFolder": "Pasta {name}",+ "importPage.takeoutTooLarge": "Foram ignoradas {count} mensagens com mais de 24 MB.",+ "importPage.takeoutIgnored": "Foram ignoradas {count} mensagens de spam ou do lixo.",+ "importPage.takeoutFailed": "Não foi possível importar {count} mensagens:","layout.resizeMenu": "Redimensionar menu lateral","nav.loadingPage": "A carregar página","message.blockRemote": "Bloquear conteúdo remoto",diff --git a/public/locales/ru.json b/public/locales/ru.jsonindex dffe1b6..064a656 100644--- a/public/locales/ru.json+++ b/public/locales/ru.json@@ -1973,6 +1973,29 @@"importPage.useTls": "Использовать TLS","importPage.imapNote": "IMAP автоматически импортирует выбранные разделы-источники. Папки обнаруживаются в исходном аккаунте и импортируются в соответствующие новые или существующие папки Mailflare.","importPage.importSources": "Импортировать выбранные источники",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Файлы Takeout",+ "importPage.takeoutHint": "Выберите .zip-файлы из Google Takeout или .mbox внутри них. Они читаются в браузере; загружаются только письма.",+ "importPage.takeoutKeepOpen": "Не закрывайте эту вкладку до завершения импорта. Если он прервётся, снова выберите те же файлы — импорт продолжится с того же места.",+ "importPage.takeoutFolders": "Создавать папки из ярлыков Gmail",+ "importPage.takeoutSkipSpam": "Пропускать спам",+ "importPage.takeoutSkipTrash": "Пропускать корзину",+ "importPage.takeoutIgnoreLabels": "Игнорируемые ярлыки",+ "importPage.takeoutIgnoreHint": "Через запятую. Добавьте / в конце ярлыка, чтобы игнорировать и все вложенные ярлыки.",+ "importPage.takeoutPreview": "Предпросмотр",+ "importPage.takeoutStart": "Импортировать",+ "importPage.takeoutStop": "Остановить",+ "importPage.takeoutReading": "Чтение {source} ({index}/{count})",+ "importPage.takeoutCounts": "Прочитано писем: {read}, импортировано: {imported}, пропущено: {skipped}",+ "importPage.takeoutResumed": "Продолжение после письма {count}.",+ "importPage.takeoutNoMbox": "В {files} не найден файл .mbox.",+ "importPage.takeoutUnsupported": "Этот браузер не может распаковывать zip-файлы. Распакуйте архив и выберите файл .mbox.",+ "importPage.takeoutPreviewResult": "Будет импортировано писем: {count}:",+ "importPage.takeoutStopped": "Импорт остановлен. Снова выберите те же файлы, чтобы продолжить.",+ "importPage.takeoutFolder": "Папка {name}",+ "importPage.takeoutTooLarge": "Пропущено писем больше 24 МБ: {count}.",+ "importPage.takeoutIgnored": "Пропущено писем из спама или корзины: {count}.",+ "importPage.takeoutFailed": "Не удалось импортировать писем: {count}:","layout.resizeMenu": "Изменить размер левого меню","nav.loadingPage": "Загрузка страницы","message.blockRemote": "Блокировать внешнее содержимое",diff --git a/public/locales/si.json b/public/locales/si.jsonindex 6760254..ef26750 100644--- a/public/locales/si.json+++ b/public/locales/si.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS භාවිත කරන්න","importPage.imapNote": "IMAP මගින් තෝරාගත් මූලාශ්ර කොටස් ස්වයංක්රීයව ආයාත කෙරේ. ෆෝල්ඩර මූලාශ්ර ගිණුමෙන් සොයාගෙන, ගැළපෙන නව හෝ පවතින Mailflare ෆෝල්ඩර වෙත ආයාත කෙරේ.","importPage.importSources": "තෝරාගත් මූලාශ්ර ආයාත කරන්න",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ගොනු",+ "importPage.takeoutHint": "Google Takeout හි .zip ගොනු හෝ ඒවා තුළ ඇති .mbox තෝරන්න. ඒවා ඔබගේ බ්රවුසරයේ කියවනු ලැබේ; පණිවිඩ පමණක් උඩුගත කෙරේ.",+ "importPage.takeoutKeepOpen": "ආයාතය අවසන් වන තුරු මෙම ටැබය විවෘතව තබන්න. එය නැවතුණොත්, එම ගොනු නැවත තෝරන්න; නැවතුණු තැන සිට දිගටම කරයි.",+ "importPage.takeoutFolders": "Gmail ලේබල වලින් ෆෝල්ඩර සාදන්න",+ "importPage.takeoutSkipSpam": "ස්පෑම් මඟහරින්න",+ "importPage.takeoutSkipTrash": "කුණු බඳුන මඟහරින්න",+ "importPage.takeoutIgnoreLabels": "නොසලකා හැරිය යුතු ලේබල",+ "importPage.takeoutIgnoreHint": "කොමා මඟින් වෙන් කරන්න. ඊට පහළ සියලු ලේබල ද නොසලකා හැරීමට ලේබලය / මඟින් අවසන් කරන්න.",+ "importPage.takeoutPreview": "පෙරදසුන",+ "importPage.takeoutStart": "ආයාත කරන්න",+ "importPage.takeoutStop": "නවත්වන්න",+ "importPage.takeoutReading": "{source} කියවමින් ({index}/{count})",+ "importPage.takeoutCounts": "පණිවිඩ {read} ක් කියවා ඇත, {imported} ක් ආයාත කළා, {skipped} ක් මඟහැරියා",+ "importPage.takeoutResumed": "පණිවිඩය {count} න් පසු සිට දිගටම.",+ "importPage.takeoutNoMbox": "{files} තුළ .mbox ගොනුවක් හමු නොවීය.",+ "importPage.takeoutUnsupported": "මෙම බ්රවුසරයට zip ගොනු විවෘත කළ නොහැක. සංරක්ෂිතය දිගහැර .mbox ගොනුව තෝරන්න.",+ "importPage.takeoutPreviewResult": "පණිවිඩ {count} ක් ආයාත වනු ඇත:",+ "importPage.takeoutStopped": "ආයාතය නැවැත්විණි. දිගටම කිරීමට එම ගොනු නැවත තෝරන්න.",+ "importPage.takeoutFolder": "ෆෝල්ඩරය {name}",+ "importPage.takeoutTooLarge": "24 MB ට වැඩි පණිවිඩ {count} ක් මඟහැරිණි.",+ "importPage.takeoutIgnored": "ස්පෑම් හෝ කුණු බඳුනේ පණිවිඩ {count} ක් මඟහැරිණි.",+ "importPage.takeoutFailed": "පණිවිඩ {count} ක් ආයාත කළ නොහැකි විය:","layout.resizeMenu": "වම් මෙනුවේ ප්රමාණය වෙනස් කරන්න","nav.loadingPage": "පිටුව පූරණය වෙමින්","message.blockRemote": "දුරස්ථ අන්තර්ගතය අවහිර කරන්න",diff --git a/public/locales/sw.json b/public/locales/sw.jsonindex 7be70eb..55c1ee2 100644--- a/public/locales/sw.json+++ b/public/locales/sw.json@@ -1943,6 +1943,29 @@"importPage.useTls": "Tumia TLS","importPage.imapNote": "IMAP huleta sehemu za chanzo zilizochaguliwa kiotomatiki. Folda hugunduliwa kutoka akaunti ya chanzo na kuletwa kwenye folda mpya au zilizopo zinazolingana za Mailflare.","importPage.importSources": "Leta vyanzo vilivyochaguliwa",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Faili za Takeout",+ "importPage.takeoutHint": "Chagua faili za .zip kutoka Google Takeout, au faili ya .mbox iliyo ndani yake. Zinasomwa kwenye kivinjari chako; ujumbe pekee ndio hupakiwa.",+ "importPage.takeoutKeepOpen": "Acha kichupo hiki wazi hadi uingizaji ukamilike. Ukisimama, chagua faili zile zile tena na utaendelea pale ulipoishia.",+ "importPage.takeoutFolders": "Unda folda kutoka lebo za Gmail",+ "importPage.takeoutSkipSpam": "Ruka barua taka",+ "importPage.takeoutSkipTrash": "Ruka tupio",+ "importPage.takeoutIgnoreLabels": "Lebo za kupuuza",+ "importPage.takeoutIgnoreHint": "Zimetenganishwa kwa koma. Malizia lebo kwa / ili kupuuza pia lebo zote zilizo chini yake.",+ "importPage.takeoutPreview": "Hakiki",+ "importPage.takeoutStart": "Ingiza",+ "importPage.takeoutStop": "Simamisha",+ "importPage.takeoutReading": "Inasoma {source} ({index}/{count})",+ "importPage.takeoutCounts": "Ujumbe {read} umesomwa, {imported} umeingizwa, {skipped} umerukwa",+ "importPage.takeoutResumed": "Inaendelea baada ya ujumbe {count}.",+ "importPage.takeoutNoMbox": "Hakuna faili ya .mbox iliyopatikana katika {files}.",+ "importPage.takeoutUnsupported": "Kivinjari hiki hakiwezi kufungua faili za zip. Fungua kumbukumbu kisha uchague faili ya .mbox.",+ "importPage.takeoutPreviewResult": "Ujumbe {count} utaingizwa:",+ "importPage.takeoutStopped": "Uingizaji umesimamishwa. Chagua faili zile zile tena ili kuendelea.",+ "importPage.takeoutFolder": "Folda {name}",+ "importPage.takeoutTooLarge": "Ujumbe {count} wenye zaidi ya MB 24 umerukwa.",+ "importPage.takeoutIgnored": "Ujumbe {count} wa barua taka au tupio umerukwa.",+ "importPage.takeoutFailed": "Ujumbe {count} haukuweza kuingizwa:","layout.resizeMenu": "Badilisha ukubwa wa menyu ya kushoto","nav.loadingPage": "Inapakia ukurasa","message.blockRemote": "Zuia maudhui ya mbali",diff --git a/public/locales/ta.json b/public/locales/ta.jsonindex 3ea4796..65b72df 100644--- a/public/locales/ta.json+++ b/public/locales/ta.json@@ -1943,6 +1943,29 @@"importPage.useTls": "TLS ஐப் பயன்படுத்து","importPage.imapNote": "IMAP தேர்ந்தெடுத்த மூலப் பிரிவுகளைத் தானாக இறக்குமதி செய்கிறது. கோப்புறைகள் மூலக் கணக்கிலிருந்து கண்டறியப்பட்டு, பொருந்தும் புதிய அல்லது இருக்கும் Mailflare கோப்புறைகளில் இறக்குமதி செய்யப்படுகின்றன.","importPage.importSources": "தேர்ந்தெடுத்த மூலங்களை இறக்குமதி செய்",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout கோப்புகள்",+ "importPage.takeoutHint": "Google Takeout இன் .zip கோப்புகளை அல்லது அவற்றுக்குள் உள்ள .mbox ஐத் தேர்ந்தெடுக்கவும். அவை உங்கள் உலாவியில் படிக்கப்படும்; செய்திகள் மட்டுமே பதிவேற்றப்படும்.",+ "importPage.takeoutKeepOpen": "இறக்குமதி முடியும் வரை இந்தத் தாவலைத் திறந்தே வைக்கவும். அது நின்றால், அதே கோப்புகளை மீண்டும் தேர்ந்தெடுக்கவும்; நின்ற இடத்திலிருந்து தொடரும்.",+ "importPage.takeoutFolders": "Gmail லேபிள்களிலிருந்து கோப்புறைகளை உருவாக்கு",+ "importPage.takeoutSkipSpam": "ஸ்பேமைத் தவிர்",+ "importPage.takeoutSkipTrash": "குப்பையைத் தவிர்",+ "importPage.takeoutIgnoreLabels": "புறக்கணிக்க வேண்டிய லேபிள்கள்",+ "importPage.takeoutIgnoreHint": "காற்புள்ளியால் பிரிக்கவும். கீழுள்ள எல்லா லேபிள்களையும் புறக்கணிக்க லேபிளை / உடன் முடிக்கவும்.",+ "importPage.takeoutPreview": "முன்னோட்டம்",+ "importPage.takeoutStart": "இறக்குமதி செய்",+ "importPage.takeoutStop": "நிறுத்து",+ "importPage.takeoutReading": "{source} படிக்கப்படுகிறது ({index}/{count})",+ "importPage.takeoutCounts": "{read} செய்திகள் படிக்கப்பட்டன, {imported} இறக்குமதி, {skipped} தவிர்க்கப்பட்டன",+ "importPage.takeoutResumed": "செய்தி {count} க்குப் பிறகு தொடர்கிறது.",+ "importPage.takeoutNoMbox": "{files} இல் .mbox கோப்பு இல்லை.",+ "importPage.takeoutUnsupported": "இந்த உலாவியால் zip கோப்புகளைத் திறக்க முடியாது. காப்பகத்தை அன்சிப் செய்து .mbox கோப்பைத் தேர்ந்தெடுக்கவும்.",+ "importPage.takeoutPreviewResult": "{count} செய்திகள் இறக்குமதி செய்யப்படும்:",+ "importPage.takeoutStopped": "இறக்குமதி நிறுத்தப்பட்டது. தொடர அதே கோப்புகளை மீண்டும் தேர்ந்தெடுக்கவும்.",+ "importPage.takeoutFolder": "கோப்புறை {name}",+ "importPage.takeoutTooLarge": "24 MB க்கு மேற்பட்ட {count} செய்திகள் தவிர்க்கப்பட்டன.",+ "importPage.takeoutIgnored": "ஸ்பேம் அல்லது குப்பையிலுள்ள {count} செய்திகள் தவிர்க்கப்பட்டன.",+ "importPage.takeoutFailed": "{count} செய்திகளை இறக்குமதி செய்ய முடியவில்லை:","layout.resizeMenu": "இடது மெனுவின் அளவை மாற்று","nav.loadingPage": "பக்கம் ஏற்றப்படுகிறது","message.blockRemote": "தொலைநிலை உள்ளடக்கத்தைத் தடு",diff --git a/public/locales/te.json b/public/locales/te.jsonindex 2841a38..02ce84d 100644--- a/public/locales/te.json+++ b/public/locales/te.json@@ -1941,6 +1941,29 @@"importPage.useTls": "TLS ఉపయోగించండి","importPage.imapNote": "IMAP ఎంచుకున్న మూలం విభాగాలను స్వయంచాలకంగా దిగుమతి చేస్తుంది. ఫోల్డర్లు మూలం ఖాతా నుండి కనుగొనబడి, సరిపోలే కొత్త లేదా ఉన్న Mailflare ఫోల్డర్లలోకి దిగుమతి చేయబడతాయి.","importPage.importSources": "ఎంచుకున్న మూలాలను దిగుమతి చేయండి",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout ఫైల్లు",+ "importPage.takeoutHint": "Google Takeout యొక్క .zip ఫైల్లను లేదా వాటిలోని .mbox ను ఎంచుకోండి. అవి మీ బ్రౌజర్లో చదవబడతాయి; సందేశాలు మాత్రమే అప్లోడ్ అవుతాయి.",+ "importPage.takeoutKeepOpen": "దిగుమతి పూర్తయ్యే వరకు ఈ ట్యాబ్ను తెరిచి ఉంచండి. ఆగిపోతే, అవే ఫైల్లను మళ్లీ ఎంచుకోండి; ఆగిన చోట నుండి కొనసాగుతుంది.",+ "importPage.takeoutFolders": "Gmail లేబుల్ల నుండి ఫోల్డర్లను సృష్టించండి",+ "importPage.takeoutSkipSpam": "స్పామ్ను దాటవేయండి",+ "importPage.takeoutSkipTrash": "ట్రాష్ను దాటవేయండి",+ "importPage.takeoutIgnoreLabels": "విస్మరించాల్సిన లేబుల్లు",+ "importPage.takeoutIgnoreHint": "కామాలతో వేరు చేయండి. దాని కింద ఉన్న అన్ని లేబుల్లను కూడా విస్మరించడానికి లేబుల్ను / తో ముగించండి.",+ "importPage.takeoutPreview": "ప్రివ్యూ",+ "importPage.takeoutStart": "దిగుమతి చేయండి",+ "importPage.takeoutStop": "ఆపండి",+ "importPage.takeoutReading": "{source} చదువుతోంది ({index}/{count})",+ "importPage.takeoutCounts": "{read} సందేశాలు చదవబడ్డాయి, {imported} దిగుమతి, {skipped} దాటవేయబడ్డాయి",+ "importPage.takeoutResumed": "సందేశం {count} తర్వాత నుండి కొనసాగుతోంది.",+ "importPage.takeoutNoMbox": "{files} లో .mbox ఫైల్ కనుగొనబడలేదు.",+ "importPage.takeoutUnsupported": "ఈ బ్రౌజర్ zip ఫైల్లను తెరవలేదు. ఆర్కైవ్ను అన్జిప్ చేసి .mbox ఫైల్ను ఎంచుకోండి.",+ "importPage.takeoutPreviewResult": "{count} సందేశాలు దిగుమతి అవుతాయి:",+ "importPage.takeoutStopped": "దిగుమతి ఆపబడింది. కొనసాగించడానికి అవే ఫైల్లను మళ్లీ ఎంచుకోండి.",+ "importPage.takeoutFolder": "ఫోల్డర్ {name}",+ "importPage.takeoutTooLarge": "24 MB కంటే పెద్ద {count} సందేశాలు దాటవేయబడ్డాయి.",+ "importPage.takeoutIgnored": "స్పామ్ లేదా ట్రాష్లోని {count} సందేశాలు దాటవేయబడ్డాయి.",+ "importPage.takeoutFailed": "{count} సందేశాలను దిగుమతి చేయలేకపోయాము:","layout.resizeMenu": "ఎడమ మెనూ పరిమాణాన్ని మార్చండి","nav.loadingPage": "పేజీ లోడ్ అవుతోంది","message.blockRemote": "రిమోట్ కంటెంట్ను బ్లాక్ చేయండి",diff --git a/public/locales/th.json b/public/locales/th.jsonindex 9fcf587..ee97426 100644--- a/public/locales/th.json+++ b/public/locales/th.json@@ -1943,6 +1943,29 @@"importPage.useTls": "ใช้ TLS","importPage.imapNote": "IMAP นำเข้าส่วนต้นทางที่เลือกโดยอัตโนมัติ โฟลเดอร์จะถูกค้นพบจากบัญชีต้นทางและนำเข้าไปยังโฟลเดอร์ Mailflare ใหม่หรือที่มีอยู่ที่ตรงกัน","importPage.importSources": "นำเข้าต้นทางที่เลือก",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "ไฟล์ Takeout",+ "importPage.takeoutHint": "เลือกไฟล์ .zip จาก Google Takeout หรือไฟล์ .mbox ข้างใน ไฟล์จะถูกอ่านในเบราว์เซอร์ และอัปโหลดเฉพาะข้อความเท่านั้น",+ "importPage.takeoutKeepOpen": "เปิดแท็บนี้ไว้จนกว่าการนำเข้าจะเสร็จ หากหยุดไป ให้เลือกไฟล์เดิมอีกครั้งแล้วจะทำต่อจากจุดที่ค้างไว้",+ "importPage.takeoutFolders": "สร้างโฟลเดอร์จากป้ายกำกับ Gmail",+ "importPage.takeoutSkipSpam": "ข้ามสแปม",+ "importPage.takeoutSkipTrash": "ข้ามถังขยะ",+ "importPage.takeoutIgnoreLabels": "ป้ายกำกับที่จะละเว้น",+ "importPage.takeoutIgnoreHint": "คั่นด้วยจุลภาค ลงท้ายป้ายกำกับด้วย / เพื่อละเว้นป้ายกำกับทั้งหมดที่อยู่ข้างใต้ด้วย",+ "importPage.takeoutPreview": "ดูตัวอย่าง",+ "importPage.takeoutStart": "นำเข้า",+ "importPage.takeoutStop": "หยุด",+ "importPage.takeoutReading": "กำลังอ่าน {source} ({index}/{count})",+ "importPage.takeoutCounts": "อ่านแล้ว {read} ข้อความ นำเข้า {imported} ข้าม {skipped}",+ "importPage.takeoutResumed": "ทำต่อหลังข้อความที่ {count}",+ "importPage.takeoutNoMbox": "ไม่พบไฟล์ .mbox ใน {files}",+ "importPage.takeoutUnsupported": "เบราว์เซอร์นี้แตกไฟล์ zip ไม่ได้ ให้แตกไฟล์เก็บถาวรแล้วเลือกไฟล์ .mbox แทน",+ "importPage.takeoutPreviewResult": "จะนำเข้า {count} ข้อความ:",+ "importPage.takeoutStopped": "หยุดการนำเข้าแล้ว เลือกไฟล์เดิมอีกครั้งเพื่อทำต่อ",+ "importPage.takeoutFolder": "โฟลเดอร์ {name}",+ "importPage.takeoutTooLarge": "ข้ามข้อความที่ใหญ่กว่า 24 MB จำนวน {count} ข้อความ",+ "importPage.takeoutIgnored": "ข้ามข้อความสแปมหรือถังขยะ {count} ข้อความ",+ "importPage.takeoutFailed": "นำเข้าไม่ได้ {count} ข้อความ:","layout.resizeMenu": "ปรับขนาดเมนูด้านซ้าย","nav.loadingPage": "กำลังโหลดหน้า","message.blockRemote": "บล็อกเนื้อหาระยะไกล",diff --git a/public/locales/tr.json b/public/locales/tr.jsonindex 4840219..107a0b8 100644--- a/public/locales/tr.json+++ b/public/locales/tr.json@@ -1892,6 +1892,29 @@"importPage.useTls": "TLS kullan","importPage.imapNote": "IMAP, seçili kaynak bölümlerini otomatik olarak içe aktarır. Klasörler kaynak hesaptan keşfedilir ve eşleşen yeni veya mevcut Mailflare klasörlerine aktarılır.","importPage.importSources": "Seçili kaynakları içe aktar",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout dosyaları",+ "importPage.takeoutHint": "Google Takeout'tan gelen .zip dosyalarını veya içindeki .mbox dosyasını seçin. Dosyalar tarayıcınızda okunur; yalnızca iletiler yüklenir.",+ "importPage.takeoutKeepOpen": "İçe aktarma bitene kadar bu sekmeyi açık tutun. Durursa aynı dosyaları yeniden seçin; kaldığı yerden devam eder.",+ "importPage.takeoutFolders": "Gmail etiketlerinden klasör oluştur",+ "importPage.takeoutSkipSpam": "Spam'i atla",+ "importPage.takeoutSkipTrash": "Çöp kutusunu atla",+ "importPage.takeoutIgnoreLabels": "Yok sayılacak etiketler",+ "importPage.takeoutIgnoreHint": "Virgülle ayrılmış. Altındaki tüm etiketleri de yok saymak için etiketi / ile bitirin.",+ "importPage.takeoutPreview": "Önizleme",+ "importPage.takeoutStart": "İçe aktar",+ "importPage.takeoutStop": "Durdur",+ "importPage.takeoutReading": "{source} okunuyor ({index}/{count})",+ "importPage.takeoutCounts": "{read} ileti okundu, {imported} içe aktarıldı, {skipped} atlandı",+ "importPage.takeoutResumed": "{count}. iletiden sonra devam ediliyor.",+ "importPage.takeoutNoMbox": "{files} içinde .mbox dosyası bulunamadı.",+ "importPage.takeoutUnsupported": "Bu tarayıcı zip dosyalarını açamıyor. Arşivi açın ve bunun yerine .mbox dosyasını seçin.",+ "importPage.takeoutPreviewResult": "{count} ileti içe aktarılacak:",+ "importPage.takeoutStopped": "İçe aktarma durduruldu. Devam etmek için aynı dosyaları yeniden seçin.",+ "importPage.takeoutFolder": "{name} klasörü",+ "importPage.takeoutTooLarge": "24 MB'tan büyük {count} ileti atlandı.",+ "importPage.takeoutIgnored": "{count} spam veya çöp kutusu iletisi atlandı.",+ "importPage.takeoutFailed": "{count} ileti içe aktarılamadı:","layout.resizeMenu": "Sol menüyü yeniden boyutlandır","nav.loadingPage": "Sayfa yükleniyor","message.blockRemote": "Uzak içeriği engelle",diff --git a/public/locales/uk.json b/public/locales/uk.jsonindex 878fa13..aa6d15b 100644--- a/public/locales/uk.json+++ b/public/locales/uk.json@@ -1973,6 +1973,29 @@"importPage.useTls": "Використовувати TLS","importPage.imapNote": "IMAP автоматично імпортує вибрані розділи джерела. Папки виявляються з облікового запису джерела та імпортуються до відповідних нових або наявних папок Mailflare.","importPage.importSources": "Імпортувати вибрані джерела",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Файли Takeout",+ "importPage.takeoutHint": "Виберіть .zip-файли з Google Takeout або .mbox усередині них. Вони читаються в браузері; завантажуються лише листи.",+ "importPage.takeoutKeepOpen": "Не закривайте цю вкладку до завершення імпорту. Якщо він перерветься, знову виберіть ті самі файли — імпорт продовжиться з того ж місця.",+ "importPage.takeoutFolders": "Створювати папки з міток Gmail",+ "importPage.takeoutSkipSpam": "Пропускати спам",+ "importPage.takeoutSkipTrash": "Пропускати кошик",+ "importPage.takeoutIgnoreLabels": "Мітки, які ігнорувати",+ "importPage.takeoutIgnoreHint": "Через кому. Додайте / в кінці мітки, щоб ігнорувати й усі вкладені мітки.",+ "importPage.takeoutPreview": "Попередній перегляд",+ "importPage.takeoutStart": "Імпортувати",+ "importPage.takeoutStop": "Зупинити",+ "importPage.takeoutReading": "Читання {source} ({index}/{count})",+ "importPage.takeoutCounts": "Прочитано листів: {read}, імпортовано: {imported}, пропущено: {skipped}",+ "importPage.takeoutResumed": "Продовження після листа {count}.",+ "importPage.takeoutNoMbox": "У {files} не знайдено файлу .mbox.",+ "importPage.takeoutUnsupported": "Цей браузер не може розпаковувати zip-файли. Розпакуйте архів і виберіть файл .mbox.",+ "importPage.takeoutPreviewResult": "Буде імпортовано листів: {count}:",+ "importPage.takeoutStopped": "Імпорт зупинено. Знову виберіть ті самі файли, щоб продовжити.",+ "importPage.takeoutFolder": "Папка {name}",+ "importPage.takeoutTooLarge": "Пропущено листів понад 24 МБ: {count}.",+ "importPage.takeoutIgnored": "Пропущено листів зі спаму або кошика: {count}.",+ "importPage.takeoutFailed": "Не вдалося імпортувати листів: {count}:","layout.resizeMenu": "Змінити розмір лівого меню","nav.loadingPage": "Завантаження сторінки","message.blockRemote": "Блокувати віддалений вміст",diff --git a/public/locales/ur.json b/public/locales/ur.jsonindex 943d7a0..9b47f8d 100644--- a/public/locales/ur.json+++ b/public/locales/ur.json@@ -1941,6 +1941,29 @@"importPage.useTls": "TLS استعمال کریں","importPage.imapNote": "IMAP منتخب ماخذ حصوں کو خودکار طور پر درآمد کرتا ہے۔ فولڈرز ماخذ اکاؤنٹ سے تلاش کیے جاتے ہیں اور مماثل نئے یا موجودہ Mailflare فولڈرز میں درآمد کیے جاتے ہیں۔","importPage.importSources": "منتخب ماخذ درآمد کریں",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout فائلیں",+ "importPage.takeoutHint": "Google Takeout کی .zip فائلیں یا ان کے اندر موجود .mbox منتخب کریں۔ یہ آپ کے براؤزر میں پڑھی جاتی ہیں؛ صرف پیغامات اپ لوڈ ہوتے ہیں۔",+ "importPage.takeoutKeepOpen": "امپورٹ مکمل ہونے تک یہ ٹیب کھلا رکھیں۔ اگر یہ رک جائے تو وہی فائلیں دوبارہ منتخب کریں، یہ وہیں سے جاری رہے گا۔",+ "importPage.takeoutFolders": "Gmail لیبلز سے فولڈر بنائیں",+ "importPage.takeoutSkipSpam": "اسپام چھوڑیں",+ "importPage.takeoutSkipTrash": "ردی چھوڑیں",+ "importPage.takeoutIgnoreLabels": "نظرانداز کیے جانے والے لیبل",+ "importPage.takeoutIgnoreHint": "کوما سے الگ کریں۔ لیبل کے آخر میں / لگائیں تاکہ اس کے نیچے کے تمام لیبل بھی نظرانداز ہوں۔",+ "importPage.takeoutPreview": "پیش منظر",+ "importPage.takeoutStart": "امپورٹ کریں",+ "importPage.takeoutStop": "روکیں",+ "importPage.takeoutReading": "{source} پڑھا جا رہا ہے ({index}/{count})",+ "importPage.takeoutCounts": "{read} پیغامات پڑھے گئے، {imported} امپورٹ ہوئے، {skipped} چھوڑے گئے",+ "importPage.takeoutResumed": "پیغام {count} کے بعد سے جاری۔",+ "importPage.takeoutNoMbox": "{files} میں کوئی .mbox فائل نہیں ملی۔",+ "importPage.takeoutUnsupported": "یہ براؤزر zip فائلیں نہیں کھول سکتا۔ آرکائیو کو ان زِپ کریں اور .mbox فائل منتخب کریں۔",+ "importPage.takeoutPreviewResult": "{count} پیغامات امپورٹ ہوں گے:",+ "importPage.takeoutStopped": "امپورٹ روک دیا گیا۔ جاری رکھنے کے لیے وہی فائلیں دوبارہ منتخب کریں۔",+ "importPage.takeoutFolder": "فولڈر {name}",+ "importPage.takeoutTooLarge": "24 MB سے بڑے {count} پیغامات چھوڑ دیے گئے۔",+ "importPage.takeoutIgnored": "اسپام یا ردی کے {count} پیغامات چھوڑ دیے گئے۔",+ "importPage.takeoutFailed": "{count} پیغامات امپورٹ نہیں ہو سکے:","layout.resizeMenu": "بائیں مینو کا سائز تبدیل کریں","nav.loadingPage": "صفحہ لوڈ ہو رہا ہے","message.blockRemote": "بیرونی مواد بلاک کریں",diff --git a/public/locales/vi.json b/public/locales/vi.jsonindex 01a74b6..23a6250 100644--- a/public/locales/vi.json+++ b/public/locales/vi.json@@ -1928,6 +1928,29 @@"importPage.useTls": "Dùng TLS","importPage.imapNote": "IMAP tự động nhập các mục nguồn đã chọn. Các thư mục được khám phá từ tài khoản nguồn và nhập vào các thư mục Mailflare mới hoặc có sẵn tương ứng.","importPage.importSources": "Nhập các nguồn đã chọn",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Tệp Takeout",+ "importPage.takeoutHint": "Chọn các tệp .zip từ Google Takeout hoặc tệp .mbox bên trong. Tệp được đọc trong trình duyệt của bạn; chỉ thư được tải lên.",+ "importPage.takeoutKeepOpen": "Hãy giữ tab này mở cho đến khi nhập xong. Nếu bị dừng, hãy chọn lại đúng các tệp đó và quá trình sẽ tiếp tục từ chỗ đã dừng.",+ "importPage.takeoutFolders": "Tạo thư mục từ nhãn Gmail",+ "importPage.takeoutSkipSpam": "Bỏ qua thư rác",+ "importPage.takeoutSkipTrash": "Bỏ qua thùng rác",+ "importPage.takeoutIgnoreLabels": "Nhãn cần bỏ qua",+ "importPage.takeoutIgnoreHint": "Phân tách bằng dấu phẩy. Kết thúc nhãn bằng / để bỏ qua cả mọi nhãn bên dưới.",+ "importPage.takeoutPreview": "Xem trước",+ "importPage.takeoutStart": "Nhập",+ "importPage.takeoutStop": "Dừng",+ "importPage.takeoutReading": "Đang đọc {source} ({index}/{count})",+ "importPage.takeoutCounts": "Đã đọc {read} thư, đã nhập {imported}, đã bỏ qua {skipped}",+ "importPage.takeoutResumed": "Tiếp tục sau thư thứ {count}.",+ "importPage.takeoutNoMbox": "Không tìm thấy tệp .mbox trong {files}.",+ "importPage.takeoutUnsupported": "Trình duyệt này không giải nén được tệp zip. Hãy giải nén tệp lưu trữ và chọn tệp .mbox.",+ "importPage.takeoutPreviewResult": "Sẽ nhập {count} thư:",+ "importPage.takeoutStopped": "Đã dừng nhập. Chọn lại đúng các tệp đó để tiếp tục.",+ "importPage.takeoutFolder": "Thư mục {name}",+ "importPage.takeoutTooLarge": "Đã bỏ qua {count} thư lớn hơn 24 MB.",+ "importPage.takeoutIgnored": "Đã bỏ qua {count} thư rác hoặc trong thùng rác.",+ "importPage.takeoutFailed": "Không thể nhập {count} thư:","layout.resizeMenu": "Đổi kích thước menu bên trái","nav.loadingPage": "Đang tải trang","message.blockRemote": "Chặn nội dung từ xa",diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.jsonindex 5cf0ce5..d784518 100644--- a/public/locales/zh-CN.json+++ b/public/locales/zh-CN.json@@ -1928,6 +1928,29 @@"importPage.useTls": "使用 TLS","importPage.imapNote": "IMAP 会自动导入所选的来源分区。系统会从来源账户中发现文件夹,并导入到对应的新建或现有 Mailflare 文件夹中。","importPage.importSources": "导入所选来源",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout 文件",+ "importPage.takeoutHint": "选择 Google Takeout 导出的 .zip 文件或其中的 .mbox 文件。文件在浏览器中读取,只上传邮件。",+ "importPage.takeoutKeepOpen": "导入完成前请保持此标签页打开。如果中断,再次选择相同的文件即可从中断处继续。",+ "importPage.takeoutFolders": "根据 Gmail 标签创建文件夹",+ "importPage.takeoutSkipSpam": "跳过垃圾邮件",+ "importPage.takeoutSkipTrash": "跳过已删除邮件",+ "importPage.takeoutIgnoreLabels": "要忽略的标签",+ "importPage.takeoutIgnoreHint": "用逗号分隔。标签以 / 结尾时,其下所有标签也会被忽略。",+ "importPage.takeoutPreview": "预览",+ "importPage.takeoutStart": "导入",+ "importPage.takeoutStop": "停止",+ "importPage.takeoutReading": "正在读取 {source}({index}/{count})",+ "importPage.takeoutCounts": "已读取 {read} 封,已导入 {imported} 封,已跳过 {skipped} 封",+ "importPage.takeoutResumed": "从第 {count} 封邮件之后继续。",+ "importPage.takeoutNoMbox": "在 {files} 中未找到 .mbox 文件。",+ "importPage.takeoutUnsupported": "此浏览器无法解压 zip 文件。请先解压,然后选择 .mbox 文件。",+ "importPage.takeoutPreviewResult": "将导入 {count} 封邮件:",+ "importPage.takeoutStopped": "导入已停止。再次选择相同的文件即可继续。",+ "importPage.takeoutFolder": "文件夹 {name}",+ "importPage.takeoutTooLarge": "已跳过 {count} 封超过 24 MB 的邮件。",+ "importPage.takeoutIgnored": "已跳过 {count} 封垃圾邮件或已删除邮件。",+ "importPage.takeoutFailed": "{count} 封邮件无法导入:","layout.resizeMenu": "调整左侧菜单大小","nav.loadingPage": "正在加载页面","message.blockRemote": "阻止远程内容",diff --git a/scripts/import-gmail-takeout.mjs b/scripts/import-gmail-takeout.mjsnew file mode 100644index 0000000..afb242f--- /dev/null+++ b/scripts/import-gmail-takeout.mjs@@ -0,0 +1,219 @@+/**+ * Imports a Google Takeout Gmail export (.mbox) into a Mailflare mailbox from the command line. The import+ * page (Settings → Import → Google Takeout) does the same in the browser, straight from the Takeout zip.+ *+ * node scripts/import-gmail-takeout.mjs \+ * --url https://mailflare.example.workers.dev \+ * --mailbox [email protected] \+ * --file "All mail Including Spam and Trash.mbox"+ *+ * Needs Node 22.18 or newer: the import logic is shared with the app and loaded from+ * src/lib/import/gmail-takeout-utils.ts through Node's built-in type stripping.+ *+ * The file is streamed, so its size does not matter. Gmail labels decide where each message lands: Inbox,+ * Sent, Drafts, Spam and Trash map to those sections, other labels become folders (first matching label+ * wins), and mail without either is archived. Unread and Starred carry over. Uploads skip duplicates, so an+ * interrupted run can simply be started again.+ *+ * Sign-in: set MAILFLARE_TOKEN to a session token (DevTools → Application → Local Storage →+ * mailflare-session-token), or pass --email and enter the password (and a 2FA code) when asked.+ * MAILFLARE_PASSWORD skips the prompt.+ *+ * Options:+ * --dry-run parse the file and print where messages would go+ * --no-folders archive mail with custom labels instead of creating folders+ * --ignore-label <name> ignore a label, or every label below it with a trailing "/" (repeatable)+ * --skip-spam, --skip-trash+ * --start-at <n> skip the first n messages of the file+ */++import { createReadStream, statSync } from "node:fs";+import { createInterface } from "node:readline";+import { fileURLToPath } from "node:url";+import { parseArgs } from "node:util";+import { runTakeoutImport, splitMbox } from "../src/lib/import/gmail-takeout-utils.ts";++function prompt(question, { hidden = false } = {}) {+ const rl = createInterface({ input: process.stdin, output: process.stdout, terminal: true });+ if (hidden) {+ rl._writeToOutput = (text) => {+ if (text.startsWith(question)) process.stdout.write(question);+ };+ }+ return new Promise((resolve) => {+ rl.question(question, (answer) => {+ rl.close();+ if (hidden) process.stdout.write("\n");+ resolve(answer.trim());+ });+ });+}++class MailflareClient {+ constructor(baseUrl, token) {+ this.baseUrl = baseUrl.replace(/\/$/, "");+ this.token = token;+ }++ static async signIn(baseUrl, email) {+ const url = baseUrl.replace(/\/$/, "");+ const password = process.env.MAILFLARE_PASSWORD || (await prompt(`Mailflare password for ${email}: `, { hidden: true }));+ const login = await fetch(`${url}/api/auth/login`, {+ method: "POST",+ headers: { "Content-Type": "application/json", Origin: url },+ body: JSON.stringify({ email, password }),+ });+ let data = await login.json().catch(() => ({}));+ if (!login.ok) {+ throw new Error(`Sign-in failed (${login.status}): ${JSON.stringify(data.error ?? data)}. If sign-in uses a captcha, set MAILFLARE_TOKEN instead.`);+ }+ if (data.mfaRequired) {+ const code = await prompt("Two-factor code: ");+ const verify = await fetch(`${url}/api/auth/mfa/verify`, {+ method: "POST",+ headers: { "Content-Type": "application/json", Origin: url },+ body: JSON.stringify({ challengeToken: data.challengeToken, code }),+ });+ data = await verify.json().catch(() => ({}));+ if (!verify.ok) throw new Error(`Two-factor verification failed (${verify.status}): ${data.error ?? ""}`);+ }+ if (!data.token) throw new Error("Sign-in returned no session token");+ return new MailflareClient(url, data.token);+ }++ async request(path, init = {}) {+ const headers = new Headers(init.headers);+ headers.set("Authorization", `Bearer ${this.token}`);+ const response = await fetch(`${this.baseUrl}${path}`, { ...init, headers });+ const text = await response.text();+ let data;+ try {+ data = text ? JSON.parse(text) : {};+ } catch {+ data = { error: `HTTP ${response.status} (non-JSON response)` };+ }+ return { response, data };+ }++ async findMailbox(selector) {+ const { response, data } = await this.request("/api/mailboxes");+ if (!response.ok) throw new Error(`Could not list mailboxes (${response.status}): ${data.error ?? ""}. Check that the session token is valid.`);+ const wanted = selector.toLowerCase();+ const mailbox = data.mailboxes.find((item) =>+ item.id === selector || (item.senderAddresses ?? []).some((address) => address.toLowerCase() === wanted),+ );+ if (!mailbox) {+ const known = data.mailboxes.map((item) => `${item.id} (${(item.senderAddresses ?? []).join(", ")})`).join("\n ");+ throw new Error(`Mailbox ${selector} not found. Available:\n ${known}`);+ }+ return mailbox;+ }++ async findFolder(mailboxId, name) {+ const { response, data } = await this.request(`/api/folders?mailboxId=${encodeURIComponent(mailboxId)}`);+ if (!response.ok) throw new Error(`Could not list folders (${response.status}): ${data.error ?? ""}`);+ return (data.folders ?? []).find((folder) => folder.name.toLowerCase() === name.toLowerCase())?.id;+ }++ async resolveFolder(mailboxId, name) {+ const existing = await this.findFolder(mailboxId, name);+ if (existing) return existing;+ const { response, data } = await this.request("/api/folders", {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ mailboxId, name }),+ });+ if (response.ok && data.id) return data.id;+ const created = response.status === 409 ? await this.findFolder(mailboxId, name) : undefined;+ if (created) return created;+ throw new Error(`Could not create folder ${name} (${response.status}): ${JSON.stringify(data.error ?? "")}`);+ }++ async upload(mailboxId, destination, messages, signal) {+ const form = new FormData();+ form.set("mailboxId", mailboxId);+ form.set("destination", destination);+ form.set("flags", JSON.stringify(Object.fromEntries(messages.map((message) => [message.filename, { read: message.read, starred: message.starred }]))));+ for (const message of messages) {+ form.append("files", new Blob([message.raw], { type: "message/rfc822" }), message.filename);+ }+ const { response, data } = await this.request("/api/import/messages", { method: "POST", body: form, signal });+ return { status: response.status, data };+ }+}++function formatBytes(bytes) {+ return bytes >= 1024 ** 3 ? `${(bytes / 1024 ** 3).toFixed(2)} GB` : `${(bytes / 1024 ** 2).toFixed(1)} MB`;+}++async function main() {+ const { values } = parseArgs({+ options: {+ url: { type: "string", default: process.env.MAILFLARE_URL },+ mailbox: { type: "string" },+ file: { type: "string" },+ email: { type: "string" },+ "dry-run": { type: "boolean", default: false },+ "no-folders": { type: "boolean", default: false },+ "ignore-label": { type: "string", multiple: true, default: [] },+ "skip-spam": { type: "boolean", default: false },+ "skip-trash": { type: "boolean", default: false },+ "start-at": { type: "string", default: "0" },+ },+ });+ if (!values.file) throw new Error("--file is required");+ const dryRun = values["dry-run"];+ const fileSize = statSync(values.file).size;++ let client = null;+ let mailboxId = null;+ if (!dryRun) {+ if (!values.url || !values.mailbox) throw new Error("--url and --mailbox are required");+ client = process.env.MAILFLARE_TOKEN+ ? new MailflareClient(values.url, process.env.MAILFLARE_TOKEN)+ : await MailflareClient.signIn(values.url, values.email ?? values.mailbox);+ mailboxId = (await client.findMailbox(values.mailbox)).id;+ console.log(`Importing ${values.file} (${formatBytes(fileSize)}) into ${values.mailbox} (${mailboxId})`);+ }++ let readBytes = 0;+ async function* countBytes(stream) {+ for await (const chunk of stream) {+ readBytes += chunk.length;+ yield chunk;+ }+ }++ const summary = await runTakeoutImport(splitMbox(countBytes(createReadStream(values.file))), {+ labels: { folders: !values["no-folders"], ignore: values["ignore-label"] },+ skipSpam: values["skip-spam"],+ skipTrash: values["skip-trash"],+ startAt: Math.max(0, Number(values["start-at"]) || 0),+ dryRun,+ upload: client ? (destination, messages, signal) => client.upload(mailboxId, destination, messages, signal) : undefined,+ resolveFolder: client ? (name) => client.resolveFolder(mailboxId, name) : undefined,+ onProgress: (progress) => {+ const percent = fileSize ? Math.min(100, (readBytes / fileSize) * 100).toFixed(1) : "100";+ process.stdout.write(`\r${progress.read} messages read (${percent}%), ${progress.imported} imported, ${progress.skipped} skipped `);+ },+ });++ console.log(`\n\n${summary.read} messages in file.`);+ for (const [key, count] of Object.entries(summary.destinations).sort((a, b) => b[1] - a[1])) console.log(` ${String(count).padStart(7)} ${key}`);+ if (summary.ignored) console.log(` ${summary.ignored} spam/trash messages skipped by option`);+ if (summary.tooLarge) console.log(` ${summary.tooLarge} messages over 24 MB skipped (Mailflare's upload size limit)`);+ if (!dryRun) {+ console.log(`Imported ${summary.imported}, skipped ${summary.skipped} (already present).`);+ if (summary.failed) {+ console.log(`${summary.failed} failed, first ones:`);+ for (const error of summary.errors.slice(0, 20)) console.log(` ${error}`);+ }+ }+}++if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {+ main().catch((error) => {+ console.error(`\n${error instanceof Error ? error.message : error}`);+ process.exit(1);+ });+}diff --git a/src/app/(settings)/settings/import/page.tsx b/src/app/(settings)/settings/import/page.tsxindex 654bfaf..c97f593 100644--- a/src/app/(settings)/settings/import/page.tsx+++ b/src/app/(settings)/settings/import/page.tsx@@ -19,6 +19,7 @@ import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";import { Select } from "@/components/ui/select";import { importMessageFiles } from "@/components/settings/import-messages-utils";+import { TakeoutImport } from "@/components/settings/takeout-import";import type {ImapFormState,ImportResult,@@ -257,8 +258,13 @@ export default function SettingsImportPage() {><option value="file">{t("importPage.backupFile")}</option><option value="imap">{t("importPage.imap")}</option>+ <option value="takeout">{t("importPage.takeout")}</option></Select></div>+ {activeTab === "takeout" ? (+ <TakeoutImport />+ ) : (+ <><div className="space-y-2"><Label>{t("importPage.chooseSections")}</Label>@@ -518,6 +524,8 @@ export default function SettingsImportPage() {</form></>)}+ </>+ )}</CardContent></div></section>diff --git a/src/app/(settings)/settings/import/types.d.ts b/src/app/(settings)/settings/import/types.d.tsindex 044b17c..25f651c 100644--- a/src/app/(settings)/settings/import/types.d.ts+++ b/src/app/(settings)/settings/import/types.d.ts@@ -28,7 +28,7 @@ export type ImportSourceOption = {system?: boolean;};-export type ImportTab = "file" | "imap";+export type ImportTab = "file" | "imap" | "takeout";export type ImportSourceItem = {id: string;diff --git a/src/app/api/import/messages/utils.ts b/src/app/api/import/messages/utils.tsindex 887ed74..69e6f11 100644--- a/src/app/api/import/messages/utils.ts+++ b/src/app/api/import/messages/utils.ts@@ -22,6 +22,25 @@ function stringToArrayBuffer(value: string): ArrayBuffer {return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength) as ArrayBuffer;}+type ImportFileFlags = Record<string, { read?: unknown; starred?: unknown }>;++/** Optional `flags` field: JSON mapping an uploaded file name to its source read/starred state. */+function parseImportFlags(value: FormDataEntryValue | null): ImportFileFlags {+ if (typeof value !== "string" || !value) return {};+ const parsed: unknown = JSON.parse(value);+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("Import flags are invalid");+ return parsed as ImportFileFlags;+}++function getMessageFlags(flags: ImportFileFlags, filename: string): Pick<ImportMessageInput, "read" | "starred"> {+ const entry = flags[filename];+ if (!entry) return {};+ return {+ ...(typeof entry.read === "boolean" ? { read: entry.read } : {}),+ ...(typeof entry.starred === "boolean" ? { starred: entry.starred } : {}),+ };+}+export async function parseImportForm(request: Request): Promise<{mailboxId: string;destination: ImportDestination;@@ -30,6 +49,7 @@ export async function parseImportForm(request: Request): Promise<{const form = await readFormDataBody(request, MAX_IMPORT_REQUEST_SIZE);const mailboxId = String(form.get("mailboxId") ?? "");const destination = parseImportDestination(form.get("destination"));+ const flags = parseImportFlags(form.get("flags"));const files = form.getAll("files").filter((value): value is File => value instanceof File && value.size > 0);const messages: ImportMessageInput[] = [];@@ -37,16 +57,14 @@ export async function parseImportForm(request: Request): Promise<{if (isMboxFile(file.name, file.type)) {const content = await file.text();for (const [index, raw] of splitMboxMessages(content).entries()) {- messages.push({- filename: `${file.name}#${index + 1}`,- raw: stringToArrayBuffer(raw),- });+ const filename = `${file.name}#${index + 1}`;+ messages.push({ filename, raw: stringToArrayBuffer(raw), ...getMessageFlags(flags, filename) });}continue;}if (isEmlFile(file.name, file.type) || file.type === "") {- messages.push({ filename: file.name, raw: await file.arrayBuffer() });+ messages.push({ filename: file.name, raw: await file.arrayBuffer(), ...getMessageFlags(flags, file.name) });}}diff --git a/src/components/settings/takeout-import-types.d.ts b/src/components/settings/takeout-import-types.d.tsnew file mode 100644index 0000000..b08dfc9--- /dev/null+++ b/src/components/settings/takeout-import-types.d.ts@@ -0,0 +1,28 @@+import type { TakeoutImportSummary } from "@/lib/import/gmail-takeout-types";++/** One .mbox to import: a picked .mbox file, or an .mbox entry inside a picked Takeout zip. */+export interface TakeoutSource {+ /** Stable across page loads, used to continue an interrupted import. */+ key: string;+ label: string;+ /** Uncompressed size in bytes. */+ size: number;+ open: () => Promise<ReadableStream<Uint8Array>>;+}++export interface TakeoutSourceList {+ sources: TakeoutSource[];+ /** Picked zip files that contain no .mbox. */+ withoutMbox: string[];+}++export interface TakeoutRunState {+ mode: "preview" | "import";+ sourceIndex: number;+ sourceCount: number;+ sourceLabel: string;+ bytesRead: number;+ bytesTotal: number;+ resumedAt: number;+ summary: TakeoutImportSummary;+}diff --git a/src/components/settings/takeout-import-utils.ts b/src/components/settings/takeout-import-utils.tsnew file mode 100644index 0000000..8f31391--- /dev/null+++ b/src/components/settings/takeout-import-utils.ts@@ -0,0 +1,118 @@+"use client";++import { authFetch } from "@/lib/auth/client";+import { getMailboxFolders, invalidateFolderCache } from "@/lib/folders/client";+import type { TakeoutBatchMessage, TakeoutImportSummary, TakeoutUploadResponse } from "@/lib/import/gmail-takeout-types";+import { listZipEntries, openZipEntry } from "@/lib/import/zip-utils";+import type { TakeoutSource, TakeoutSourceList } from "./takeout-import-types";++const PROGRESS_STORAGE_PREFIX = "mailflare:takeout-import:";++function isZipFile(file: File): boolean {+ return /\.zip$/i.test(file.name) || file.type === "application/zip" || file.type === "application/x-zip-compressed";+}++/** Finds the .mbox files to import among picked Takeout zips and .mbox files. */+export async function getTakeoutSources(files: File[]): Promise<TakeoutSourceList> {+ const sources: TakeoutSource[] = [];+ const withoutMbox: string[] = [];+ for (const file of files) {+ const fileKey = `${file.name}:${file.size}:${file.lastModified}`;+ if (!isZipFile(file)) {+ sources.push({ key: fileKey, label: file.name, size: file.size, open: async () => file.stream() as ReadableStream<Uint8Array> });+ continue;+ }+ const entries = (await listZipEntries(file)).filter((entry) => /\.mbox$/i.test(entry.name) && entry.size > 0);+ if (entries.length === 0) withoutMbox.push(file.name);+ for (const entry of entries) {+ sources.push({+ key: `${fileKey}:${entry.name}`,+ label: `${file.name} › ${entry.name.split("/").pop()}`,+ size: entry.size,+ open: () => openZipEntry(file, entry),+ });+ }+ }+ return { sources, withoutMbox };+}++export function createTakeoutUploader(mailboxId: string) {+ return async (destination: string, messages: TakeoutBatchMessage[], signal?: AbortSignal): Promise<TakeoutUploadResponse> => {+ const form = new FormData();+ form.set("mailboxId", mailboxId);+ form.set("destination", destination);+ form.set("flags", JSON.stringify(Object.fromEntries(messages.map((message) => [message.filename, { read: message.read, starred: message.starred }]))));+ for (const message of messages) {+ form.append("files", new Blob([message.raw as BlobPart], { type: "message/rfc822" }), message.filename);+ }+ const response = await authFetch("/api/import/messages", { method: "POST", body: form, signal });+ const data = (await response.json().catch(() => ({ error: `HTTP ${response.status}` }))) as TakeoutUploadResponse["data"];+ return { status: response.status, data };+ };+}++export function createTakeoutFolderResolver(mailboxId: string) {+ async function find(name: string): Promise<string | undefined> {+ const data = await getMailboxFolders<{ folders?: { id: string; name: string }[] }>(mailboxId);+ return data.folders?.find((folder) => folder.name.toLowerCase() === name.toLowerCase())?.id;+ }+ return async (name: string): Promise<string> => {+ const existing = await find(name);+ if (existing) return existing;+ const response = await authFetch("/api/folders", {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ mailboxId, name }),+ });+ const data = (await response.json().catch(() => ({}))) as { id?: string; error?: unknown };+ invalidateFolderCache();+ if (response.ok && data.id) return data.id;+ const created = response.status === 409 ? await find(name) : undefined;+ if (created) return created;+ throw new Error(typeof data.error === "string" ? data.error : `Unable to create folder ${name}`);+ };+}++function progressKey(mailboxId: string, source: TakeoutSource): string {+ return `${PROGRESS_STORAGE_PREFIX}${mailboxId}:${source.key}`;+}++/** How many messages of this source an earlier, interrupted import already finished. */+export function getTakeoutProgress(mailboxId: string, source: TakeoutSource): number {+ const value = Number(localStorage.getItem(progressKey(mailboxId, source)));+ return Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;+}++export function saveTakeoutProgress(mailboxId: string, source: TakeoutSource, committed: number): void {+ localStorage.setItem(progressKey(mailboxId, source), String(committed));+}++export function clearTakeoutProgress(mailboxId: string, source: TakeoutSource): void {+ localStorage.removeItem(progressKey(mailboxId, source));+}++export function emptyTakeoutSummary(): TakeoutImportSummary {+ return { read: 0, imported: 0, skipped: 0, failed: 0, errors: [], tooLarge: 0, ignored: 0, committed: 0, destinations: {}, aborted: false };+}++export function addTakeoutSummaries(total: TakeoutImportSummary, next: TakeoutImportSummary): TakeoutImportSummary {+ const destinations = { ...total.destinations };+ for (const [key, count] of Object.entries(next.destinations)) destinations[key] = (destinations[key] ?? 0) + count;+ return {+ read: total.read + next.read,+ imported: total.imported + next.imported,+ skipped: total.skipped + next.skipped,+ failed: total.failed + next.failed,+ errors: [...total.errors, ...next.errors].slice(0, 50),+ tooLarge: total.tooLarge + next.tooLarge,+ ignored: total.ignored + next.ignored,+ committed: next.committed,+ destinations,+ aborted: next.aborted,+ };+}++export function formatBytes(bytes: number): string {+ if (bytes >= 1024 ** 3) return `${(bytes / 1024 ** 3).toFixed(1)} GB`;+ return `${Math.max(0, bytes / 1024 ** 2).toFixed(bytes >= 10 * 1024 ** 2 ? 0 : 1)} MB`;+}diff --git a/src/components/settings/takeout-import.tsx b/src/components/settings/takeout-import.tsxnew file mode 100644index 0000000..99b8547--- /dev/null+++ b/src/components/settings/takeout-import.tsx@@ -0,0 +1,275 @@+"use client";++import type { FormEvent } from "react";+import { useEffect, useRef, useState } from "react";+import { Upload } from "lucide-react";+import { useLanguage } from "@/components/language-provider";+import { useSelectedMailbox } from "@/components/mailbox-provider";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";+import { Label } from "@/components/ui/label";+import type { TranslationKey } from "@/lib/i18n/types";+import type { TakeoutImportSummary } from "@/lib/import/gmail-takeout-types";+import { parseIgnoredLabels, runTakeoutImport, splitMbox } from "@/lib/import/gmail-takeout-utils";+import { isZipSupported, readStreamChunks } from "@/lib/import/zip-utils";+import type { TakeoutRunState } from "./takeout-import-types";+import {+ addTakeoutSummaries,+ clearTakeoutProgress,+ createTakeoutFolderResolver,+ createTakeoutUploader,+ emptyTakeoutSummary,+ formatBytes,+ getTakeoutProgress,+ getTakeoutSources,+ saveTakeoutProgress,+} from "./takeout-import-utils";++const SECTION_LABEL_KEYS: Record<string, TranslationKey> = {+ inbox: "navigation.inbox",+ sent: "navigation.sent",+ drafts: "navigation.drafts",+ archived: "navigation.archived",+ spam: "navigation.spam",+ trash: "navigation.trash",+};++function cloneSummary(summary: TakeoutImportSummary): TakeoutImportSummary {+ return { ...summary, errors: [...summary.errors], destinations: { ...summary.destinations } };+}++/** Imports a Google Takeout export: the zip is read in the browser and messages are uploaded in batches. */+export function TakeoutImport() {+ const { t } = useLanguage();+ const { selectedMailbox } = useSelectedMailbox();+ const [files, setFiles] = useState<File[]>([]);+ const [folders, setFolders] = useState(true);+ const [skipSpam, setSkipSpam] = useState(false);+ const [skipTrash, setSkipTrash] = useState(false);+ const [ignoreLabels, setIgnoreLabels] = useState("");+ const [run, setRun] = useState<TakeoutRunState | null>(null);+ const [result, setResult] = useState<{ mode: TakeoutRunState["mode"]; summary: TakeoutImportSummary } | null>(null);+ const [error, setError] = useState<string | null>(null);+ const [notice, setNotice] = useState<string | null>(null);+ const controllerRef = useRef<AbortController | null>(null);+ const liveRef = useRef<TakeoutRunState | null>(null);+ const running = run !== null;++ useEffect(() => {+ if (!running) return;+ const timer = window.setInterval(() => {+ if (liveRef.current) setRun({ ...liveRef.current, summary: cloneSummary(liveRef.current.summary) });+ }, 500);+ const onBeforeUnload = (event: BeforeUnloadEvent) => {+ if (liveRef.current?.mode === "import") event.preventDefault();+ };+ window.addEventListener("beforeunload", onBeforeUnload);+ return () => {+ window.clearInterval(timer);+ window.removeEventListener("beforeunload", onBeforeUnload);+ };+ }, [running]);++ function destinationLabel(key: string): string {+ const [type, ...rest] = key.split(":");+ const value = rest.join(":");+ if (type === "folder") return t("importPage.takeoutFolder", { name: value });+ return SECTION_LABEL_KEYS[value] ? t(SECTION_LABEL_KEYS[value]) : value;+ }++ async function start(mode: TakeoutRunState["mode"]) {+ const mailboxId = selectedMailbox?.id;+ if (!mailboxId || files.length === 0) return;+ setError(null);+ setNotice(null);+ setResult(null);+ if (!isZipSupported() && files.some((file) => /\.zip$/i.test(file.name))) {+ setError(t("importPage.takeoutUnsupported"));+ return;+ }+ const controller = new AbortController();+ controllerRef.current = controller;+ let total = emptyTakeoutSummary();+ const initial: TakeoutRunState = { mode, sourceIndex: 0, sourceCount: 0, sourceLabel: "", bytesRead: 0, bytesTotal: 0, resumedAt: 0, summary: total };+ liveRef.current = initial;+ setRun(initial);+ try {+ const { sources, withoutMbox } = await getTakeoutSources(files);+ if (withoutMbox.length > 0) setNotice(t("importPage.takeoutNoMbox", { files: withoutMbox.join(", ") }));+ if (sources.length === 0) return;+ const upload = createTakeoutUploader(mailboxId);+ const resolveFolder = createTakeoutFolderResolver(mailboxId);+ for (const [index, source] of sources.entries()) {+ const resumedAt = mode === "import" ? getTakeoutProgress(mailboxId, source) : 0;+ const live: TakeoutRunState = {+ mode,+ sourceIndex: index + 1,+ sourceCount: sources.length,+ sourceLabel: source.label,+ bytesRead: 0,+ bytesTotal: source.size,+ resumedAt,+ summary: total,+ };+ liveRef.current = live;+ const before = total;+ const chunks = readStreamChunks(await source.open(), (bytes) => {+ live.bytesRead += bytes;+ });+ const summary = await runTakeoutImport(splitMbox(chunks), {+ labels: { folders, ignore: parseIgnoredLabels(ignoreLabels) },+ skipSpam,+ skipTrash,+ startAt: resumedAt,+ dryRun: mode === "preview",+ signal: controller.signal,+ upload,+ resolveFolder,+ onProgress: (progress) => {+ live.summary = addTakeoutSummaries(before, progress);+ if (mode === "import") saveTakeoutProgress(mailboxId, source, progress.committed);+ },+ });+ total = addTakeoutSummaries(before, summary);+ if (summary.aborted) break;+ if (mode === "import") clearTakeoutProgress(mailboxId, source);+ }+ setResult({ mode, summary: total });+ } catch (caught) {+ setError(caught instanceof Error ? caught.message : String(caught));+ } finally {+ controllerRef.current = null;+ liveRef.current = null;+ setRun(null);+ if (mode === "import") window.dispatchEvent(new Event("mailflare:messages-changed"));+ }+ }++ function onSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();+ void start("import");+ }++ const summary = run?.summary ?? result?.summary ?? null;+ const percent = run && run.bytesTotal > 0 ? Math.min(100, Math.round((run.bytesRead / run.bytesTotal) * 100)) : 0;+ const destinations = Object.entries(result?.summary.destinations ?? {}).sort((a, b) => b[1] - a[1]);+ const destinationCount = destinations.reduce((sum, [, count]) => sum + count, 0);++ return (+ <form onSubmit={onSubmit} className="space-y-4">+ <div className="space-y-2">+ <Label htmlFor="takeout-files">{t("importPage.takeoutFiles")}</Label>+ <Input+ id="takeout-files"+ type="file"+ accept=".zip,.mbox,application/zip,application/mbox"+ multiple+ disabled={running}+ onChange={(event) => setFiles(Array.from(event.target.files ?? []))}+ className="block w-full rounded-md border border-neutral-200 bg-white px-3 py-1 text-sm shadow-sm shadow-neutral-200/50 file:mr-3 file:rounded-md file:border-0 file:bg-neutral-100 file:px-3 file:py-1.5 file:text-sm file:font-medium"+ />+ <p className="text-xs leading-5 text-neutral-500">{t("importPage.takeoutHint")}</p>+ </div>+ <div className="grid gap-2 sm:grid-cols-3">+ <label className="flex items-center gap-2 text-sm text-neutral-700">+ <Checkbox checked={folders} disabled={running} onChange={(event) => setFolders(event.target.checked)} />+ {t("importPage.takeoutFolders")}+ </label>+ <label className="flex items-center gap-2 text-sm text-neutral-700">+ <Checkbox checked={skipSpam} disabled={running} onChange={(event) => setSkipSpam(event.target.checked)} />+ {t("importPage.takeoutSkipSpam")}+ </label>+ <label className="flex items-center gap-2 text-sm text-neutral-700">+ <Checkbox checked={skipTrash} disabled={running} onChange={(event) => setSkipTrash(event.target.checked)} />+ {t("importPage.takeoutSkipTrash")}+ </label>+ </div>+ {folders && (+ <div className="space-y-2">+ <Label htmlFor="takeout-ignore">{t("importPage.takeoutIgnoreLabels")}</Label>+ <Input+ id="takeout-ignore"+ value={ignoreLabels}+ disabled={running}+ onChange={(event) => setIgnoreLabels(event.target.value)}+ placeholder="[Superhuman]/, Notes"+ />+ <p className="text-xs leading-5 text-neutral-500">{t("importPage.takeoutIgnoreHint")}</p>+ </div>+ )}+ <p className="rounded-lg border border-neutral-200 bg-neutral-50 px-4 py-3 text-xs leading-5 text-neutral-500">+ {t("importPage.takeoutKeepOpen")}+ </p>+ <div className="flex flex-wrap gap-2">+ <Button type="submit" disabled={!selectedMailbox || files.length === 0 || running}>+ <Upload className="h-4 w-4" />+ {run?.mode === "import" ? t("import.importing") : t("importPage.takeoutStart")}+ </Button>+ <Button type="button" variant="outline" disabled={!selectedMailbox || files.length === 0 || running} onClick={() => void start("preview")}>+ {t("importPage.takeoutPreview")}+ </Button>+ {running && (+ <Button type="button" variant="outline" onClick={() => controllerRef.current?.abort()}>+ {t("importPage.takeoutStop")}+ </Button>+ )}+ </div>+ {run && (+ <div className="space-y-1 text-xs text-neutral-500" aria-live="polite">+ <div className="flex justify-between gap-4">+ <span className="truncate">+ {run.sourceCount > 0+ ? t("importPage.takeoutReading", { source: run.sourceLabel, index: run.sourceIndex, count: run.sourceCount })+ : t("importPage.preparing")}+ </span>+ <span className="shrink-0">+ {formatBytes(run.bytesRead)} / {formatBytes(run.bytesTotal)}+ </span>+ </div>+ <div className="h-1.5 overflow-hidden rounded-full bg-neutral-100">+ <div className="h-full bg-blue-600 transition-[width]" style={{ width: `${percent}%` }} />+ </div>+ {run.resumedAt > 0 && <p>{t("importPage.takeoutResumed", { count: run.resumedAt })}</p>}+ </div>+ )}+ {summary && (run?.mode === "import" || result?.mode === "import") && (+ <p className="text-sm text-neutral-700">+ {t("importPage.takeoutCounts", { read: summary.read, imported: summary.imported, skipped: summary.skipped })}+ </p>+ )}+ {result && (+ <div className="space-y-2 rounded-lg border border-green-100 bg-green-50 px-4 py-3 text-sm text-green-800">+ {result.summary.aborted && <p className="font-medium">{t("importPage.takeoutStopped")}</p>}+ {result.mode === "preview" && (+ <>+ <p className="font-medium">{t("importPage.takeoutPreviewResult", { count: destinationCount })}</p>+ <ul className="space-y-0.5 text-xs">+ {destinations.map(([key, count]) => (+ <li key={key} className="flex justify-between gap-4">+ <span className="truncate">{destinationLabel(key)}</span>+ <span className="tabular-nums">{count}</span>+ </li>+ ))}+ </ul>+ </>+ )}+ {result.summary.tooLarge > 0 && <p className="text-xs">{t("importPage.takeoutTooLarge", { count: result.summary.tooLarge })}</p>}+ {result.summary.ignored > 0 && <p className="text-xs">{t("importPage.takeoutIgnored", { count: result.summary.ignored })}</p>}+ {result.summary.failed > 0 && (+ <div className="text-xs text-red-700">+ <p>{t("importPage.takeoutFailed", { count: result.summary.failed })}</p>+ <ul className="mt-1 list-disc space-y-0.5 pl-5">+ {result.summary.errors.slice(0, 5).map((item) => (+ <li key={item}>{item}</li>+ ))}+ </ul>+ </div>+ )}+ </div>+ )}+ {notice && <p className="rounded-lg border border-amber-100 bg-amber-50 px-4 py-3 text-sm text-amber-700">{notice}</p>}+ {error && <p className="rounded-lg border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700">{error}</p>}+ </form>+ );+}diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.jsonindex a2261e1..6ae2610 100644--- a/src/lib/i18n/en.json+++ b/src/lib/i18n/en.json@@ -1988,6 +1988,29 @@"importPage.useTls": "Use TLS","importPage.imapNote": "IMAP imports selected source sections automatically. Folders are discovered from the source account and imported into matching new or existing Mailflare folders.","importPage.importSources": "Import selected sources",+ "importPage.takeout": "Google Takeout (.zip)",+ "importPage.takeoutFiles": "Takeout files",+ "importPage.takeoutHint": "Choose the .zip files from Google Takeout, or the .mbox inside them. They are read in your browser; only the messages are uploaded.",+ "importPage.takeoutKeepOpen": "Keep this tab open until the import finishes. If it stops, choose the same files again and it continues where it left off.",+ "importPage.takeoutFolders": "Create folders from Gmail labels",+ "importPage.takeoutSkipSpam": "Skip spam",+ "importPage.takeoutSkipTrash": "Skip trash",+ "importPage.takeoutIgnoreLabels": "Labels to ignore",+ "importPage.takeoutIgnoreHint": "Comma-separated. End a label with / to also ignore every label below it.",+ "importPage.takeoutPreview": "Preview",+ "importPage.takeoutStart": "Import",+ "importPage.takeoutStop": "Stop",+ "importPage.takeoutReading": "Reading {source} ({index}/{count})",+ "importPage.takeoutCounts": "{read} messages read, {imported} imported, {skipped} skipped",+ "importPage.takeoutResumed": "Continuing after message {count}.",+ "importPage.takeoutNoMbox": "No .mbox file found in {files}.",+ "importPage.takeoutUnsupported": "This browser cannot unpack zip files. Unzip the archive and choose the .mbox file instead.",+ "importPage.takeoutPreviewResult": "{count} messages would be imported:",+ "importPage.takeoutStopped": "Import stopped. Choose the same files again to continue.",+ "importPage.takeoutFolder": "Folder {name}",+ "importPage.takeoutTooLarge": "{count} messages over 24 MB were skipped.",+ "importPage.takeoutIgnored": "{count} spam or trash messages were skipped.",+ "importPage.takeoutFailed": "{count} messages could not be imported:","layout.resizeMenu": "Resize left menu","nav.loadingPage": "Loading page","message.blockRemote": "Block remote content",diff --git a/src/lib/import/gmail-takeout-types.d.ts b/src/lib/import/gmail-takeout-types.d.tsnew file mode 100644index 0000000..53bc302--- /dev/null+++ b/src/lib/import/gmail-takeout-types.d.ts@@ -0,0 +1,62 @@+export type TakeoutSection = "inbox" | "sent" | "drafts" | "spam" | "trash" | "archived";++export type TakeoutDestination = { type: "system"; section: TakeoutSection } | { type: "folder"; name: string };++export interface TakeoutPlacement {+ destination: TakeoutDestination;+ read: boolean;+ starred: boolean;+}++export interface TakeoutLabelOptions {+ /** Turn custom labels into folders. Defaults to true. */+ folders?: boolean;+ /** Labels to ignore; an entry ending in "/" also ignores every label below it. */+ ignore?: string[];+}++export interface TakeoutBatchMessage {+ filename: string;+ raw: Uint8Array;+ read: boolean;+ starred: boolean;+}++export interface TakeoutUploadResponse {+ status: number;+ data: { imported?: number; skipped?: number; errors?: string[]; error?: unknown };+}++export interface TakeoutImportSummary {+ /** Messages read from the file so far. */+ read: number;+ imported: number;+ skipped: number;+ failed: number;+ /** The first error messages; `failed` has the full count. */+ errors: string[];+ tooLarge: number;+ ignored: number;+ /** Every message up to this position is finished, so a new run can start after it. */+ committed: number;+ /** Message counts per destination key (`system:inbox`, `folder:Name`). */+ destinations: Record<string, number>;+ aborted: boolean;+}++export interface TakeoutImportOptions {+ labels?: TakeoutLabelOptions;+ skipSpam?: boolean;+ skipTrash?: boolean;+ /** Skip the first n messages, e.g. the `committed` count of an interrupted run. */+ startAt?: number;+ /** Only count where messages would go. */+ dryRun?: boolean;+ signal?: AbortSignal;+ /** Sends one batch to /api/import/messages; `destination` is `system:<section>` or `folder:<id>`. */+ upload?: (destination: string, messages: TakeoutBatchMessage[], signal?: AbortSignal) => Promise<TakeoutUploadResponse>;+ /** Returns the id of the folder with this name, creating it when missing. */+ resolveFolder?: (name: string) => Promise<string>;+ onProgress?: (summary: TakeoutImportSummary) => void;+ wait?: (ms: number, signal?: AbortSignal) => Promise<void>;+}diff --git a/src/lib/import/gmail-takeout-utils.ts b/src/lib/import/gmail-takeout-utils.tsnew file mode 100644index 0000000..7d2b62d--- /dev/null+++ b/src/lib/import/gmail-takeout-utils.ts@@ -0,0 +1,357 @@+/**+ * Google Takeout (Gmail .mbox) import, shared by the import page and scripts/import-gmail-takeout.mjs.+ * Runtime-free on purpose: the script loads this file directly with Node's type stripping, so it may only+ * have type imports.+ */+import type {+ TakeoutBatchMessage,+ TakeoutDestination,+ TakeoutImportOptions,+ TakeoutImportSummary,+ TakeoutLabelOptions,+ TakeoutPlacement,+ TakeoutSection,+ TakeoutUploadResponse,+} from "./gmail-takeout-types";++export const TAKEOUT_MAX_BATCH_MESSAGES = 100;+export const TAKEOUT_MAX_BATCH_BYTES = 20 * 1024 * 1024;+const MAX_BUFFERED_BYTES = 60 * 1024 * 1024;+/** The import endpoint caps a whole request at 25 MiB, form overhead included. */+export const TAKEOUT_MAX_MESSAGE_BYTES = 24 * 1024 * 1024;+const MAX_FOLDER_NAME = 80;+const MAX_KEPT_ERRORS = 50;+const MAX_ATTEMPTS = 4;++const SYSTEM_LABELS: Record<Exclude<TakeoutSection, "archived">, string[]> = {+ inbox: ["inbox", "posteingang"],+ sent: ["sent", "gesendet"],+ drafts: ["drafts", "draft", "entwürfe"],+ spam: ["spam"],+ trash: ["trash", "bin", "papierkorb"],+};+const SECTION_PRIORITY = ["trash", "spam", "drafts", "sent", "inbox"] as const;+const STARRED_LABELS = ["starred", "markiert"];+const UNREAD_LABELS = ["unread", "ungelesen"];+const IGNORED_LABELS = ["opened", "geöffnet", "important", "wichtig", "archived", "archiviert", "chat", "chats"];+const IGNORED_LABEL_PREFIXES = ["category ", "kategorie "];+const KNOWN_LABELS = new Set([...Object.values(SYSTEM_LABELS).flat(), ...STARRED_LABELS, ...UNREAD_LABELS]);++const LF = 10;+const CR = 13;+const FROM_ = [70, 114, 111, 109, 32];++function startsWithFrom(line: Uint8Array, offset = 0): boolean {+ if (line.length < offset + FROM_.length) return false;+ return FROM_.every((byte, index) => line[offset + index] === byte);+}++function isBlankLine(line: Uint8Array): boolean {+ return line.length === 0 || (line.length === 1 && line[0] === LF) || (line.length === 2 && line[0] === CR && line[1] === LF);+}++function escapedFromDepth(line: Uint8Array): number {+ let depth = 0;+ while (depth < line.length && line[depth] === 62) depth += 1;+ return depth > 0 && startsWithFrom(line, depth) ? depth : 0;+}++function concatBytes(parts: Uint8Array[]): Uint8Array {+ let total = 0;+ for (const part of parts) total += part.length;+ const result = new Uint8Array(total);+ let offset = 0;+ for (const part of parts) {+ result.set(part, offset);+ offset += part.length;+ }+ return result;+}++/**+ * Splits an mbox byte stream into raw RFC 822 messages without decoding them, so 8-bit and binary content+ * survives unchanged. A "From " line only starts a message after a blank line; mboxrd ">From " escapes are undone.+ */+export async function* splitMbox(chunks: AsyncIterable<Uint8Array>): AsyncGenerator<Uint8Array> {+ let carry: Uint8Array = new Uint8Array(0);+ let parts: Uint8Array[] | null = null;+ let previousBlank = true;++ function finish(): Uint8Array | null {+ if (!parts) return null;+ while (parts.length > 0 && isBlankLine(parts[parts.length - 1])) parts.pop();+ const raw = concatBytes(parts);+ parts = null;+ return raw;+ }++ function handle(line: Uint8Array): Uint8Array | null {+ const separator = previousBlank && startsWithFrom(line);+ previousBlank = isBlankLine(line);+ if (separator) {+ const raw = finish();+ parts = [];+ return raw;+ }+ if (parts) parts.push(line.subarray(escapedFromDepth(line) > 0 ? 1 : 0));+ return null;+ }++ for await (const chunk of chunks) {+ const data = carry.length > 0 ? concatBytes([carry, chunk]) : chunk;+ let start = 0;+ while (true) {+ const end = data.indexOf(LF, start);+ if (end === -1) break;+ const raw = handle(data.subarray(start, end + 1));+ if (raw) yield raw;+ start = end + 1;+ }+ carry = data.slice(start);+ }+ if (carry.length > 0) {+ const raw = handle(carry);+ if (raw) yield raw;+ }+ const last = finish();+ if (last) yield last;+}++function headerEnd(raw: Uint8Array): number {+ const limit = Math.min(raw.length, 64 * 1024);+ let index = raw.indexOf(LF);+ while (index !== -1 && index < limit) {+ if (raw[index + 1] === LF) return index;+ if (raw[index + 1] === CR && raw[index + 2] === LF) return index;+ index = raw.indexOf(LF, index + 1);+ }+ return limit;+}++function decodeEncodedWords(value: string): string {+ return value.replace(/=\?([^?]+)\?([bq])\?([^?]*)\?=/gi, (match, charset: string, encoding: string, text: string) => {+ try {+ const binary = encoding.toLowerCase() === "b"+ ? atob(text)+ : text.replace(/_/g, " ").replace(/=([0-9a-f]{2})/gi, (_, hex: string) => String.fromCharCode(parseInt(hex, 16)));+ return new TextDecoder(charset).decode(Uint8Array.from(binary, (char) => char.charCodeAt(0)));+ } catch {+ return match;+ }+ });+}++/** Reads the X-Gmail-Labels header of a raw message. */+export function parseGmailLabels(raw: Uint8Array): string[] {+ const headers = new TextDecoder().decode(raw.subarray(0, headerEnd(raw))).replace(/\r?\n[ \t]+/g, " ");+ const match = headers.match(/^X-Gmail-Labels:[ \t]*(.*)$/im);+ if (!match) return [];+ const labels: string[] = [];+ let current = "";+ let quoted = false;+ for (const char of decodeEncodedWords(match[1])) {+ if (char === '"') quoted = !quoted;+ else if (char === "," && !quoted) {+ labels.push(current.trim());+ current = "";+ } else current += char;+ }+ labels.push(current.trim());+ return labels.filter(Boolean);+}++function isIgnoredLabel(label: string, ignore: string[]): boolean {+ const name = label.toLowerCase();+ if (IGNORED_LABELS.includes(name) || IGNORED_LABEL_PREFIXES.some((prefix) => name.startsWith(prefix))) return true;+ return ignore.some((entry) => {+ const value = entry.trim().toLowerCase();+ if (!value) return false;+ return value.endsWith("/") ? name === value.slice(0, -1) || name.startsWith(value) : name === value;+ });+}++/** Decides where a message goes from its Gmail labels. */+export function mapGmailLabels(labels: string[], options: TakeoutLabelOptions = {}): TakeoutPlacement {+ const names = labels.map((label) => label.toLowerCase());+ const read = !names.some((name) => UNREAD_LABELS.includes(name));+ const starred = names.some((name) => STARRED_LABELS.includes(name));+ const section = SECTION_PRIORITY.find((key) => names.some((name) => SYSTEM_LABELS[key].includes(name)));+ if (section) return { destination: { type: "system", section }, read, starred };++ const folder = options.folders === false+ ? undefined+ : labels.find((label) => !KNOWN_LABELS.has(label.toLowerCase()) && !isIgnoredLabel(label, options.ignore ?? []));+ if (folder) return { destination: { type: "folder", name: folder.slice(0, MAX_FOLDER_NAME) }, read, starred };+ return { destination: { type: "system", section: "archived" }, read, starred };+}++export function takeoutDestinationKey(destination: TakeoutDestination): string {+ return destination.type === "folder" ? `folder:${destination.name}` : `system:${destination.section}`;+}++/** Splits a comma-separated list of labels to ignore. */+export function parseIgnoredLabels(value: string): string[] {+ return value.split(",").map((label) => label.trim()).filter(Boolean);+}++function abortableWait(ms: number, signal?: AbortSignal): Promise<void> {+ return new Promise((resolve, reject) => {+ if (signal?.aborted) return reject(signal.reason);+ const timer = setTimeout(() => {+ signal?.removeEventListener("abort", onAbort);+ resolve();+ }, ms);+ function onAbort() {+ clearTimeout(timer);+ reject(signal?.reason);+ }+ signal?.addEventListener("abort", onAbort, { once: true });+ });+}++interface PendingGroup {+ destination: TakeoutDestination;+ messages: TakeoutBatchMessage[];+ bytes: number;+ first: number;+}++/**+ * Reads messages from an mbox stream and uploads them in batches per destination. Batches that are too large+ * or keep failing on the server are split; a single message that still fails is counted and skipped. Only+ * errors that are not about the batch (sign-in, missing mailbox) stop the run.+ */+export async function runTakeoutImport(messages: AsyncIterable<Uint8Array>, options: TakeoutImportOptions): Promise<TakeoutImportSummary> {+ const { signal, upload, resolveFolder } = options;+ if (!options.dryRun && (!upload || !resolveFolder)) throw new Error("upload and resolveFolder are required");+ const wait = options.wait ?? abortableWait;+ const startAt = Math.max(0, options.startAt ?? 0);+ const summary: TakeoutImportSummary = {+ read: 0,+ imported: 0,+ skipped: 0,+ failed: 0,+ errors: [],+ tooLarge: 0,+ ignored: 0,+ committed: startAt,+ destinations: {},+ aborted: false,+ };+ const groups = new Map<string, PendingGroup>();+ const folderIds = new Map<string, string>();+ let buffered = 0;+ /** Consecutive single messages the server kept failing on; a few in a row means the server, not the mail. */+ let singleFailures = 0;++ function addErrors(errors: string[]) {+ summary.failed += errors.length;+ summary.errors.push(...errors.slice(0, Math.max(0, MAX_KEPT_ERRORS - summary.errors.length)));+ }++ function updateCommitted() {+ let lowest = summary.read + 1;+ for (const group of groups.values()) lowest = Math.min(lowest, group.first);+ summary.committed = Math.max(summary.committed, lowest - 1);+ }++ async function destinationValue(destination: TakeoutDestination): Promise<string> {+ if (destination.type === "system") return `system:${destination.section}`;+ let id = folderIds.get(destination.name.toLowerCase());+ if (!id) {+ id = await resolveFolder!(destination.name);+ folderIds.set(destination.name.toLowerCase(), id);+ }+ return `folder:${id}`;+ }++ async function send(destination: string, batch: TakeoutBatchMessage[]): Promise<void> {+ for (let attempt = 1; ; attempt += 1) {+ signal?.throwIfAborted();+ let status = 0;+ let data: TakeoutUploadResponse["data"] = {};+ try {+ ({ status, data } = await upload!(destination, batch, signal));+ } catch (error) {+ signal?.throwIfAborted();+ data = { error: error instanceof Error ? error.message : String(error) };+ }+ if (status >= 200 && status < 300) {+ singleFailures = 0;+ summary.imported += data.imported ?? 0;+ summary.skipped += data.skipped ?? 0;+ addErrors(data.errors ?? []);+ return;+ }+ if (batch.length > 1 && (status === 413 || (status >= 500 && attempt >= 2))) {+ const middle = Math.ceil(batch.length / 2);+ await send(destination, batch.slice(0, middle));+ await send(destination, batch.slice(middle));+ return;+ }+ const reason = typeof data.error === "string" ? data.error : JSON.stringify(data.error ?? data);+ const retryable = status === 0 || status === 429 || status >= 500;+ if (batch.length === 1 && (status === 413 || (retryable && attempt >= MAX_ATTEMPTS))) {+ singleFailures += 1;+ if (status !== 413 && singleFailures >= 3) throw new Error(`Upload failed (${status || "network error"}): ${reason}`);+ addErrors([`${batch[0].filename}: ${status === 413 ? "too large for one upload" : reason}`]);+ return;+ }+ if (!retryable || attempt >= MAX_ATTEMPTS) throw new Error(`Upload failed (${status || "network error"}): ${reason}`);+ await wait(5000 * 3 ** (attempt - 1), signal);+ }+ }++ async function flush(key: string): Promise<void> {+ const group = groups.get(key);+ if (!group) return;+ await send(await destinationValue(group.destination), group.messages);+ groups.delete(key);+ buffered -= group.bytes;+ updateCommitted();+ options.onProgress?.(summary);+ }++ try {+ for await (const raw of messages) {+ signal?.throwIfAborted();+ summary.read += 1;+ const index = summary.read;+ if (index <= startAt) continue;+ const { destination, read, starred } = mapGmailLabels(parseGmailLabels(raw), options.labels);+ const section = destination.type === "system" ? destination.section : null;+ if ((options.skipSpam && section === "spam") || (options.skipTrash && section === "trash")) {+ summary.ignored += 1;+ } else if (raw.length > TAKEOUT_MAX_MESSAGE_BYTES) {+ summary.tooLarge += 1;+ } else {+ const key = takeoutDestinationKey(destination);+ summary.destinations[key] = (summary.destinations[key] ?? 0) + 1;+ if (!options.dryRun) {+ const existing = groups.get(key);+ if (existing && (existing.messages.length >= TAKEOUT_MAX_BATCH_MESSAGES || existing.bytes + raw.length > TAKEOUT_MAX_BATCH_BYTES)) {+ await flush(key);+ }+ const group = groups.get(key) ?? { destination, messages: [], bytes: 0, first: index };+ group.messages.push({ filename: `takeout-${index}.eml`, raw, read, starred });+ group.bytes += raw.length;+ groups.set(key, group);+ buffered += raw.length;+ while (buffered > MAX_BUFFERED_BYTES) {+ const [largest] = [...groups.entries()].sort((a, b) => b[1].bytes - a[1].bytes);+ await flush(largest[0]);+ }+ }+ }+ if (groups.size === 0) summary.committed = Math.max(summary.committed, index);+ if (index % 200 === 0) options.onProgress?.(summary);+ }+ for (const key of [...groups.keys()]) await flush(key);+ summary.committed = Math.max(summary.committed, summary.read);+ } catch (error) {+ if (!signal?.aborted) throw error;+ summary.aborted = true;+ }+ options.onProgress?.(summary);+ return summary;+}diff --git a/src/lib/import/zip-types.d.ts b/src/lib/import/zip-types.d.tsnew file mode 100644index 0000000..4035bfa--- /dev/null+++ b/src/lib/import/zip-types.d.ts@@ -0,0 +1,9 @@+export interface ZipEntry {+ name: string;+ /** 0 = stored, 8 = deflate. */+ method: number;+ compressedSize: number;+ size: number;+ localHeaderOffset: number;+ encrypted: boolean;+}diff --git a/src/lib/import/zip-utils.ts b/src/lib/import/zip-utils.tsnew file mode 100644index 0000000..66d76f9--- /dev/null+++ b/src/lib/import/zip-utils.ts@@ -0,0 +1,116 @@+/**+ * Reads entries from a zip file held as a Blob (a File picked in the browser) without loading it: only the+ * central directory and the requested entry are read, and deflated entries are inflated as a stream. Supports+ * Zip64, which Google Takeout uses for archives over 4 GB.+ */+import type { ZipEntry } from "./zip-types";++const EOCD_SIGNATURE = 0x06054b50;+const ZIP64_LOCATOR_SIGNATURE = 0x07064b50;+const ZIP64_EOCD_SIGNATURE = 0x06064b50;+const CENTRAL_SIGNATURE = 0x02014b50;+const LOCAL_SIGNATURE = 0x04034b50;+const MAX_EOCD_SEARCH = 22 + 0xffff;++async function readView(blob: Blob, start: number, end: number): Promise<DataView> {+ return new DataView(await blob.slice(start, end).arrayBuffer());+}++function readUint64(view: DataView, offset: number): number {+ const value = view.getBigUint64(offset, true);+ if (value > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error("Zip file is too large");+ return Number(value);+}++export function isZipSupported(): boolean {+ return typeof DecompressionStream !== "undefined";+}++export async function listZipEntries(blob: Blob): Promise<ZipEntry[]> {+ const tailStart = Math.max(0, blob.size - MAX_EOCD_SEARCH);+ const tail = await readView(blob, tailStart, blob.size);+ let eocd = -1;+ for (let offset = tail.byteLength - 22; offset >= 0; offset -= 1) {+ if (tail.getUint32(offset, true) === EOCD_SIGNATURE) {+ eocd = offset;+ break;+ }+ }+ if (eocd === -1) throw new Error("Not a zip file");++ let count = tail.getUint16(eocd + 10, true);+ let directorySize = tail.getUint32(eocd + 12, true);+ let directoryOffset = tail.getUint32(eocd + 16, true);+ if (count === 0xffff || directorySize === 0xffffffff || directoryOffset === 0xffffffff) {+ const locator = eocd - 20;+ if (locator < 0 || tail.getUint32(locator, true) !== ZIP64_LOCATOR_SIGNATURE) throw new Error("Invalid Zip64 file");+ const recordOffset = readUint64(tail, locator + 8);+ const record = await readView(blob, recordOffset, recordOffset + 56);+ if (record.getUint32(0, true) !== ZIP64_EOCD_SIGNATURE) throw new Error("Invalid Zip64 file");+ count = readUint64(record, 32);+ directorySize = readUint64(record, 40);+ directoryOffset = readUint64(record, 48);+ }++ const directory = await readView(blob, directoryOffset, directoryOffset + directorySize);+ const decoder = new TextDecoder();+ const entries: ZipEntry[] = [];+ let offset = 0;+ for (let index = 0; index < count && offset + 46 <= directory.byteLength; index += 1) {+ if (directory.getUint32(offset, true) !== CENTRAL_SIGNATURE) throw new Error("Corrupt zip directory");+ const flags = directory.getUint16(offset + 8, true);+ const method = directory.getUint16(offset + 10, true);+ let compressedSize = directory.getUint32(offset + 20, true);+ let size = directory.getUint32(offset + 24, true);+ const nameLength = directory.getUint16(offset + 28, true);+ const extraLength = directory.getUint16(offset + 30, true);+ const commentLength = directory.getUint16(offset + 32, true);+ let localHeaderOffset = directory.getUint32(offset + 42, true);+ const nameStart = directory.byteOffset + offset + 46;+ const name = decoder.decode(new Uint8Array(directory.buffer, nameStart, nameLength));++ let extra = offset + 46 + nameLength;+ const extraEnd = extra + extraLength;+ while (extra + 4 <= extraEnd) {+ const id = directory.getUint16(extra, true);+ const length = directory.getUint16(extra + 2, true);+ if (id === 0x0001) {+ let field = extra + 4;+ if (size === 0xffffffff) { size = readUint64(directory, field); field += 8; }+ if (compressedSize === 0xffffffff) { compressedSize = readUint64(directory, field); field += 8; }+ if (localHeaderOffset === 0xffffffff) localHeaderOffset = readUint64(directory, field);+ }+ extra += 4 + length;+ }++ entries.push({ name, method, compressedSize, size, localHeaderOffset, encrypted: (flags & 1) === 1 });+ offset += 46 + nameLength + extraLength + commentLength;+ }+ return entries;+}++/** Streams the uncompressed bytes of one entry. */+export async function openZipEntry(blob: Blob, entry: ZipEntry): Promise<ReadableStream<Uint8Array>> {+ if (entry.encrypted) throw new Error(`${entry.name} is encrypted`);+ if (entry.method !== 0 && entry.method !== 8) throw new Error(`${entry.name} uses an unsupported compression method`);+ const header = await readView(blob, entry.localHeaderOffset, entry.localHeaderOffset + 30);+ if (header.getUint32(0, true) !== LOCAL_SIGNATURE) throw new Error("Corrupt zip entry");+ const start = entry.localHeaderOffset + 30 + header.getUint16(26, true) + header.getUint16(28, true);+ const data = blob.slice(start, start + entry.compressedSize).stream() as ReadableStream<Uint8Array>;+ return entry.method === 0 ? data : data.pipeThrough(new DecompressionStream("deflate-raw") as unknown as TransformStream<Uint8Array, Uint8Array>);+}++/** Iterates a ReadableStream; Safari has no async iteration for streams. */+export async function* readStreamChunks(stream: ReadableStream<Uint8Array>, onBytes?: (bytes: number) => void): AsyncGenerator<Uint8Array> {+ const reader = stream.getReader();+ try {+ while (true) {+ const { done, value } = await reader.read();+ if (done) return;+ onBytes?.(value.length);+ yield value;+ }+ } finally {+ await reader.cancel().catch(() => {});+ }+}diff --git a/tests/gmail-takeout-import.test.mjs b/tests/gmail-takeout-import.test.mjsnew file mode 100644index 0000000..222342e--- /dev/null+++ b/tests/gmail-takeout-import.test.mjs@@ -0,0 +1,173 @@+import assert from "node:assert/strict";+import test from "node:test";+import { deflateRawSync } from "node:zlib";++import { mapGmailLabels, parseGmailLabels, runTakeoutImport, splitMbox } from "../src/lib/import/gmail-takeout-utils.ts";+import { listZipEntries, openZipEntry, readStreamChunks } from "../src/lib/import/zip-utils.ts";++const latin1 = (text) => Buffer.from(text, "latin1");++async function* chunked(text, size = text.length) {+ for (let index = 0; index < text.length; index += size) yield new Uint8Array(latin1(text.slice(index, index + size)));+}++async function collect(iterable) {+ const messages = [];+ for await (const raw of iterable) messages.push(Buffer.from(raw).toString("latin1"));+ return messages;+}++const mbox = [+ "From 1795843245834567890@xxx Thu Oct 22 10:11:12 +0000 2026\r\n",+ "X-Gmail-Labels: Inbox,Unread,\"Kunden, alt\"\r\n",+ "Subject: one\r\n",+ "\r\n",+ "Hello\r\n",+ ">From the archive\r\n",+ "From is not a separator here\r\n",+ "\r\n",+ "From 1795843245834567891@xxx Thu Oct 22 10:12:12 +0000 2026\r\n",+ "X-Gmail-Labels: Archived,Starred,Newton/Doped\r\n",+ "Subject: caf\xe9\r\n",+ "\r\n",+ "8-bit body \xff\xfe\r\n",+].join("");++test("mbox messages are split on From_ lines and keep their bytes", async () => {+ const messages = await collect(splitMbox(chunked(mbox)));+ assert.equal(messages.length, 2);+ assert.ok(messages[0].startsWith("X-Gmail-Labels: Inbox"));+ assert.ok(messages[0].includes("\r\nFrom the archive\r\n"));+ assert.ok(messages[0].endsWith("From is not a separator here\r\n"));+ assert.ok(messages[1].endsWith("8-bit body \xff\xfe\r\n"));+});++test("splitting does not depend on where chunks end", async () => {+ assert.deepEqual(await collect(splitMbox(chunked(mbox, 7))), await collect(splitMbox(chunked(mbox))));+});++test("labels are parsed, including quoted, folded and encoded ones", () => {+ assert.deepEqual(parseGmailLabels(latin1('X-Gmail-Labels: Inbox,Unread,"Kunden, alt"\r\n\r\nbody')), ["Inbox", "Unread", "Kunden, alt"]);+ assert.deepEqual(parseGmailLabels(latin1("Subject: x\nX-Gmail-Labels: Sent,\n Projekte\n\nbody")), ["Sent", "Projekte"]);+ assert.deepEqual(parseGmailLabels(latin1("X-Gmail-Labels: =?UTF-8?Q?Entw=C3=BCrfe?=\r\n\r\n")), ["Entwürfe"]);+ assert.deepEqual(parseGmailLabels(latin1("Subject: none\r\n\r\nX-Gmail-Labels: Inbox")), []);+});++test("labels map to sections, folders and read state", () => {+ assert.deepEqual(mapGmailLabels(["Inbox", "Unread", "Newton"]), { destination: { type: "system", section: "inbox" }, read: false, starred: false });+ assert.deepEqual(mapGmailLabels(["Sent", "Inbox"]).destination, { type: "system", section: "sent" });+ assert.deepEqual(mapGmailLabels(["Papierkorb", "Inbox"]).destination, { type: "system", section: "trash" });+ assert.deepEqual(mapGmailLabels(["Archived", "Starred", "Important", "Newton/Doped"]), { destination: { type: "folder", name: "Newton/Doped" }, read: true, starred: true });+ assert.deepEqual(mapGmailLabels(["Category Promotions", "Opened"]).destination, { type: "system", section: "archived" });+ assert.deepEqual(mapGmailLabels(["Newton"], { folders: false }).destination, { type: "system", section: "archived" });+ const ignore = ["[Superhuman]/", "Save"];+ assert.deepEqual(mapGmailLabels(["[Superhuman]/AI/News", "Save", "Apple"], { ignore }).destination, { type: "folder", name: "Apple" });+ assert.deepEqual(mapGmailLabels(["[Superhuman]", "[Superhuman]/AI"], { ignore }).destination, { type: "system", section: "archived" });+});++function message(index, labels, body = "body") {+ return `From x@xxx Thu Oct 22 10:00:00 +0000 2026\r\nX-Gmail-Labels: ${labels}\r\nMessage-ID: <m${index}@example.com>\r\n\r\n${body}\r\n\r\n`;+}++test("import batches per destination, resolves folders once and reports progress", async () => {+ const text = [message(1, "Inbox"), message(2, "Kunden"), message(3, "Inbox,Unread"), message(4, "Spam"), message(5, "Kunden")].join("");+ const uploads = [];+ const folders = [];+ const summary = await runTakeoutImport(splitMbox(chunked(text)), {+ skipSpam: true,+ upload: async (destination, messages) => {+ uploads.push({ destination, files: messages.map((item) => [item.filename, item.read]) });+ return { status: 200, data: { imported: messages.length, skipped: 0, errors: [] } };+ },+ resolveFolder: async (name) => {+ folders.push(name);+ return "fld_1";+ },+ });+ assert.deepEqual(folders, ["Kunden"]);+ assert.deepEqual(uploads.sort((a, b) => a.destination.localeCompare(b.destination)), [+ { destination: "folder:fld_1", files: [["takeout-2.eml", true], ["takeout-5.eml", true]] },+ { destination: "system:inbox", files: [["takeout-1.eml", true], ["takeout-3.eml", false]] },+ ]);+ assert.equal(summary.imported, 4);+ assert.equal(summary.ignored, 1);+ assert.equal(summary.committed, 5);+});++test("failing batches are split, a single bad message is skipped, startAt resumes", async () => {+ const text = [1, 2, 3, 4].map((index) => message(index, "Inbox", index === 3 ? "BAD" : "ok")).join("");+ const summary = await runTakeoutImport(splitMbox(chunked(text)), {+ startAt: 1,+ wait: async () => {},+ resolveFolder: async () => "x",+ upload: async (_destination, messages) => {+ const bad = messages.some((item) => Buffer.from(item.raw).toString().includes("BAD"));+ return bad ? { status: 413, data: { error: "Invalid import upload" } } : { status: 200, data: { imported: messages.length } };+ },+ });+ assert.equal(summary.read, 4);+ assert.equal(summary.imported, 2);+ assert.equal(summary.failed, 1);+ assert.match(summary.errors[0], /takeout-3\.eml/);+});++test("an aborted import stops and keeps the committed position", async () => {+ const controller = new AbortController();+ const text = [1, 2, 3].map((index) => message(index, "Inbox")).join("");+ const summary = await runTakeoutImport(splitMbox(chunked(text)), {+ signal: controller.signal,+ resolveFolder: async () => "x",+ upload: async () => ({ status: 200, data: { imported: 1 } }),+ });+ assert.equal(summary.aborted, false);+ controller.abort();+ const aborted = await runTakeoutImport(splitMbox(chunked(text)), { signal: controller.signal, resolveFolder: async () => "x", upload: async () => ({ status: 200, data: {} }) });+ assert.equal(aborted.aborted, true);+ assert.equal(aborted.committed, 0);+});++function buildZip(entries) {+ const locals = [];+ const centrals = [];+ let offset = 0;+ for (const { name, data, method } of entries) {+ const nameBytes = Buffer.from(name);+ const payload = method === 8 ? deflateRawSync(data) : data;+ const local = Buffer.alloc(30);+ local.writeUInt32LE(0x04034b50, 0);+ local.writeUInt16LE(method, 8);+ local.writeUInt32LE(payload.length, 18);+ local.writeUInt32LE(data.length, 22);+ local.writeUInt16LE(nameBytes.length, 26);+ locals.push(local, nameBytes, payload);+ const central = Buffer.alloc(46);+ central.writeUInt32LE(0x02014b50, 0);+ central.writeUInt16LE(method, 10);+ central.writeUInt32LE(payload.length, 20);+ central.writeUInt32LE(data.length, 24);+ central.writeUInt16LE(nameBytes.length, 28);+ central.writeUInt32LE(offset, 42);+ centrals.push(central, nameBytes);+ offset += 30 + nameBytes.length + payload.length;+ }+ const directory = Buffer.concat(centrals);+ const end = Buffer.alloc(22);+ end.writeUInt32LE(0x06054b50, 0);+ end.writeUInt16LE(entries.length, 8);+ end.writeUInt16LE(entries.length, 10);+ end.writeUInt32LE(directory.length, 12);+ end.writeUInt32LE(offset, 16);+ return new Blob([...locals, directory, end]);+}++test("zip entries are listed and deflated entries stream back intact", async () => {+ const zip = buildZip([+ { name: "Takeout/archive_browser.html", data: Buffer.from("<html>"), method: 0 },+ { name: "Takeout/Mail/All mail Including Spam and Trash.mbox", data: latin1(mbox), method: 8 },+ ]);+ const entries = await listZipEntries(zip);+ assert.deepEqual(entries.map((entry) => entry.name), ["Takeout/archive_browser.html", "Takeout/Mail/All mail Including Spam and Trash.mbox"]);+ const messages = await collect(splitMbox(readStreamChunks(await openZipEntry(zip, entries[1]))));+ assert.equal(messages.length, 2);+ assert.ok(messages[1].endsWith("8-bit body \xff\xfe\r\n"));+});