New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

python-gettext-translations

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-gettext-translations

Python gettext translations

  • 1.1.0
  • PyPI
  • Socket score

Maintainers
1

Usage

  1. Place your translation files in the directory tree structured as below: .. code-block:: console

    i18n/en_GB/messages.po i18n/fr_FR/messages.po

  2. Load the translation strings: .. code-block:: python

    from translations import init_translations dir_path = os.path.dirname(os.path.realpath(file)) init_translations(dir_path + "/i18n")

  3. Get translation string: .. code-block:: python

    from translations import translate translate("de_DE", "Hello, %user%", {"user": "Alexey"}) # Prints "Hello, Alexey"

New version release

To release new version:

  1. Update sphinx_integral_theme/init.py with new version and version_info

  2. Run the following command: .. code-block:: console

    (.venv) $ flit publish

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc