Skip to content

Commit

Permalink
Merge branch 'move-back-from-gitlab' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
firemaples committed Jan 21, 2019
2 parents 62ace71 + 0e878aa commit 730df03
Show file tree
Hide file tree
Showing 366 changed files with 10,524 additions and 4,142 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ build/
obj/

#Custom
KeyId.java
#KeyId.java
app/debug_config/*
app/release_config/*
keys.xml
google-services.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_lite_step1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_lite_step2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_lite_step4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_lite_step6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUse/guide_step7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/AreaSelecting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/LangSelector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/MainBar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/Menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/ResultWindow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OnScreenTranslator/HowToUseV2/guide_ext_menu.png
Binary file not shown.
Binary file not shown.
Binary file added OnScreenTranslator/HowToUseV3/moveMainBar.mp4
Binary file not shown.
Binary file added OnScreenTranslator/HowToUseV3/selectAreaFull.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added OnScreenTranslator/Icons/ic_round/ic_round.png
Binary file added OnScreenTranslator/Icons/ic_round/ic_round.zip
Binary file not shown.
Binary file added OnScreenTranslator/Icons/menu_move/menu-white.png
Binary file added OnScreenTranslator/Icons/menu_move/menu.png
Binary file added OnScreenTranslator/Icons/menu_move/menu_move.png
Binary file added OnScreenTranslator/Icons/menu_move/menu_move.psd
Diff not rendered.
Binary file added OnScreenTranslator/Icons/ocr_only/ocr_only.png
Binary file added OnScreenTranslator/Icons/ocr_only/ocr_only.psd
Diff not rendered.
Binary file added OnScreenTranslator/Icons/ocr_only/selection.png
1 change: 1 addition & 0 deletions OnScreenTranslator/OnlinePhotoshop.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://www.photopea.com/
117 changes: 117 additions & 0 deletions OnScreenTranslator/Yandex lang transformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
var arr = [{id:'af', name:'Afrikaans'},
{id:'am', name:'Amharic'},
{id:'ar', name:'Arabic'},
{id:'az', name:'Azerbaijani'},
{id:'ba', name:'Bashkir'},
{id:'be', name:'Belarusian'},
{id:'bg', name:'Bulgarian'},
{id:'bn', name:'Bengali'},
{id:'bs', name:'Bosnian'},
{id:'ca', name:'Catalan'},
{id:'ceb', name:'Cebuano'},
{id:'cs', name:'Czech'},
{id:'cy', name:'Welsh'},
{id:'da', name:'Danish'},
{id:'de', name:'German'},
{id:'el', name:'Greek'},
{id:'en', name:'English'},
{id:'eo', name:'Esperanto'},
{id:'es', name:'Spanish'},
{id:'et', name:'Estonian'},
{id:'eu', name:'Basque'},
{id:'fa', name:'Persian'},
{id:'fi', name:'Finnish'},
{id:'fr', name:'French'},
{id:'ga', name:'Irish'},
{id:'gd', name:'Scottish Gaelic'},
{id:'gl', name:'Galician'},
{id:'gu', name:'Gujarati'},
{id:'he', name:'Hebrew'},
{id:'hi', name:'Hindi'},
{id:'hr', name:'Croatian'},
{id:'ht', name:'Haitian'},
{id:'hu', name:'Hungarian'},
{id:'hy', name:'Armenian'},
{id:'id', name:'Indonesian'},
{id:'is', name:'Icelandic'},
{id:'it', name:'Italian'},
{id:'ja', name:'Japanese'},
{id:'jv', name:'Javanese'},
{id:'ka', name:'Georgian'},
{id:'kk', name:'Kazakh'},
{id:'km', name:'Khmer'},
{id:'kn', name:'Kannada'},
{id:'ko', name:'Korean'},
{id:'ky', name:'Kyrgyz'},
{id:'la', name:'Latin'},
{id:'lb', name:'Luxembourgish'},
{id:'lo', name:'Lao'},
{id:'lt', name:'Lithuanian'},
{id:'lv', name:'Latvian'},
{id:'mg', name:'Malagasy'},
{id:'mhr', name:'Mari'},
{id:'mi', name:'Maori'},
{id:'mk', name:'Macedonian'},
{id:'ml', name:'Malayalam'},
{id:'mn', name:'Mongolian'},
{id:'mr', name:'Marathi'},
{id:'mrj', name:'Hill Mari'},
{id:'ms', name:'Malay'},
{id:'mt', name:'Maltese'},
{id:'my', name:'Burmese'},
{id:'ne', name:'Nepali'},
{id:'nl', name:'Dutch'},
{id:'no', name:'Norwegian'},
{id:'pa', name:'Punjabi'},
{id:'pap', name:'Papiamento'},
{id:'pl', name:'Polish'},
{id:'pt', name:'Portuguese'},
{id:'ro', name:'Romanian'},
{id:'ru', name:'Russian'},
{id:'si', name:'Sinhalese'},
{id:'sk', name:'Slovak'},
{id:'sl', name:'Slovenian'},
{id:'sq', name:'Albanian'},
{id:'sr', name:'Serbian'},
{id:'su', name:'Sundanese'},
{id:'sv', name:'Swedish'},
{id:'sw', name:'Swahili'},
{id:'ta', name:'Tamil'},
{id:'te', name:'Telugu'},
{id:'tg', name:'Tajik'},
{id:'th', name:'Thai'},
{id:'tl', name:'Tagalog'},
{id:'tr', name:'Turkish'},
{id:'tt', name:'Tatar'},
{id:'udm', name:'Udmurt'},
{id:'uk', name:'Ukrainian'},
{id:'ur', name:'Urdu'},
{id:'uz', name:'Uzbek'},
{id:'vi', name:'Vietnamese'},
{id:'xh', name:'Xhosa'},
{id:'yi', name:'Yiddish'},
{id:'zh', name:'Chinese'}]

function SortByName(a, b){
var aName = a.name.toLowerCase();
var bName = b.name.toLowerCase();
return ((aName < bName) ? -1 : ((aName > bName) ? 1 : 0));
}

arr = arr.sort(SortByName);

var langCodes = ""
var langNames = ""
$(arr).each(function(i,v){
var code = v.id
var name = v.name

langCodes += ("<item>"+code+"</item><!-- "+name+" -->")
/* console.log(langCodes) */

langNames += ("<item>"+name+"</item>")
/* console.log(langNames) */
})

console.log(langCodes)
console.log(langNames)
24 changes: 24 additions & 0 deletions OnScreenTranslator/YandexLangTransformer.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// https://tech.yandex.com/translate/doc/dg/reference/getLangs-docpage/#codes

code:

<Item key="
<item>

" value="
</item><!--

" />
-->


name:

<Item key="
<!--

" value="
--><item>

" />
</item>
Binary file added OnScreenTranslator/ic_for_notify.png
Binary file modified OnScreenTranslator/icon.psd
Diff not rendered.
127 changes: 100 additions & 27 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,127 @@ buildscript {
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
apply plugin: 'com.google.firebase.firebase-perf'

apply from: '../../sign.gradle'

repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}


android {
compileSdkVersion 23
buildToolsVersion '25.0.0'

packagingOptions {
exclude 'META-INF/main.kotlin_module'
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "tw.firemaples.onscreenocr"
minSdkVersion 21
targetSdkVersion 23
versionCode 21
versionName "1.5.0"
targetSdkVersion 28
versionCode 60
versionName "2.3.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

//https://gist.github.com/keyboardsurfer/a6a5bcf2b62f9aa41ae2
applicationVariants.all { variant ->
if (variant.buildType.isDebuggable()) {
def flavor = variant.mergedFlavor
def name = flavor.getVersionName()
def versionName = name + '-debug'
flavor.versionName = versionName;
// applicationVariants.all { variant ->
// if (variant.buildType.isDebuggable()) {
// def flavor = variant.mergedFlavor
// def name = flavor.getVersionName()
// def versionName = name + '-debug'
// flavor.versionName = versionName;
// flavor.applicationId = 'tw.firemaples.onscreenocr_debug'
// }
// }
flavorDimensions "tier"
productFlavors {
dev {
dimension "tier"
applicationId "tw.firemaples.onscreenocr_debug"
versionCode 100
versionName "10.0.0"
}
prod {
dimension "tier"
signingConfig signingConfigs.SignConfig
}
}

// Instead, use the bundle block to control which types of configuration APKs
// you want your app bundle to support.
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
density {
// This property is set to true by default.
enableSplit = true
}
abi {
// This property is set to true by default.
enableSplit = true
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.rmtheis:tess-two:6.1.1'
compile 'com.github.johnpersano:supertoasts:1.3.4@aar'
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
compile 'com.android.support:cardview-v7:23.0.0'
compile 'io.github.firemaples:microsoft-translator-java-api:0.8.3'
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
implementation('com.crashlytics.sdk.android:crashlytics:2.9.7@aar') {
transitive = true
}

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-config:16.1.2'
implementation 'com.google.firebase:firebase-perf:16.2.3'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0-eap13'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.27.0-eap13'

implementation 'com.rmtheis:tess-two:9.0.0'

implementation 'com.muddzdev:styleabletoast:2.1.2'
implementation 'io.github.firemaples:microsoft-translator-java-api:0.8.6'
implementation 'com.google.android.exoplayer:exoplayer:r2.4.0'
implementation 'com.amitshekhar.android:android-networking:1.0.0'

implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'

// implementation 'com.loopj.android:android-async-http:1.4.9'
testImplementation 'junit:junit:4.12'

//For logger
implementation 'com.github.tony19:logback-android-core:1.1.1-4'
implementation('com.github.tony19:logback-android-classic:1.1.1-4') {
exclude(group: 'xpp3', module: 'xpp3')
exclude group: 'com.google.android'
}
implementation 'org.slf4j:slf4j-api:1.7.22'

implementation 'org.greenrobot:eventbus:3.1.1'

implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
}

apply plugin: 'com.google.gms.google-services'
20 changes: 20 additions & 0 deletions app/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

DEVICE=""

if [ "$1" != "" ]
then
DEVICE="$1"
fi

echo " #### adb devices #### "
adb devices

echo " #### push apk #### "
adb $DEVICE push ./app-release.apk /data/local/tmp/tw.firemaples.onscreenocr

echo " #### install apk #### "
adb $DEVICE shell pm install -r "/data/local/tmp/tw.firemaples.onscreenocr"

echo " #### launch app #### "
adb $DEVICE shell am start -n "tw.firemaples.onscreenocr/tw.firemaples.onscreenocr.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Binary file added app/libs/notchtools-release-11d4e6.aar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright 2016-2017 Louis Chen [[email protected]].
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package tw.firemaples.onscreenocr;

import android.app.Application;
Expand Down
15 changes: 15 additions & 0 deletions app/src/debug/assets/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configuration>
<!-- Create a logcat appender -->
<appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
<tagEncoder>
<pattern>%logger{0}</pattern>
</tagEncoder>
<encoder>
<pattern>[%line][%thread] %msg%n</pattern>
</encoder>
</appender>

<root level="DEBUG">
<appender-ref ref="logcat" />
</root>
</configuration>
4 changes: 4 additions & 0 deletions app/src/dev/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">(Dev)随处翻译</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/dev/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">(Dev)隨處翻譯</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/dev/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">(Dev)EverTranslator</string>
</resources>
Loading

0 comments on commit 730df03

Please sign in to comment.