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 frontend.
  • Provide a Hatch Build Hook to compile catalogs when building wheels.
  • Update the list of contributors from Crowdin project.

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

Uploaded Source

Built Distribution

jupyterlab_translate-1.3.2-py3-none-any.whl (854.7 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_translate-1.3.2.tar.gz.

File metadata

  • Download URL: jupyterlab_translate-1.3.2.tar.gz
  • Upload date:
  • Size: 856.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for jupyterlab_translate-1.3.2.tar.gz
Algorithm Hash digest
SHA256 75dca8f73552b86fb8d33268722630429c8f85a247a93f2ff3097d92a8990eaf
MD5 e4bbe8ff81b699c78fd6484681d482d2
BLAKE2b-256 151395eca2b223f1f5f7e336e5b7dee4370d3ae5a193f2f7b0d9381f438c75d4

See more details on using hashes here.

File details

Details for the file jupyterlab_translate-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_translate-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8265656964445f3670cad1e8b620c476c7af7266d4ad1f2cc654855b715d15
MD5 61e14353f6eaff8bbbcc65bab666dd6f
BLAKE2b-256 2913cc445f93736599ab98f59262eecf6f431afb541ec0b42e4d0e0781ee4f03

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