Skip to main content

PoSentinel

PyPI version Python versions License: MIT

Odoo Translation Quality Analyzer — Protect your Odoo translations before they hit production.


Overview

PoSentinel is a deterministic linter and quality engine designed to inspect .po localization files, with first-class support for Odoo modules and terms (pt_BR and multilingual setups).

It catches critical runtime translation issues such as corrupted or altered Python format placeholders (%s, %(name)s), broken HTML/XML tags, empty translations, and uninspected fuzzy entries.

Quick Start

Installation

pip install posentinel

Basic Usage

Analyze a single .po file:

posentinel scan path/to/pt_BR.po

Analyze an entire directory or Odoo module structure:

posentinel scan ./addons/my_module/i18n

Export issues in JSON format (ideal for CI/CD integrations):

posentinel scan pt_BR.po --format json

Exit Codes for CI/CD

  • 0: Scan passed successfully without blocking issues.
  • 1: Validation issues detected (errors found).
  • 2: Runtime error or invalid arguments/configuration.

License

MIT License. See LICENSE for details.

Autenticação e Assistente de Tradução por IA (v0.6)

O PoSentinel suporta opcionalmente um assistente de tradução e correção usando a API do Claude (Anthropic).

Para configurar a autenticação: A maneira recomendada é usar a CLI oficial da Anthropic:

ant auth login

Alternativamente, você pode definir a variável de ambiente ANTHROPIC_API_KEY:

export ANTHROPIC_API_KEY="sk-..."

Uso:

  • O assistente é ativado por padrão. Ele gerará sugestões para problemas detectados e pedirá confirmação interativa.
  • Para aceitar tudo automaticamente: --auto-translate
  • Para desativar a IA e focar apenas na validação: --no-translation

Exemplo do posentinel.toml:

[ai]
enabled = true
auto_translate = false
model = "claude-opus-5"

Metadata

Release files for posentinel 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for posentinel 0.6.3
File Size Uploaded Provenance Actions
posentinel-0.6.3.tar.gz 824.8 kB Without provenance Details for posentinel-0.6.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for posentinel 0.6.3
File Interpreter ABI Platform Actions
posentinel-0.6.3-py3-none-any.whl Python 3 none any Details for posentinel-0.6.3-py3-none-any.whl

Total release size: 850.5 kB

Release files / posentinel-0.6.3.tar.gz

Download URL posentinel-0.6.3.tar.gz
Size 824.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5b257a198e377e2f0fb792d8d0f39c282a4152a05dbb00b95862b9516bde8800
BLAKE2b-256 checksum
How to use checksums
880e10d726941987fccb744e0911468550e238789203aa6a683a4d991639448f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / posentinel-0.6.3-py3-none-any.whl

Download URL posentinel-0.6.3-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67aa773920c2223f8504bb49d8a93c87e395ec2bdb0729e31038a86a7fd9787e
BLAKE2b-256 checksum
How to use checksums
0fc993b085737e1d4a3d876407968748ded7717631b97a2b16740e68301f9a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for posentinel 0.6.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page