-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from shalldie/feature-i18n
Feature i18n
- Loading branch information
Showing
22 changed files
with
387 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<!-- 中英文切换 --> | ||
<div align="right"> | ||
|
||
[English](./README.md) | 中文 | ||
|
||
</div> | ||
<!-- 中英文切换 end --> | ||
|
||
<!-- 封面区域 --> | ||
<div align="center"> | ||
|
||
<img src="https://user-images.githubusercontent.com/9987486/229472271-62a5d923-f7b7-416c-913e-c842ecc2de4d.png" width="320" /> | ||
|
||
### Note in terminal, based on Github Gist. 🧑💻 | ||
|
||
`终端运行的记事本,基于 Github Gist 构建。` | ||
|
||
[![Release Version](https://img.shields.io/github/v/release/shalldie/tnote?display_name=tag&logo=github&style=flat-square)](https://github.com/shalldie/tnote) | ||
[![Docker Image Version](https://img.shields.io/docker/v/shalldie/tnote/latest?style=flat-square&logo=docker)](https://hub.docker.com/r/shalldie/tnote/tags) | ||
[![Go Version](https://img.shields.io/github/go-mod/go-version/shalldie/tnote?label=go&logo=go&style=flat-square)](https://github.com/shalldie/tnote) | ||
[![Go Reference](https://pkg.go.dev/badge/github.com/shalldie/tnote.svg)](https://pkg.go.dev/github.com/shalldie/tnote) | ||
[![Build Status](https://img.shields.io/github/actions/workflow/status/shalldie/tnote/ci.yml?logo=github&style=flat-square)](https://github.com/shalldie/tnote/actions) | ||
[![License](https://img.shields.io/github/license/shalldie/tnote?logo=github&style=flat-square)](https://github.com/shalldie/tnote) | ||
|
||
<img src="https://github.com/shalldie/tnote/assets/9987486/109dac72-1596-46d5-a727-e939f74a0fd2" width="900"> | ||
|
||
</div> | ||
|
||
<!-- 封面区域 end --> | ||
|
||
`tnote` 是一个运行在 `Terminal` 的记事本应用程序,让你可以在不同设备快速访问、同步内容,记录自己的想法。 | ||
|
||
- [x] 应用 🎯 | ||
- [x] 快捷键、鼠标操作 | ||
- [x] 云端存储持久化 | ||
- [x] 国际化 | ||
- [x] 文件 | ||
- [x] 增删查改 | ||
- [x] 详情 📝 | ||
- [x] Markdown 高亮 | ||
- [x] 编辑、保存 | ||
- [x] 安装 | ||
- [x] binary | ||
- [x] go install | ||
- [x] docker | ||
|
||
## 准备&配置 | ||
|
||
应用基于 github gist 构建,需要去 [申请 access token](https://github.com/settings/tokens/new),然后添加到环境变量 `TNOTE_GIST_TOKEN`。 | ||
|
||
```bash | ||
# ~/.bashrc | ||
export TNOTE_GIST_TOKEN="<your_access_token>" | ||
``` | ||
|
||
| 环境变量 | 默认值 | 描述 | | ||
| :-------------------- | :-----: | :----------------------------------- | | ||
| `TNOTE_GIST_TOKEN` | | 申请到的 access token | | ||
| `TNOTE_LANG` / `LANG` | `en_US` | 使用的语言,可选值:`en_US`、`zh_CN` | | ||
|
||
## 安装&运行 | ||
|
||
### 1. binary | ||
|
||
[Download](https://github.com/shalldie/tnote/releases),下载后直接执行即可,加入 `PATH` 更佳。 | ||
|
||
| 文件 | 适用系统 | | ||
| :------------------- | :----------------------- | | ||
| `tnote.darwin-amd64` | `Mac amd64`、`Mac arm64` | | ||
| `tnote.linux-amd64` | `Linux amd64` | | ||
| `tnote.linux-arm64` | `Linux arm64` | | ||
|
||
example: | ||
|
||
```bash | ||
# install | ||
wget -O tnote [url] | ||
sudo chmod a+x tnote | ||
sudo mv tnote /usr/local/bin/tnote | ||
# run | ||
tnote | ||
``` | ||
|
||
### 2. go install | ||
|
||
需要 `go@1.20+` 环境 | ||
|
||
```bash | ||
# install | ||
go install github.com/shalldie/tnote@latest | ||
# run | ||
tnote | ||
``` | ||
|
||
### 3. docker | ||
|
||
```bash | ||
docker run -it -e TNOTE_GIST_TOKEN=$TNOTE_GIST_TOKEN shalldie/tnote:latest | ||
``` | ||
|
||
## LICENSE | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package file_list | ||
|
||
var i18nTpl = ` | ||
# del file | ||
del_confirm: | ||
en_US: Are you sure you want to delete the file 「%v」? | ||
zh_CN: 确定要删除文件「%v」吗? | ||
del_deleting: | ||
en_US: deleting... | ||
zh_CN: 删除中... | ||
del_done: | ||
en_US: 「%v」Complete deletion | ||
zh_CN: 「%v」完成删除 | ||
# new file | ||
new_namevalid: | ||
en_US: The file name length needs to be greater than 3 | ||
zh_CN: 文件名长度需要大于3 | ||
new_message: | ||
en_US: New file, please enter the file name | ||
zh_CN: 新建文件,请输入文件名 | ||
new_creating: | ||
en_US: creating... | ||
zh_CN: 新建中... | ||
new_done: | ||
en_US: 「%v」Complete new creation | ||
zh_CN: 「%v」完成新建 | ||
# rename file | ||
rename_message: | ||
en_US: Rename file「%v」 | ||
zh_CN: 重命名文件「%v」 | ||
rename_renaming: | ||
en_US: renaming... | ||
zh_CN: 重命名中... | ||
rename_done: | ||
en_US: 「%v」->「%v」Complete renaming | ||
zh_CN: 「%v」->「%v」完成重命名 | ||
# file list | ||
filelist_title: | ||
en_US: File List | ||
zh_CN: 文件列表 | ||
filelist_filter: | ||
en_US: "Filter:" | ||
zh_CN: 过滤: | ||
# keys | ||
key_up: | ||
en_US: up | ||
zh_CN: 上 | ||
key_down: | ||
en_US: down | ||
zh_CN: 下 | ||
key_pgup: | ||
en_US: prev pg | ||
zh_CN: 上一页 | ||
key_pgdown: | ||
en_US: next pg | ||
zh_CN: 下一页 | ||
key_filter: | ||
en_US: filter | ||
zh_CN: 过滤 | ||
key_cancel: | ||
en_US: cancel | ||
zh_CN: 取消 | ||
key_filter_apply: | ||
en_US: apply filter | ||
zh_CN: 应用过滤 | ||
key_filter_more: | ||
en_US: more | ||
zh_CN: 更多 | ||
key_filter_less: | ||
en_US: less | ||
zh_CN: 折叠 | ||
# key custom | ||
key_new: | ||
en_US: new | ||
zh_CN: 新建 | ||
key_rename: | ||
en_US: rename | ||
zh_CN: 重命名 | ||
key_edit: | ||
en_US: edit | ||
zh_CN: 编辑 | ||
key_del: | ||
en_US: delete | ||
zh_CN: 删除 | ||
` |
Oops, something went wrong.