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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 418948f2036382e3f456c79e8716a2d90289c8f3b2758d45edeb3b0ba5877dbe |
|
MD5 | c885cfcc168956733d1167d346bc3897 |
|
BLAKE2b-256 | 817b76c2759cec00fd03dce162d7e24cea71a2dc516e5f125e0466401e0bcd79 |
Hashes for jupyterlab_translate-1.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a112f86ef3ef94d4d2e8c9f1c353101d1fbec4ea621296a3675637d0990731 |
|
MD5 | 63482ea5cd66b0320e88a99481aef8e2 |
|
BLAKE2b-256 | 9032451760c5f11187b90916df565b4c904f1907f58bc5f27e73bde85e5c2380 |