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
File details
Details for the file jupyterlab_translate-1.2.0.tar.gz
.
File metadata
- Download URL: jupyterlab_translate-1.2.0.tar.gz
- Upload date:
- Size: 856.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402e38069ee767025c299d3faaad4c4aa4a8fbb41e2f0c650fcd635f0bb297a1 |
|
MD5 | b849ca72db8689dd8cd5c3a5f401cee7 |
|
BLAKE2b-256 | 7ef2f087253b153a7738a27bbb045e5d6709de2247d9a0c8f2eda68daee84330 |
File details
Details for the file jupyterlab_translate-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: jupyterlab_translate-1.2.0-py3-none-any.whl
- Upload date:
- Size: 854.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29b5ec892fe0d3b34c4212da92da87a2fd8a6760038539028764d4337ce2e5f0 |
|
MD5 | 866c1c5fafd7d9c3ddaf3d7efd5b59ed |
|
BLAKE2b-256 | 7b7e3461d9ef281f1260fe60fdc3a68c702d15cfc9fd2207062f51396b9b1318 |