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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | da7722c825dca8a7597dd54621f7f79f338872506f7b9a36809dc0754bfd7141 |
|
MD5 | f43a9e38475de0991e3271a3376d8d7d |
|
BLAKE2b-256 | 90b5d591eec4e45c4d43676b2bfe5b4bb09e6f87474b75960ab9fe9b64527242 |
Hashes for jupyterlab_translate-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c8bad2f7d188ff448c561a773107006da13a904f3da978f29fe424880a57b2 |
|
MD5 | 8f807a4c8f1fd03fd61cebcade345a4e |
|
BLAKE2b-256 | 4f0492ef503c68ea3581562132a495bb85b56187d0ecdc88d1fe45ad4da850b5 |