Asset manager reports assets used only in a translation as not used
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
Start in ProjectAssetService.calculateAssetUsage, which builds the text it searches from JSON.stringify(this.projectService.project) plus the thumbnail name and used text files. Look at how translation files (translations.<locale>.json) are loaded in the project service, and at ComponentAuthoringComponent.setComponent to see how translations are applied to a copy of the content. Done when an asset referenced only in a translation is no longer reported as unused, which you can check with a unit test on calculateAssetUsage that includes a translation file.
Written by the indexing model from the issue text.
Description
ProjectAssetService.calculateAssetUsage decides whether an asset is used by searching JSON.stringify(this.projectService.project) (plus the thumbnail name and used text files). Translations are stored separately in translations.<locale>.json, and the authoring tool applies them only to a copy of each component's content (ComponentAuthoringComponent.setComponent), so the project object never contains translated text.
As a result, an asset referenced only in a translation, for example an image with labels in another language inserted through the translation editor, is marked "(Not Used)" in the asset manager, next to its delete button, and counted in the unused total. Deleting it breaks the translated unit.
This is from reading the code; I have not reproduced it in a running instance.
A fix would add the content of each of the project's translation files to the text searched in calculateAssetUsage.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 8
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 12
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WISE-Community/WISE-Client
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WISE-Community/WISE-Client#2404 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WISE-Community/WISE-Client#2403 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WISE-Community/WISE-Client#2401 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WISE-Community/WISE-Client#2354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WISE-Community/WISE-Client#2350 ·
Maintainers usually reply within 1 day
All issues in WISE-Community/WISE-Client
Similar issues
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw#203385 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nwverse/persona#12800 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/playwright#44289 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 Half a day Newbie friendliness 65/100
Maintainers usually reply within 1 day