make summary of passphrase timeout translatable

//FREEBIE
This commit is contained in:
agrajaghh 2014-12-13 01:37:06 +01:00
parent 6980a32628
commit 3c7e319029
2 changed files with 4 additions and 1 deletions

View File

@ -42,6 +42,9 @@
<string name="ApplicationPreferencesActivity_incoming_sms">Incoming</string>
<string name="ApplicationPreferencesActivity_outgoing_sms">outgoing</string>
<!-- AppProtectionPreferenceFragment -->
<string name="AppProtectionPreferenceFragment_minutes">%d minutes</string>
<!-- DraftDatabase -->
<string name="DraftDatabase_Draft_image_snippet">(image)</string>
<string name="DraftDatabase_Draft_audio_snippet">(audio)</string>

View File

@ -69,7 +69,7 @@ public class AppProtectionPreferenceFragment extends PreferenceFragment {
private void initializeTimeoutSummary() {
int timeoutMinutes = TextSecurePreferences.getPassphraseTimeoutInterval(getActivity());
this.findPreference(TextSecurePreferences.PASSPHRASE_TIMEOUT_INTERVAL_PREF)
.setSummary(String.format("%d minutes", timeoutMinutes));
.setSummary(getString(R.string.AppProtectionPreferenceFragment_minutes, timeoutMinutes));
}
private class ChangePassphraseClickListener implements Preference.OnPreferenceClickListener {