diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5c4b4b3ee6..d81a30892a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -39,8 +39,8 @@
partial
SMS
MMS
- Incoming
- outgoing
+ Incoming %s
+ outgoing %s
%d minutes
@@ -723,8 +723,10 @@
Change my passphrase
Complete key exchanges
Enable passphrase
+ Passphrase %s
Enable local encryption of messages and keys
Screen security
+ Screen security %s
Automatically complete key exchanges for new sessions or for existing sessions with the same identity key
Block screenshots in the recents list and inside the app
Forget passphrase from memory after some interval
@@ -789,8 +791,10 @@
Dark
Appearance
Theme
+ Theme %s
Default
Language
+ Language %s
Set as default SMS app
Make TextSecure the default SMS/MMS application for your system.
Push messages
diff --git a/src/org/thoughtcrime/securesms/preferences/AppProtectionPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/AppProtectionPreferenceFragment.java
index d157dae737..a1870fb23b 100644
--- a/src/org/thoughtcrime/securesms/preferences/AppProtectionPreferenceFragment.java
+++ b/src/org/thoughtcrime/securesms/preferences/AppProtectionPreferenceFragment.java
@@ -11,7 +11,6 @@ import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceScreen;
import android.support.v4.preference.PreferenceFragment;
-import android.util.Log;
import android.widget.Toast;
import com.doomonafireball.betterpickers.hmspicker.HmsPickerBuilder;
@@ -153,10 +152,31 @@ public class AppProtectionPreferenceFragment extends PreferenceFragment {
}
}
- public static CharSequence getSummary(Context context) {
- final int onCapsResId = R.string.ApplicationPreferencesActivity_On;
- final int offCapsResId = R.string.ApplicationPreferencesActivity_Off;
+ private static CharSequence getPassphraseSummary(Context context) {
+ final int passphraseResId = R.string.preferences__passphrase_summary;
+ final String onRes = context.getString(R.string.ApplicationPreferencesActivity_on);
+ final String offRes = context.getString(R.string.ApplicationPreferencesActivity_off);
- return context.getString(TextSecurePreferences.isPasswordDisabled(context) ? offCapsResId : onCapsResId);
+ if (TextSecurePreferences.isPasswordDisabled(context)) {
+ return context.getString(passphraseResId, offRes);
+ } else {
+ return context.getString(passphraseResId, onRes);
+ }
+ }
+
+ private static CharSequence getScreenSecuritySummary(Context context) {
+ final int screenSecurityResId = R.string.preferences__screen_security_summary;
+ final String onRes = context.getString(R.string.ApplicationPreferencesActivity_on);
+ final String offRes = context.getString(R.string.ApplicationPreferencesActivity_off);
+
+ if (TextSecurePreferences.isScreenSecurityEnabled(context)) {
+ return context.getString(screenSecurityResId, onRes);
+ } else {
+ return context.getString(screenSecurityResId, offRes);
+ }
+ }
+
+ public static CharSequence getSummary(Context context) {
+ return getPassphraseSummary(context) + ", " + getScreenSecuritySummary(context);
}
}
diff --git a/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java
index 23aadc7428..ffe24748c5 100644
--- a/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java
+++ b/src/org/thoughtcrime/securesms/preferences/AppearancePreferenceFragment.java
@@ -50,7 +50,7 @@ public class AppearancePreferenceFragment extends ListSummaryPreferenceFragment
int langIndex = Arrays.asList(languageEntryValues).indexOf(TextSecurePreferences.getLanguage(context));
int themeIndex = Arrays.asList(themeEntryValues).indexOf(TextSecurePreferences.getTheme(context));
- return context.getString(R.string.preferences__theme) + ": " + themeEntries[themeIndex] + ", " +
- context.getString(R.string.preferences__language) + ": " + languageEntries[langIndex];
+ return context.getString(R.string.preferences__theme_summary, themeEntries[themeIndex]) + ", " +
+ context.getString(R.string.preferences__language_summary, languageEntries[langIndex]);
}
}
diff --git a/src/org/thoughtcrime/securesms/preferences/SmsMmsPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/SmsMmsPreferenceFragment.java
index 4caed2a0bf..81f0c0d85e 100644
--- a/src/org/thoughtcrime/securesms/preferences/SmsMmsPreferenceFragment.java
+++ b/src/org/thoughtcrime/securesms/preferences/SmsMmsPreferenceFragment.java
@@ -146,7 +146,7 @@ public class SmsMmsPreferenceFragment extends PreferenceFragment {
final int offResId = R.string.ApplicationPreferencesActivity_off;
final int smsResId = R.string.ApplicationPreferencesActivity_sms;
final int mmsResId = R.string.ApplicationPreferencesActivity_mms;
- final int incomingSmsResId = R.string.ApplicationPreferencesActivity_incoming_sms;
+ final int incomingSmsResId = R.string.ApplicationPreferencesActivity_incoming_sms_summary;
final int incomingSmsSummary;
boolean postKitkatSMS = Util.isDefaultSmsProvider(context);
@@ -161,14 +161,14 @@ public class SmsMmsPreferenceFragment extends PreferenceFragment {
else if (!preKitkatSMS && preKitkatMMS) incomingSmsSummary = mmsResId;
else incomingSmsSummary = offResId;
}
- return context.getString(incomingSmsResId) + ": " + context.getString(incomingSmsSummary);
+ return context.getString(incomingSmsResId, context.getString(incomingSmsSummary));
}
private static CharSequence getOutgoingSmsSummary(Context context) {
final int onResId = R.string.ApplicationPreferencesActivity_on;
final int offResId = R.string.ApplicationPreferencesActivity_off;
final int partialResId = R.string.ApplicationPreferencesActivity_partial;
- final int outgoingSmsResId = R.string.ApplicationPreferencesActivity_outgoing_sms;
+ final int outgoingSmsResId = R.string.ApplicationPreferencesActivity_outgoing_sms_summary;
final int outgoingSmsSummary;
if (TextSecurePreferences.isFallbackSmsAllowed(context) && TextSecurePreferences.isDirectSmsAllowed(context)) {
@@ -178,6 +178,6 @@ public class SmsMmsPreferenceFragment extends PreferenceFragment {
} else {
outgoingSmsSummary = offResId;
}
- return context.getString(outgoingSmsResId) + ": " + context.getString(outgoingSmsSummary);
+ return context.getString(outgoingSmsResId, context.getString(outgoingSmsSummary));
}
}