Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

fix(resx-translation): show group filename in entries table

fatDucka34732d80e3a
diff --git a/.agents/skills/resx-translation/helpers/resx_core.py b/.agents/skills/resx-translation/helpers/resx_core.py
index 9ada7e3..45ade5d 100644
--- a/.agents/skills/resx-translation/helpers/resx_core.py
+++ b/.agents/skills/resx-translation/helpers/resx_core.py
@@ -417,7 +417,8 @@ def format_entry_compact(entry: ResxEntry, show_value: bool = True, max_val: int
return " ".join(parts)
-def format_entries_table(entries: list[ResxEntry], show_values: bool = True) -> str:
+def format_entries_table(entries: list[ResxEntry], filename: str = "?",
+ show_values: bool = True) -> str:
"""Format entries as a compact aligned table."""
if not entries:
return " (no entries)"
@@ -432,9 +433,9 @@ def format_entries_table(entries: list[ResxEntry], show_values: bool = True) ->
val = e.value
if len(val) > 50:
val = val[:47] + "..."
- lines.append(f" [{idx}] {key} = '{val}' ({e.filename}:{line_info})")
+ lines.append(f" [{idx}] {key} = '{val}' ({filename}:{line_info})")
else:
- lines.append(f" [{idx}] {key} ({e.filename}:{line_info})")
+ lines.append(f" [{idx}] {key} ({filename}:{line_info})")
return "\n".join(lines)
diff --git a/.agents/skills/resx-translation/helpers/resx_list.py b/.agents/skills/resx-translation/helpers/resx_list.py
index ace642a..8575eec 100644
--- a/.agents/skills/resx-translation/helpers/resx_list.py
+++ b/.agents/skills/resx-translation/helpers/resx_list.py
@@ -92,7 +92,7 @@ def list_directory(base: Path, *, lang_filter: str | None = None,
for e in entries:
print(format_entry_compact(e, show_value=False))
else:
- print(format_entries_table(entries, show_values=show_values))
+ print(format_entries_table(entries, default.filename, show_values=show_values))
# Locale files
for lf in locales:
@@ -104,7 +104,7 @@ def list_directory(base: Path, *, lang_filter: str | None = None,
for e in entries:
print(format_entry_compact(e, show_value=False))
else:
- print(format_entries_table(entries, show_values=show_values))
+ print(format_entries_table(entries, lf.filename, show_values=show_values))
def main() -> None: