Skip to main content

JupyterLab Language Pack Translations Helper

Project description

jupyterlab-translate

Linux tests license pypi version conda version 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 package 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 nodejs >= 14.

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

jupyterlab-translate extract <JLAB-EXTENSION-DIR> <JLAB-EXTENSION-NAME>
jupyterlab-translate update <JLAB-EXTENSION-DIR> <JLAB-EXTENSION-NAME> -l es-ES
jupyterlab-translate compile <JLAB-EXTENSION-DIR> <JLAB-EXTENSION-NAME>

Development

Typescript extractor

To extract translatable strings from typescript files, this package relies on gettext-extract. To ease its installation and usage, that tool is packaged within the python package by creating a monolithic JavaScript file using @vercel/ncc compiler.

To update the monolithic file, have a look at the release file.

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-1.0.1.tar.gz (853.9 kB view details)

Uploaded Source

Built Distribution

jupyterlab_translate-1.0.1-py2.py3-none-any.whl (849.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyterlab-translate-1.0.1.tar.gz.

File metadata

  • Download URL: jupyterlab-translate-1.0.1.tar.gz
  • Upload date:
  • Size: 853.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11

File hashes

Hashes for jupyterlab-translate-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3e18dd8808f40eaa2c0b0de975d91bf1f5a7f78f1bdf70231082551890fff837
MD5 40d430a6b973f4162b51ed93c92f5f46
BLAKE2b-256 8ce572091efbdd434332b8abb5b2293a7975c86c0109b44e937f3590c311d203

See more details on using hashes here.

File details

Details for the file jupyterlab_translate-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_translate-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 849.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11

File hashes

Hashes for jupyterlab_translate-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c07a83fb0dad80301109e00a1594a6e02a1c5b2c8c0a9deafe3cbab0af830bd2
MD5 7b81e02d161aba4878a4d5b596defec2
BLAKE2b-256 a14551c7c915e0757d40273d121a0c2eb2b67bb2e7b6dbb9b4f7506045517551

See more details on using hashes here.

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