# FixLang **Repository Path**: FormatFa/TtranslateInputBox ## Basic Information - **Project Name**: FixLang - **Description**: 11111111111111111111111 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-20 - **Last Updated**: 2025-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 聊天翻译器 - FixLang 一个跨平台的聊天翻译器,支持输入语句,自动纠正语法,并显示差异。 ## 功能特点 - 语法自动纠正 - 记录错误语法类别 - 历史查询记录 ## 技术栈 - Go 语言 - Fyne 框架 ## 项目结构 ``` ├── cmd/ │ └── main.go # 主程序入口 ├── internal/ │ ├── config/ # 配置模块 │ ├── core/ │ │ ├── corrector/ # 语法纠正器 │ │ ├── translator/ # 翻译器 │ │ └── storage/ # 存储模块 │ └── ui/ │ ├── pages/ # 页面组件 │ └── components/ # UI组件 ├── go.mod # Go模块文件 ├── requirement.md # 需求文件 └── README.md # 项目说明 ``` ## 构建和运行 ### 前提条件 - Go 1.21 或更高版本 - Fyne 框架 ### 安装依赖 ```bash go mod tidy ``` ### 打包应用 根据不同操作系统,使用以下命令打包应用: #### macOS ```bash fyne package -os darwin ``` 打包完成后,会在项目根目录生成`cmd.app`文件。 #### Windows ```bash fyne package -os windows -icon Icon.png -src cmd ``` #### Linux ```bash fyne package -os linux -icon Icon.png -src cmd ``` #### Android export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk/26.1.10909125 fyne package -os android/arm64 --metadata FyneApp.toml fyne package -os android/arm64, -appID online.indigo6a.fixlang -icon Icon.png fyne package -os android/arm64 ### 运行应用 ```bash go run cmd/main.go ``` ### 构建应用 ```bash # 构建当前平台 fyne package -os $(go env GOOS) -icon icon.png # 构建其他平台 fyne package -os windows -icon icon.png fyne package -os linux -icon icon.png fyne package -os android -icon icon.png ``` fyne package -os darwin -icon ../Icon.png ## 配置 应用第一次运行时会创建 `config.json` 文件,您可以编辑此文件来配置翻译引擎: ```json { "translation_engine": "default", // 可选: default, openai "openai_key": "your_openai_key" } ``` ### 数据存储目录 macos: ~/Library/Preferences/fyne/ ## 贡献 欢迎贡献代码!请提交Pull Request。 ## 许可证 本项目采用 MIT 许可证。 字体修改: https://blog.csdn.net/Regulations/article/details/122170985