Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit fbfb704

Browse files
committed
2.1.0 update
1 parent 3e8316b commit fbfb704

File tree

11 files changed

+61
-136
lines changed

11 files changed

+61
-136
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ Sublime Text Google Translate Plugin
33

44
For SublimeText 2 & 3, support proxy `PROXY_TYPE_SOCKS5` `PROXY_TYPE_SOCKS4` `PROXY_TYPE_HTTP`
55

6-
**Version:** 2.0.0
6+
**Version:** 2.1.0
77

8-
![Sublime Text Google Translate Plugin](https://raw.githubusercontent.com/MtimerCMS/SublimeText-Google-Translate-Plugin/master/GoogleTranslate.gif)
8+
![Sublime Text Google Translate Plugin](https://raw.githubusercontent.com/MTimer/SublimeText-Google-Translate-Plugin/master/GoogleTranslate.gif)
99
------------------
1010

1111
Install:
1212
=======
1313

1414
**[Recommend] Package Control:** [Usage](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` then search `Inline Google Translate`
1515

16-
**Without Git:** Download the latest source from [GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.
16+
**Without Git:** Download the latest source from [GitHub](https://github.com/MTimer/SublimeText-Google-Translate-Plugin) and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.
1717

1818
**With Git:** Clone the repository in your Sublime Text "Packages" directory:
1919

20-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
20+
git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
2121

2222
Folder name must be **Inline Google Translate** !!
2323

@@ -108,7 +108,7 @@ SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!**GFW**
108108

109109
@更多优秀项目 [下载插件中文版](http://dev.mtimecms.com)
110110

111-
**当前版本:** 2.0.0
111+
**当前版本:** 2.1.0
112112

113113
------------------
114114

@@ -117,11 +117,11 @@ SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!**GFW**
117117

118118
**[推荐] Package Control:** [使用方法](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` 然后搜索 `Inline Google Translate`
119119

120-
**不用 Git:**[GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。
120+
**不用 Git:**[GitHub](https://github.com/MTimer/SublimeText-Google-Translate-Plugin) 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。
121121

122122
**手动 Git:** 克隆到 Sublime Text "程序包" 目录:
123123

124-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
124+
git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
125125

126126
目录名必须为 **Inline Google Translate** !!
127127

core/handler_st2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python
22
# coding:utf-8
3-
# https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
3+
# https://github.com/MTimer/SublimeText-Google-Translate-Plugin
44

55
import urllib2
66
import httplib

core/handler_st3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python
22
# coding:utf-8
3-
# https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
3+
# https://github.com/MTimer/SublimeText-Google-Translate-Plugin
44

55
from urllib.request import HTTPHandler, HTTPSHandler
66
from http.client import HTTPConnection, HTTPSConnection

core/translate.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/python
22
# coding:utf-8
3-
# https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
3+
# https://github.com/MTimer/SublimeText-Google-Translate-Plugin
44

5-
__version__ = "2.0.0"
5+
__version__ = "2.1.0"
66

77
import sublime
88
try:
@@ -34,8 +34,6 @@ class GoogleTranslate(object):
3434
string_pattern = r"\"(([^\"\\]|\\.)*)\""
3535
match_string =re.compile(
3636
r"\,?\["
37-
+ string_pattern + r"\,"
38-
+ string_pattern + r"\,"
3937
+ string_pattern + r"\,"
4038
+ string_pattern
4139
+r"\]")
@@ -51,7 +49,7 @@ def __init__(self, proxy_enable, proxy_type, proxy_host, proxy_port, source_lang
5149
'languages': None,
5250
}
5351
self.api_urls = {
54-
'translate': 'https://translate.google.com/translate_a/t?client=t&ie=UTF-8&oe=UTF-8',
52+
'translate': 'https://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&dt=t',
5553
}
5654
if not source_lang:
5755
source_lang = 'auto'

goTranslate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# author:mtimer
3-
# https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
3+
# https://github.com/MTimer/SublimeText-Google-Translate-Plugin
44

55
import sublime
66
import sublime_plugin

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"install": "messages/install.txt",
33
"1.0.0": "messages/1.0.0.txt",
4-
"2.0.0": "messages/2.0.0.txt"
4+
"2.0.0": "messages/2.0.0.txt",
5+
"2.1.0": "messages/2.1.0.txt"
56
}

messages/1.0.0.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sublime-google-translate
22
========================
33
Google Translate plugin for SublimeText 2 and 3
44

5-
@Github https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
5+
@Github https://github.com/MTimer/SublimeText-Google-Translate-Plugin
66

77
Configure:
88
---------------
@@ -33,7 +33,7 @@ sublime-google-translate
3333
========================
3434
Sublime Text Google 翻译插件 支持 ST 2 和 3
3535

36-
@Github https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin
36+
@Github https://github.com/MTimer/SublimeText-Google-Translate-Plugin
3737
@微博 http://weibo.com/u/3488979130
3838

3939
设置:

messages/2.0.0.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ For SublimeText 2 & 3, support proxy `PROXY_TYPE_SOCKS5` `PROXY_TYPE_SOCKS4` `PR
55

66
**Version:** 2.0.0
77

8-
![Sublime Text Google Translate Plugin](https://raw.githubusercontent.com/MtimerCMS/SublimeText-Google-Translate-Plugin/master/GoogleTranslate.gif)
8+
![Sublime Text Google Translate Plugin](https://raw.githubusercontent.com/MTimer/SublimeText-Google-Translate-Plugin/master/GoogleTranslate.gif)
99
------------------
1010

1111
Install:
1212
=======
1313

1414
**[Recommend] Package Control:** [Usage](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` then search `Inline Google Translate`
1515

16-
**Without Git:** Download the latest source from [GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.
16+
**Without Git:** Download the latest source from [GitHub](https://github.com/MTimer/SublimeText-Google-Translate-Plugin) and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.
1717

1818
**With Git:** Clone the repository in your Sublime Text "Packages" directory:
1919

20-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
20+
git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
2121

2222
Folder name must be **Inline Google Translate** !!
2323

@@ -117,11 +117,11 @@ SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!**GFW**
117117

118118
**[推荐] Package Control:** [使用方法](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` 然后搜索 `Inline Google Translate`
119119

120-
**不用 Git:** 从 [GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。
120+
**不用 Git:** 从 [GitHub](https://github.com/MTimer/SublimeText-Google-Translate-Plugin) 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。
121121

122122
**手动 Git:** 克隆到 Sublime Text "程序包" 目录:
123123

124-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
124+
git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
125125

126126
目录名必须为 **Inline Google Translate** !!
127127

messages/2.1.0.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Congratulations! Package updated!
2+
=================================
3+
4+
**Current Version:** 2.1.0
5+
6+
Updates:
7+
=======
8+
9+
1. Google api
10+
2. repository address
11+
12+
13+
MTimer: www.mtimer.cn
14+
15+
16+
------------------
17+
18+
19+
20+
Sublime Text Google 翻译插件
21+
==========================
22+
23+
**当前版本:** 2.1.0
24+
25+
------------------
26+
27+
更新:
28+
====
29+
30+
1. Google API
31+
2. 插件地址

messages/install.txt

Lines changed: 7 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,13 @@
11
Sublime Text Google Translate Plugin
22
===============================
33

4-
For SublimeText 2 & 3, support proxy `PROXY_TYPE_SOCKS5` `PROXY_TYPE_SOCKS4` `PROXY_TYPE_HTTP`
54

6-
**Version:** 2.0.0
5+
**Version:** 2.1.0
76

8-
![Sublime Text Google Translate Plugin](https://raw.githubusercontent.com/MtimerCMS/SublimeText-Google-Translate-Plugin/master/GoogleTranslate.gif)
9-
------------------
10-
11-
Install:
12-
=======
13-
14-
**[Recommend] Package Control:** [Usage](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` then search `Inline Google Translate`
15-
16-
**Without Git:** Download the latest source from [GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.
17-
18-
**With Git:** Clone the repository in your Sublime Text "Packages" directory:
19-
20-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
21-
22-
Folder name must be **Inline Google Translate** !!
23-
24-
The "Packages" directory is located at:
25-
26-
* OS X:
277

28-
ST2: ~/Library/Application Support/Sublime Text 2/Packages/
29-
ST3: ~/Library/Application Support/Sublime Text 3/Packages/
30-
31-
* Linux:
32-
33-
ST2: ~/.config/sublime-text-2/Packages/
34-
ST3: ~/.config/sublime-text-3/Packages/
35-
36-
* Windows:
8+
Thank you!
9+
------------------
3710

38-
ST2: %APPDATA%/Sublime Text 2/Packages/
39-
ST3: %APPDATA%/Sublime Text 3/Packages/
4011

4112
Configure:
4213
=========
@@ -70,77 +41,23 @@ Overview your language code:
7041
* press `Google Translate Print the available translate variants` in context menu
7142
* press `ctrl + ~` to see output errors in console
7243

73-
Features:
74-
=======
75-
76-
* Support proxy! F*K GFW !
77-
* 80 languages support!
78-
* SublimeText 2 & 3 support!
79-
* Autodetect source language!
80-
* Ability to specify source language & target language!
81-
* Ability to choose the target language in context menu
82-
* Ability to choose output type, 'plain' or 'html'
83-
* Ability to specify proxy type, proxy host, proxy port
84-
* Fixed Google Translate output errors
85-
* Implemented translation of multiple selection **`[Ctrl]`**!
86-
87-
Credits:
44+
Author:
8845
=======
8946

90-
* [PySocks](https://github.com/Anorov/PySocks)
9147
* [MTimer](http://www.mtimer.cn)
9248

93-
License:
94-
=======
95-
96-
MIT
97-
98-
9949

100-
------------------
10150

10251

10352

10453
Sublime Text Google 翻译插件
10554
==========================
10655

107-
SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!**GFW** 你逼我的!
108-
109-
@更多优秀项目 [下载插件中文版](http://dev.mtimecms.com)
11056

111-
**当前版本:** 2.0.0
57+
**当前版本:** 2.1.0
11258

11359
------------------
11460

115-
安装:
116-
====
117-
118-
**[推荐] Package Control:** [使用方法](https://sublime.wbond.net/docs/usage), `Package Control: Install Package` 然后搜索 `Inline Google Translate`
119-
120-
**不用 Git:** 从 [GitHub](https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin) 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。
121-
122-
**手动 Git:** 克隆到 Sublime Text "程序包" 目录:
123-
124-
git clone https://github.com/MtimerCMS/SublimeText-Google-Translate-Plugin 'Inline Google Translate'
125-
126-
目录名必须为 **Inline Google Translate** !!
127-
128-
插件将位于 "程序包" 目录:
129-
130-
* OS X:
131-
132-
ST2: ~/Library/Application Support/Sublime Text 2/Packages/
133-
ST3: ~/Library/Application Support/Sublime Text 3/Packages/
134-
135-
* Linux:
136-
137-
ST2: ~/.config/sublime-text-2/Packages/
138-
ST3: ~/.config/sublime-text-3/Packages/
139-
140-
* Windows:
141-
142-
ST2: %APPDATA%/Sublime Text 2/Packages/
143-
ST3: %APPDATA%/Sublime Text 3/Packages/
14461

14562
设置:
14663
====
@@ -174,27 +91,7 @@ SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!**GFW**
17491
* 在右键面板中点击 `Google Translate Print the available translate variants`
17592
* 按 `ctrl+~` 在控制台查看输出错误
17693

177-
功能:
94+
作者:
17895
====
17996

180-
* 支持各种代理! F*K GFW !
181-
* 支持 80 种语言互相转换翻译!
182-
* 支持 SublimeText 2 & 3!
183-
* 自动监测 source language!
184-
* 可以指定 source language & target language!
185-
* 可以右键选择需要翻译成的语言
186-
* 可以设置代理服务器类型、地址、端口
187-
* 可以选择输出类型, 'plain' 或 'html'
188-
* 修复 Google 输出的 html 标签错误
189-
* 可以多划选翻译 **`[Ctrl]`**!
190-
191-
感谢:
192-
====
193-
194-
* [PySocks](https://github.com/Anorov/PySocks)
195-
* [MTimer](http://www.mtimer.cn)
196-
197-
版权:
198-
===
199-
200-
MIT
97+
* [MTimer](http://www.mtimer.cn)

0 commit comments

Comments
 (0)