reclaimable 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.claude/launch.json +11 -0
  3. data/.gitignore +11 -0
  4. data/.gitlab-ci.yml +16 -0
  5. data/AGENTS.md +88 -0
  6. data/CLAUDE.md +1 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE +674 -0
  9. data/README.md +160 -0
  10. data/Rakefile +28 -0
  11. data/ai-skill/reclaimable/SKILL.md +94 -0
  12. data/benchmark/README.md +59 -0
  13. data/benchmark/experiments/lstat_scanner.rb +11 -0
  14. data/benchmark/experiments/ractor_scanner.rb +92 -0
  15. data/benchmark/experiments/verify_bulk_list.rb +34 -0
  16. data/benchmark/lib/fixture.rb +104 -0
  17. data/benchmark/lib/results.rb +62 -0
  18. data/benchmark/reports/00-baseline.md +75 -0
  19. data/benchmark/reports/01-jit.md +70 -0
  20. data/benchmark/reports/02-ractor.md +58 -0
  21. data/benchmark/reports/03-getattrlistbulk.md +84 -0
  22. data/benchmark/reports/04-others.md +52 -0
  23. data/benchmark/reports/05-outside-root.md +56 -0
  24. data/benchmark/reports/06-round2-discussion.md +374 -0
  25. data/benchmark/reports/06-round2.md +194 -0
  26. data/benchmark/reports/README.md +46 -0
  27. data/benchmark/results/baseline.yml +126 -0
  28. data/benchmark/results/bulk-list.yml +126 -0
  29. data/benchmark/results/final-yjit.yml +126 -0
  30. data/benchmark/results/final.yml +126 -0
  31. data/benchmark/results/ractor-exp.yml +38 -0
  32. data/benchmark/results/round2-after.yml +126 -0
  33. data/benchmark/results/round2-before.yml +126 -0
  34. data/benchmark/results/src-baseline.yml +32 -0
  35. data/benchmark/results/src-bulk-list.yml +32 -0
  36. data/benchmark/results/src-pair-none1.yml +38 -0
  37. data/benchmark/results/src-pair-none2.yml +38 -0
  38. data/benchmark/results/src-pair-yjit1.yml +38 -0
  39. data/benchmark/results/src-pair-yjit2.yml +38 -0
  40. data/benchmark/results/src-ractor-exp.yml +32 -0
  41. data/benchmark/results/src-round2-after1.yml +52 -0
  42. data/benchmark/results/src-round2-after2.yml +52 -0
  43. data/benchmark/results/src-round2-before1.yml +52 -0
  44. data/benchmark/results/src-round2-before2.yml +52 -0
  45. data/benchmark/results/yjit.yml +126 -0
  46. data/benchmark/results/zjit.yml +126 -0
  47. data/benchmark/run.rb +149 -0
  48. data/bin/reclaimable +10 -0
  49. data/doc/performance.md +179 -0
  50. data/lib/reclaimable/ai_skill.rb +138 -0
  51. data/lib/reclaimable/bulk_list.rb +91 -0
  52. data/lib/reclaimable/cache_dump.rb +125 -0
  53. data/lib/reclaimable/cli.rb +168 -0
  54. data/lib/reclaimable/cloud_files.rb +33 -0
  55. data/lib/reclaimable/config.rb +100 -0
  56. data/lib/reclaimable/i18n.rb +24 -0
  57. data/lib/reclaimable/locations.rb +89 -0
  58. data/lib/reclaimable/output.rb +154 -0
  59. data/lib/reclaimable/paths.rb +36 -0
  60. data/lib/reclaimable/report.rb +504 -0
  61. data/lib/reclaimable/ruby_abi.rb +69 -0
  62. data/lib/reclaimable/scan_cache.rb +97 -0
  63. data/lib/reclaimable/scanner.rb +440 -0
  64. data/lib/reclaimable/util.rb +34 -0
  65. data/lib/reclaimable.rb +42 -0
  66. data/locale/ja/LC_MESSAGES/reclaimable.mo +0 -0
  67. data/man/reclaimable.1.ronn +302 -0
  68. data/man/reclaimable.en.1 +234 -0
  69. data/man/reclaimable.ja.1 +452 -0
  70. data/po/ja/reclaimable-docs.po +668 -0
  71. data/po/ja/reclaimable.po +510 -0
  72. data/rakelib/benchmark.rake +22 -0
  73. data/rakelib/docs/japanese.rb +132 -0
  74. data/rakelib/docs/man_page.rb +73 -0
  75. data/rakelib/docs/site.rb +187 -0
  76. data/rakelib/docs/sources.rb +94 -0
  77. data/rakelib/docs/translation.rb +157 -0
  78. data/rakelib/docs.rake +62 -0
  79. data/rakelib/gettext.rake +30 -0
  80. data/rakelib/i18n.rake +199 -0
  81. data/reclaimable.gemspec +56 -0
  82. data/site/index.md +142 -0
  83. data/site/layout.html.erb +60 -0
  84. data/site/style.css +82 -0
  85. metadata +231 -0
@@ -0,0 +1,510 @@
1
+ # Japanese translations for reclaimable package.
2
+ # Copyright (C) 2026 Kitaiti Makoto
3
+ # This file is distributed under the same license as the reclaimable package.
4
+ # Kitaiti Makoto, 2026.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: reclaimable 0.1.0\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "PO-Revision-Date: 2026-11-15 22:54+0900\n"
11
+ "Last-Translator: Kitaiti Makoto\n"
12
+ "Language-Team: Japanese\n"
13
+ "Language: ja\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "\n"
19
+
20
+ msgid "Codex and other agents"
21
+ msgstr "Codex などのエージェント"
22
+
23
+ msgid "reclaimable comes with a skill for AI agents such as Claude Code and Codex. It tells the agent how to run reclaimable, how to read the report, and never to delete anything without asking you."
24
+ msgstr "reclaimable には、Claude Code や Codex などの AI エージェント向けのスキルが付いています。reclaimable の実行のしかた、レポートの読み方、そして、あなたに確かめずに何も削除しないことを、エージェントに伝えます。"
25
+
26
+ msgid "The skill is in %{dir}:"
27
+ msgstr "スキルの場所は %{dir} です:"
28
+
29
+ msgid "To install it yourself, copy that folder into the skill directory of your agent:"
30
+ msgstr "自分でインストールするには、そのフォルダーをお使いのエージェントのスキル置き場にコピーしてください:"
31
+
32
+ msgid "To let reclaimable copy it:"
33
+ msgstr "reclaimable にコピーさせるには:"
34
+
35
+ msgid "asks where to install it"
36
+ msgstr "インストール先を尋ねる"
37
+
38
+ msgid "installs it in DIR without asking"
39
+ msgstr "尋ねずに DIR にインストールする"
40
+
41
+ msgid "The copy is not updated with the gem, so install it again after you update reclaimable."
42
+ msgstr "コピーは gem と一緒には更新されないので、reclaimable を更新したあとはインストールし直してください。"
43
+
44
+ msgid "Cannot ask where to install the AI agent skill, because standard input is not a terminal."
45
+ msgstr "標準入力が端末でないため、AI エージェント向けのスキルのインストール先を尋ねられません。"
46
+
47
+ msgid "Give the skill directory, such as:"
48
+ msgstr "スキル置き場を次のように渡してください:"
49
+
50
+ msgid "Where do you want to install the AI agent skill?"
51
+ msgstr "AI エージェント向けのスキルをどこにインストールしますか?"
52
+
53
+ msgid "[already installed]"
54
+ msgstr "[インストール済み]"
55
+
56
+ msgid "Enter numbers (such as 1, or 1 2 for both) or another skill directory. Leave it empty to cancel: "
57
+ msgstr "番号(1、または両方なら 1 2 など)か、別のスキル置き場を入力してください。空のままだとキャンセルします: "
58
+
59
+ msgid "Canceled. Nothing was installed."
60
+ msgstr "キャンセルしました。何もインストールしていません。"
61
+
62
+ msgid "There is no choice %{number}. Nothing was installed."
63
+ msgstr "選択肢 %{number} はありません。何もインストールしていません。"
64
+
65
+ msgid "%{path} already exists. Overwrite it? [y/N]: "
66
+ msgstr "%{path} はすでにあります。上書きしますか? [y/N]: "
67
+
68
+ msgid "%{path} is a symbolic link, so nothing was written there. Remove it first to install the skill."
69
+ msgstr "%{path} はシンボリックリンクなので、何も書き込みませんでした。スキルをインストールするには、先にこれを削除してください。"
70
+
71
+ msgid "Installed the AI agent skill in %{path}"
72
+ msgstr "AI エージェント向けのスキルを %{path} にインストールしました"
73
+
74
+ msgid "Cannot install the AI agent skill in %{path}: %{error}"
75
+ msgstr "AI エージェント向けのスキルを %{path} にインストールできません: %{error}"
76
+
77
+ msgid "it was made by another version of reclaimable; run reclaimable once to remake it"
78
+ msgstr "別の版の reclaimable が作ったキャッシュなので、reclaimable を 1 度実行して作り直してください"
79
+
80
+ msgid "Cache file: %{path}"
81
+ msgstr "キャッシュファイル: %{path}"
82
+
83
+ msgid "Saved: %{time} / root: %{root} / %{count} folders / large files: %{large} or more"
84
+ msgstr "保存: %{time} / 起点: %{root} / %{count} フォルダー / 大きいファイル: %{large} 以上"
85
+
86
+ msgid "Modified"
87
+ msgstr "更新時刻"
88
+
89
+ msgid "Small files"
90
+ msgstr "小さいファイル"
91
+
92
+ msgid "Subfolders"
93
+ msgstr "子フォルダー"
94
+
95
+ msgid "Large files"
96
+ msgstr "大きいファイル"
97
+
98
+ msgid "Folder"
99
+ msgstr "フォルダー"
100
+
101
+ msgid "There is no cache for %{root} yet (%{path}). Run reclaimable once to make it."
102
+ msgstr "%{root} のキャッシュはまだありません(%{path})。reclaimable を 1 度実行すると作られます。"
103
+
104
+ msgid "Cannot read the cache %{path}: %{error}"
105
+ msgstr "キャッシュ %{path} を読めません: %{error}"
106
+
107
+ msgid "Cannot read the config file %{path}: %{error}"
108
+ msgstr "設定ファイル %{path} を読めません: %{error}"
109
+
110
+ msgid "Cannot stop downloading cloud-only files, so %{dirs} will not be scanned (%{reason})"
111
+ msgstr "クラウド上のファイルのダウンロードを止められないので、%{dirs} は走査しません(%{reason})"
112
+
113
+ msgctxt "list separator"
114
+ msgid ", "
115
+ msgstr "・"
116
+
117
+ msgid "Unfroze %{dir}"
118
+ msgstr "%{dir} の固定を外しました"
119
+
120
+ msgid "%{dir} was not frozen"
121
+ msgstr "%{dir} は固定されていません"
122
+
123
+ msgid "Measuring %{dir} with %{jobs} threads..."
124
+ msgstr "%{dir} を %{jobs} スレッドで測っています…"
125
+
126
+ msgid "Froze %{dir} at %{size}. It will not be scanned from now on."
127
+ msgstr "%{dir} を %{size} で固定しました。次からは走査しません。"
128
+
129
+ msgid "Cannot freeze %{dir}: %{error}"
130
+ msgstr "%{dir} を固定できません: %{error}"
131
+
132
+ msgid "Saved the config file: %{path}"
133
+ msgstr "設定ファイルを保存しました: %{path}"
134
+
135
+ msgid "Cannot find the manual in %{dir}. When running from the source, make it with rake man first."
136
+ msgstr "マニュアルが %{dir} にありません。ソースから実行しているときは、先に rake man で作ってください。"
137
+
138
+ msgid "Cannot open the manual: %{error}"
139
+ msgstr "マニュアルを開けません: %{error}"
140
+
141
+ msgid "Usage: reclaimable [options]"
142
+ msgstr "使い方: reclaimable [オプション]"
143
+
144
+ msgid "Number of entries in each ranking (default: 20)"
145
+ msgstr "各ランキングの表示件数(既定 20)"
146
+
147
+ msgid "Smallest size, in MB, that counts as a large file (default: 1024)"
148
+ msgstr "「巨大ファイル」とみなす下限サイズ。MB 単位(既定 1024)"
149
+
150
+ msgid "Directory to start scanning from (default: your home directory)"
151
+ msgstr "走査の起点(既定 ホーム)"
152
+
153
+ msgid "Directory to save the report and the log in (default: %{dir})"
154
+ msgstr "レポートとログの保存先(既定 %{dir})"
155
+
156
+ msgid "Also save the report and the log to files (default: save)"
157
+ msgstr "レポートとログをファイルにも保存する(既定 する)"
158
+
159
+ msgid "Number of threads that scan in parallel (default: %{jobs})"
160
+ msgstr "並列に走査するスレッド数(既定 %{jobs})"
161
+
162
+ msgid "Ignore the cached scan results and scan everything again"
163
+ msgstr "前回の走査結果(キャッシュ)を使わず全部走査し直す"
164
+
165
+ msgid "Measure DIR once, save its size to the config file, and skip it in later scans (for large folders that never change). Can be given more than once"
166
+ msgstr "DIR を 1 度だけ測ってサイズを設定ファイルに保存し、以後の走査では中へ降りない(変わらない大きなフォルダー向け)。何度でも指定できる"
167
+
168
+ msgid "Remove DIR from the frozen folders, so it is scanned again"
169
+ msgstr "DIR の固定を外し、また走査するようにする"
170
+
171
+ msgid "Print the cached scan results for the start directory (-d) as %{formats} (default: text), without scanning"
172
+ msgstr "起点(-d)の走査結果のキャッシュを %{formats} のいずれかの形式で書き出す(既定 text)。走査はしない"
173
+
174
+ msgid "Config file to use (default: %{file})"
175
+ msgstr "使う設定ファイル(既定 %{file})"
176
+
177
+ msgid "Show the skill for AI agents (Claude Code, Codex, and others) and how to install it"
178
+ msgstr "AI エージェント向けのスキル(Claude Code・Codex など)と、そのインストール方法を表示する"
179
+
180
+ msgid "Install the skill for AI agents in the skill directory DIR, as DIR/reclaimable. Without DIR, ask where to install it. Can be given more than once"
181
+ msgstr "AI エージェント向けのスキルを、スキル置き場 DIR の下に DIR/reclaimable としてインストールする。DIR を省くとインストール先を尋ねる。複数回指定できる"
182
+
183
+ msgid "Show the manual"
184
+ msgstr "マニュアルを表示する"
185
+
186
+ msgid "%{error} (see reclaimable --help)"
187
+ msgstr "%{error}(reclaimable --help を参照)"
188
+
189
+ msgid "setiopolicy_np failed (errno %{errno})"
190
+ msgstr "setiopolicy_np が失敗した(errno %{errno})"
191
+
192
+ msgid "%{path} is not a mapping"
193
+ msgstr "%{path} の中身がマッピング(キーと値の組)になっていません"
194
+
195
+ msgid "%{key} in %{path} is not a mapping"
196
+ msgstr "%{path} の %{key} がマッピング(キーと値の組)になっていません"
197
+
198
+ msgid "The entry for %{path} has no size (bytes)"
199
+ msgstr "%{path} の項目にサイズ(bytes)がありません"
200
+
201
+ msgid "reclaimable config. --freeze and --unfreeze rewrite this file, so comments are not kept."
202
+ msgstr "reclaimable の設定。--freeze と --unfreeze がこのファイルを書き直すので、コメントは残りません。"
203
+
204
+ msgid "Cannot read the date %{value}"
205
+ msgstr "日時 %{value} を読めません"
206
+
207
+ msgid "Trash. Emptying it frees the space right away"
208
+ msgstr "ゴミ箱。空にすればそのまま空く"
209
+
210
+ msgid "App caches. Quit the apps before deleting the contents; they are usually recreated as needed"
211
+ msgstr "アプリのキャッシュ。アプリを終了してから中身を消せば、通常は必要に応じて再生成される"
212
+
213
+ msgid "Homebrew download cache. brew cleanup --prune=all removes all of it"
214
+ msgstr "Homebrew のダウンロードキャッシュ。brew cleanup --prune=all で全部消える"
215
+
216
+ msgid "Caches of command-line tools (pip, Hugging Face, and others)"
217
+ msgstr "CLI ツール(pip・Hugging Face など)のキャッシュ"
218
+
219
+ msgid "Hugging Face models and datasets. They can be downloaded again"
220
+ msgstr "Hugging Face のモデル・データセット。再ダウンロード可"
221
+
222
+ msgid "npm cache. npm cache clean --force removes it"
223
+ msgstr "npm のキャッシュ。npm cache clean --force で消える"
224
+
225
+ msgid "yarn cache and versions"
226
+ msgstr "yarn のキャッシュ・バージョン"
227
+
228
+ msgid "pnpm store. pnpm store prune removes unused packages"
229
+ msgstr "pnpm のストア。pnpm store prune で未使用分が消える"
230
+
231
+ msgid "bun cache"
232
+ msgstr "bun のキャッシュ"
233
+
234
+ msgid "Node.js versions installed with nodenv. Remove unused ones with nodenv uninstall"
235
+ msgstr "nodenv で入れた Node.js。使わない版は nodenv uninstall"
236
+
237
+ msgid "Crate sources and archives. They are downloaded again on the next build"
238
+ msgstr "crate のソースとアーカイブ。消しても次のビルドで再取得される"
239
+
240
+ msgid "Crates from git dependencies. They are downloaded again when needed"
241
+ msgstr "git 依存の crate。消しても再取得される"
242
+
243
+ msgid "Rust toolchains. Remove unused ones with rustup toolchain uninstall"
244
+ msgstr "Rust toolchain。使わないものは rustup toolchain uninstall"
245
+
246
+ msgid "Rubies installed with ruby-install and similar tools. Unused versions can be removed"
247
+ msgstr "ruby-install などで入れた Ruby。使わない版を削除できる"
248
+
249
+ msgid "Dart/Flutter package cache. It can be downloaded again"
250
+ msgstr "Dart/Flutter のパッケージキャッシュ。再取得可"
251
+
252
+ msgid "Gradle cache"
253
+ msgstr "Gradle のキャッシュ"
254
+
255
+ msgid "Android emulator (AVD) images and more"
256
+ msgstr "Android エミュレーター(AVD)のイメージなど"
257
+
258
+ msgid "Android SDK. Remove unused API levels and images with SDK Manager"
259
+ msgstr "Android SDK。使わない API レベルやイメージを SDK Manager で削除できる"
260
+
261
+ msgid "CocoaPods spec repositories and cache"
262
+ msgstr "CocoaPods のスペックリポジトリ・キャッシュ"
263
+
264
+ msgid "Xcode intermediate build files. They are recreated on the next build"
265
+ msgstr "Xcode のビルド中間物。消しても再ビルドで再生成される"
266
+
267
+ msgid "Xcode archives. Candidates for removal once shipped and no longer needed"
268
+ msgstr "Xcode のアーカイブ。配布済みで不要なら削除候補"
269
+
270
+ msgid "Symbols for debugging on devices. Those for old iOS versions are not needed"
271
+ msgstr "実機デバッグ用シンボル。古い iOS 版のものは不要"
272
+
273
+ msgid "iOS simulators. Remove old ones with xcrun simctl delete unavailable"
274
+ msgstr "iOS シミュレーター。xcrun simctl delete unavailable で古いものを削除"
275
+
276
+ msgid "Ollama models. Remove unused ones with ollama rm"
277
+ msgstr "Ollama のモデル。使わないものは ollama rm"
278
+
279
+ msgid "LM Studio models"
280
+ msgstr "LM Studio のモデル"
281
+
282
+ msgid "Keras datasets and model cache"
283
+ msgstr "Keras のデータセット・モデルキャッシュ"
284
+
285
+ msgid "ComfyUI environments. Old installations are candidates for removal"
286
+ msgstr "ComfyUI の環境。古いインストールは削除候補"
287
+
288
+ msgid "ComfyUI shared models"
289
+ msgstr "ComfyUI の共有モデル"
290
+
291
+ msgid "VirtualBox virtual machines. Remove unused VMs from VirtualBox"
292
+ msgstr "VirtualBox の仮想マシン。使わない VM は VirtualBox から削除"
293
+
294
+ msgid "Vagrant boxes. vagrant box prune removes old versions"
295
+ msgstr "Vagrant の box。vagrant box prune で古い版が消える"
296
+
297
+ msgid "tebako build cache"
298
+ msgstr "tebako のビルドキャッシュ"
299
+
300
+ msgid "GHC and packages for Haskell Stack"
301
+ msgstr "Haskell Stack の GHC・パッケージ"
302
+
303
+ msgid "Deno cache"
304
+ msgstr "Deno のキャッシュ"
305
+
306
+ msgid "WordPress environments for wp-env"
307
+ msgstr "wp-env の WordPress 環境"
308
+
309
+ msgid "Local iPhone/iPad backups. Remove old ones from Finder"
310
+ msgstr "iPhone/iPad のローカルバックアップ。古いものは Finder から削除"
311
+
312
+ msgid "Gem documentation (rdoc, ri). It can be rebuilt with gem rdoc"
313
+ msgstr "gem のドキュメント(rdoc・ri)。消しても gem rdoc で作り直せる"
314
+
315
+ msgid "Cannot prepare the save location, so nothing will be saved to files: %{error}"
316
+ msgstr "保存先を用意できないので、ファイルには保存しません: %{error}"
317
+
318
+ msgid "Saved: %{path}"
319
+ msgstr "保存しました: %{path}"
320
+
321
+ msgid "Cannot run command: %{command} (%{error})"
322
+ msgstr "コマンドを実行できない: %{command}(%{error})"
323
+
324
+ msgid "Command failed (exit status %{status}): %{command}"
325
+ msgstr "コマンド失敗(終了コード %{status}): %{command}"
326
+
327
+ msgid "Start: ruby %{ruby} / root %{root} / top %{top} / large files %{min_mb}MB or more"
328
+ msgstr "開始: ruby %{ruby} / 起点 %{root} / 表示件数 %{top} / 巨大ファイル %{min_mb}MB 以上"
329
+
330
+ msgid "Whole disk"
331
+ msgstr "ディスク全体"
332
+
333
+ msgid "(Scanning %{root} with %{jobs} threads. The cache is older than 7 days, so everything is scanned again; this takes a while.)"
334
+ msgstr "(%{root} を %{jobs} スレッドで走査中。キャッシュが 7 日より古いので全部走査し直します。時間がかかります)"
335
+
336
+ msgid "(Scanning %{root} with %{jobs} threads. There is no cache yet, so this takes a while.)"
337
+ msgstr "(%{root} を %{jobs} スレッドで走査中。初回・キャッシュなしなので時間がかかります)"
338
+
339
+ msgid "(Scanning %{root} with %{jobs} threads, reusing the previous results.)"
340
+ msgstr "(%{root} を %{jobs} スレッドで走査中。前回の結果を使います)"
341
+
342
+ msgid "Scan finished: %<seconds>d s, %<dirs>d folders (%<reused>d from the cache), total %<total>s, %<denied>d unreadable, %<cloud>d cloud-only"
343
+ msgstr "走査完了: %<seconds>d 秒、%<dirs>d フォルダー(うちキャッシュ再利用 %<reused>d)、合計 %<total>s、読めなかった場所 %<denied>d 件、クラウド上のみ %<cloud>d 件"
344
+
345
+ msgid " %<sec>8.1f s %<path>s"
346
+ msgstr " %<sec>8.1f 秒 %<path>s"
347
+
348
+ msgid "Time spent by top-level folder (sum over threads), top %{top}:"
349
+ msgstr "所要時間(スレッド合計)トップレベル別 上位 %{top}:"
350
+
351
+ msgid "Slowest subtrees, top %{top}:"
352
+ msgstr "時間がかかったサブツリー 上位 %{top}:"
353
+
354
+ msgid "Largest folders directly under %{dir}"
355
+ msgstr "%{dir} 直下の大きいフォルダー"
356
+
357
+ msgid "Inside %{dir}"
358
+ msgstr "%{dir} の内訳"
359
+
360
+ msgid "Usually regenerable or downloadable again (100MB or more)"
361
+ msgstr "再生成・再取得できることが多い場所(100MB 以上)"
362
+
363
+ msgid "Build artifacts and dependencies (50MB or more, under %{root})"
364
+ msgstr "ビルド成果物・依存パッケージ(50MB 以上、%{root} 以下)"
365
+
366
+ msgid "Ruby: vendor/bundle in projects (by ABI version, 10MB or more)"
367
+ msgstr "Ruby: プロジェクトの vendor/bundle(ABI 版ごと、10MB 以上)"
368
+
369
+ msgid "Ruby version in use unknown (no .ruby-version)"
370
+ msgstr "使用版不明(.ruby-version なし)"
371
+
372
+ msgid "in use"
373
+ msgstr "使用中"
374
+
375
+ msgid "possibly stale (the project uses %{want})"
376
+ msgstr "旧版候補(プロジェクトは %{want})"
377
+
378
+ msgid "possibly stale (the project uses %{want}; no Ruby of this version found)"
379
+ msgstr "旧版候補(プロジェクトは %{want}・この版の Ruby は見つからない)"
380
+
381
+ msgid "Ruby: gems in your home directory (by version)"
382
+ msgstr "Ruby: ユーザー領域の gem(版ごと)"
383
+
384
+ msgid "matching Ruby found"
385
+ msgstr "対応する Ruby あり"
386
+
387
+ msgid "possibly stale (no Ruby of this version found)"
388
+ msgstr "旧版候補(この版の Ruby は見つからない)"
389
+
390
+ msgid ", of which docs %{size}"
391
+ msgstr "・うちドキュメント %{size}"
392
+
393
+ msgid "Ruby ABI versions found: %{list}"
394
+ msgstr "見つかった Ruby の ABI 版: %{list}"
395
+
396
+ msgid "Ruby versions found: %{list}"
397
+ msgstr "見つかった Ruby の版: %{list}"
398
+
399
+ msgid "Containers: data folders and disk images"
400
+ msgstr "コンテナ環境: データ置き場とディスクイメージ"
401
+
402
+ msgid " └ %{path} (apparent size %{size})"
403
+ msgstr " └ %{path}(見かけ %{size})"
404
+
405
+ msgid "Containers: by engine (start stopped engines and run again to include them)"
406
+ msgstr "コンテナ環境: エンジンごとの内訳(止まっているものは起動してから再実行すると出る)"
407
+
408
+ msgid "-- %{context}: no response (stopped)"
409
+ msgstr "-- %{context}: 応答なし(停止中)"
410
+
411
+ msgid "-- %{context}: same engine as %{first} (skipped)"
412
+ msgstr "-- %{context}: %{first} と同じエンジン(省略)"
413
+
414
+ msgid "-- %{context}: the RECLAIMABLE column is roughly what prune frees (use docker builder prune for the build cache)"
415
+ msgstr "-- %{context}: RECLAIMABLE 列が prune で空く目安(Build Cache は docker builder prune)"
416
+
417
+ msgid " Large images (<none> means dangling, removed by docker image prune)"
418
+ msgstr " 大きいイメージ(<none> は宙ぶらりんで docker image prune の対象)"
419
+
420
+ msgid " Stopped containers (removed by docker container prune)"
421
+ msgstr " 停止中のコンテナ(docker container prune の対象)"
422
+
423
+ msgid " Volumes not used by any container (check their contents before docker volume rm)"
424
+ msgstr " どのコンテナからも使われていないボリューム(中身を確かめてから docker volume rm)"
425
+
426
+ msgid "Files of %{min_mb}MB or more (under %{root})"
427
+ msgstr "%{min_mb}MB 以上のファイル(%{root} 以下)"
428
+
429
+ msgid " [uses less than half of its apparent size]"
430
+ msgstr " [実占有が見かけの半分未満]"
431
+
432
+ msgid "Time Machine local snapshots"
433
+ msgstr "Time Machine ローカルスナップショット"
434
+
435
+ msgid "(could not get the list)"
436
+ msgstr "(取得できませんでした)"
437
+
438
+ msgid "Estimates from other tools"
439
+ msgstr "ツール別の見積もり"
440
+
441
+ msgid "-- Homebrew: summary of brew cleanup -n (old versions and caches)"
442
+ msgstr "-- Homebrew: brew cleanup -n の要約(古いバージョンとキャッシュ)"
443
+
444
+ msgid "-- Ollama models (remove unused ones with ollama rm <name>)"
445
+ msgstr "-- Ollama のモデル(使わないものは ollama rm <名前>)"
446
+
447
+ msgid "-- Rust toolchains (remove unused ones with rustup toolchain uninstall <name>)"
448
+ msgstr "-- Rust toolchain(使わないものは rustup toolchain uninstall <名前>)"
449
+
450
+ msgid "-- Unavailable iOS simulators: %{count} (remove them with xcrun simctl delete unavailable)"
451
+ msgstr "-- 使えなくなった iOS シミュレーター: %{count} 台(xcrun simctl delete unavailable で削除)"
452
+
453
+ msgid "Frozen folders (sizes from the config file, not scanned)"
454
+ msgstr "固定したフォルダー(設定ファイルのサイズを使い、走査していない)"
455
+
456
+ msgid " (not found; remove it with --unfreeze)"
457
+ msgstr " (見つからない。--unfreeze で外せます)"
458
+
459
+ msgid " (changed since it was measured; measure it again with --freeze)"
460
+ msgstr " (測ったあとで変わっている。--freeze で測り直してください)"
461
+
462
+ msgid "Config file: %{path}"
463
+ msgstr "設定ファイル: %{path}"
464
+
465
+ msgid "Unreadable locations (missing from the totals)"
466
+ msgstr "読めなかった場所(集計から漏れている)"
467
+
468
+ msgid "Unreadable: %{path}"
469
+ msgstr "読めなかった場所: %{path}"
470
+
471
+ msgid "Cloud-only folders, not read (they use almost no local space)"
472
+ msgstr "クラウド上にしか無く、読まなかったフォルダー(手元の容量はほぼ 0)"
473
+
474
+ msgid "Cloud-only: %{path}"
475
+ msgstr "クラウド上のみ: %{path}"
476
+
477
+ msgid "%{count} item. First %{top}:"
478
+ msgid_plural "%{count} items. First %{top}:"
479
+ msgstr[0] "%{count} 件。先頭 %{top} 件:"
480
+
481
+ msgid "Done"
482
+ msgstr "完了"
483
+
484
+ msgid "Took %<total>d s (scanning %<scan>d s, %<jobs>d threads). %<reused>d of the %<dirs>d scanned folders came from the cache."
485
+ msgstr "所要時間: %<total>d 秒(うち走査 %<scan>d 秒、%<jobs>d スレッド)。走査したフォルダー %<dirs>d のうち %<reused>d はキャッシュを再利用。"
486
+
487
+ msgid "Nothing was deleted."
488
+ msgstr "このスクリプトは何も削除していません。"
489
+
490
+ msgid "Finished: took %<total>d s"
491
+ msgstr "終了: 所要時間 %<total>d 秒"
492
+
493
+ msgid "Not using the cache because it is older than 7 days: %{path}"
494
+ msgstr "キャッシュが 7 日より古いので使わない: %{path}"
495
+
496
+ msgid "Not using the cache because its format or settings differ: %{path}"
497
+ msgstr "キャッシュの形式・基準が違うので使わない: %{path}"
498
+
499
+ msgid "Not using the cache because it cannot be read: %{error}"
500
+ msgstr "キャッシュを読めないので使わない: %{error}"
501
+
502
+ msgid "Saved the cache: %{path} (%{size}, %{count} folder)"
503
+ msgid_plural "Saved the cache: %{path} (%{size}, %{count} folders)"
504
+ msgstr[0] "キャッシュを保存: %{path}(%{size}、%{count} フォルダーぶん)"
505
+
506
+ msgid "Cannot save the cache: %{error}"
507
+ msgstr "キャッシュを保存できない: %{error}"
508
+
509
+ msgid "Scanning: %{dirs} folders (%{reused} reused) | %{current}"
510
+ msgstr "走査中 %{dirs} フォルダー(再利用 %{reused})| %{current}"
@@ -0,0 +1,22 @@
1
+ # ベンチマーク(benchmark/)のタスク。くわしくは benchmark/README.md を参照。
2
+ # rake "benchmark[ラベル]" 計測して benchmark/results/<ラベル>.yml に保存する(ラベルを省くと latest)
3
+ # rake "benchmark:compare[基準,...]" 保存した結果を、最初のラベルを基準に比べる(省くと全部を古い順に)
4
+ # JIT を付けて測るときは JIT=yjit か JIT=zjit を付ける。ほかの設定(BENCH_ROOT など)は benchmark/run.rb が読む
5
+
6
+ desc "ベンチマークを測って benchmark/results/<ラベル>.yml に保存する(JIT=yjit|zjit、BENCH_ROOT=実際のフォルダー)"
7
+ task :benchmark, [:label] do |_, args|
8
+ jit = ENV["JIT"]
9
+ abort "JIT は yjit か zjit" unless [nil, "", "none", "yjit", "zjit"].include?(jit)
10
+ env = jit.nil? || jit.empty? || jit == "none" ? {} : { "RUBYOPT" => "#{ENV['RUBYOPT']} --#{jit}".strip }
11
+ sh env, RbConfig.ruby, "benchmark/run.rb", args[:label] || "latest"
12
+ end
13
+
14
+ namespace :benchmark do
15
+ desc "保存したベンチマークの結果を比べる(最初のラベルが基準)"
16
+ task :compare do |_, args|
17
+ require_relative "../benchmark/lib/results"
18
+ labels = args.extras.empty? ? ReclaimableBenchmark::Results.labels : args.extras
19
+ abort "結果がまだありません(rake \"benchmark[ラベル]\" で計測する)" if labels.empty?
20
+ ReclaimableBenchmark::Results.compare(labels)
21
+ end
22
+ end
@@ -0,0 +1,132 @@
1
+ module Docs
2
+ # 日本語の原稿を HTML と man page に変換するときの手当て
3
+ module Japanese
4
+ module_function
5
+
6
+ # 全角で表示する文字(漢字・かな・全角の約物など)。
7
+ # 「・」「ー」は Unicode の文字種(Script)では Common なので、\p{Katakana} ではなく符号位置の範囲で拾う
8
+ WIDE_RANGES = [
9
+ 0x2E80..0x303E, # CJK の部首・記号と句読点(「、」「。」「」」など)
10
+ 0x3040..0x30FF, # ひらがな・カタカナ(「・」「ー」を含む)
11
+ 0x31F0..0x31FF, # カタカナ拡張
12
+ 0xFF01..0xFF60, # 全角英数字・全角記号
13
+ 0xFFE0..0xFFE6, # 全角の通貨記号など
14
+ ].freeze
15
+ WIDE = Regexp.new("[\\p{Han}#{WIDE_RANGES.map { "#{it.begin.chr(Encoding::UTF_8)}-#{it.end.chr(Encoding::UTF_8)}" }.join}]")
16
+ # 行頭に置かない文字。幅を超えても行末にぶら下げる
17
+ NO_LINE_START = "、。」』)!?:・ー"
18
+ # 行末に置かない文字。次の行へ送る
19
+ NO_LINE_END = /[「『(]\z/
20
+ # 次の行がブロックの始まり(箇条書き・見出し・引用・表・コード)なら改行を残す
21
+ BLOCK_START = /[ \t]*(?:[-*+][ \t]|\d+\.[ \t]|[#>|]|```)/
22
+
23
+ # 原稿の改行のうち、日本語の文中にあるものを取り除く。
24
+ # HTML でも roff でも原稿の改行は空白として表示され、「です。 次の」のように余計な空白が入るため。
25
+ # 句読点や「・」で終わる行は、次の行が英数字で始まっていても続ける(「、Homebrew」のように空白を入れない)。
26
+ # コードブロックと先頭の front matter(--- で囲んだ部分)は変えない
27
+ def join_lines(markdown)
28
+ front = markdown[/\A---\n.*?\n---\n/m].to_s
29
+ body = markdown.delete_prefix(front).split(/(^```.*?^```$)/m).each_with_index.map do |part, i|
30
+ next part if i.odd?
31
+
32
+ part.gsub(/(?<=#{WIDE})\n[ \t]*(?=#{WIDE})/, "")
33
+ .gsub(/(?<=[、。・])\n(?!#{BLOCK_START})[ \t]*(?=\S)/, "")
34
+ end
35
+ front + body.join
36
+ end
37
+
38
+ # roff の本文行のうち、日本語を含んで長いものを width 桁ごとに .br で折り返す。
39
+ # macOS の man(mandoc)は空白でしか行を折らないため、空白のない日本語の文が画面からはみ出す
40
+ def wrap_roff(roff, width: 64)
41
+ nofill = false
42
+ tag = false
43
+ roff.each_line.map do |line|
44
+ if line.start_with?(".", "'")
45
+ nofill = true if line.start_with?(".nf")
46
+ nofill = false if line.start_with?(".fi")
47
+ tag = line.start_with?(".TP") # .TP の次の 1 行は項目名なので折らない
48
+ next line
49
+ end
50
+
51
+ was_tag = tag
52
+ tag = false
53
+ next line if nofill || was_tag || !line.match?(WIDE) || display_width(line.chomp) <= width
54
+
55
+ wrap_line(line.chomp, width).map { "#{protect(it)}\n" }.join(".br\n")
56
+ end.join
57
+ end
58
+
59
+ # roff の 1 行を、分割できない単位(全角 1 文字、英数字の語、空白)に分ける。
60
+ # フォント切り替え(\fB など)は幅を持たないので、直後の単位にくっつける
61
+ def atoms(line)
62
+ tokens = line.scan(/\\f(?:\[[^\]]*\]|\(..|.)|\\(?:\(..|\[[^\]]*\]|.)|#{WIDE}| +|(?:(?!#{WIDE})[^ \\])+/)
63
+ atoms = []
64
+ prefix = +""
65
+ tokens.each do |t|
66
+ if t.start_with?("\\f")
67
+ prefix << t
68
+ next
69
+ end
70
+ kind = if t.start_with?(" ") then :space
71
+ elsif t.match?(WIDE) then :wide
72
+ else :narrow
73
+ end
74
+ last = atoms.last
75
+ # 空白は行末で捨てることがあるので、フォント切り替えは直前の単位の後ろに付け替える
76
+ # (「\fBsudo\fR は」の \fR が消えると、以降が太字のままになる)
77
+ if kind == :space && !prefix.empty? && last
78
+ last[:text] << prefix
79
+ prefix = +""
80
+ end
81
+ # 英数字の語とエスケープ(\- など)が続くときは 1 つの単位にまとめる
82
+ if kind == :narrow && prefix.empty? && last && last[:kind] == :narrow
83
+ last[:text] << t
84
+ last[:width] += display_width(t)
85
+ else
86
+ atoms << { kind:, text: prefix + t, width: display_width(t) }
87
+ prefix = +""
88
+ end
89
+ end
90
+ atoms << { kind: :narrow, text: prefix, width: 0 } unless prefix.empty?
91
+ atoms
92
+ end
93
+
94
+ def wrap_line(line, width)
95
+ lines = [[]]
96
+ atoms(line).each do |atom|
97
+ current = lines.last
98
+ if atom[:kind] == :space && current.empty?
99
+ next # 行頭の空白は捨てる
100
+ end
101
+
102
+ used = current.sum { it[:width] }
103
+ fits = used + atom[:width] <= width || current.empty? || no_line_start?(atom)
104
+ if fits
105
+ current << atom
106
+ else
107
+ current.pop while current.last&.dig(:kind) == :space
108
+ carry = current.last&.then { it[:text].match?(NO_LINE_END) } ? [current.pop] : []
109
+ lines << carry + (atom[:kind] == :space ? [] : [atom])
110
+ end
111
+ end
112
+ lines.map { |atoms| atoms.map { it[:text] }.join.rstrip }.reject(&:empty?)
113
+ end
114
+
115
+ # 行頭に置けない単位か。全角の句読点や閉じ括弧のほか、半角の「:」「,」「)」などで始まる単位も含める
116
+ def no_line_start?(atom)
117
+ first = atom[:text].sub(/\A(?:\\f(?:\[[^\]]*\]|\(..|.))+/, "")[0]
118
+ !first.nil? && (NO_LINE_START.include?(first) || ",.:;!?)]".include?(first))
119
+ end
120
+
121
+ # 表示幅。全角は 2 桁、roff のエスケープは 1 桁(フォント切り替えは 0 桁)と数える
122
+ def display_width(text)
123
+ text.gsub(/\\f(?:\[[^\]]*\]|\(..|.)/, "")
124
+ .gsub(/\\(?:\(..|\[[^\]]*\]|[^&])/, "x")
125
+ .gsub("\\&", "")
126
+ .each_char.sum { it.match?(WIDE) ? 2 : 1 }
127
+ end
128
+
129
+ # 行頭の「.」「'」はマクロとして読まれるので、ゼロ幅の \& を前に置く
130
+ def protect(text) = text.start_with?(".", "'") ? "\\&#{text}" : text
131
+ end
132
+ end