JupyterLab语言包翻译助手
项目描述
jupyterlab-translate
此包用于生成JupyterLab生态系统中的语言包。
此包执行以下在JupyterLab核心和外部扩展中常见的任务
- 从
*.py
、*.ts
、*.tsx
文件中的代码中提取字符串。 - 从JSON模式文件中提取字符串。
- 创建gettext
*.pot
目录。 - 从目录中删除重复的字符串。
- 为特定语言创建gettext
*.po
目录。 - 将目录编译为
*.mo
和*.json
格式,以便由JupyterLab前端使用。 - 提供Hatch构建钩子,在构建wheel时编译目录。
- 从Crowdin项目更新贡献者列表。
安装
Pip
pip install jupyterlab-translate
您还需要安装nodejs
>= 14。
Conda
conda install jupyterlab-translate -c conda-forge
用法
将目录捆绑为语言包的一部分
这是分发您本地化目录的推荐方式。
访问语言包仓库。
将目录与包捆绑在一起
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>
开发
Typescript提取器
为了从typescript文件中提取可翻译的字符串,此包依赖于gettext-extract
。为了简化其安装和使用,该工具通过创建使用@vercel/ncc
编译器的单个JavaScript文件打包到Python包中。
要更新单一代码文件,请参阅发布文件。
关闭
jupyterlab_translate-1.3.7.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ce1663e5fc43456d345800e74fdc1023d3f4d1afa88d62b1e836b7342a4a0c61 |
|
MD5 | 0e14a396fc13824d0777664357cbe860 |
|
BLAKE2b-256 | 08260e147d6fa8051b40b5e8db367f64aa383c7ea982205f3e776ec32e3b3fa0 |
关闭
jupyterlab_translate-1.3.7-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a88384e888b203dbee78754c205c7bb06dad882cde220ad4e55af6c246c2ef13 |
|
MD5 | 83aabfda9b5f31a793b3839607118ede |
|
BLAKE2b-256 | fa07482a62cb87e71d1d624369d1ef94b41cf22ee72167ad5e2f67b3d051880b |