Skip to content

Commit

Permalink
Release 1.4
Browse files Browse the repository at this point in the history
1. 简化自动翻译模式切换提示
将原有的自动翻译模式切换提示进行了简化,去除冗余,简化后的提示分别为:
禁用自动翻译
常规自动翻译
反向自动翻译

2. 重构帮助文档内容
针对帮助文档内容进行重构,调整文档内容。修复英文帮助文档中的错误。
  • Loading branch information
huaiyinfeilong committed Apr 29, 2023
1 parent d1ae933 commit 89294c4
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 37 deletions.
23 changes: 21 additions & 2 deletions addon/doc/zh_CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,29 @@

## 升级日志

### Version 1.4

* 完善帮助文档,修复英文帮助文档中的错误。
* 优化自动翻译切换提示,现在更加简洁明确。

### Version 1.3

新增剪贴板正向翻译和剪贴板反向翻译功能。

* 剪贴板正向翻译:将剪贴板中的内容从源语言翻译到目标语言,若开启了“自动识别源语言”选项,则源语言将自动识别。
* 剪贴板反向翻译:将剪贴板中的内容从目标语言翻译到源语言。

### Version 1.2

* 新增剪贴板正向翻译和剪贴板反向翻译功能。
新增自动翻译功能,支持常规自动翻译、反向自动翻译和禁用自动翻译三种模式。

开启自动翻译功能后,NVDA朗读的所有内容将进行自动翻译。三种模式具体功能说明如下:

* 正向自动翻译:将NVDA朗读内容自动从源语言翻译到目标语言,若开启了“自动识别源语言”选项,源语言将自动识别。
* 反向自动翻译:将NVDA朗读内容自动从目标语言翻译到源语言。
* 禁用自动翻译:不使用自动翻译功能。

注意:开启自动翻译功能后,NVDA所有朗读内容都会发送至翻译服务器,NVDA朗读响应速度将因翻译结果而有不同程度的减慢。
### Version 1.1

* 新增自动翻译功能,开启后将针对读屏朗读的所有文字进行翻译,可在设置界面货按快捷键NVDA+F8进行切换。现提供三种模式:禁用、常规、反向,其中常规模式下,会同步应用“自动识别源语言”开关
新增反向翻译功能,可从目标语言翻译为源语言
6 changes: 3 additions & 3 deletions addon/globalPlugins/baiduTranslation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ def script_reverseTranslate(self, gesture):
def script_switchAutomaticTranslationMode(self, gesture):
option_name = [
# Translators: Automatic translation mode set to disabled
_("Automatic translation mode set to disabled"),
_("Disable automatic translation"),
# Translators: Automatic translation mode set to normal
_("Automatic translation mode set to normal"),
_("Normal automatic translation"),
# Translators: Automatic translation mode set to reverse
_("Automatic translation mode set to reverse")
_("Reverse automatic translation")
]
option_count = len(option_name)
mode = option_name[(config.conf["baiduTranslation"]["autoTrans"] + option_count + 1) % option_count]
Expand Down
52 changes: 32 additions & 20 deletions addon/locale/zh_CN/LC_MESSAGES/nvda.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 'baiduTranslation' '1.0'\n"
"Report-Msgid-Bugs-To: 'nvda-translations@groups.io'\n"
"POT-Creation-Date: 2023-04-27 20:36+0800\n"
"PO-Revision-Date: 2023-04-27 21:14+0800\n"
"POT-Creation-Date: 2023-04-29 13:53+0800\n"
"PO-Revision-Date: 2023-04-29 13:55+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
Expand All @@ -24,22 +24,22 @@ msgstr ""
#. Translators: Summary for this add-on
#. to be shown on installation and add-on information found in Add-ons Manager.
#: addon\globalPlugins\baiduTranslation\__init__.py:19
#: addon\globalPlugins\baiduTranslation\__init__.py:78 buildVars.py:23
#: addon\globalPlugins\baiduTranslation\__init__.py:77 buildVars.py:23
msgid "Baidu Translation"
msgstr "百度翻译"

#. Translators: Source language in the settings panel
#: addon\globalPlugins\baiduTranslation\__init__.py:24
#: addon\globalPlugins\baiduTranslation\__init__.py:25
msgid "Source language"
msgstr "源语言"

#. Translators: Target language in the settings panel
#: addon\globalPlugins\baiduTranslation\__init__.py:26
#: addon\globalPlugins\baiduTranslation\__init__.py:27
msgid "Target language"
msgstr "目标语言"

#. Translators: the label for the Auto from language checkbox
#: addon\globalPlugins\baiduTranslation\__init__.py:40
#: addon\globalPlugins\baiduTranslation\__init__.py:41
msgid "Automatically identify the source language"
msgstr "自动识别源语言"

Expand All @@ -64,41 +64,41 @@ msgid "Automatic translation"
msgstr "自动翻译"

#. Translators: Translate what you just heard
#: addon\globalPlugins\baiduTranslation\__init__.py:107
#: addon\globalPlugins\baiduTranslation\__init__.py:108
msgid "Translate what you just heard"
msgstr "翻译听到的内容"

#: addon\globalPlugins\baiduTranslation\__init__.py:121
#: addon\globalPlugins\baiduTranslation\__init__.py:122
msgid "Reverse translate what you just heard"
msgstr "反向翻译听到的内容"

#. Translators: Switch automatic translation mode
#: addon\globalPlugins\baiduTranslation\__init__.py:132
#: addon\globalPlugins\baiduTranslation\__init__.py:133
msgid "Switch automatic translation mode"
msgstr "切换自动翻译模式"

#. Translators: Automatic translation mode set to disabled
#: addon\globalPlugins\baiduTranslation\__init__.py:137
msgid "Automatic translation mode set to disabled"
msgstr "自动翻译模式设置为禁用"
#: addon\globalPlugins\baiduTranslation\__init__.py:138
msgid "Disable automatic translation"
msgstr "禁用自动翻译"

#. Translators: Automatic translation mode set to normal
#: addon\globalPlugins\baiduTranslation\__init__.py:139
msgid "Automatic translation mode set to normal"
msgstr "自动翻译模式设置为常规"
#: addon\globalPlugins\baiduTranslation\__init__.py:140
msgid "Normal automatic translation"
msgstr "常规自动翻译"

#. Translators: Automatic translation mode set to reverse
#: addon\globalPlugins\baiduTranslation\__init__.py:141
msgid "Automatic translation mode set to reverse"
msgstr "自动翻译模式设置为反向"
#: addon\globalPlugins\baiduTranslation\__init__.py:142
msgid "Reverse automatic translation"
msgstr "反向自动翻译"

#. Translators: Translate the content in the clipboard
#: addon\globalPlugins\baiduTranslation\__init__.py:151
#: addon\globalPlugins\baiduTranslation\__init__.py:152
msgid "Translate the content in the clipboard"
msgstr "翻译剪贴板中的内容"

#. Translators: Reverse translate the content in the clipboard
#: addon\globalPlugins\baiduTranslation\__init__.py:160
#: addon\globalPlugins\baiduTranslation\__init__.py:161
msgid "Reverse translate the content in the clipboard"
msgstr "反向翻译剪贴板中的内容"

Expand Down Expand Up @@ -127,3 +127,15 @@ msgstr "翻译失败:"
#: buildVars.py:26
msgid "An NVDA add-on that provides baidu translation"
msgstr "一个提供百度翻译的NVDA插件"

#~ msgid "Automatic translation mode set to disabled"
#~ msgstr "自动翻译模式设置为禁用"

#~ msgid "Automatic translation mode set to normal"
#~ msgstr "自动翻译模式设置为常规"

#~ msgid "Automatic translation mode set to reverse"
#~ msgstr "自动翻译模式设置为反向"

#~ msgid "huaiyinfeilong <huaiyinfeilong@163.com>"
#~ msgstr "槐荫飞龙 <huaiyinfeilong@163.com>"
4 changes: 2 additions & 2 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def _(arg):
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description": _("An NVDA add-on that provides baidu translation"),
# version
"addon_version": "1.2",
# Author(s)
"addon_version": "1.4",
# Translators: Author(s)
"addon_author": "huaiyinfeilong <huaiyinfeilong@163.com>",
# URL for the add-on documentation support
"addon_url": "https://github.com/huaiyinfeilong/baiduTranslation",
Expand Down
48 changes: 38 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,49 @@
# Baidu Translation
# Baidu translator

An NVDA add-on that provides baidu translation.
An NVDA plugin that provides Baidu translation.

## Keyboard shortcuts:

* Translate what you just heard: NVDA+A
* Reverse translation of what I just heard: NVDA+SHIFT+A
* Loop switching automatic translation mode (disabled, normal, reverse): NVDA+F7
* Forward translation of clipboard content: NVDA+Control+A
* Reverse translation of clipboard content: NVDA+CTRL+SHIFT+A
* Translate what you just heard: NVDA+W
* Reverse translate what you just heard: NVDA+SHIFT+W
* Cycle through automatic translation modes (disabled, normal, reverse): NVDA+F8
* Translate clipboard contents forward: NVDA+CONTROL+W
* Reverse translate clipboard content: NVDA+CONTROL+SHIFT+W

## Upgrade Log
## Feedback Contact

Any comments and suggestions are welcome to communicate:

* Project address: https://github.com/huaiyinfeilong/baiduTranslation
* E-mail: huaiyinfeilong@163.com
* QQ: 354522977
* WeChat: huaiyinfeilong

## Upgrade log

### Version 1.4

* Improve the help documentation and fix errors in the English help documentation.
* Optimize the automatic translation switching prompt, which is now more concise and clear.

### Version 1.3

Added clipboard forward translation and clipboard reverse translation functions.

* Forward translation of the clipboard: Translate the contents of the clipboard from the source language to the target language. If the "Automatically identify source language" option is enabled, the source language will be automatically recognized.
* Clipboard reverse translation: Translate the contents of the clipboard from the target language to the source language.

### Version 1.2

* Added clipboard forward translation and clipboard reverse translation functions.
Added the automatic translation function, which supports three modes of regular automatic translation, reverse automatic translation and disabled automatic translation.

After the automatic translation function is turned on, all content read by NVDA will be automatically translated. The specific functions of the three modes are described as follows:

* Forward automatic translation: Automatically translate the content read by NVDA from the source language to the target language. If the "Automatically identify source language" option is enabled, the source language will be automatically recognized.
* Reverse automatic translation: Automatically translate the content read by NVDA from the target language to the source language.
* Disable auto-translation: Do not use the auto-translation feature.

Note: After the automatic translation function is turned on, all the reading content of NVDA will be sent to the translation server, and the response speed of NVDA reading will be slowed down to varying degrees due to the translation results.
### Version 1.1

* Add an automatic translation function, which will translate all text read on the screen when enabled. You can switch between the settings interface and pressing the shortcut keys NVDA+F7. There are three modes available: Disabled, Normal, and Reverse. In Normal mode, the "Auto Identify Source Language" switch will be applied synchronously.
Added reverse translation function, which can translate from the target language to the source language.

0 comments on commit 89294c4

Please sign in to comment.