Giter Club home page Giter Club logo

translateapp's Introduction

咕咚翻译

icon

Build Status

介绍

一个实现『划词翻译』功能的 Android 应用 ,可能是目前 Android 市场上翻译效率最高的一款应用。

shot

下载

Fir

酷安市场

如果想要帮助做内部测试,欢迎来Google+社区我会把最新的版本放在 Google+社区。

缘起

自己经常在手机上会阅读一些英文的技术 blog 或者文档,经常会遇到陌生的单词,想必大家都有类似的经历,一般的,如果是上班期间,我可能会打开谷歌翻译,然后查词,但是当你不在电脑旁,就只能通过手机上的翻译软件来翻译生词,所以这时我们通常遇到生词会这样操作,长按生词、选择复制、点击 Home 键、找到翻译 App,有道翻译或者谷歌翻译之类的,然后长按输入框,选择粘贴,此时你才可以看到那个生词的意思。其实这是一个非常考验用户耐性的事,连续操作几次,不烦才怪呢。

我也是,自己以前在 Medium 上阅读文章时经常做这样的事,后来我想能不能简单点呢,所以就有了咕咚翻译这个 App,咕咚是我的网名呢~

讨论/发声

个人博客上关于咕咚翻译的介绍

V2EX 上对 App 的讨论 咕咚翻译

微博上关于咕咚翻译的讨论

Google+ 咕咚翻译社群

技术点

  • 1、全程使用 Dagger2 对项目进行类依赖管理
  • 2、项目使用标准的 MVP 架构,关于 MVP 的一篇博客
  • 3、实现对粘贴板的监听以及访问
  • 4、无需权限显示悬浮窗(6.0悬浮窗权限适配)
  • 5、使用 RxJava 探索函数式编程
  • 6、使用 Retrofit2 进行网络请求
  • 7、开机自启动
  • 8、Android 6.0 自定义文本操作栏

Note 3、4都是借鉴自廖祜秋的开源项目android-UCToast,感谢~

适配问题

更新日志

日志列表

支持一下

贡献者

关于作者

咕咚,软件工程师,更多

License

 Copyright (C) 2015 GuDong <[email protected]>

 This file is part of GdTranslate

 GdTranslate is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 GdTranslate is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with GdTranslate.  If not, see <http://www.gnu.org/licenses/>.

translateapp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

translateapp's Issues

计时

用户在一个时间限制下最后时刻第二次取词,会关闭翻译。

缺少文件

name.gudong.translate.reject.components.DaggerActivityComponent;

在红米手机上不能使用

不知道是不是我的操作方法不对还是其它原因,我选中文字点击复制按钮后并没有显示翻译提示。

可否加入输入单词时自动提示功能

应用场景:
在某个看到个单词不懂是什么意思。需要在手机上查找。但是输入单词很费力,要是有自动提示就更完美了。
请作者考虑加入此功能。

请问一下这个实现句子和词组的翻译难道有多大.

我对这个项目很感兴趣,现在的iphone或者是mac都默认对单个单词执行翻译,安卓有了你开发的应用也实现了这个功能. 但是谷歌浏览器的插件划词翻译可以实现句子的翻译,我想问一下你开发的这个实现句子翻译的难度有多大.而且我是一个刚入行的pythoner,要想对你的项目有所贡献应该如何做呢.如果实现一个跨平台的划词翻译.iphone andriod mac Windows 都可以. 不用浏览器插件,在pdf阅读中也可以用的软件是不是一个很大的挑战呢(可以翻译句子的)?

Setup Airbrake for your Java application

Step 1: Install

Install option 1: Maven

Add the javabrake dependency through your IDE or directly to your pom.xml file:

<dependency>
  <groupId>io.airbrake</groupId>
  <artifactId>javabrake</artifactId>
  <version>0.1.4</version>
  <type>pom</type>
</dependency>

Install option 2: Gradle

Add javabrake to your Gradle dependencies:

compile 'io.airbrake:javabrake:0.1.4'

Install option 3: Ivy

Add javabrake to your Ivy dependencies:

<dependency org='io.airbrake' name='javabrake' rev='0.1.4'>
  <artifact name='javabrake' ext='pom'></artifact>
</dependency>

Step 2: Configuration

Copy this configuration snippet into your Java app.

(You can find your project API KEY with your project's settings)

import io.airbrake.javabrake.Notifier;

int projectId = <Your project ID>;
String projectKey = "<Your project API KEY>";
Notifier notifier = new Notifier(projectId, projectKey);

notifier.addFilter(
    (Notice notice) -> {
      notice.setContext("environment", "production");
      return notice;
    });

Example of reporting a caught exception:

try {
  do();
} catch (IOException e) {
  notifier.report(e);
}

Visit our official GitHub repo for advanced information and integrations like log4j, log4j2, and logback.

Inclusion in F-Droid

Hi,

Since this app is GNU GPL v3 licensed, are you considering the fact to add it to F-Droid? There is a strong community behind, that do not use Google Play nor anything else, except F-Droid.

You can find some documentation here.

Otherwise, if you don't want to work on the inclusion of this app by yourself, would it be ok for you if someone else do it for you?

问博主一个问题

你好,我是安卓新手,请问这个插件【classpath 'io.fabric.tools:gradle:1.22.2】是自定义的吗,我build有问题

快速退出会导致程序崩溃

一开就按后退键。
call: Attempt to invoke interface method 'void name.gudong.translate.mvp.views.IMainView.fillDayline(name.gudong.translate.mvp.model.entity.dayline.IDayLine)' on a null object reference

原因应该是MainPresenter 里dayline方法,由于mView 在退出后为空导致NullpointerException,建议做一下null检查或者cancel 这个subscrption

bing api 讨论

之前看过说是bing api收费,但是昨天在调试一个前端页面的时候,发现有一个插件调用了bing的

http://api.bing.com/qsonhs.aspx?mkt=zh-CN&ds=bingdict&q=要查的词&json

是可以正常查询的.好像是bing的建议数据接口,同时确实是可以用来翻译的.

记录,之后如果有必要添加bing接口,再使用.

app外悬浮窗如何覆盖状态栏讨论

参考1里的尝试情况

TYPE_SEARCH_BAR:未知
TYPE_ACCESSIBILITY_OVERLAY:拒绝使用
TYPE_APPLICATION:只能配合Activity在当前APP使用
TYPE_APPLICATION_ATTACHED_DIALOG:只能配合Activity在当前APP使用
TYPE_APPLICATION_MEDIA:无法使用(什么也不显示)
TYPE_APPLICATION_PANEL:只能配合Activity在当前APP使用(PopupWindow默认就是这个>Type)
TYPE_APPLICATION_STARTING:无法使用(什么也不显示)
TYPE_APPLICATION_SUB_PANEL:只能配合Activity在当前APP使用
TYPE_BASE_APPLICATION:无法使用(什么也不显示)
TYPE_CHANGED:只能配合Activity在当前APP使用
TYPE_INPUT_METHOD:无法使用(直接崩溃)
TYPE_INPUT_METHOD_DIALOG:无法使用(直接崩溃)
TYPE_KEYGUARD_DIALOG:拒绝使用
TYPE_PHONE:属于悬浮窗(并且给一个Activity的话按下HOME键会出现看不到桌面上的图标异常情况)
TYPE_TOAST:不属于悬浮窗,但有悬浮窗的功能,缺点是在Android2.3上无法接收点击事件
TYPE_SYSTEM_ALERT:属于悬浮窗,但是会被禁止

可以看到这个TOAST的type是不能改的.要改申请权限,如果申请权限,就不用通过这种方式绕过了,
根据官方说明

type: 值低的窗口在值高的下层,相同的 type值,后创建的窗口显示在先创建的窗口上面.

但是状态栏是2000

Window type: the status bar. There can be only one status bar window; it is placed at the top of the screen, and all other windows are shifted down so they are below it. In multiuser systems shows on all users' windows.

TYPE_TOAST 是 2005
然后就是可能修改FLAG了.

我自己根据官方文档.测试了几个比较可能的.比如
FLAG_FULLSCREEN 等.当时这个值的时候,会被状态栏遮挡部分,但是无法显示在状态栏之上.( ,说法好像有冲突..按理说应该是在上面的.因为值更高.也可能是因为这个值只能在本app内使用.)

暂无思路..

string.xml中有错别字

<string name="use_recite_or_nor_summary">开启后,咕咚翻译将会自动的在**手机山**循环浮动显示已收藏的单词,帮助你更好的记忆这些单词。</string>

导入报错

项目导入的时候报错怎么整? Could not find im.fir:gradle-fir-publisher:1.0.7

单词获取建议,能否实现?

现在的长按单词再复制才能出翻译,感觉有点麻烦,能否实现下面的功能?
1 【选取】:通过点击单词就选中单词,代替长按选词
2 【获取】:自动复制单词代替手动复制单词
当然最好就是点击单词就出翻译,一步到位哈!
小白想问问能否实现这两个功能?

当然,要是能做到锤子手机那种“哪里不会点哪里”的翻译功能可就太棒了,我估计是用ocr做的

复制小问题

再次复制同一个单词,不显示或者提示引擎出错。

通知:目前自己一直在开发咕咚翻译 2.0 版本,目前已经完成了很多功能,但是还有很多问题,欢迎大家踊跃参与。点击查看更多详情

目前最新的代码提交在 develop 分支,其中包含了诸多新功能(背单词、Android M 划词适配,每日一句),但是目前还有很多小问题,自己时间有限,这里把一些比较明显问题列举在 project 下的待完成功能 中,如果有兴趣,欢迎认领。

下面是最新的 咕咚翻译 版本,增加了很多新特性

定时单词提醒循环选词不全面

加了快50个单词了.

但是定时单词提醒还是在我开启功能时添加的那 4-5 个单词里循环.

重新关闭和开启似乎也没有用.

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.