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

Uploaded Source

Built Distribution

jupyterlab_translate-1.0.0-py2.py3-none-any.whl (849.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: jupyterlab-translate-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 eac71deb0eb77ad4224d68ab49c86022174d3a7066743f4a22a14f8b30eb81c4
MD5 5153bbb9d4c2b8c55f35970887de194b
BLAKE2b-256 fdea9426bef0a09b655f4b49b5f50f1c74191d84a52273b4ae4f1bb3af26e291

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jupyterlab_translate-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 849.6 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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c85a679621dee039bf1f22ba9be88f134a6d37af769908b5a3c9f81b5851de5
MD5 59553e9571623858c8fa3a2881e43c86
BLAKE2b-256 872372fcfcd71e4e5b5f4fbaa7d7189709b38bb7b1600723a817267a404cecc0

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