Extract TextSecure strings for i18n.

1) Change all instances which use concatenation to build strings
with variables in them to use string formatting instead.

2) Extract all string literals from layouts and menus into strings.xml

3) Extract all string literals from code into strings.xml
This commit is contained in:
Moxie Marlinspike
2012-09-07 20:03:23 -07:00
parent 45c058b46d
commit 4c3b7cbe08
89 changed files with 1228 additions and 1205 deletions

View File

@@ -18,59 +18,59 @@
*/
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Use Settings">
<PreferenceCategory android:title="@string/use_settings">
<CheckBoxPreference android:defaultValue="true"
android:key="pref_all_sms"
android:summary="Use TextSecure for viewing and storing all incoming text messages"
android:summary="@string/use_textsecure_for_viewing_and_storing_all_incoming_text_messages"
android:title="Use for all SMS" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_all_mms"
android:summary="Use TextSecure for viewing and storing all incoming multimedia messages"
android:summary="@string/use_textsecure_for_viewing_and_storing_all_incoming_multimedia_messages"
android:title="Use for all MMS" />
</PreferenceCategory>
<PreferenceCategory android:title="Input Settings">
<PreferenceCategory android:title="@string/input_settings">
<CheckBoxPreference android:defaultValue="false"
android:key="pref_enter_sends"
android:summary="Pressing the enter key will send text messages"
android:summary="@string/pressing_the_enter_key_will_send_text_messages"
android:title="Enter Sends" />
</PreferenceCategory>
<PreferenceCategory android:title="Display Settings">
<PreferenceCategory android:title="@string/display_settings">
<Preference android:key="pref_choose_identity"
android:title="Choose Identity"
android:summary="Choose your contact entry from the contacts list."/>
android:title="@string/choose_identity"
android:summary="@string/choose_your_contact_entry_from_the_contacts_list"/>
</PreferenceCategory>
<PreferenceCategory android:title="Encryption Settings">
<PreferenceCategory android:title="@string/encryption_settings">
<Preference android:key="pref_change_passphrase"
android:title="Change Passphrase"
android:summary="Change my passphrase"/>
android:title="@string/change_passphrase"
android:summary="@string/change_my_passphrase"/>
<CheckBoxPreference android:defaultValue="true"
android:key="pref_auto_complete_key_exchange"
android:title="Complete Key Exchanges"
android:summary="Automatically complete key exchanges for new sessions or for existing sessions with the same identity key" />
android:title="@string/complete_key_exchanges"
android:summary="@string/automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_key_tag_whitespace"
android:summary="Include a whitespace tag at the end of every non-encrypted message"
android:title="Include whitespace tag" />
android:summary="@string/include_a_whitespace_tag_at_the_end_of_every_non_encrypted_message"
android:title="@string/include_whitespace_tag" />
<CheckBoxPreference android:defaultValue="true"
android:key="pref_send_identity_key"
android:summary="Sign key exchange messages with identity key"
android:title="Sign Key Exchange" />
android:summary="@string/sign_key_exchange_messages_with_identity_key"
android:title="@string/sign_key_exchange" />
<CheckBoxPreference android:defaultValue="false"
android:key="pref_timeout_passphrase"
android:summary="Forget passphrase from memory after some interval"
android:title="Timeout passphrase" />
android:summary="@string/forget_passphrase_from_memory_after_some_interval"
android:title="@string/timeout_passphrase" />
<org.thoughtcrime.securesms.preferences.PassphraseTimeoutPreference
@@ -83,38 +83,38 @@
</PreferenceCategory>
<PreferenceCategory android:title="Identity Key Settings">
<PreferenceCategory android:title="@string/identity_key_settings">
<Preference android:key="pref_view_identity"
android:title="View My Identity Key"
android:summary="View my identity key"/>
android:title="@string/view_my_identity_key"
android:summary="@string/view_my_identity_key"/>
<Preference android:key="pref_export_identity"
android:title="Export My Identity Key"
android:summary="Export my identity key"/>
android:title="@string/export_my_identity_key"
android:summary="@string/export_my_identity_key"/>
<Preference android:key="pref_import_identity"
android:title="Import Contact's Key"
android:summary="Import an identity key from a contact"/>
android:title="@string/import_contacts_key"
android:summary="@string/import_an_identity_key_from_a_contact"/>
<Preference android:key="pref_manage_identity"
android:title="Manage Identity Keys"
android:summary="Manage configured identity keys"/>
android:title="@string/manage_identity_keys"
android:summary="@string/manage_configured_identity_keys"/>
</PreferenceCategory>
<PreferenceCategory android:title="Notification Settings">
<PreferenceCategory android:title="@string/notification_settings">
<CheckBoxPreference android:key="pref_key_enable_notifications"
android:title="Notifications"
android:summary="Display message notifications in status bar"
android:title="@string/notifications"
android:summary="@string/display_message_notifications_in_status_bar"
android:defaultValue="true" />
<ListPreference
android:key="pref_led_color"
android:defaultValue="green"
android:title="LED Color"
android:title="@string/led_color"
android:dependency="pref_key_enable_notifications"
android:summary="Change notification LED color"
android:summary="@string/change_notification_led_color"
android:entries="@array/pref_led_color_entries"
android:entryValues="@array/pref_led_color_values"
android:dialogTitle="Select LED Color" />
android:dialogTitle="@string/select_led_color" />
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
android:key="pref_led_blink"
@@ -130,14 +130,14 @@
<RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
android:dependency="pref_key_enable_notifications"
android:key="pref_key_ringtone"
android:title="Select ringtone"
android:title="@string/select_ringtone"
android:ringtoneType="notification"
android:defaultValue="content://settings/system/notification_sound" />
<CheckBoxPreference android:layout="?android:attr/preferenceLayoutChild"
android:dependency="pref_key_enable_notifications"
android:key="pref_key_vibrate"
android:defaultValue="true"
android:title="Vibrate"
android:summary="Also vibrate when notified" />
android:title="@string/vibrate"
android:summary="@string/also_vibrate_when_notified" />
</PreferenceCategory>
</PreferenceScreen>