Git Product home page Git Product logo

stranslate's Introduction

STranslate

Latest GitHub release Latest GitHub release Docker pull GitHub last commit

STranslate

WPF 开发的一款即开即用即用即走的翻译工具
中文 | English

Preview 2.0

  • 支持多服务同时翻译
  • 支持完全离线OCR,实用效果ok
  • 支持历史记录,方便回溯查找
  • 后期收尾,即将更新

功能

  • 添加 DeepL API
  • 添加划词翻译
  • 添加复制结果蛇形、大小驼峰
  • 软件层面识别语种(中英文)
  • 添加开机自启
  • 添加明/暗主题
  • 添加 UI 设置缓存(用户目录下 AppData\Local\STranslate)
  • 添加离线语音合成
  • 添加离线截图文字识别(支持英文, 中文数据包过大且体验不好)
  • 添加检查更新
  • 添加翻译记录缓存功能

安装

下载最新 Release 版本后解压即可使用

使用

previews

previews_dark

打开软件后会静默在后台,等待调用

  1. 全局监听快捷键
  • Alt + A 打开软件界面,输入内容按回车翻译
  • Alt + D 复制当前鼠标选中内容并翻译
  • Alt + S 截图选中区域内容并翻译
  • Alt + G 打开窗口(不清空内容)
  1. 软件内快捷键
  • ESC 隐藏界面
  • Ctrl+Shift+Q 退出程序
  • Ctrl+Shift+R 切换主题
  • Ctrl+Shift+T 置顶/取消置顶

点击软件外部任意处即自动隐藏到后台——即用即走。

STranslate依赖于.NET Framework 4.8 运行环境,如果程序启动时提示“This application requires *** .NETFramework,Version=v4.8”,请点击以下链接下载并安装.NET Framework 4.8 运行环境。
适用于 Windows 的 Microsoft .NET Framework 4.8 脱机安装程序下载 | Microsoft Support

卸载

  1. 删除软件运行目录
  2. 打开 cmd 运行下面的命令即可
rd /s /q "%localappdata%\stranslate"

开发历史

  • 2023-03-02 0.25 添加复制提醒动画

  • 2023-02-28 0.24 添加 deepl 接口(已经安装的cmd运行 del %localappdata%\stranslate\stranslate.json 后打开即可更新接口)

  • 2023-02-24 0.22 优化分辨率切换时托盘图标模糊问题

  • 2023-01-17 0.20 添加翻译记录缓存功能,重复翻译从本地数据库获取,本地记录数量上限可调整

  • 2023-01-12 0.18 优化 GC 后台静默运行内存占用保持 4MB 左右

  • 2023-01-12 0.17 添加检查更新功能

  • 2023-01-10 0.15 添加离线 OCR 功能,其使用 tesseract 目前仅支持英文

自修改提示

有经验者可自行下载 语言包tessdata 目录后修改 UtilTesseractGetText方法即可

public static string TesseractGetText(Bitmap bmp)
{
	try
	{
		using (var engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.Default))
		//using (var engine = new TesseractEngine(@"./tessdata", "chi_sim", EngineMode.Default))
		{
			using(var pix = PixConverter.ToPix(bmp))
			{
				using (var page = engine.Process(pix))
				{
					return page.GetText();
				}
			}
		}
	}
	catch (Exception ex)
	{
		throw ex;
	}
}
  • 2023-12-28 0.10 添加明暗主题切换功能

  • 2022-12-27 0.08 版本添加开机启动

如果接口失效

当请求人数较多时,远端接口可能暂时失效,可自行运行翻译接口程序

  1. 【推荐】 下载对应平台可 执行文件,随后在软件右上角选择 local 接口即可
  2. 【进阶】 下载 docker镜像,关闭软件 - cmd 运行 start %localappdata%\stranslate\stranslate.json - 修改接口地址 - 重启软件即可

Author 作者

STranslate © zggsong, Released under the MIT License.
Authored and maintained by zggsong with help from other open source projects WpfTool and Tai.

Website Blog · GitHub @zggsong

stranslate's People

Contributors

zggsong avatar zggsong7 avatar egandx avatar llrui-0719 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.