OrchardCoreContrib.PoExtractor icon indicating copy to clipboard operation
OrchardCoreContrib.PoExtractor copied to clipboard

Consider extracting Liquid strings from JSON files

Open sarahelsaig opened this issue 1 year ago • 4 comments

The tool supports extracting strings from Liquid files. But it does not extract Liquid strings from *.recipe.json files. For example the Lombiq Training Demo repo contains a recipe with the "You have no permission to manage Person Page content items." text:

git clone https://github.com/Lombiq/Orchard-Training-Demo-Module.git
cd Orchard-Training-Demo-Module/
extractpo . . -t Liquid
grep "You have no permission" Lombiq.TrainingDemo.pot

It says Lombiq.TrainingDemo: Found 55 strings., but the expected string is not found among them.

[!NOTE] If this is considered dynamic content and intentionally not supported, that's fine too. But in this case a note should be added to the Readme for clarity.

sarahelsaig avatar Jan 21 '25 14:01 sarahelsaig

PO Extractor extracts localization strings from liquid files, not JSON files. If this used in OC we could subclass LiquidStringExtractor to make this happen

hishamco avatar Jan 21 '25 23:01 hishamco

At least in Lombiq projects Liquid in recipes is much more common than Liquid files. Especially for widgets and in the DotNest tenants that we maintain. If you are open to it, I may implement a subclass for LiquidStringExtractor some time soon.

sarahelsaig avatar Jan 22 '25 15:01 sarahelsaig

If you are open to it,

This is not my project, a community project. Feel free to add what it might help the community

hishamco avatar Jan 22 '25 22:01 hishamco

@sarahelsaig, are you willing to implement this?

hishamco avatar Jun 30 '25 23:06 hishamco