🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

gcm-utils

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gcm-utils

G20开发集成工具

latest
npmnpm
Version
1.1.1
Version published
Weekly downloads
2
-60%
Maintainers
1
Weekly downloads
 
Created
Source

G20集成开发工具包

目的

为了方便开发过程,统一使用 n20-common-lib 提供的 $l 方法, 移除废弃历史版本中的 $t

功能描述

Usage: g20-utils <command> [options] 

G20集成开发工具包

Options:
  -V, --version                output the version number
  -h, --help                   display help for command

Commands:
  pick-up [options]            提取代码中的中文字符
  replace-prototype [options]  统一项目中多语言属性 把 $t 替换为 $l
  translate [options]          将项目中的中文翻译为其他语言
  help [command]               display help for command

用法

  • 快速将代码中的 $t 替换 $l
Usage: g20-utils replace-prototype [options]            
                                                        
统一项目中多语言属性 把 $t 替换为 $l                    
                                                        
Options:                                                
  -o, --designation [type...]  处理指定的文件           
  -l, --lang [type...]         中文语言包位置           
  -h, --help                   display help for command

如果遇到没有翻译的会输出到 module/no-translate.json 文件中

  • 将代码中的中文提取到 module/i18n-zh.json
Usage: g20-utils pick-up [options] 
                                   
提取代码中的中文字符               
                                   
Options:                           
  -i, --ignores [type...]  不包含那些目录
  -f --force               强制覆盖已经提取的内容
  -h, --help               display help for command

  • 翻译功能
Usage: g20-utils translate [options]

将项目中的中文翻译为其他语言

Options:                                                                  
-l, --lang [lang]      目标语言简写, 比如英语 en 越南语: vi。默认为 en
-i, --input [input]    中文目录的位置, 默认为 ./i18n-zh.json            
-o, --output [output]  输出到指定位置, 默认为 ./lang/i18n.json          
-t, --token <token>    AI的token    联系作者获取 token                                  
-h, --help             display help for command  

FAQs

Package last updated on 20 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts