Skip to content

Commit

Permalink
feat(context-menus): add youglish
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed May 15, 2018
1 parent 1b956aa commit cd39f22
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 50 deletions.
85 changes: 45 additions & 40 deletions src/_locales/context/messages.json
Original file line number Diff line number Diff line change
@@ -1,102 +1,107 @@
{
"baidu_search": {
"en": "Baidu Search",
"zh_CN": "百度搜索",
"zh_TW": "百度搜尋",
"en": "Baidu Search"
"zh_TW": "百度搜尋"
},
"bing_dict": {
"en": "Bing Dict",
"zh_CN": "必应词典",
"zh_TW": "必應字典",
"en": "Bing Dict"
"zh_TW": "必應字典"
},
"bing_search": {
"en": "Bing Search",
"zh_CN": "必应搜索",
"zh_TW": "必應搜尋",
"en": "Bing Search"
"zh_TW": "必應搜尋"
},
"cambridge": {
"en": "Cambridge",
"zh_CN": "剑桥词典",
"zh_TW": "劍橋字典",
"en": "Cambridge"
"zh_TW": "劍橋字典"
},
"dictcn": {
"en": "Dictcn",
"zh_CN": "海词词典",
"zh_TW": "海詞字典",
"en": "Dictcn"
"zh_TW": "海詞字典"
},
"etymonline": {
"en": "Etymonline",
"zh_CN": "培根词源",
"zh_TW": "培根字根",
"en": "Etymonline"
"zh_TW": "培根字根"
},
"google_page_translate": {
"en": "Google Page Translate",
"zh_CN": "谷歌网页翻译",
"zh_TW": "谷歌網頁翻譯",
"en": "Google Page Translate"
"zh_TW": "谷歌網頁翻譯"
},
"google_search": {
"en": "Google Search",
"zh_CN": "谷歌搜索",
"zh_TW": "谷歌搜尋",
"en": "Google Search"
"zh_TW": "谷歌搜尋"
},
"google_translate": {
"en": "Google Translate",
"zh_CN": "谷歌翻译",
"zh_TW": "谷歌翻譯",
"en": "Google Translate"
"zh_TW": "谷歌翻譯"
},
"guoyu": {
"en": "國語辭典",
"zh_CN": "国语辞典",
"zh_TW": "國語字典",
"en": "國語辭典"
"zh_TW": "國語字典"
},
"iciba": {
"en": "iciba",
"zh_CN": "金山词霸",
"zh_TW": "金山詞霸",
"en": "iciba"
"zh_TW": "金山詞霸"
},
"liangan": {
"en": "兩岸詞典",
"zh_CN": "两岸词典",
"zh_TW": "兩岸字典",
"en": "兩岸詞典"
"zh_TW": "兩岸字典"
},
"longman_business": {
"en": "Longman Business",
"zh_CN": "朗文商务",
"zh_TW": "朗文商務",
"en": "Longman Business"
"zh_TW": "朗文商務"
},
"manual_title": {
"en": "Manual",
"zh_CN": "详细使用说明",
"zh_TW": "詳細使用說明",
"en": "Manual"
"zh_TW": "詳細使用說明"
},
"merriam_webster": {
"en": "Merriam Webster",
"zh_CN": "韦氏词典",
"zh_TW": "韋氏字典",
"en": "Merriam Webster"
"zh_TW": "韋氏字典"
},
"notebook_title": {
"en": "New Word List",
"zh_CN": "生词本",
"zh_TW": "生字本",
"en": "New Word List"
"zh_TW": "生字本"
},
"oxford": {
"en": "Oxford",
"zh_CN": "牛津词典",
"zh_TW": "牛津字典",
"en": "Oxford"
"zh_TW": "牛津字典"
},
"view_as_pdf": {
"en": "View as PDF",
"zh_CN": "打开为 PDF",
"zh_TW": "打開為 PDF",
"en": "View as PDF"
"zh_TW": "打開為 PDF"
},
"youdao": {
"en": "Youdao",
"zh_CN": "有道词典",
"zh_TW": "有道字典",
"en": "Youdao"
"zh_TW": "有道字典"
},
"youdao_page_translate": {
"en": "Youdao Page Translate",
"zh_CN": "有道网页翻译",
"zh_TW": "有道網頁翻譯",
"en": "Youdao Page Translate"
"zh_TW": "有道網頁翻譯"
},
"youglish": {
"en": "YouGlish",
"zh_CN": "YouGlish",
"zh_TW": "YouGlish"
}
}
21 changes: 11 additions & 10 deletions src/app-config/context-menus.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
export function getAllContextMenus () {
const allContextMenus = {
google_page_translate: 'x',
youdao_page_translate: 'x',
google_search: 'https://www.google.com/#newwindow=1&q=%s',
baidu_search: 'https://www.baidu.com/s?ie=utf-8&wd=%s',
bing_dict: 'https://cn.bing.com/dict/?q=%s',
bing_search: 'https://www.bing.com/search?q=%s',
google_translate: 'https://translate.google.cn/#auto/zh-CN/%s',
etymonline: 'http://www.etymonline.com/index.php?search=%s',
merriam_webster: 'http://www.merriam-webster.com/dictionary/%s',
oxford: 'http://www.oxforddictionaries.com/us/definition/english/%s',
cambridge: 'http://dictionary.cambridge.org/spellcheck/english-chinese-simplified/?q=%s',
youdao: 'http://dict.youdao.com/w/%s',
dictcn: 'https://dict.eudic.net/dicts/en/%s',
etymonline: 'http://www.etymonline.com/index.php?search=%s',
google_page_translate: 'x',
google_search: 'https://www.google.com/#newwindow=1&q=%s',
google_translate: 'https://translate.google.cn/#auto/zh-CN/%s',
guoyu: 'https://www.moedict.tw/%s',
iciba: 'http://www.iciba.com/%s',
liangan: 'https://www.moedict.tw/~%s',
guoyu: 'https://www.moedict.tw/%s',
longman_business: 'http://www.ldoceonline.com/search/?q=%s',
bing_dict: 'https://cn.bing.com/dict/?q=%s'
merriam_webster: 'http://www.merriam-webster.com/dictionary/%s',
oxford: 'http://www.oxforddictionaries.com/us/definition/english/%s',
youdao_page_translate: 'x',
youdao: 'http://dict.youdao.com/w/%s',
youglish: 'https://youglish.com/search/%s',
}

// Just for type check. Keys in allContextMenus are useful so no actual assertion
Expand Down

0 comments on commit cd39f22

Please sign in to comment.