JupyterLab Language Pack Translations Helper
Project description
jupyterlab-translate
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jupyterlab-translate-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb50bd409c5ca57197b2e8cb01517adebf7e830cd5eb4da12fc8fcb7ca78a76 |
|
MD5 | f9571cba66655f9fc4d34ab94b963bbd |
|
BLAKE2b-256 | 858ed541409a7b172d4d2d71948fc67c816a26bf8490061ebee8d6604cba6743 |
Hashes for jupyterlab_translate-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcd6e1c6e68be454f26c6b61d0d58259ad5e45293cb975e906d35f4a5713245c |
|
MD5 | 2eb66e49c7d19a69239247fe353addc0 |
|
BLAKE2b-256 | eca6b60000550e4b2326cb2906cce1b164a257395f128f53705dd3dfce2b4f27 |