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 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
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.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bb0a0586e5e317432a05d9fe05918bd869c59ae9356cf3557b8f0f2eddfa45 |
|
MD5 | b8d56ae9db3c45838743a84b434f456a |
|
BLAKE2b-256 | 6ed52310b66287ce95614c25137c588c438a41fb3c73fe2b0b451a7f223ff790 |
Hashes for jupyterlab_translate-1.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03fab5d85b7dffd1895d86c88ab849de95bcc32daa34c3d9897e2248b7ec7efe |
|
MD5 | aef101ea7eff25a86854a7c5e3b3aa2c |
|
BLAKE2b-256 | 93ccb2be9d372d8ea2b5fe89288e088764cb0d2f0549c790cbc63545ad41ccc1 |