Release 0.0.3

This commit is contained in:
2026-04-20 20:41:07 +00:00
parent a8846756a3
commit 8044a630e2
7 changed files with 319 additions and 71 deletions

View File

@@ -2,7 +2,7 @@ import { analyzeStorage } from "../core/analyzer.js";
import { isMediaPath, normalizePath } from "../core/path-utils.js";
async function* walkFilePicker(storage, target = "", onProgress = null) {
onProgress?.({ phase: "files", label: `Durchsuche ${storage}:${target || "/"}` });
onProgress?.({ phase: "files", label: format("KSA.Progress.BrowseStorage", { storage, path: target || "/" }) });
const result = await FilePicker.browse(storage, target);
for (const file of result.files ?? []) {
const path = normalizePath(file);
@@ -78,7 +78,7 @@ async function* packagePackEntries(onProgress = null) {
const ownerType = pack.metadata.packageType;
const ownerId = pack.metadata.packageName;
if (!["module", "system"].includes(ownerType) || !ownerId) continue;
onProgress?.({ phase: "sources", label: `Lese Paket-Pack ${pack.collection}`, currentSource: pack.collection });
onProgress?.({ phase: "sources", label: format("KSA.Progress.ReadPack", { pack: pack.collection }), currentSource: pack.collection });
const documents = await pack.getDocuments();
for (const document of documents) {
yield {
@@ -108,3 +108,7 @@ export async function runRuntimeAnalysis({ onProgress }={}) {
onProgress
});
}
function format(key, data) {
return game.i18n?.format(key, data) ?? key;
}