一、注册
- 地址 https://app.lokalise.com/login
- 也可以直接用Github登录
二、下载cli工具
地址:https://github.com/lokalise/lokalise-cli-2-go
1. 打开 PowerShell
2. 下载scoop
win下载命令
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
![](https://img.haomeiwen.com/i5644085/763d3cb7a70e8eed.png)
验证scoop
PS C:\Users\haoyi> scoop help
Usage: scoop <command> [<args>]
Some useful commands are:
alias Manage scoop aliases
bucket Manage Scoop buckets
cache Show or clear the download cache
checkup Check for potential problems
cleanup Cleanup apps by removing old versions
config Get or set configuration values
create Create a custom app manifest
depends List dependencies for an app
export Exports (an importable) list of installed apps
help Show help for a command
hold Hold an app to disable updates
home Opens the app homepage
info Display information about an app
install Install apps
list List installed apps
prefix Returns the path to the specified app
reset Reset an app to resolve conflicts
search Search available apps
status Show status and check for new app versions
unhold Unhold an app to enable updates
uninstall Uninstall an app
update Update apps, or Scoop itself
virustotal Look for app's hash on virustotal.com
which Locate a shim/executable (similar to 'which' on Linux)
Type 'scoop help <command>' to get help for a specific command.
安装lokalise2
scoop bucket add extras
scoop install lokalise2
提示
PS C:\Users\haoyi> scoop bucket add extras
WARN The 'extras' bucket already exists. Use 'scoop bucket rm extras' to remove it.
PS C:\Users\haoyi> scoop install lokalise2
WARN 'lokalise2' (2.6.4) is already installed.
Use 'scoop update lokalise2' to install a new version.
PS C:\Users\haoyi>
三、配置Token
token在上传/下载json文件的时候需要用到。
![](https://img.haomeiwen.com/i5644085/c817fd88c5fe6c22.png)
没有可以新创建
![](https://img.haomeiwen.com/i5644085/c652c68cdc2a5b0c.png)
四、创建项目
![](https://img.haomeiwen.com/i5644085/68eb2d6d6cf0b3f1.png)
五、项目 ID
ID在上传/下载json文件的时候需要用到。
![](https://img.haomeiwen.com/i5644085/b72025583226b8ad.png)
![](https://img.haomeiwen.com/i5644085/9ff51569d89e42fc.png)
六、上传本地语言文件
1、进入开发项目
cmd进入项目目录。
![](https://img.haomeiwen.com/i5644085/c27226948d3ab383.png)
2、 上传
1.使用命令
lokalise2 --token <token> --project-id <project-id> file upload --file <xxx.json> --lang-iso en
其中token和project-id就是上面获取到的token和项目ID,json文件就是当前目录下对应的json文件路径。
![](https://img.haomeiwen.com/i5644085/2324a82bf0b1466e.png)
-
视图上传
image.png
七、录入语种语言
![](https://img.haomeiwen.com/i5644085/eae78d5fc4377e82.png)
八、下载语言文件
1.使用命令
lokalise2 --token <token> --project-id <project-id> file download --format json
![](https://img.haomeiwen.com/i5644085/d435ac392ef72ebb.png)
![](https://img.haomeiwen.com/i5644085/027e7915cf0711bc.png)
2. 视图下载
![](https://img.haomeiwen.com/i5644085/067b44d7764bc299.png)
网友评论