mix live_svelte_gettext.fix_references (LiveSvelteGettext v0.2.0)
View SourceFixes POT/PO file references to point to original Svelte files.
⚠️ Note: As of v0.1.0, LiveSvelteGettext uses
CustomExtractorto automatically inject correct Svelte file references duringmix gettext.extract. This task is now primarily a fallback/troubleshooting tool for edge cases where automatic extraction doesn't work as expected.
When to Use This Task
You typically don't need this task because:
CustomExtractorautomatically handles references during extraction- POT files will already contain correct Svelte file paths
Use this task only if:
- You're migrating from an older version with incorrect references
- You have existing POT files that need reference fixing
- CustomExtractor isn't working in your specific setup (please report as bug!)
- You're troubleshooting reference issues
Usage
mix live_svelte_gettext.fix_referencesOr run both extraction and fixing in one command:
mix gettext.extract && mix live_svelte_gettext.fix_referencesHow it works
- Finds all modules that use LiveSvelteGettext
- Reads the extraction metadata from each module
- Builds a mapping of msgid -> original Svelte file:line references
- Updates all .pot and .po files, replacing module references with Svelte references
Options
--gettext-path- Path to gettext directory (default: "priv/gettext")--dry-run- Show what would be changed without making changes