Skip to main content

Jupyterlab Language Pack Translations Helper

Project description

jupyterlab-translate

Linux tests Code Style: Black Join the chat at https://gitter.im/jupyterlab/jupyterlab

This package is used to generate language packs for the JupyterLab ecosystem.

This pacakge performs the following tasks common on JupyterLab core and external extensions:

  • Extract strings from code in *.py, *.ts, *.tsx files.
  • Extract strings from JSON schema files.
  • Create gettext *.pot catalogs.
  • Removes duplicate strings from catalogs.
  • Create gettext *.po catalogs for specific languages.
  • Compile catalogs to *.mo and *.json format to be consumed by the JupyterLab frontent.

Installation

Pip

pip install jupyterlab-translate

You will also need to install gettext-extract to be able to extract strings from *.tsx files.

npm install gettext-extract -g

Conda

conda install jupyterlab-translate -c conda-forge

Usage

Bundle catalogs as part of a language pack

This is the recommended way of distributing your localization catalogs.

Visit the language packs repository.

Bundle catalogs with packages

jlab-trans extract <JLAB-EXTENSION-DIR> <JLAB_EXTENSION_NAME>
jlab-trans update <JLAB-EXTENSION-DIR> <JLAB_EXTENSION_NAME> -l es-ES
jlab-trans compile <JLAB-EXTENSION-DIR> <JLAB_EXTENSION_NAME>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab-translate-0.1.0.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distribution

jupyterlab_translate-0.1.0-py2.py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page