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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 015395b3af23921f1a3e7972e7cf8750c1078f3d77af5022e5daf58638622d95 |
|
MD5 | 157d54257863682f2b62ca386f3eec54 |
|
BLAKE2b-256 | 0a62969aec855054d8139bca58604aae99c8b557fbebdbe59602e2587d4e83af |
Hashes for jupyterlab_translate-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8d364cfa97e01dd46ae6078bb2c8a4687e73e8945b52a7284073f9fbe48981c |
|
MD5 | 428cae6b0c81bdae8c1e2be457f4ab4c |
|
BLAKE2b-256 | f997724c31c9e8e828d29ee9a2a258cadb82e1d253b2f127b104fa7062ba19d6 |