Skip to content

Commit

Permalink
Merge pull request #1448 from unfoldingWord-dev/release-7.0
Browse files Browse the repository at this point in the history
Release 7.0
  • Loading branch information
da1nerd committed Apr 22, 2016
2 parents d1ba9bc + 6a2d592 commit 45aeff7
Show file tree
Hide file tree
Showing 113 changed files with 3,852 additions and 1,884 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.gitignore.io

.sync
### Android ###
# Built application files
*.apk
Expand Down Expand Up @@ -130,4 +130,4 @@ Temporary Items
# KDE directory preferences
.directory
app/manifest-merger-release-report.txt
captures
captures
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:2.0.0'
}
}

Expand All @@ -18,9 +18,9 @@ android {
defaultConfig {
applicationId "com.translationstudio.androidapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 120
versionName "6.1"
targetSdkVersion 22
versionCode 126
versionName "7.0"
multiDexEnabled = true
}
dexOptions {
Expand Down Expand Up @@ -68,7 +68,7 @@ dependencies {
compile 'org.apmem.tools:layouts:1.10'
compile 'com.itextpdf:itextpdf:5.5.7'
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'org.unfoldingword.tools:gogs-client:1.1.0'
compile 'org.unfoldingword.tools:gogs-client:1.3.4'
compile project(':html-textview')
compile project(':com.door43.tools.reporting')
compile project(':com.door43.tools.security')
Expand Down
19 changes: 19 additions & 0 deletions app/src/androidTest/assets/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,28 @@ CREATE TABLE `project` (
`source_language_catalog_url` TEXT NOT NULL,
`source_language_catalog_local_modified_at` INTEGER NOT NULL DEFAULT 0,
`source_language_catalog_server_modified_at` INTEGER NOT NULL DEFAULT 0,
`chunk_marker_catalog_url` TEXT NULL DEFAULT NULL,
`chunk_marker_catalog_local_modified_at` INTEGER NOT NULL DEFAULT 0,
`chunk_marker_catalog_server_modified_at` INTEGER NOT NULL DEFAULT 0,
UNIQUE (`slug`)
);


-- ---
-- Table 'chunk_marker'
-- ---

DROP TABLE IF EXISTS `chunk_marker`;

CREATE TABLE `chunk_marker` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`project_id` INTEGER NOT NULL,
`chapter_slug` TEXT NOT NULL,
`first_verse_slug` TEXT NOT NULL,
UNIQUE (`project_id`, 'chapter_slug', 'first_verse_slug'),
FOREIGN KEY (project_id) REFERENCES `project` (`id`) ON DELETE CASCADE
);

-- ---
-- Table 'resource'
-- ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected void setUp() throws Exception {
super.setUp();
this.context = getInstrumentation().getContext();
this.testsDir = new File(AppContext.context().getCacheDir(), "import_export_tests");
this.translator = new Translator(this.context, new File(this.testsDir, "translator"));
this.translator = new Translator(this.context, null, new File(this.testsDir, "translator"));
this.library = AppContext.getLibrary();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
import android.content.Context;
import android.test.InstrumentationTestCase;

import com.door43.tools.reporting.Logger;
import com.door43.translationstudio.MainApplication;
import com.door43.translationstudio.core.CheckingQuestion;
import com.door43.translationstudio.core.Indexer;
import com.door43.translationstudio.core.IndexerSQLiteHelper;
import com.door43.translationstudio.core.SourceTranslation;
import com.door43.translationstudio.AppContext;
import com.door43.translationstudio.core.TranslationWord;
import com.door43.translationstudio.core.Util;
import com.door43.util.Zip;

import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* Created by joel on 8/27/2015.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.test.InstrumentationTestCase;

import com.door43.translationstudio.core.ChunkMarker;
import com.door43.translationstudio.core.Library;
import com.door43.translationstudio.core.LibraryUpdates;
import com.door43.translationstudio.core.Project;
Expand Down Expand Up @@ -43,6 +44,11 @@ public void test02ExtractLibrary() throws Exception {
assertTrue(mLibrary.exists());
}

public void test03ChunkMarkers() throws Exception {
ChunkMarker[] markers = mLibrary.getChunkMarkers("gen");
assertTrue(markers.length > 0);
}

// public void test03DownloadTargetLanguages() throws Exception {
// mLibrary.downloadTargetLanguages();
// assertTrue(mLibrary.getTargetLanguages().length > 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class TranslatorTest extends InstrumentationTestCase {
protected void setUp() throws Exception {
app = AppContext.context();
mTranslatorDir = new File(app.getFilesDir(), "translator_test_translations");
mTranslator = new Translator(app, mTranslatorDir);
mTranslator = new Translator(app, null, mTranslatorDir);
String server = app.getUserPreferences().getString(SettingsActivity.KEY_PREF_MEDIA_SERVER, app.getResources().getString(R.string.pref_default_media_server));
rootApiUrl = server + app.getResources().getString(R.string.root_catalog_api);
library = new Library(app, rootApiUrl);
Expand Down
22 changes: 14 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<activity
android:name=".TermsOfUseActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".SplashScreenActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreenActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"
Expand All @@ -67,7 +67,7 @@
android:label="@string/title_activity_crash_reporter" />
<activity
android:name=".ImportFileChooserActivity"
android:label="@string/title_file_browser"></activity>
android:label="@string/title_file_browser" />
<activity
android:name=".device2device.DeviceToDeviceActivity"
android:label="@string/title_activity_sharing"
Expand Down Expand Up @@ -119,12 +119,15 @@
<activity
android:name=".newui.home.HomeActivity"
android:label="@string/title_activity_target_translations"
android:theme="@style/AppTheme.NoActionBar" >
android:theme="@style/AppTheme.NoActionBar">

<!-- this does not work to register file extension -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="file" />
<data android:scheme="http" />
<data android:scheme="https" />
Expand Down Expand Up @@ -174,11 +177,14 @@
android:name=".newui.draft.DraftActivity"
android:label="@string/preview">

<!--android:theme="@style/AppTheme.NoActionBar"-->
<!-- android:theme="@style/AppTheme.NoActionBar" -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".newui.translate.TargetTranslationActivity" />
</activity>
<activity android:name=".RegisterDoor43Activity" />
<activity android:name=".LoginDoor43Activity" />
<activity android:name=".RegisterOfflineActivity"></activity>
</application>

</manifest>
</manifest>
Binary file modified app/src/main/assets/library.zip
Binary file not shown.
19 changes: 19 additions & 0 deletions app/src/main/assets/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,28 @@ CREATE TABLE `project` (
`source_language_catalog_url` TEXT NOT NULL,
`source_language_catalog_local_modified_at` INTEGER NOT NULL DEFAULT 0,
`source_language_catalog_server_modified_at` INTEGER NOT NULL DEFAULT 0,
`chunk_marker_catalog_url` TEXT NULL DEFAULT NULL,
`chunk_marker_catalog_local_modified_at` INTEGER NOT NULL DEFAULT 0,
`chunk_marker_catalog_server_modified_at` INTEGER NOT NULL DEFAULT 0,
UNIQUE (`slug`)
);


-- ---
-- Table 'chunk_marker'
-- ---

DROP TABLE IF EXISTS `chunk_marker`;

CREATE TABLE `chunk_marker` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`project_id` INTEGER NOT NULL,
`chapter_slug` TEXT NOT NULL,
`first_verse_slug` TEXT NOT NULL,
UNIQUE (`project_id`, 'chapter_slug', 'first_verse_slug'),
FOREIGN KEY (project_id) REFERENCES `project` (`id`) ON DELETE CASCADE
);

-- ---
-- Table 'resource'
-- ---
Expand Down
Loading

0 comments on commit 45aeff7

Please sign in to comment.