aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-08 03:04:49 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-08 03:04:49 +0200
commit11c039ed3f0dc2ecc5eb30512b3dafa647fc4520 (patch)
tree72efdf58bdbc1cf3582d4f570f0cd421e4cf2a1f /packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
parent2ac1f1f704d44e2b20f9598044f7e266ffae4d36 (diff)
downloadmeshbay-11c039ed3f0dc2ecc5eb30512b3dafa647fc4520.tar.gz
feat(hub): cap a directory zip at 512 MB
An arbitrary ceiling, not a technical one: the zip writer streams and holds one chunk plus a record per file, so it would happily produce a hundred gigabytes. Past half a gigabyte the honest answer is a subfolder at a time, or the files individually. Enforced in file-utils.js's downloadDirectory, which is the one implementation behind every zip button — Files' single folder, Files' multi-folder selection, and the Photos album button (docs/photos.md §3). - Per directory, not per selection: Files zips a whole multi-directory selection in one click, so an oversized folder is refused and its siblings still download. - Before _openDownloadTarget, so no save dialog opens for an archive that is never going to be written. - The bound is strict, so a folder of exactly 512 MB still goes through. - Counted in the 1024-based units formatSize already prints, so the number in the refusal is the number in the constant. group.zip_too_large in all ten catalogues. test_zip_size_limit.py runs the module under Node and pins the refusal, the inclusive bound, and that nothing is asked or started when a folder is over. The user guide's "a 40 GB folder costs 40 GB of disk" is no longer true and now documents the cap instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8EDjk6pkYZrCbo63m2x87
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
index 260d11c..c672a13 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
@@ -569,6 +569,8 @@ export default {
'group.zip_empty': '该文件夹里没有可下载的内容。',
'group.zip_no_stream': '此浏览器无法把下载内容直接写入磁盘,'
+ '因此 {name}({size})必须先在内存中构建。若压缩包很大,这可能会失败。是否继续?',
+ 'group.zip_too_large': '“{name}” 为 {size},而文件夹打包为 zip 下载的上限是 {limit}。'
+ + '请逐个下载子文件夹,或单独下载文件。',
'group.rmdir': '删除文件夹',
'group.rmdir_confirm': '删除文件夹“{name}”?它必须是空的。',
'group.rmdir_not_empty': '该文件夹不是空的。请先删除其中的内容——'