Jupyterlab语言包翻译帮助程序
jupyterlab-translate的Python项目详细描述
jupyterlab翻译
此包用于为JupyterLab生态系统生成language packs。在
此包在JupyterLab核心和外部扩展上执行以下常见任务:
- 从
*.py
、*.ts
、*.tsx
文件中的代码提取字符串。在 - 从JSON模式文件中提取字符串。在
- 创建gettext
*.pot
目录。在 - 从目录中删除重复的字符串。在
- 为特定语言创建gettext
*.po
目录。在 - 将目录编译为
*.mo
和*.json
格式,供JupyterLab前端使用。在
安装
Pip
pip install jupyterlab-translate
您还需要安装nodejs
>;=14。在
康达
^{pr2}$使用
捆绑目录作为语言包的一部分
这是推荐的分发本地化目录的方法。在
将目录与包捆绑在一起
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>
- 项目
标签: