App-Greple-xlate
view release on metacpan or search on metacpan
Revision history for Perl extension App-Greple-xlate
2.01 2026-07-09T05:59:30Z
- Renew the `xlate` command-line front-end for the 2.0 module.
Incompatible changes in the `xlate` command (the -Mxlate module
interface is unchanged):
* The default engine changes from deepl to gpt5. Cache file
names include the engine name, so run with `-e deepl` to keep
using DeepL for existing documents.
* API translation is now the default. The clipboard-based
manual translation mode is now `--no-api` (`-a`/`--api`
remains valid as an explicit default).
* `-n` is now a counting flag: once prints the composed greple
command as before, twice (`-nn`) runs it with --xlate-dryrun
to preview the transmission payload without calling the API.
- Add first-class `xlate` options for the 2.0 module features:
--anonymize, --mark, --template, --frontmatter, --seed and
--context, mapping to the corresponding --xlate-* options.
- share/XLATE.mk defaults to gpt5 and carries the new options via
XLATE_ANONYMIZE, XLATE_MARK, XLATE_TEMPLATE, XLATE_FRONTMATTER,
XLATE_SEED and XLATE_CONTEXT_WINDOW; a per-file FILE.ANONYMIZE
control file is used as that file's anonymization dictionary.
- Fix: --xlate-dryrun no longer prints "!!! TRANSLATION ERROR !!!"
for cache misses with a substituting output format.
- Fix: --xlate-dryrun combined with --xlate-cache=clear no longer
truncates the on-disk cache file.
- Fix a stray masking tag left in the Korean DeepL documentation.
2.00 2026-07-06T19:58:24Z
- New llm backend: the gpt5 engine now calls the general-purpose
llm command (https://llm.datasette.io/) instead of gpty. The
gpty-based engines (gpt3, gpt4, gpt4o) are retained under the
gpty namespace; engine names are resolved backend-first (llm,
then gpty, then bare). Use --xlate-setopt backend=gpty to force
a specific backend.
- Context-aware differential translation: when a cached document
is edited, each changed region is translated in its own API call
together with the surrounding translated pairs, the raw source
text around the change, and the previous translation of the
edited part, so unchanged wording is preserved. Controlled by
--xlate-context-window (default 2, set 0 to disable).
- Anonymization: conceal sensitive strings from the translation
API with --xlate-anonymize (JSON or line-format dictionary) or
--xlate-anonymize-mark (inline first-occurrence marks). Strings
are replaced by category tags like <person id=1 /> during
transmission and restored in the output; local cache files keep
restored plain text.
- Template support: --xlate-template protects Jinja2-style
expressions as opaque placeholders and verifies that they
survive translation; --xlate-frontmatter excludes YAML front
matter from translation and anonymizes its values. Designed to
work with macro processors such as pandoc-embedz.
- Add --xlate-cache-seed to initialize a new document's cache from
another document's cache file (useful for periodic reports).
- Behavior change: the progress From display and the --xlate-dryrun
preview now show each payload as transmitted, after anonymization
and masking.
- A failed translation run no longer discards cache data: results
already obtained are saved and the cache file is left untouched
afterward.
- Fix cache lookup bugs: duplicate normalized keys could fake
cache hits, and default settings were shared between cache
objects.
- Revise the manual for the new engine layout; document the
previously missing --xlate-dryrun and --xlate-from options and
the GREPLE_XLATE_CACHE environment variable.
- Move the generated multilingual documentation from docs/ to
i18n/; docs/ now holds development documentation only.
( run in 0.951 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )