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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e18dd8808f40eaa2c0b0de975d91bf1f5a7f78f1bdf70231082551890fff837 |
|
MD5 | 40d430a6b973f4162b51ed93c92f5f46 |
|
BLAKE2b-256 | 8ce572091efbdd434332b8abb5b2293a7975c86c0109b44e937f3590c311d203 |
Hashes for jupyterlab_translate-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c07a83fb0dad80301109e00a1594a6e02a1c5b2c8c0a9deafe3cbab0af830bd2 |
|
MD5 | 7b81e02d161aba4878a4d5b596defec2 |
|
BLAKE2b-256 | a14551c7c915e0757d40273d121a0c2eb2b67bb2e7b6dbb9b4f7506045517551 |