Skip to content

Commit

Permalink
Catalan translation and minor layout tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoreilly committed Dec 2, 2020
1 parent 5b1d84c commit de4ccc2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/cat/oreilly/localstt/SpeechActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void onReadyForSpeech(Bundle bundle) {
@Override
public void onBeginningOfSpeech() {
editText.setText("");
editText.setHint("Listening...");
editText.setHint(R.string.speaknow);
}

@Override
Expand Down Expand Up @@ -211,7 +211,7 @@ private void returnResults(ArrayList<String> results) {
Intent intent = new Intent();
intent.putExtras(bundle);
handler.sendMessage(
createMessage(MSG_TOAST, String.format(getString(R.string.toastForwardedMatches), results.get(0))));
createMessage(MSG_TOAST, String.format(getString(R.string.recognized), results.get(0))));
try {
Log.d(TAG, "Sending result via pendingIntent");
pendingIntent.send(this, AppCompatActivity.RESULT_OK, intent);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/rounded.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/colorBackground"/>
<corners android:topLeftRadius="6dp" android:topRightRadius="6dp"
android:bottomLeftRadius="6dp" android:bottomRightRadius="6dp"/>
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp"
android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp"
android:bottom="0dp" />
</shape>
13 changes: 7 additions & 6 deletions app/src/main/res/layout/speech_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:padding="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="@string/recognition"
android:textColor="#000000"
android:textSize="15sp"
android:textStyle="bold"
android:text="@string/app_name"
android:textColor="@color/colorPrimary"
android:textSize="20sp"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="16dp"
android:hint="@string/loading"
android:id="@+id/text"
android:layout_centerInParent="true"
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">LocalSTT</string>
<string name="vosk_recognition_service">Reconeixement Kaldi/Vosk</string>
<string name="deepspeech_recognition_service">Reconeixement DeepSpeech</string>
<string name="recognized">Reconegut: %1$s</string>
<string name="loading">Carregant...</string>
<string name="speaknow">Comença a parlar!</string>

</resources>
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
<color name="colorBackground">#FFFFFF</color>
<color name="colorBackground">#EEEEEE</color>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<string name="app_name">LocalSTT</string>
<string name="vosk_recognition_service">Kaldi/Vosk Recognizer</string>
<string name="deepspeech_recognition_service">Deepspeech Recognizer</string>
<string name="toastForwardedMatches">Recognized: %1$s</string>
<string name="recognition">Speech recognition</string>
<string name="recognized">Recognized: %1$s</string>
<string name="loading">Loading...</string>
<string name="speaknow">Start speaking now!</string>

</resources>

0 comments on commit de4ccc2

Please sign in to comment.