forked from 1b-agent/opencadstudio-upstream
web: point a failed open of a very large drawing to the desktop app
A browser tab gets a few GB of memory at most, so a drawing of a few hundred MB can fail to open there while the desktop app opens it (#918). When an open over 150 MB fails in the browser, the command line now says so and recommends the desktop app. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c8aa179ec0
commit
d1a14bef91
24 files changed
+35
No files matched your search
@@ -863,6 +863,7 @@ common =
|
||||
.recent-documents = المستندات الأخيرة
|
||||
.recent-files = الملفات الأخيرة
|
||||
.recent-file-no-longer-exists = الملف الأخير لم يعد موجودًا: __ocs_fmt_0__
|
||||
.web-drawing-too-large = حجم هذا الرسم __ocs_fmt_0__ ميغابايت، وهو أكبر مما يتعامل معه إصدار المتصفح بشكل موثوق. افتحه في تطبيق سطح المكتب.
|
||||
.red = أحمر
|
||||
.redo-last-label = إعادة: __ocs_fmt_0__
|
||||
.reference = مرجع
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = Скорошни документи
|
||||
.recent-files = Скорошни файлове
|
||||
.recent-file-no-longer-exists = Скорошният файл вече не съществува: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Този чертеж е __ocs_fmt_0__ MB – повече, отколкото браузърната версия обработва надеждно. Отворете го в настолното приложение.
|
||||
.red = Червено
|
||||
.redo-last-label = Повтори: __ocs_fmt_0__
|
||||
.reference = Референция
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = Nedávné dokumenty
|
||||
.recent-files = Nedávné soubory
|
||||
.recent-file-no-longer-exists = Poslední soubor již neexistuje: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Tento výkres má __ocs_fmt_0__ MB, víc, než verze v prohlížeči spolehlivě zvládne. Otevřete jej v desktopové aplikaci.
|
||||
.red = Červená
|
||||
.redo-last-label = Znovu: __ocs_fmt_0__
|
||||
.reference = Odkaz
|
||||
|
||||
@@ -851,6 +851,7 @@ common =
|
||||
.recent-documents = Letzte Dokumente
|
||||
.recent-files = Zuletzt geöffnete Dateien
|
||||
.recent-file-no-longer-exists = Aktuelle Datei existiert nicht mehr: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Diese Zeichnung ist __ocs_fmt_0__ MB groß, mehr als die Browserversion zuverlässig verarbeitet. Öffnen Sie sie in der Desktop-App.
|
||||
.red = Rot
|
||||
.redo-last-label = Rep.: __ocs_fmt_0__
|
||||
.reference = Referenz
|
||||
|
||||
@@ -852,6 +852,7 @@ common =
|
||||
.recent-documents = Πρόσφατα έγγραφα
|
||||
.recent-files = Πρόσφατα αρχεία
|
||||
.recent-file-no-longer-exists = Το πρόσφατο αρχείο δεν υπάρχει πλέον: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Αυτό το σχέδιο είναι __ocs_fmt_0__ MB, περισσότερο από όσο χειρίζεται αξιόπιστα η έκδοση του προγράμματος περιήγησης. Ανοίξτε το στην εφαρμογή επιφάνειας εργασίας.
|
||||
.red = Κόκκινο
|
||||
.redo-last-label = Επανάληψη: __ocs_fmt_0__
|
||||
.reference = Αναφορά
|
||||
|
||||
@@ -849,6 +849,7 @@ common =
|
||||
.recent-documents = Recent Documents
|
||||
.recent-files = Recent Files
|
||||
.recent-file-no-longer-exists = Recent file no longer exists: __ocs_fmt_0__
|
||||
.web-drawing-too-large = This drawing is __ocs_fmt_0__ MB, more than the browser version handles reliably. Open it in the desktop app.
|
||||
.red = Red
|
||||
.redo-last-label = Redo: __ocs_fmt_0__
|
||||
.reference = Reference
|
||||
|
||||
@@ -851,6 +851,7 @@ common =
|
||||
.recent-documents = Documentos recientes
|
||||
.recent-files = Archivos recientes
|
||||
.recent-file-no-longer-exists = El archivo reciente ya no existe: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Este dibujo ocupa __ocs_fmt_0__ MB, más de lo que la versión del navegador maneja con fiabilidad. Ábralo en la aplicación de escritorio.
|
||||
.red = Rojo
|
||||
.redo-last-label = Rehacer: __ocs_fmt_0__
|
||||
.reference = Referencia
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = Viimeaikaiset asiakirjat
|
||||
.recent-files = Viimeisimmät tiedostot
|
||||
.recent-file-no-longer-exists = Viimeisintä tiedostoa ei enää ole: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Tämä piirustus on __ocs_fmt_0__ Mt, enemmän kuin selainversio käsittelee luotettavasti. Avaa se työpöytäsovelluksessa.
|
||||
.red = Punainen
|
||||
.redo-last-label = Toista: __ocs_fmt_0__
|
||||
.reference = Viite
|
||||
|
||||
@@ -851,6 +851,7 @@ common =
|
||||
.recent-documents = Documents récents
|
||||
.recent-files = Fichiers récents
|
||||
.recent-file-no-longer-exists = Le fichier récent n'existe plus : __ocs_fmt_0__
|
||||
.web-drawing-too-large = Ce dessin fait __ocs_fmt_0__ Mo, plus que ce que la version navigateur gère de façon fiable. Ouvrez-le dans l'application de bureau.
|
||||
.red = Rouge
|
||||
.redo-last-label = Refaire le texte suivant: __ocs_fmt_0__
|
||||
.reference = Référence
|
||||
|
||||
@@ -839,6 +839,7 @@ common =
|
||||
.recent-documents = हाल के दस्तावेज़
|
||||
.recent-files = हाल ही में फ़ाइलें
|
||||
.recent-file-no-longer-exists = हाल ही में फ़ाइल अब मौजूद नहीं है: __ocs_fmt_0__
|
||||
.web-drawing-too-large = यह ड्रॉइंग __ocs_fmt_0__ MB की है, जो ब्राउज़र संस्करण के विश्वसनीय रूप से संभालने से अधिक है। इसे डेस्कटॉप ऐप में खोलें।
|
||||
.red = लाल
|
||||
.redo-last-label = रेनो: __ocs_fmt_0__
|
||||
.reference = संदर्भ
|
||||
|
||||
@@ -855,6 +855,7 @@ common =
|
||||
.recent-documents = Legutóbbi dokumentumok
|
||||
.recent-files = Legutóbbi fájlok
|
||||
.recent-file-no-longer-exists = A legutóbbi fájl már nem létezik: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Ez a rajz __ocs_fmt_0__ MB, több, mint amit a böngészős változat megbízhatóan kezel. Nyissa meg az asztali alkalmazásban.
|
||||
.red = Piros
|
||||
.redo-last-label = Újra: __ocs_fmt_0__
|
||||
.reference = Hivatkozás
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = Documenti recenti
|
||||
.recent-files = File recenti
|
||||
.recent-file-no-longer-exists = Il file recente non esiste più: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Questo disegno è di __ocs_fmt_0__ MB, più di quanto la versione browser gestisca in modo affidabile. Aprilo nell'app desktop.
|
||||
.red = Rosso
|
||||
.redo-last-label = Rifare: __ocs_fmt_0__
|
||||
.reference = Riferimento
|
||||
|
||||
@@ -841,6 +841,7 @@ common =
|
||||
.recent-documents = 最近使ったドキュメント
|
||||
.recent-files = 最近使ったファイル
|
||||
.recent-file-no-longer-exists = 最近使ったファイルがありません: __ocs_fmt_0__
|
||||
.web-drawing-too-large = この図面は __ocs_fmt_0__ MB で、ブラウザー版で確実に扱える大きさを超えています。デスクトップ アプリで開いてください。
|
||||
.red = 赤
|
||||
.redo-last-label = やり直し: __ocs_fmt_0__
|
||||
.reference = 参照
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = 최근 문서
|
||||
.recent-files = 최근 파일
|
||||
.recent-file-no-longer-exists = 최근 파일이 더 이상 존재하지 않습니다: __ocs_fmt_0__
|
||||
.web-drawing-too-large = 이 도면은 __ocs_fmt_0__ MB로, 브라우저 버전이 안정적으로 처리할 수 있는 크기를 넘습니다. 데스크톱 앱에서 여세요.
|
||||
.red = 빨간색
|
||||
.redo-last-label = 다시 실행: __ocs_fmt_0__
|
||||
.reference = 참고자료
|
||||
|
||||
@@ -856,6 +856,7 @@ common =
|
||||
.recent-documents = ເອກະສານຫຼ້າສຸດ
|
||||
.recent-files = ໄຟລ໌ຫຼ້າສຸດ
|
||||
.recent-file-no-longer-exists = ໄຟລ໌ຫຼ້າສຸດບໍ່ມີຢູ່ນີ້ອີກຕໍ່ໄປ: __ocs_fmt_0__
|
||||
.web-drawing-too-large = ແບບແຕ້ມນີ້ມີຂະໜາດ __ocs_fmt_0__ MB, ໃຫຍ່ເກີນກວ່າທີ່ລຸ້ນບຣາວເຊີຈະຈັດການໄດ້ຢ່າງໝັ້ນໃຈ. ກະລຸນາເປີດໃນແອັບເດັສທັອບ.
|
||||
.red = ສີແດງ
|
||||
.redo-last-label = ເຮັດຄືນ: __ocs_fmt_0__
|
||||
.reference = ອ້າງອີງ
|
||||
|
||||
@@ -849,6 +849,7 @@ common =
|
||||
.recent-documents = Recente documenten
|
||||
.recent-files = Recente bestanden
|
||||
.recent-file-no-longer-exists = Recent bestand bestaat niet meer: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Deze tekening is __ocs_fmt_0__ MB, meer dan de browserversie betrouwbaar aankan. Open hem in de desktop-app.
|
||||
.red = Rood
|
||||
.redo-last-label = Opnieuw: __ocs_fmt_0__
|
||||
.reference = Referentie
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = Najnowsze dokumenty
|
||||
.recent-files = Najnowsze pliki
|
||||
.recent-file-no-longer-exists = Ostatni plik już nie istnieje: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Ten rysunek ma __ocs_fmt_0__ MB, więcej niż wersja przeglądarkowa niezawodnie obsługuje. Otwórz go w aplikacji desktopowej.
|
||||
.red = Czerwony
|
||||
.redo-last-label = Wykonaj ponownie: __ocs_fmt_0__
|
||||
.reference = Odniesienie
|
||||
|
||||
@@ -851,6 +851,7 @@ common =
|
||||
.recent-documents = Documentos recentes
|
||||
.recent-files = Arquivos recentes
|
||||
.recent-file-no-longer-exists = O arquivo recente não existe mais: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Este desenho tem __ocs_fmt_0__ MB, mais do que a versão do navegador suporta com segurança. Abra-o no aplicativo de desktop.
|
||||
.red = Vermelho
|
||||
.redo-last-label = Refazer: __ocs_fmt_0__
|
||||
.reference = Referência
|
||||
|
||||
@@ -854,6 +854,7 @@ common =
|
||||
.recent-documents = Последние документы
|
||||
.recent-files = Недавно открытые файлы
|
||||
.recent-file-no-longer-exists = Файл больше не существует: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Этот чертёж занимает __ocs_fmt_0__ МБ — больше, чем браузерная версия надёжно обрабатывает. Откройте его в настольном приложении.
|
||||
.red = Красный
|
||||
.redo-last-label = Редо: __ocs_fmt_0__
|
||||
.reference = Ссылка
|
||||
|
||||
@@ -839,6 +839,7 @@ common =
|
||||
.recent-documents = Son Belgeler
|
||||
.recent-files = Son Dosyalar
|
||||
.recent-file-no-longer-exists = Son kullanılan dosya artık yok: __ocs_fmt_0__
|
||||
.web-drawing-too-large = Bu çizim __ocs_fmt_0__ MB; tarayıcı sürümünün güvenle açabileceğinden büyük. Masaüstü uygulamasında açın.
|
||||
.red = Kırmızı
|
||||
.redo-last-label = Yinele: __ocs_fmt_0__
|
||||
.reference = Referans
|
||||
|
||||
@@ -838,6 +838,7 @@ common =
|
||||
.recent-documents = 最近文档
|
||||
.recent-files = 最近的文件
|
||||
.recent-file-no-longer-exists = 最近的文件已不存在 : __ocs_fmt_0__
|
||||
.web-drawing-too-large = 此图形为 __ocs_fmt_0__ MB,超出了浏览器版本可靠处理的范围。请在桌面应用中打开。
|
||||
.red = 红色
|
||||
.redo-last-label = 重做 : __ocs_fmt_0__
|
||||
.reference = 参考
|
||||
|
||||
@@ -850,6 +850,7 @@ common =
|
||||
.recent-documents = 最近文檔
|
||||
.recent-files = 最近的檔案
|
||||
.recent-file-no-longer-exists = 最近的檔案已不存在 : __ocs_fmt_0__
|
||||
.web-drawing-too-large = 此圖面為 __ocs_fmt_0__ MB,超出瀏覽器版本能穩定處理的範圍。請在桌面應用程式中開啟。
|
||||
.red = 紅色
|
||||
.redo-last-label = 重做 : __ocs_fmt_0__
|
||||
.reference = 參考
|
||||
|
||||
@@ -1421,6 +1421,18 @@ impl OpenCADStudio {
|
||||
self.queue_next_web_autosave_prompt();
|
||||
}
|
||||
}
|
||||
// A browser tab has a few GB of memory at most; a very large
|
||||
// drawing that fails here usually opens in the desktop app.
|
||||
const WEB_LARGE_DRAWING: u64 = 150 * 1024 * 1024;
|
||||
if outcome.result.is_err() && outcome.size_bytes > WEB_LARGE_DRAWING {
|
||||
self.command_line.push_info(
|
||||
crate::tf!(
|
||||
"This drawing is {} MB, more than the browser version handles reliably. Open it in the desktop app.",
|
||||
outcome.size_bytes / (1024 * 1024)
|
||||
)
|
||||
.as_ref(),
|
||||
);
|
||||
}
|
||||
if let Some(opening) = self.opening.as_mut() {
|
||||
opening.name = outcome.name.clone();
|
||||
opening.source_path = Some(std::path::PathBuf::from(&outcome.name));
|
||||
|
||||
@@ -2771,6 +2771,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Recent Documents" => Some(("common", "recent-documents")),
|
||||
"Recent Files" => Some(("common", "recent-files")),
|
||||
"Recent file no longer exists: {}" => Some(("common", "recent-file-no-longer-exists")),
|
||||
"This drawing is {} MB, more than the browser version handles reliably. Open it in the desktop app." => Some(("common", "web-drawing-too-large")),
|
||||
"Records" => Some(("properties", "records")),
|
||||
"Rectangle - Center" => Some(("draw", "rectangle-center")),
|
||||
"Rectangle - Rotated" => Some(("draw", "rectangle-rotated")),
|
||||
|
||||
Reference in new issue
Block a user