Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Records gettext translation messages and synchronizes to message catalogs.
The recorder is attached to an existing translation function keeps track of the inputs and outputs.
The result is a locales directory structure::
.pot / /LC_MESSAGES /LC_MESSAGES/.po ...
This structure is written on process exit.
Note that when the recorder is initialized, it imports any existing message catalog. That is, it's robust to process startup/shutdown and can operate continuously.
In Python-code, enable the translation recorder by wrapping an existing translation function.
The easiest way to wire this up is by patching the module that holds the function (if possible)::
import zope.i18n import translationrecorder
zope.i18n.translate = translationrecorder.Recorder( zope.i18n.translate, './locales' )
There's integration included for the Pyramid and Zope/Plone frameworks.
Set the environment variable RECORD_TRANSLATIONS
to an existing
locales directory and run your server process::
$ mkdir ./locales $ RECORD_TRANSLATIONS=./locales bin/paster serve ...
This requires that the translationrecorder
module is imported. This
is handled automatically on Plone. For other systems::
import translationrecorder
Technically, the package applies patches against the global translation functions of the applicable frameworks.
Malthe Borch mborch@gmail.com
Fixed an issue where a translation would always appear with a default text, even when not present in catalog.
Fixed an issue where a message with a mapping would not get properly decoded into a message id.
Fixed issue where generated .po-files would result in a syntax error
on compilation using pythongettext
due to a missing initial
dummy message translation.
Patch the translation domain instead of the (higher-level) global translation function.
This fixes an issue where messages would not be recorded with the proper translation domain and the used target languages would not be correctly registered.
FAQs
Records gettext translation messages and synchronizes to message catalogs.
We found that translationrecorder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.