Registry / serialization / ilib-lint-python-gnu

ilib-lint-python-gnu

JSON →
library2.0.4jsnpmunverified

A plugin for ilib-lint that checks Python resources using the GNU gettext library. It parses PO files and validates printf-style substitution parameters (like %s, %d) in source and target strings, ensuring parameters match and are properly numbered for translation. Current stable version is 2.0.4, with patch releases under the ilib-mono monorepo. Integrates with ilib-loctool-po for heavy lifting. Designed for ESM environments with Node.js >=12.

npm install ilib-lint-python-gnu
INSTALL
IMPORT
SIG · ILIB-LINT-PYTHON-G
I
ilib-lint-python-gnu
serializationjavascriptv2.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from 'ilib-lint-python-gnu'
const plugin = require('ilib-lint-python-gnu')
ESM-only package since v2.0.0; CommonJS require is not supported.
PythonGnuPlugin
import { PythonGnuPlugin } from 'ilib-lint-python-gnu'
Named export for explicit plugin class usage.
pythonGnuRules
import { pythonGnuRules } from 'ilib-lint-python-gnu'
Access individual rule definitions if needed.

Installs the plugin, adds it to ilib-lint config, and verifies it loads correctly.

// Install: npm install --save-dev ilib-lint-python-gnu // ilib-lint-config.json { "plugins": ["python-gnu"], "rulesets": { "python-gnu": true } } // Programmatic usage import plugin from 'ilib-lint-python-gnu'; console.log('Plugin loaded:', plugin.name); // Expected: Plugin loaded: python-gnu
Debug
Known issues
gotchaNode.js >=12 required; ESM modules not supported in older Node versions.
fix
Upgrade Node.js to version 12 or later.
affects: >=2.0.0
deprecatedThe plugin expects ilib-lint >=2.0.0; older ilib-lint versions may not be compatible.
fix
Use ilib-lint version 2.x or higher.
affects: >=2.0.0
gotchaThe dependency 'ilib-loctool-po' must be installed separately; it is not automatically included.
fix
Run 'npm install --save-dev ilib-loctool-po' alongside this package.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module .../node_modules/ilib-lint-python-gnu/index.js from ... not supported
Using CommonJS require() on an ESM-only package.
fix
Switch to ESM: use import statements or set 'type': 'module' in package.json.
Error: Cannot find module 'ilib-loctool-po'
Missing peer dependency 'ilib-loctool-po'.
fix
Install the missing peer: npm install --save-dev ilib-loctool-po.
Plugin 'python-gnu' not found in configuration
Plugin name mismatch in ilib-lint-config.json.
fix
Ensure the plugin key in config is 'python-gnu' (not 'ilib-lint-python-gnu').
Upgrade
Version history
2.0.4latest on npm
Audit
Dependencies
ilib-loctool-porequiredProvides the underlying PO file parser
ilib-lintrequiredRuntime dependency for plugin integration
Agent activity
4 hits · last 30 days
node
4
Resources
ilib-lint-python-gnu — npm install ilib-lint-python-gnu · libregistry