Made as much strings translatable as possible+

A lot of smal fixes
This commit is contained in:
massimiliano 2018-12-16 11:40:25 +01:00
parent a290f55354
commit 35387fbc50
15 changed files with 53 additions and 24 deletions

View File

@ -32,10 +32,8 @@
android:label="@string/app_name"> android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data <data
android:host="*.disroot.org" android:host="*.disroot.org"
android:scheme="https" /> android:scheme="https" />

View File

@ -56,12 +56,9 @@ import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ListAdapter;
import android.widget.ListView; import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -1877,7 +1874,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
new NotificationCompat.Builder(this) new NotificationCompat.Builder(this)
.setAutoCancel( true ) .setAutoCancel( true )
.setSmallIcon(R.drawable.ic_state) .setSmallIcon(R.drawable.ic_state)
.setContentTitle( "Message from Disroot State!" ) .setContentTitle( getString( R.string.NotificationTitle ) )
.setContentText(name)//get text Title from json :-) .setContentText(name)//get text Title from json :-)
.setContentInfo(message)//get text message from json :-) .setContentInfo(message)//get text message from json :-)
.setContentIntent(launchStateMessages); .setContentIntent(launchStateMessages);

View File

@ -2,9 +2,7 @@ package org.disroot.disrootapp.ui;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color; import android.graphics.Color;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
@ -28,7 +26,6 @@ import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.sql.Date;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -78,7 +75,6 @@ public class StateMessagesActivity extends AppCompatActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_about, menu); getMenuInflater().inflate(R.menu.menu_about, menu);
return true; return true;
} }
@ -86,9 +82,6 @@ public class StateMessagesActivity extends AppCompatActivity {
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId(); int id = item.getItemId();
@ -255,14 +248,16 @@ public class StateMessagesActivity extends AppCompatActivity {
case "Fixed": case "Fixed":
case "Scheduled": case "Scheduled":
humanStatus.setTextColor(Color.GREEN); humanStatus.setTextColor(Color.GREEN);
humanStatus.setText(R.string.Scheduled);
break; break;
case "Investigating": case "Investigating":
case "Watching": case "Watching":
humanStatus.setTextColor(Color.YELLOW); humanStatus.setTextColor(Color.YELLOW);
humanStatus.setText(R.string.Investigating);
break; break;
case "Identified": case "Identified":
humanStatus.setTextColor(Color.RED); humanStatus.setTextColor(Color.RED);
humanStatus.setText(R.string.Identified);
break; break;
} }
return v; return v;

View File

@ -17,7 +17,6 @@ public class Constants {
public static final String URL_DisApp_POLL = "https://poll.disroot.org"; public static final String URL_DisApp_POLL = "https://poll.disroot.org";
public static final String URL_DisApp_BOARD = "https://board.disroot.org"; public static final String URL_DisApp_BOARD = "https://board.disroot.org";
public static final String URL_DisApp_USER = "https://user.disroot.org"; public static final String URL_DisApp_USER = "https://user.disroot.org";
public static final String URL_DisApp_STATE = "https://state.disroot.org";
public static final String URL_DisApp_HOWTO = "https://howto.disroot.org"; public static final String URL_DisApp_HOWTO = "https://howto.disroot.org";
public static final String URL_DisApp_K9HELP = "https://howto.disroot.org/email/email-clients/mobile/androidk9"; public static final String URL_DisApp_K9HELP = "https://howto.disroot.org/email/email-clients/mobile/androidk9";
public static final String URL_DisApp_XMPPHELP = "https://howto.disroot.org/xmpp/mobile/android"; public static final String URL_DisApp_XMPPHELP = "https://howto.disroot.org/xmpp/mobile/android";

View File

@ -22,7 +22,7 @@
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways" app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/DisTheme.PopupOverlay" app:popupTheme="@style/DisTheme.PopupOverlay"
app:title="@string/app_name"> app:title="@string/app_state">
</android.support.v7.widget.Toolbar> </android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
@ -37,11 +37,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxWidth="24dp" android:maxWidth="24dp"
android:drawableTop="@drawable/ic_state" android:drawableTop="@drawable/ic_state"
android:drawableTint="@color/gray"
android:text="@string/state_btn" android:text="@string/state_btn"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginHorizontal="@android:dimen/app_icon_size" android:layout_marginLeft="@android:dimen/app_icon_size"
android:layout_marginRight="@android:dimen/app_icon_size"
style="?android:attr/borderlessButtonStyle" style="?android:attr/borderlessButtonStyle"
android:textColor="#ffffff"/> android:textColor="@color/gray"/>
<Button <Button
android:id="@+id/StateMessageBtn" android:id="@+id/StateMessageBtn"
android:shadowColor="@color/bg_primary_blue" android:shadowColor="@color/bg_primary_blue"
@ -51,7 +53,8 @@
android:drawableTop="@drawable/ic_state" android:drawableTop="@drawable/ic_state"
android:text="@string/state_messages_btn" android:text="@string/state_messages_btn"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginHorizontal="@android:dimen/app_icon_size" android:layout_marginLeft="@android:dimen/app_icon_size"
android:layout_marginRight="@android:dimen/app_icon_size"
style="?android:attr/borderlessButtonStyle" style="?android:attr/borderlessButtonStyle"
android:textColor="#ffffff"/> android:textColor="#ffffff"/>
</android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat>

View File

@ -22,7 +22,7 @@
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways" app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/DisTheme.PopupOverlay" app:popupTheme="@style/DisTheme.PopupOverlay"
app:title="@string/app_name"> app:title="@string/app_state">
</android.support.v7.widget.Toolbar> </android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
@ -39,7 +39,8 @@
android:drawableTop="@drawable/ic_state" android:drawableTop="@drawable/ic_state"
android:text="@string/state_btn" android:text="@string/state_btn"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginHorizontal="@android:dimen/app_icon_size" android:layout_marginLeft="@android:dimen/app_icon_size"
android:layout_marginRight="@android:dimen/app_icon_size"
style="?android:attr/borderlessButtonStyle" style="?android:attr/borderlessButtonStyle"
android:textColor="#ffffff"/> android:textColor="#ffffff"/>
<Button <Button
@ -49,11 +50,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxWidth="24dp" android:maxWidth="24dp"
android:drawableTop="@drawable/ic_state" android:drawableTop="@drawable/ic_state"
android:drawableTint="@color/gray"
android:text="@string/state_messages_btn" android:text="@string/state_messages_btn"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginHorizontal="@android:dimen/app_icon_size" android:layout_marginLeft="@android:dimen/app_icon_size"
android:layout_marginRight="@android:dimen/app_icon_size"
style="?android:attr/borderlessButtonStyle" style="?android:attr/borderlessButtonStyle"
android:textColor="#ffffff"/> android:textColor="@color/gray"/>
</android.support.v7.widget.LinearLayoutCompat> </android.support.v7.widget.LinearLayoutCompat>

View File

@ -148,4 +148,8 @@
<string name="state_messages_btn">Show State messages</string> <string name="state_messages_btn">Show State messages</string>
<string name="state_btn">Show Service State</string> <string name="state_btn">Show Service State</string>
<string name="ScheduledAt">Scheduled at:</string> <string name="ScheduledAt">Scheduled at:</string>
<string name="NotificationTitle">Message from Disroot State!</string>
<string name="Scheduled">Scheduled</string>
<string name="Investigating">Investigating</string>
<string name="Identified">Identified</string>
</resources> </resources>

View File

@ -177,4 +177,8 @@
<string name="state_messages_btn">Show State messages</string> <string name="state_messages_btn">Show State messages</string>
<string name="state_btn">Show Service State</string> <string name="state_btn">Show Service State</string>
<string name="ScheduledAt">Scheduled at:</string> <string name="ScheduledAt">Scheduled at:</string>
<string name="NotificationTitle">Message from Disroot State!</string>
<string name="Scheduled">Scheduled</string>
<string name="Investigating">Investigating</string>
<string name="Identified">Identified</string>
</resources> </resources>

View File

@ -147,4 +147,8 @@
<string name="state_messages_btn">Mostra messaggi di stato</string> <string name="state_messages_btn">Mostra messaggi di stato</string>
<string name="state_btn">Mostra stato dei servizi</string> <string name="state_btn">Mostra stato dei servizi</string>
<string name="ScheduledAt">In programma il: \</string> <string name="ScheduledAt">In programma il: \</string>
<string name="NotificationTitle">Messaggio dallo Stato di Disroot!</string>
<string name="Scheduled">Pianificato</string>
<string name="Investigating">Indagando</string>
<string name="Identified">Identificato</string>
</resources> </resources>

View File

@ -148,4 +148,8 @@
<string name="state_messages_btn">Toon statusberichten</string> <string name="state_messages_btn">Toon statusberichten</string>
<string name="state_btn">Toon Service Status</string> <string name="state_btn">Toon Service Status</string>
<string name="ScheduledAt">Gepland op: \</string> <string name="ScheduledAt">Gepland op: \</string>
<string name="NotificationTitle">Bericht van Disroot State!</string>
<string name="Scheduled">Gepland</string>
<string name="Investigating">Aan het onderzoeken</string>
<string name="Identified">Geïdentificeerd</string>
</resources> </resources>

View File

@ -147,4 +147,8 @@
<string name="state_messages_btn">Show State messages</string> <string name="state_messages_btn">Show State messages</string>
<string name="state_btn">Show Service State</string> <string name="state_btn">Show Service State</string>
<string name="ScheduledAt">Scheduled at:</string> <string name="ScheduledAt">Scheduled at:</string>
<string name="NotificationTitle">Message from Disroot State!</string>
<string name="Scheduled">Scheduled</string>
<string name="Investigating">Investigating</string>
<string name="Identified">Identified</string>
</resources> </resources>

View File

@ -148,4 +148,8 @@
<string name="state_messages_btn">Show State messages</string> <string name="state_messages_btn">Show State messages</string>
<string name="state_btn">Show Service State</string> <string name="state_btn">Show Service State</string>
<string name="ScheduledAt">Scheduled at:</string> <string name="ScheduledAt">Scheduled at:</string>
<string name="NotificationTitle">Message from Disroot State!</string>
<string name="Scheduled">Scheduled</string>
<string name="Investigating">Investigating</string>
<string name="Identified">Identified</string>
</resources> </resources>

View File

@ -2,4 +2,5 @@
<resources> <resources>
<color name="bg_primary_blue">#50162d</color> <color name="bg_primary_blue">#50162d</color>
<color name="bg_primary_blue_dark">#1f5c60</color> <color name="bg_primary_blue_dark">#1f5c60</color>
<color name="gray">#808080</color>
</resources> </resources>

View File

@ -148,4 +148,8 @@
<string name="state_messages_btn">Show State messages</string> <string name="state_messages_btn">Show State messages</string>
<string name="state_btn">Show Service State</string> <string name="state_btn">Show Service State</string>
<string name="ScheduledAt">Scheduled at: \</string> <string name="ScheduledAt">Scheduled at: \</string>
<string name="NotificationTitle">Message from Disroot State!</string>
<string name="Scheduled">Scheduled</string>
<string name="Investigating">Investigating</string>
<string name="Identified">Identified</string>
</resources> </resources>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<changelog> <changelog>
<release version="1.0.2" versioncode="12" > <release version="1.1.0" versioncode="12" >
<change>State page is api based instead of webview</change> <change>State page is api based instead of webview</change>
<change>In State page is possible to view state messages</change> <change>In State page is possible to view state messages</change>
<change>State page is ordered by status</change> <change>State page is ordered by status</change>
@ -8,6 +8,11 @@
<change>Fixed app lanuch in state on fresh install</change> <change>Fixed app lanuch in state on fresh install</change>
<change>Refresh state data to update state events</change> <change>Refresh state data to update state events</change>
<change>Added app notification on new state events</change> <change>Added app notification on new state events</change>
<change>Notifications make sound</change>
<change>Notification text comes from json data</change>
<change>Tapping on notification launches StateMessagesActivity</change>
<change>Made as much strings translatable as possible</change>
<change>A lot of smal fixes</change>
</release> </release>
<release version="1.0.2" versioncode="12" > <release version="1.0.2" versioncode="12" >
<change>Third partie cookies disabled</change> <change>Third partie cookies disabled</change>