PrestaShop / PrestaShop/TranslationToolsBundle
Twig extractor returns the same message over and over in file where it doen't exist
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 5
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
When trying to translate a module, some messages in twig templates are not visible in the BO interface
Debugging the TwigExtractor class, it seems that we have one message which come back in templates where it doesn't belong
See the video
https://user-images.githubusercontent.com/7426640/187469128-288b0e1b-1ca6-4acc-b37e-f2415ffb7f3b.mp4
The message "It looks like we have trouble connecting to Addons. Please refresh the page or check your firewall configuration." belongs to error.html.twig but the extractor found it again in layout-ajax.html.twig and catalog-refresh.html.twig
But this string is not present in these files
On the other hand we have a lot of wordings which are not extracted
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with the TwigExtractor class and compare its results for error.html.twig, layout-ajax.html.twig, and catalog-refresh.html.twig. Reproduce the module translation case shown in the video, then verify that messages are extracted only from the templates where they occur and that the reported missing wordings are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100