From b5611f5121a3bebb815199915e959a4f0cee66dd Mon Sep 17 00:00:00 2001 From: Kaarel Kaljurand Date: Sun, 12 Feb 2017 10:24:06 +0100 Subject: [PATCH] Export RewritesSelector + minor fixes --- app/AndroidManifest.xml | 11 +++++------ app/build.gradle | 4 ++-- app/res/layout/list_item_rewrites.xml | 4 +++- app/res/values/strings.xml | 4 ++-- .../speak/activity/RewritesLoaderActivity.java | 4 ++-- docs/README.md | 6 +++--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/AndroidManifest.xml b/app/AndroidManifest.xml index 7a852c2d..2a501e81 100644 --- a/app/AndroidManifest.xml +++ b/app/AndroidManifest.xml @@ -137,14 +137,11 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP - + @@ -207,8 +204,10 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP android:name=".ServerListActivity" android:label="@string/labelActivityServerList" android:parentActivityName=".PreferencesRecognitionServiceHttp"> + + android:padding="@dimen/layoutMargin2"> @@ -19,6 +20,7 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" + android:layout_centerVertical="true" android:text="@string/check" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="?android:textColorPrimary" /> diff --git a/app/res/values/strings.xml b/app/res/values/strings.xml index d0364ab9..1f1f0158 100644 --- a/app/res/values/strings.xml +++ b/app/res/values/strings.xml @@ -280,7 +280,7 @@ http://kaljurand.github.io/K6nele/docs/et/user_guide.html - http://kaljurand.github.io/K6nele/docs/et/user_guide.html#mberkirjutusreeglid + http://kaljurand.github.io/K6nele/docs/et/user_guide.html#Ümberkirjutusreeglid audio/x-raw @@ -377,4 +377,4 @@ Speak now!\nTap when finished - \ No newline at end of file + diff --git a/app/src/ee/ioc/phon/android/speak/activity/RewritesLoaderActivity.java b/app/src/ee/ioc/phon/android/speak/activity/RewritesLoaderActivity.java index d93c0a6d..ab6761a9 100644 --- a/app/src/ee/ioc/phon/android/speak/activity/RewritesLoaderActivity.java +++ b/app/src/ee/ioc/phon/android/speak/activity/RewritesLoaderActivity.java @@ -46,9 +46,9 @@ import ee.ioc.phon.android.speechutils.utils.PreferenceUtils; /** - * Loads the rewrites from the EXTRAs of an incoming SEND-intent, or if they are missing, + * Loads the rewrites from the EXTRAs of an incoming VIEW- or SEND-intent, or if they are missing, * then launches ACTION_GET_CONTENT to load the rewrites from its result data. - * In case of an incoming SEND-intent we only accept "text/tab-separated-values". + * In case of an incoming VIEW/SEND-intent we only accept "text/tab-separated-values" (see the manifest). * However, if the user explicitly launches a file picker from Kõnele, then any "text/*" files * can be picked. */ diff --git a/docs/README.md b/docs/README.md index ef09e50a..1a84ce1a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,7 +7,7 @@ Various documents, notes, examples [intents.dot](intents.dot) is a diagram showing how information can flow from Kõnele to external devices/apps and back. -[Rewrite rule examples](http://kaljurand.github.io/K6nele/docs/et/user_guide.html#nited) +[Rewrite rule examples](http://kaljurand.github.io/K6nele/docs/et/user_guide.html#näited) contains (mostly) Estonian rewrite rule tables (documented in English). A rewrite rule table contains the following tab-separated columns: @@ -21,7 +21,7 @@ A rewrite rule table contains the following tab-separated columns: - Arg1. First argument of the command - Arg2. Second argument of the command -The first line of the table is a header that names the columns. Only the Utterance and Replacement columns must be present. +The first line of the table is a header that names the columns. The header is optional if the table contains a single column (interpreted as Utterance) or 2 columns (interpreted as Utterance and Replacement). Non-header lines can be commented out using an initial '#'. Rewriting is done by: @@ -30,4 +30,4 @@ Rewriting is done by: The pre-defined commands cover cursor movement within the text and between fields, selection, replacement, copy/paste/cut, and the editor actions `search`, `send`, `go`, and `done`. Most of the commands can be repeated or undone multiple times. -The arguments can reference expression groups by `$1`, `$2`, ... and the current selection by `{}`. +The arguments can reference expression groups by `$1`, `$2`, ... and the current selection by `@sel()`.