diff --git a/res/layout-sw400dp/activity_display_name.xml b/res/layout-sw400dp/activity_display_name.xml
index 11de7b28c2..dc118f42b8 100644
--- a/res/layout-sw400dp/activity_display_name.xml
+++ b/res/layout-sw400dp/activity_display_name.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Pick your display name" />
+ android:text="@string/activity_display_name_title_2" />
+ android:text="@string/activity_display_name_explanation" />
+ android:hint="@string/activity_display_name_edit_text_hint" />
+ android:text="@string/continue_2" />
\ No newline at end of file
diff --git a/res/layout-sw400dp/activity_landing.xml b/res/layout-sw400dp/activity_landing.xml
index a4f7790d60..815f4f9732 100644
--- a/res/layout-sw400dp/activity_landing.xml
+++ b/res/layout-sw400dp/activity_landing.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Your Session begins here..." />
+ android:text="@string/activity_landing_title_2" />
+ android:text="@string/activity_landing_register_button_title" />
+ android:text="@string/activity_landing_restore_button_title" />
+ android:text="@string/activity_landing_link_button_title" />
\ No newline at end of file
diff --git a/res/layout-sw400dp/activity_register.xml b/res/layout-sw400dp/activity_register.xml
index 0a905eca61..28c9f532b2 100644
--- a/res/layout-sw400dp/activity_register.xml
+++ b/res/layout-sw400dp/activity_register.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Say hello to your Session ID" />
+ android:text="@string/activity_register_title" />
+ android:text="@string/activity_register_explanation" />
+ android:text="@string/continue_2" />
+ android:text="@string/copy" />
+ android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
\ No newline at end of file
diff --git a/res/layout-sw400dp/activity_restore.xml b/res/layout-sw400dp/activity_restore.xml
index 82e1cf8d13..6b5f6d95fe 100644
--- a/res/layout-sw400dp/activity_restore.xml
+++ b/res/layout-sw400dp/activity_restore.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Restore your account" />
+ android:text="@string/activity_restore_title" />
+ android:text="@string/activity_restore_explanation" />
+ android:hint="@string/activity_restore_seed_edit_text_hint" />
+ android:text="@string/continue_2" />
+ android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
\ No newline at end of file
diff --git a/res/layout-sw400dp/activity_seed.xml b/res/layout-sw400dp/activity_seed.xml
index caa3272d57..f5bc0db14e 100644
--- a/res/layout-sw400dp/activity_seed.xml
+++ b/res/layout-sw400dp/activity_seed.xml
@@ -25,7 +25,7 @@
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Meet your recovery phrase" />
+ android:text="@string/activity_seed_title_2" />
+ android:text="@string/activity_seed_explanation" />
+ android:text="@string/activity_seed_reveal_button_title" />
+ android:text="@string/copy" />
\ No newline at end of file
diff --git a/res/layout-sw400dp/fragment_enter_public_key.xml b/res/layout-sw400dp/fragment_enter_public_key.xml
index 5a3dfbc85b..d2a9e7a290 100644
--- a/res/layout-sw400dp/fragment_enter_public_key.xml
+++ b/res/layout-sw400dp/fragment_enter_public_key.xml
@@ -16,7 +16,7 @@
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing"
- android:hint="Enter Session ID of recipient" />
+ android:hint="@string/fragment_enter_public_key_edit_text_hint" />
+ android:text="@string/fragment_enter_public_key_explanation" />
+ android:text="@string/copy" />
+ android:text="@string/share" />
@@ -89,6 +89,6 @@
android:layout_width="196dp"
android:layout_height="@dimen/medium_button_height"
android:layout_marginBottom="@dimen/medium_spacing"
- android:text="Next" />
+ android:text="@string/next" />
\ No newline at end of file
diff --git a/res/layout/activity_create_closed_group.xml b/res/layout/activity_create_closed_group.xml
index 55ccb98171..17c92d9eb2 100644
--- a/res/layout/activity_create_closed_group.xml
+++ b/res/layout/activity_create_closed_group.xml
@@ -19,7 +19,7 @@
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/medium_spacing"
android:layout_marginRight="@dimen/large_spacing"
- android:hint="Enter a group name" />
+ android:hint="@string/activity_create_closed_group_edit_text_hint" />
+ android:text="@string/activity_create_closed_group_explanation" />
+ android:text="@string/activity_create_closed_group_empty_state_message" />
+ android:text="@string/activity_create_closed_group_empty_state_button_title" />
diff --git a/res/layout/activity_display_name.xml b/res/layout/activity_display_name.xml
index 0c501e8343..9fb37d9d89 100644
--- a/res/layout/activity_display_name.xml
+++ b/res/layout/activity_display_name.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Pick your display name" />
+ android:text="@string/activity_display_name_title_2" />
+ android:text="@string/activity_display_name_explanation" />
+ android:hint="@string/activity_display_name_edit_text_hint" />
+ android:text="@string/continue_2" />
\ No newline at end of file
diff --git a/res/layout/activity_home.xml b/res/layout/activity_home.xml
index 4079874f8a..1bafe1d074 100644
--- a/res/layout/activity_home.xml
+++ b/res/layout/activity_home.xml
@@ -87,7 +87,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
- android:text="You don't have any contacts yet" />
+ android:text="@string/activity_home_empty_state_message" />
+ android:text="@string/activity_home_empty_state_button_title" />
diff --git a/res/layout/activity_landing.xml b/res/layout/activity_landing.xml
index 12bf0bc789..195020c0d9 100644
--- a/res/layout/activity_landing.xml
+++ b/res/layout/activity_landing.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Your Session begins here..." />
+ android:text="@string/activity_landing_title_2" />
+ android:text="@string/activity_landing_register_button_title" />
+ android:text="@string/activity_landing_restore_button_title" />
+ android:text="@string/activity_landing_link_button_title" />
\ No newline at end of file
diff --git a/res/layout/activity_pn_mode.xml b/res/layout/activity_pn_mode.xml
index 25f868d1f8..9175097cb0 100644
--- a/res/layout/activity_pn_mode.xml
+++ b/res/layout/activity_pn_mode.xml
@@ -111,6 +111,6 @@
android:layout_marginLeft="@dimen/massive_spacing"
android:layout_marginRight="@dimen/massive_spacing"
android:layout_marginBottom="@dimen/medium_spacing"
- android:text="Continue" />
+ android:text="@string/continue_2" />
\ No newline at end of file
diff --git a/res/layout/activity_register.xml b/res/layout/activity_register.xml
index da4da09770..fdd15c93a0 100644
--- a/res/layout/activity_register.xml
+++ b/res/layout/activity_register.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Say hello to your Session ID" />
+ android:text="@string/activity_register_title" />
+ android:text="@string/activity_register_explanation" />
+ android:text="@string/continue_2" />
+ android:text="@string/copy" />
+ android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
\ No newline at end of file
diff --git a/res/layout/activity_restore.xml b/res/layout/activity_restore.xml
index 08e6a3f341..eb385b3cd2 100644
--- a/res/layout/activity_restore.xml
+++ b/res/layout/activity_restore.xml
@@ -19,7 +19,7 @@
android:textSize="@dimen/large_font_size"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Restore your account" />
+ android:text="@string/activity_restore_title" />
+ android:text="@string/activity_restore_explanation" />
+ android:hint="@string/activity_restore_seed_edit_text_hint" />
+ android:text="@string/continue_2" />
+ android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
\ No newline at end of file
diff --git a/res/layout/activity_seed.xml b/res/layout/activity_seed.xml
index db9e3df0d3..72583ef0a9 100644
--- a/res/layout/activity_seed.xml
+++ b/res/layout/activity_seed.xml
@@ -25,7 +25,7 @@
android:textSize="19sp"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Meet your recovery phrase" />
+ android:text="@string/activity_seed_title_2" />
+ android:text="@string/activity_seed_explanation" />
+ android:text="@string/activity_seed_reveal_button_title" />
+ android:text="@string/copy" />
\ No newline at end of file
diff --git a/res/layout/activity_settings.xml b/res/layout/activity_settings.xml
index a575aeb636..73a6fe5668 100644
--- a/res/layout/activity_settings.xml
+++ b/res/layout/activity_settings.xml
@@ -43,7 +43,7 @@
android:id="@+id/titleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Settings"
+ android:text="@string/activity_settings_title"
android:textColor="@color/text"
android:textSize="@dimen/very_large_font_size"
android:fontFamily="sans-serif-medium" />
@@ -94,7 +94,7 @@
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:visibility="invisible"
- android:hint="Enter a display name" />
+ android:hint="@string/activity_settings_display_name_edit_text_hint" />
+ android:text="@string/copy" />
+ android:text="@string/share" />
@@ -170,7 +170,7 @@
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:gravity="center"
- android:text="Privacy" />
+ android:text="@string/activity_settings_privacy_button_title" />
+ android:text="@string/activity_settings_notifications_button_title" />
+ android:text="@string/activity_settings_chats_button_title" />
+ android:text="@string/activity_settings_devices_button_title" />
+ android:text="@string/activity_settings_recovery_phrase_button_title" />
+ android:text="@string/activity_settings_clear_all_data_button_title" />
@@ -24,7 +24,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="This will permanently delete your Session ID, including all messages, sessions, and contacts."
+ android:text="@string/dialog_clear_all_data_explanation"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:textAlignment="center" />
@@ -41,7 +41,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/small_button_height"
android:layout_weight="1"
- android:text="Cancel" />
+ android:text="@string/cancel" />
+ android:text="@string/delete" />
diff --git a/res/layout/dialog_edit_device_name.xml b/res/layout/dialog_edit_device_name.xml
index 1805bca21a..a63395415a 100644
--- a/res/layout/dialog_edit_device_name.xml
+++ b/res/layout/dialog_edit_device_name.xml
@@ -30,7 +30,7 @@
android:textAlignment="center"
android:paddingTop="12dp"
android:paddingBottom="12dp"
- android:hint="Enter a name" />
+ android:hint="@string/dialog_edit_device_name_edit_text_hint" />
+ android:text="@string/cancel" />
+ android:text="@string/ok" />
diff --git a/res/layout/dialog_link_device_master_mode.xml b/res/layout/dialog_link_device_master_mode.xml
index a2025ddf0c..6236bba517 100644
--- a/res/layout/dialog_link_device_master_mode.xml
+++ b/res/layout/dialog_link_device_master_mode.xml
@@ -40,7 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="Waiting for Device"
+ android:text="@string/dialog_link_device_master_mode_title_1"
android:textColor="@color/text"
android:textStyle="bold"
android:textSize="@dimen/medium_font_size" />
@@ -50,7 +50,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="Download Session on your other device and tap "Link to an existing account" at the bottom of the landing screen. If you have an existing account on your other device already you will have to delete that account first."
+ android:text="@string/dialog_link_device_master_mode_explanation_1"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:textAlignment="center" />
@@ -79,7 +79,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/small_button_height"
android:layout_weight="1"
- android:text="Cancel" />
+ android:text="@string/cancel" />
diff --git a/res/layout/dialog_link_device_slave_mode.xml b/res/layout/dialog_link_device_slave_mode.xml
index 209e932274..1e4578d1ab 100644
--- a/res/layout/dialog_link_device_slave_mode.xml
+++ b/res/layout/dialog_link_device_slave_mode.xml
@@ -25,7 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="Waiting for Authorization"
+ android:text="@string/dialog_link_device_slave_mode_title_1"
android:textColor="@color/text"
android:textStyle="bold"
android:textSize="@dimen/medium_font_size" />
@@ -35,7 +35,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="Please check that the words below match those shown on your other device."
+ android:text="@string/dialog_link_device_slave_mode_explanation_1"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:textAlignment="center" />
@@ -56,6 +56,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/small_button_height"
android:layout_marginTop="@dimen/large_spacing"
- android:text="Cancel" />
+ android:text="@string/cancel" />
\ No newline at end of file
diff --git a/res/layout/dialog_seed.xml b/res/layout/dialog_seed.xml
index 44fd747301..11c4076dbc 100644
--- a/res/layout/dialog_seed.xml
+++ b/res/layout/dialog_seed.xml
@@ -14,7 +14,7 @@
@@ -33,7 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing"
- android:text="This is your recovery phrase. With it, you can restore or migrate your Session ID to a new device."
+ android:text="@string/dialog_seed_explanation"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:textAlignment="center"
@@ -51,7 +51,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/small_button_height"
android:layout_weight="1"
- android:text="Cancel" />
+ android:text="@string/cancel" />
+ android:text="@string/copy" />
diff --git a/res/layout/fragment_device_list_bottom_sheet.xml b/res/layout/fragment_device_list_bottom_sheet.xml
index 77717bf242..4360e56d9b 100644
--- a/res/layout/fragment_device_list_bottom_sheet.xml
+++ b/res/layout/fragment_device_list_bottom_sheet.xml
@@ -15,7 +15,7 @@
android:drawableStart="@drawable/ic_edit_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
- android:text="Change name"/>
+ android:text="@string/fragment_device_list_bottom_sheet_change_name_button_title"/>
+ android:text="@string/fragment_device_list_bottom_sheet_unlink_device_button_title" />
diff --git a/res/layout/fragment_enter_chat_url.xml b/res/layout/fragment_enter_chat_url.xml
index 79748f4ce2..26f705c5ea 100644
--- a/res/layout/fragment_enter_chat_url.xml
+++ b/res/layout/fragment_enter_chat_url.xml
@@ -16,7 +16,7 @@
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing"
- android:hint="Enter an open group URL" />
+ android:hint="@string/fragment_enter_chat_url_edit_text_hint" />
+ android:text="@string/next" />
+ android:text="@string/fragment_enter_chat_url_privacy_warning" />
\ No newline at end of file
diff --git a/res/layout/fragment_enter_public_key.xml b/res/layout/fragment_enter_public_key.xml
index 236fc2aca2..27be721c1f 100644
--- a/res/layout/fragment_enter_public_key.xml
+++ b/res/layout/fragment_enter_public_key.xml
@@ -16,7 +16,7 @@
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/large_spacing"
android:layout_marginRight="@dimen/large_spacing"
- android:hint="Enter Session ID of recipient" />
+ android:hint="@string/fragment_enter_public_key_edit_text_hint" />
+ android:text="@string/fragment_enter_public_key_explanation" />
+ android:text="@string/copy" />
+ android:text="@string/share" />
@@ -89,6 +89,6 @@
android:layout_width="196dp"
android:layout_height="@dimen/medium_button_height"
android:layout_marginBottom="@dimen/medium_spacing"
- android:text="Next" />
+ android:text="@string/next" />
\ No newline at end of file
diff --git a/res/layout/fragment_enter_session_id.xml b/res/layout/fragment_enter_session_id.xml
index be341a2e7e..1a53342cfd 100644
--- a/res/layout/fragment_enter_session_id.xml
+++ b/res/layout/fragment_enter_session_id.xml
@@ -20,7 +20,7 @@
android:textSize="19sp"
android:textStyle="bold"
android:textColor="@color/text"
- android:text="Link your device" />
+ android:text="@string/fragment_enter_session_id_title" />
+ android:text="@string/fragment_enter_session_id_explanation" />
+ android:hint="@string/fragment_enter_session_id_edit_text_hint" />
+ android:text="@string/next" />
\ No newline at end of file
diff --git a/res/layout/session_restore_banner.xml b/res/layout/session_restore_banner.xml
index 649fa7a473..30a6d99c96 100644
--- a/res/layout/session_restore_banner.xml
+++ b/res/layout/session_restore_banner.xml
@@ -33,7 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/small_spacing"
- android:text="@string/session_restore_banner_message"
+ android:text="@string/session_reset_banner_message"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:textAlignment="center" />
@@ -50,7 +50,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/small_button_height"
android:layout_weight="1"
- android:text="@string/session_restore_banner_dismiss_button_title" />
+ android:text="@string/session_reset_banner_dismiss_button_title" />
+ android:text="@string/session_reset_banner_restore_button_title" />
diff --git a/res/layout/view_fake_chat.xml b/res/layout/view_fake_chat.xml
index 520c3a130c..c24fd1b64b 100644
--- a/res/layout/view_fake_chat.xml
+++ b/res/layout/view_fake_chat.xml
@@ -13,7 +13,7 @@
android:layout_width="@dimen/fake_chat_view_bubble_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_spacing"
- android:text="What's Session?"
+ android:text="@string/view_fake_chat_bubble_1"
android:layout_gravity="right" />
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 480008a35a..bf813e01c0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1549,9 +1549,12 @@
TAP TO UNLOCKReminder:About
-
-
+
+
+
+
+
Session
@@ -1616,16 +1619,6 @@
Adding Server...Invalid URLCouldn\'t Connect
-
- Accept
- Decline
- %1$s sent you a session request
- You\'ve accepted %1$s\'s session request
- You\'ve declined %1$s\'s session request
- %1$s\'s session request has expired
- You\'ve sent %1$s a session request
- %1$s accepted your session request
- Your session request to %1$s has expiredPending Friend Request…New Message
@@ -1659,38 +1652,200 @@
Device unlinkedThis device has been successfully unlinked
- Would you like to restore your session with %s?
- Dismiss
- Restore
+
+
+
+
+
+ Continue
+ Copy
+ Invalid URL
+ Copied to clipboard
+ Couldn\'t link device.
+ Next
+ Share
+ Invalid Session ID
+ Cancel
+
+ Your Session begins here...
+ Create Session ID
+ Continue Your Session
+ Link to an existing account
+ Your device was unlinked successfully
+
+ What\'s Session?
+ It\'s a decentralized, encrypted messaging app
+ So it doesn\'t collect my personal information or my conversation metadata? How does it work?
+ Using a combination of advanced anonymous routing and end-to-end encryption technologies.
+ Friends don\'t let friends use compromised messengers. You\'re welcome.
+
+ Say hello to your Session ID
+ Your Session ID is the unique address people can use to contact you on Session. With no connection to your real identity, your Session ID is totally anonymous and private by design.Copied to clipboard
- Are you sure you want to leave this group?
- Are you sure you want to delete this conversation?
- Conversation deleted
- Contacts
- Closed Groups
- Open Groups
+
+ Restore your account
+ Enter the recovery phrase that was given to you when you signed up to restore your account.
+ Enter your recovery phrase
+
+ Link Device
+ Enter Session ID
+ Scan QR Code
+ Navigate to "Settings" > "Devices" > "Link a Device" on your other device and then scan the QR code that comes up to start the linking process.
+
+ Link your device
+ Navigate to "Settings" > "Devices" > "Link a Device" on your other device and then enter your Session ID here to start the linking process.
+ Enter your Session ID
+
+ Pick your display name
+ This will be your name when you use Session.
+ Enter a display name
+ Please pick a display name
+ Please pick a display name that consists of only a-z, A-Z, 0-9 and _ characters
+ Please pick a shorter display name
+
Push NotificationsThere are two ways Session can handle push notifications. Make sure to read the descriptions carefully before you choose.Firebase Cloud Messaging
- Session will use the Firebase Cloud Messaging service to receive push notifications. You’ll be notified of new messages reliably and immediately. Using FCM means that this device will communicate directly with Google’s servers to retrieve push notifications, which will expose your IP address to Google. Your messages will still be onion-routed and end-to-end encrypted, so the contents of your messages will remain completely private.
+ Session will use the Firebase Cloud Messaging service to receive push notifications. You\’ll be notified of new messages reliably and immediately. Using FCM means that this device will communicate directly with Google\’s servers to retrieve push notifications, which will expose your IP address to Google. Your messages will still be onion-routed and end-to-end encrypted, so the contents of your messages will remain completely private.Background PollingSession will occasionally check for new messages in the background. This guarantees full privacy protection, but message notifications may be significantly delayed.RecommendedPlease Pick an Option
+
+ You don\'t have any contacts yet
+ Start a Session
+ Are you sure you want to leave this group?
+ "Couldn\'t leave group"
+ Are you sure you want to delete this conversation?
+ Conversation deleted
+
Push NotificationsSession now features two ways to handle push notifications. Make sure to read the descriptions carefully before you choose.Firebase Cloud Messaging
- Session will use the Firebase Cloud Messaging service to receive push notifications. You’ll be notified of new messages reliably and immediately. Using FCM means that this device will communicate directly with Google’s servers to retrieve push notifications, which will expose your IP address to Google. Your messages will still be onion-routed and end-to-end encrypted, so the contents of your messages will remain completely private.
+ Session will use the Firebase Cloud Messaging service to receive push notifications. You\’ll be notified of new messages reliably and immediately. Using FCM means that this device will communicate directly with Google\’s servers to retrieve push notifications, which will expose your IP address to Google. Your messages will still be onion-routed and end-to-end encrypted, so the contents of your messages will remain completely private.Background PollingSession will occasionally check for new messages in the background. This guarantees full privacy protection, but message notifications may be significantly delayed.RecommendedPlease Pick an OptionConfirmSkip
+
+ Your Recovery Phrase
+ Meet your recovery phrase
+ Your recovery phrase is the master key to your Session ID — you can use it to restore your Session ID if you lose access to your device. Store your recovery phrase in a safe place, and don\’t give it to anyone. To restore your Session ID, launch Session and tap Continue your Session.
+ Hold to reveal
+
+ Secure your account by saving your recovery phrase
+ Tap and hold the redacted words to reveal your recovery phrase, then store it safely to secure your Session ID.
+ Make sure to store your recovery phrase in a safe place
+
+ New Session
+ Enter Session ID
+ Scan QR Code
+ Scan a user\’s QR code to start a session. QR codes can be found by tapping the QR code icon in account settings.
+
+ Enter Session ID of recipient
+ Users can share their Session ID by going into their account settings and tapping "Share Session ID", or by sharing their QR code.
+
+ New Closed Group
+ Enter a group name
+ Closed groups support up to 10 members and provide the same privacy protections as one-on-one sessions.
+ You don\'t have any contacts yet
+ Start a Session
+ Please enter a group name
+ Please enter a shorter group name
+ Please pick at least 2 group members
+ A closed group cannot have more than 10 members
+ One of the members of your group has an invalid Session ID
+
+ Join Open Group
+ Couldn\'t join group
+ Open Group URL
+ Scan QR Code
+ Scan the QR code of the open group you\'d like to join
+
+ Enter an open group URL
+ Open groups can be joined by anyone and do not provide full privacy protection
+
+ Settings
+ Enter a display name
+ Please pick a display name
+ Please pick a display name that consists of only a-z, A-Z, 0-9 and _ characters
+ Please pick a shorter display name
+ Privacy
+ Notifications
+ Chats
+ Devices
+ Recovery Phrase
+ Clear Data
+
+ Notifications
+
+ Privacy
+
+ Chats
+
+ Devices
+ Device Limit Reached
+ It\'s currently not allowed to link more than one device.
+ Couldn\'t unlink device.
+ Your device was unlinked successfully
+ Couldn\'t link device.
+
Notification StrategyUse FCMUsing Firebase Cloud Messaging allows for more reliable push notifications, but exposes your IP to Google.
+ Waiting for Authorization
+ Device Link Authorized
+ Please check that the words below match those shown on your other device.
+ Your device has been linked successfully
+
+ Waiting for Device
+ Linking Request Received
+ Authorizing Device Link
+ Download Session on your other device and tap "Link to an existing account" at the bottom of the landing screen. If you have an existing account on your other device already you will have to delete that account first.
+ Please check that the words below match those shown on your other device.
+ Please wait while the device link is created. This can take up to a minute.
+ Authorize
+
+ Change name
+ Unlink device
+
+ Enter a name
+
+ Your Recovery Phrase
+ This is your recovery phrase. With it, you can restore or migrate your Session ID to a new device.
+
+ Clear All Data
+ This will permanently delete your Session ID, including all messages, sessions, and contacts.
+
+ QR Code
+ View My QR Code
+ Scan QR Code
+ Scan someone\'s QR code to start a conversation with them
+
+ This is your QR code. Other users can scan it to start a session with you.
+ Share QR Code
+
+ Accept
+ Decline
+ %1$s sent you a session request
+ You\'ve accepted %1$s\'s session request
+ You\'ve declined %1$s\'s session request
+ %1$s\'s session request has expired
+ You\'ve sent %1$s a session request
+ %1$s accepted your session request
+ Your session request to %1$s has expired
+
+ Would you like to restore your session with %s?
+ Dismiss
+ Restore
+
+ Contacts
+ Closed Groups
+ Open Groups
+
diff --git a/src/org/thoughtcrime/securesms/loki/activities/ChatSettingsActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/ChatSettingsActivity.kt
index 073e3df757..67a2c4f2d5 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/ChatSettingsActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/ChatSettingsActivity.kt
@@ -10,7 +10,7 @@ class ChatSettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper)
- supportActionBar!!.title = "Chats"
+ supportActionBar!!.title = resources.getString(R.string.activity_chat_settings_title)
val fragment = ChatsPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment)
diff --git a/src/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt
index 991133d018..f0989dc29b 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt
@@ -47,7 +47,7 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), MemberC
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_create_closed_group)
- supportActionBar!!.title = "New Closed Group"
+ supportActionBar!!.title = resources.getString(R.string.activity_create_closed_group_title)
recyclerView.adapter = createClosedGroupAdapter
recyclerView.layoutManager = LinearLayoutManager(this)
createNewPrivateChatButton.setOnClickListener { createNewPrivateChat() }
@@ -103,17 +103,17 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), MemberC
private fun createClosedGroup() {
val name = nameEditText.text.trim()
if (name.isEmpty()) {
- return Toast.makeText(this, "Please enter a group name", Toast.LENGTH_LONG).show()
+ return Toast.makeText(this, R.string.activity_create_closed_group_group_name_missing_error, Toast.LENGTH_LONG).show()
}
if (name.length >= 64) {
- return Toast.makeText(this, "Please enter a shorter group name", Toast.LENGTH_LONG).show()
+ return Toast.makeText(this, R.string.activity_create_closed_group_group_name_too_long_error, Toast.LENGTH_LONG).show()
}
val selectedMembers = this.selectedMembers
if (selectedMembers.count() < 2) {
- return Toast.makeText(this, "Please pick at least 2 group members", Toast.LENGTH_LONG).show()
+ return Toast.makeText(this, R.string.activity_create_closed_group_not_enough_group_members_error, Toast.LENGTH_LONG).show()
}
if (selectedMembers.count() > 10) {
- return Toast.makeText(this, "A closed group cannot have more than 10 members", Toast.LENGTH_LONG).show()
+ return Toast.makeText(this, R.string.activity_create_closed_group_too_many_group_members_error, Toast.LENGTH_LONG).show()
}
val recipients = selectedMembers.map {
Recipient.from(this, Address.fromSerialized(it), false)
@@ -155,7 +155,7 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), MemberC
}
} else {
super.onPostExecute(result)
- Toast.makeText(activity.applicationContext, "One of the members of your group has an invalid Session ID.", Toast.LENGTH_LONG).show()
+ Toast.makeText(activity.applicationContext, R.string.activity_create_closed_group_invalid_session_id_error, Toast.LENGTH_LONG).show()
}
}
}
diff --git a/src/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt
index b885ff78f3..5b784de808 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt
@@ -34,7 +34,7 @@ class CreatePrivateChatActivity : PassphraseRequiredActionBarActivity(), ScanQRC
// Set content view
setContentView(R.layout.activity_create_private_chat)
// Set title
- supportActionBar!!.title = "New Session"
+ supportActionBar!!.title = resources.getString(R.string.activity_create_private_chat_title)
// Set up view pager
viewPager.adapter = adapter
tabLayout.setupWithViewPager(viewPager)
@@ -47,7 +47,7 @@ class CreatePrivateChatActivity : PassphraseRequiredActionBarActivity(), ScanQRC
}
fun createPrivateChatIfPossible(hexEncodedPublicKey: String) {
- if (!PublicKeyValidation.isValid(hexEncodedPublicKey)) { return Toast.makeText(this, "Invalid Session ID", Toast.LENGTH_SHORT).show() }
+ if (!PublicKeyValidation.isValid(hexEncodedPublicKey)) { return Toast.makeText(this, R.string.invalid_session_id, Toast.LENGTH_SHORT).show() }
val masterHexEncodedPublicKey = TextSecurePreferences.getMasterHexEncodedPublicKey(this)
val userHexEncodedPublicKey = TextSecurePreferences.getLocalNumber(this)
val targetHexEncodedPublicKey = if (hexEncodedPublicKey == masterHexEncodedPublicKey) userHexEncodedPublicKey else hexEncodedPublicKey
@@ -78,7 +78,7 @@ private class CreatePrivateChatActivityAdapter(val activity: CreatePrivateChatAc
1 -> {
val result = ScanQRCodeWrapperFragment()
result.delegate = activity
- result.message = "Scan a user’s QR code to start a session. QR codes can be found by tapping the QR code icon in account settings."
+ result.message = activity.resources.getString(R.string.activity_create_private_chat_scan_qr_code_explanation)
result
}
else -> throw IllegalStateException()
@@ -87,8 +87,8 @@ private class CreatePrivateChatActivityAdapter(val activity: CreatePrivateChatAc
override fun getPageTitle(index: Int): CharSequence? {
return when (index) {
- 0 -> "Enter Session ID"
- 1 -> "Scan QR Code"
+ 0 -> activity.resources.getString(R.string.activity_create_private_chat_enter_session_id_tab_title)
+ 1 -> activity.resources.getString(R.string.activity_create_private_chat_scan_qr_code_tab_title)
else -> throw IllegalStateException()
}
}
@@ -122,7 +122,7 @@ class EnterPublicKeyFragment : Fragment() {
val clipboard = activity!!.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Session ID", hexEncodedPublicKey)
clipboard.primaryClip = clip
- Toast.makeText(context!!, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(context!!, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
}
private fun sharePublicKey() {
diff --git a/src/org/thoughtcrime/securesms/loki/activities/DisplayNameActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/DisplayNameActivity.kt
index a8877779fa..d5afafa364 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/DisplayNameActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/DisplayNameActivity.kt
@@ -39,13 +39,13 @@ class DisplayNameActivity : BaseActionBarActivity() {
private fun register() {
val displayName = displayNameEditText.text.toString().trim()
if (displayName.isEmpty()) {
- return Toast.makeText(this, "Please pick a display name", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_display_name_display_name_missing_error, Toast.LENGTH_SHORT).show()
}
if (!displayName.matches(Regex("[a-zA-Z0-9_]+"))) {
- return Toast.makeText(this, "Please pick a display name that consists of only a-z, A-Z, 0-9 and _ characters", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_display_name_display_name_invalid_error, Toast.LENGTH_SHORT).show()
}
if (displayName.toByteArray().size > ProfileCipher.NAME_PADDED_LENGTH) {
- return Toast.makeText(this, "Please pick a shorter display name", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_display_name_display_name_too_long_error, Toast.LENGTH_SHORT).show()
}
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.hideSoftInputFromWindow(displayNameEditText.windowToken, 0)
diff --git a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt
index a2c13c5f0a..927fbfbc50 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt
@@ -105,10 +105,10 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
val isMasterDevice = (TextSecurePreferences.getMasterHexEncodedPublicKey(this) == null)
val hasViewedSeed = TextSecurePreferences.getHasViewedSeed(this)
if (!hasViewedSeed && isMasterDevice) {
- val seedReminderViewTitle = SpannableString("You're almost finished! 80%")
+ val seedReminderViewTitle = SpannableString("You're almost finished! 80%") // Intentionally not yet translated
seedReminderViewTitle.setSpan(ForegroundColorSpan(resources.getColorWithID(R.color.accent, theme)), 24, 27, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
seedReminderView.title = seedReminderViewTitle
- seedReminderView.subtitle = "Secure your account by saving your recovery phrase"
+ seedReminderView.subtitle = resources.getString(R.string.view_seed_reminder_subtitle_1)
seedReminderView.setProgress(80, false)
seedReminderView.delegate = this
} else {
@@ -313,7 +313,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
// Send a leave group message if this is an active closed group
if (isClosedGroup && DatabaseFactory.getGroupDatabase(activity).isActive(recipient.address.toGroupString())) {
if (!ClosedGroupsProtocol.leaveGroup(activity, recipient)) {
- Toast.makeText(activity, "Couldn't leave group", Toast.LENGTH_LONG).show()
+ Toast.makeText(activity, R.string.activity_home_leaving_group_failed_message, Toast.LENGTH_LONG).show()
clearView(activity.recyclerView, viewHolder)
return@setPositiveButton
}
diff --git a/src/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt
index 5b8fefb023..fcf3e9e4e7 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt
@@ -32,7 +32,7 @@ class JoinPublicChatActivity : PassphraseRequiredActionBarActivity(), ScanQRCode
// Set content view
setContentView(R.layout.activity_join_public_chat)
// Set title
- supportActionBar!!.title = "Join Open Group"
+ supportActionBar!!.title = resources.getString(R.string.activity_join_public_chat_title)
// Set up view pager
viewPager.adapter = adapter
tabLayout.setupWithViewPager(viewPager)
@@ -63,7 +63,7 @@ class JoinPublicChatActivity : PassphraseRequiredActionBarActivity(), ScanQRCode
fun joinPublicChatIfPossible(url: String) {
if (!Patterns.WEB_URL.matcher(url).matches() || !url.startsWith("https://")) {
- return Toast.makeText(this, "Invalid URL", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.invalid_url, Toast.LENGTH_SHORT).show()
}
showLoader()
val channel: Long = 1
@@ -73,7 +73,7 @@ class JoinPublicChatActivity : PassphraseRequiredActionBarActivity(), ScanQRCode
finish()
}.failUi {
hideLoader()
- Toast.makeText(this, "Couldn't join channel", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.activity_join_public_chat_error, Toast.LENGTH_SHORT).show()
}
}
// endregion
@@ -92,7 +92,7 @@ private class JoinPublicChatActivityAdapter(val activity: JoinPublicChatActivity
1 -> {
val result = ScanQRCodeWrapperFragment()
result.delegate = activity
- result.message = "Scan the QR code of the open group you'd like to join"
+ result.message = activity.resources.getString(R.string.activity_join_public_chat_scan_qr_code_explanation)
result
}
else -> throw IllegalStateException()
@@ -101,8 +101,8 @@ private class JoinPublicChatActivityAdapter(val activity: JoinPublicChatActivity
override fun getPageTitle(index: Int): CharSequence? {
return when (index) {
- 0 -> "Open Group URL"
- 1 -> "Scan QR Code"
+ 0 -> activity.resources.getString(R.string.activity_join_public_chat_enter_group_url_tab_title)
+ 1 -> activity.resources.getString(R.string.activity_join_public_chat_scan_qr_code_tab_title)
else -> throw IllegalStateException()
}
}
diff --git a/src/org/thoughtcrime/securesms/loki/activities/LandingActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/LandingActivity.kt
index 33b35bc84b..4d08c6725b 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/LandingActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/LandingActivity.kt
@@ -47,7 +47,7 @@ class LandingActivity : BaseActionBarActivity(), LinkDeviceSlaveModeDialogDelega
restoreButton.setOnClickListener { restore() }
linkButton.setOnClickListener { linkDevice() }
if (TextSecurePreferences.getWasUnlinked(this)) {
- Toast.makeText(this, "Your device was unlinked successfully", Toast.LENGTH_LONG).show()
+ Toast.makeText(this, R.string.activity_landing_device_unlinked_dialog_title, Toast.LENGTH_LONG).show()
}
}
@@ -102,7 +102,7 @@ class LandingActivity : BaseActionBarActivity(), LinkDeviceSlaveModeDialogDelega
if (deviceLink == null) {
Log.d("Loki", "Failed to sign device link request.")
reset()
- return Toast.makeText(application, "Couldn't link device.", Toast.LENGTH_LONG).show()
+ return Toast.makeText(application, R.string.device_linking_failed, Toast.LENGTH_LONG).show()
}
val application = ApplicationContext.getInstance(this)
application.startPollingIfNeeded()
diff --git a/src/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt
index 1cf39cfb06..d9d8f95da3 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/LinkDeviceActivity.kt
@@ -26,7 +26,7 @@ class LinkDeviceActivity : BaseActionBarActivity(), ScanQRCodeWrapperFragmentDel
// Set content view
setContentView(R.layout.activity_link_device)
// Set title
- supportActionBar!!.title = "Link Device"
+ supportActionBar!!.title = resources.getString(R.string.activity_link_device_title)
// Set up view pager
viewPager.adapter = adapter
tabLayout.setupWithViewPager(viewPager)
@@ -40,7 +40,7 @@ class LinkDeviceActivity : BaseActionBarActivity(), ScanQRCodeWrapperFragmentDel
fun requestDeviceLinkIfPossible(hexEncodedPublicKey: String) {
if (!PublicKeyValidation.isValid(hexEncodedPublicKey)) {
- Toast.makeText(this, "Invalid Session ID", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.invalid_session_id, Toast.LENGTH_SHORT).show()
} else {
val intent = Intent()
intent.putExtra("hexEncodedPublicKey", hexEncodedPublicKey)
@@ -64,7 +64,7 @@ private class LinkDeviceActivityAdapter(val activity: LinkDeviceActivity) : Frag
1 -> {
val result = ScanQRCodeWrapperFragment()
result.delegate = activity
- result.message = "Navigate to \"Settings\" > \"Devices\" > \"Link a Device\" on your other device and then scan the QR code that comes up to start the linking process."
+ result.message = activity.resources.getString(R.string.activity_link_device_scan_qr_code_explanation)
result
}
else -> throw IllegalStateException()
@@ -73,8 +73,8 @@ private class LinkDeviceActivityAdapter(val activity: LinkDeviceActivity) : Frag
override fun getPageTitle(index: Int): CharSequence? {
return when (index) {
- 0 -> "Enter Session ID"
- 1 -> "Scan QR Code"
+ 0 -> activity.getString(R.string.activity_link_device_enter_session_id_tab_title)
+ 1 -> activity.getString(R.string.activity_link_device_scan_qr_code_tab_title)
else -> throw IllegalStateException()
}
}
diff --git a/src/org/thoughtcrime/securesms/loki/activities/LinkedDevicesActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/LinkedDevicesActivity.kt
index ac83e3961a..f36bee9179 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/LinkedDevicesActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/LinkedDevicesActivity.kt
@@ -46,7 +46,7 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_linked_devices)
- supportActionBar!!.title = "Devices"
+ supportActionBar!!.title = resources.getString(R.string.activity_linked_devices_title)
recyclerView.adapter = linkedDevicesAdapter
recyclerView.layoutManager = LinearLayoutManager(this)
linkDeviceButton.setOnClickListener { linkDevice() }
@@ -99,9 +99,9 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
linkDeviceDialog.show(supportFragmentManager, "Link Device Dialog")
} else {
val builder = AlertDialog.Builder(this)
- builder.setTitle("Multi Device Limit Reached")
- builder.setMessage("It's currently not allowed to link more than one device.")
- builder.setPositiveButton("OK", { dialog, _ -> dialog.dismiss() })
+ builder.setTitle(resources.getString(R.string.activity_linked_devices_multi_device_limit_reached_dialog_title))
+ builder.setMessage(resources.getString(R.string.activity_linked_devices_multi_device_limit_reached_dialog_explanation))
+ builder.setPositiveButton(resources.getString(R.string.ok), { dialog, _ -> dialog.dismiss() })
builder.create().show()
}
}
@@ -128,7 +128,7 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
val deviceLinks = apiDB.getDeviceLinks(userPublicKey)
val deviceLink = deviceLinks.find { it.masterHexEncodedPublicKey == userPublicKey && it.slaveHexEncodedPublicKey == slaveDevicePublicKey }
if (deviceLink == null) {
- return Toast.makeText(this, "Couldn't unlink device.", Toast.LENGTH_LONG).show()
+ return Toast.makeText(this, R.string.activity_linked_devices_unlinking_failed_message, Toast.LENGTH_LONG).show()
}
LokiFileServerAPI.shared.setDeviceLinks(setOf()).successUi {
DatabaseFactory.getLokiAPIDatabase(this).clearDeviceLinks(userPublicKey)
@@ -152,9 +152,9 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
sessionStore.deleteAllSessions(deviceLink.slaveHexEncodedPublicKey)
}
LoaderManager.getInstance(this).restartLoader(0, null, this)
- Toast.makeText(this, "Your device was unlinked successfully", Toast.LENGTH_LONG).show()
+ Toast.makeText(this, R.string.activity_linked_devices_unlinking_successful_message, Toast.LENGTH_LONG).show()
}.failUi {
- Toast.makeText(this, "Couldn't unlink device.", Toast.LENGTH_LONG).show()
+ Toast.makeText(this, R.string.activity_linked_devices_unlinking_failed_message, Toast.LENGTH_LONG).show()
}
}
@@ -168,7 +168,7 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
}
override fun onDeviceLinkAuthorizationFailed() {
- Toast.makeText(this, "Couldn't link device", Toast.LENGTH_LONG).show()
+ Toast.makeText(this, R.string.activity_linked_devices_linking_failed_message, Toast.LENGTH_LONG).show()
}
override fun onDeviceLinkCanceled() {
diff --git a/src/org/thoughtcrime/securesms/loki/activities/NotificationSettingsActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/NotificationSettingsActivity.kt
index 0f4eca861b..1468539a72 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/NotificationSettingsActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/NotificationSettingsActivity.kt
@@ -10,7 +10,7 @@ class NotificationSettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper)
- supportActionBar!!.title = "Notifications"
+ supportActionBar!!.title = resources.getString(R.string.activity_notification_settings_title)
val fragment = NotificationsPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment)
diff --git a/src/org/thoughtcrime/securesms/loki/activities/PrivacySettingsActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/PrivacySettingsActivity.kt
index c35d67f565..86a6419f2d 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/PrivacySettingsActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/PrivacySettingsActivity.kt
@@ -10,7 +10,7 @@ class PrivacySettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper)
- supportActionBar!!.title = "Privacy"
+ supportActionBar!!.title = resources.getString(R.string.activity_privacy_settings_title)
val fragment = AppProtectionPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment)
diff --git a/src/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt
index e84b3add0c..34fbe29756 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt
@@ -40,7 +40,7 @@ class QRCodeActivity : PassphraseRequiredActionBarActivity(), ScanQRCodeWrapperF
// Set content view
setContentView(R.layout.activity_qr_code)
// Set title
- supportActionBar!!.title = "QR Code"
+ supportActionBar!!.title = resources.getString(R.string.activity_qr_code_title)
// Set up view pager
viewPager.adapter = adapter
tabLayout.setupWithViewPager(viewPager)
@@ -53,7 +53,7 @@ class QRCodeActivity : PassphraseRequiredActionBarActivity(), ScanQRCodeWrapperF
}
fun createPrivateChatIfPossible(hexEncodedPublicKey: String) {
- if (!PublicKeyValidation.isValid(hexEncodedPublicKey)) { return Toast.makeText(this, "Invalid Session ID", Toast.LENGTH_SHORT).show() }
+ if (!PublicKeyValidation.isValid(hexEncodedPublicKey)) { return Toast.makeText(this, R.string.invalid_session_id, Toast.LENGTH_SHORT).show() }
val masterHexEncodedPublicKey = TextSecurePreferences.getMasterHexEncodedPublicKey(this)
val userHexEncodedPublicKey = TextSecurePreferences.getLocalNumber(this)
val targetHexEncodedPublicKey = if (hexEncodedPublicKey == masterHexEncodedPublicKey) userHexEncodedPublicKey else hexEncodedPublicKey
@@ -84,7 +84,7 @@ private class QRCodeActivityAdapter(val activity: QRCodeActivity) : FragmentPage
1 -> {
val result = ScanQRCodeWrapperFragment()
result.delegate = activity
- result.message = "Scan someone\'s QR code to start a conversation with them"
+ result.message = activity.resources.getString(R.string.activity_qr_code_view_scan_qr_code_explanation)
result
}
else -> throw IllegalStateException()
@@ -93,8 +93,8 @@ private class QRCodeActivityAdapter(val activity: QRCodeActivity) : FragmentPage
override fun getPageTitle(index: Int): CharSequence? {
return when (index) {
- 0 -> "View My QR Code"
- 1 -> "Scan QR Code"
+ 0 -> activity.resources.getString(R.string.activity_qr_code_view_my_qr_code_tab_title)
+ 1 -> activity.resources.getString(R.string.activity_qr_code_view_scan_qr_code_tab_title)
else -> throw IllegalStateException()
}
}
@@ -122,7 +122,7 @@ class ViewMyQRCodeFragment : Fragment() {
qrCodeImageView.setImageBitmap(qrCode)
// val explanation = SpannableStringBuilder("This is your unique public QR code. Other users can scan this to start a conversation with you.")
// explanation.setSpan(StyleSpan(Typeface.BOLD), 8, 34, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
- explanationTextView.text = "This is your QR code. Other users can scan it to start a session with you."
+ explanationTextView.text = resources.getString(R.string.fragment_view_my_qr_code_explanation)
shareButton.setOnClickListener { shareQRCode() }
}
@@ -142,7 +142,7 @@ class ViewMyQRCodeFragment : Fragment() {
intent.putExtra(Intent.EXTRA_STREAM, FileProviderUtil.getUriFor(activity!!, file))
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
intent.type = "image/png"
- startActivity(Intent.createChooser(intent, "Share QR Code"))
+ startActivity(Intent.createChooser(intent, resources.getString(R.string.fragment_view_my_qr_code_share_title)))
}
if (RxPermissions(this).isGranted(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
proceed()
diff --git a/src/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt
index aa009360ae..c566267f0d 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt
@@ -154,7 +154,7 @@ class RegisterActivity : BaseActionBarActivity() {
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Session ID", keyPair!!.hexEncodedPublicKey)
clipboard.primaryClip = clip
- Toast.makeText(this, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
}
private fun openURL(url: String) {
@@ -162,7 +162,7 @@ class RegisterActivity : BaseActionBarActivity() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
} catch (e: Exception) {
- Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.invalid_url, Toast.LENGTH_SHORT).show()
}
}
// endregion
diff --git a/src/org/thoughtcrime/securesms/loki/activities/RestoreActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/RestoreActivity.kt
index 0346e545c9..45ada00524 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/RestoreActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/RestoreActivity.kt
@@ -117,7 +117,7 @@ class RestoreActivity : BaseActionBarActivity() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
} catch (e: Exception) {
- Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.invalid_url, Toast.LENGTH_SHORT).show()
}
}
// endregion
diff --git a/src/org/thoughtcrime/securesms/loki/activities/SeedActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/SeedActivity.kt
index e30edcf618..50f2a64b22 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/SeedActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/SeedActivity.kt
@@ -34,11 +34,11 @@ class SeedActivity : BaseActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_seed)
- supportActionBar!!.title = "Your Recovery Phrase"
- val seedReminderViewTitle = SpannableString("You're almost finished! 90%")
+ supportActionBar!!.title = resources.getString(R.string.activity_seed_title)
+ val seedReminderViewTitle = SpannableString("You're almost finished! 90%") // Intentionally not yet translated
seedReminderViewTitle.setSpan(ForegroundColorSpan(resources.getColorWithID(R.color.accent, theme)), 24, 27, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
seedReminderView.title = seedReminderViewTitle
- seedReminderView.subtitle = "Tap and hold the redacted words to reveal your recovery phrase, then store it safely to secure your Session ID."
+ seedReminderView.subtitle = resources.getString(R.string.view_seed_reminder_subtitle_2)
seedReminderView.setProgress(90, false)
seedReminderView.hideContinueButton()
var redactedSeed = seed
@@ -59,10 +59,10 @@ class SeedActivity : BaseActionBarActivity() {
// region Updating
private fun revealSeed() {
- val seedReminderViewTitle = SpannableString("Account secured! 100%")
+ val seedReminderViewTitle = SpannableString("Account secured! 100%") // Intentionally not yet translated
seedReminderViewTitle.setSpan(ForegroundColorSpan(resources.getColorWithID(R.color.accent, theme)), 17, 21, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
seedReminderView.title = seedReminderViewTitle
- seedReminderView.subtitle = "Make sure to store your recovery phrase in a safe place"
+ seedReminderView.subtitle = resources.getString(R.string.view_seed_reminder_subtitle_3)
seedReminderView.setProgress(100, true)
val seedTextViewLayoutParams = seedTextView.layoutParams as LinearLayout.LayoutParams
seedTextViewLayoutParams.height = seedTextView.height
@@ -79,7 +79,7 @@ class SeedActivity : BaseActionBarActivity() {
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Seed", seed)
clipboard.primaryClip = clip
- Toast.makeText(this, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
}
// endregion
}
\ No newline at end of file
diff --git a/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
index e3051b1039..269f0eeae7 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
@@ -215,13 +215,13 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
private fun saveDisplayName() {
val displayName = displayNameEditText.text.toString().trim()
if (displayName.isEmpty()) {
- return Toast.makeText(this, "Please pick a display name", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_settings_display_name_missing_error, Toast.LENGTH_SHORT).show()
}
if (!displayName.matches(Regex("[a-zA-Z0-9_]+"))) {
- return Toast.makeText(this, "Please pick a display name that consists of only a-z, A-Z, 0-9 and _ characters", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_settings_invalid_display_name_error, Toast.LENGTH_SHORT).show()
}
if (displayName.toByteArray().size > ProfileCipher.NAME_PADDED_LENGTH) {
- return Toast.makeText(this, "Please pick a shorter display name", Toast.LENGTH_SHORT).show()
+ return Toast.makeText(this, R.string.activity_settings_display_name_too_long_error, Toast.LENGTH_SHORT).show()
}
isEditingDisplayName = false
displayNameToBeUploaded = displayName
@@ -245,7 +245,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Session ID", hexEncodedPublicKey)
clipboard.primaryClip = clip
- Toast.makeText(this, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(this, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
}
private fun sharePublicKey() {
diff --git a/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceMasterModeDialog.kt b/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceMasterModeDialog.kt
index d3031fe148..ab899c717c 100644
--- a/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceMasterModeDialog.kt
+++ b/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceMasterModeDialog.kt
@@ -59,8 +59,8 @@ class LinkDeviceMasterModeDialog : DialogFragment(), DeviceLinkingSessionListene
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = toPx(8, resources)
contentView.titleTextView.layoutParams = titleTextViewLayoutParams
- contentView.titleTextView.text = "Linking Request Received"
- contentView.explanationTextView.text = "Please check that the words below match those shown on your other device"
+ contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_master_mode_title_2)
+ contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_master_mode_explanation_2)
contentView.mnemonicTextView.visibility = View.VISIBLE
contentView.mnemonicTextView.text = MnemonicUtilities.getFirst3Words(MnemonicCodec(languageFileDirectory), deviceLink.slaveHexEncodedPublicKey)
contentView.authorizeButton.visibility = View.VISIBLE
@@ -77,8 +77,8 @@ class LinkDeviceMasterModeDialog : DialogFragment(), DeviceLinkingSessionListene
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = toPx(24, resources)
contentView.titleTextView.layoutParams = titleTextViewLayoutParams
- contentView.titleTextView.text = "Authorizing Device Link"
- contentView.explanationTextView.text = "Please wait while the device link is created. This can take up to a minute."
+ contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_master_mode_title_3)
+ contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_master_mode_explanation_3)
contentView.mnemonicTextView.visibility = View.GONE
contentView.buttonContainer.visibility = View.GONE
contentView.cancelButton.visibility = View.GONE
diff --git a/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceSlaveModeDialog.kt b/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceSlaveModeDialog.kt
index 96880d7ffd..744cdaa29a 100644
--- a/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceSlaveModeDialog.kt
+++ b/src/org/thoughtcrime/securesms/loki/dialogs/LinkDeviceSlaveModeDialog.kt
@@ -15,10 +15,10 @@ import network.loki.messenger.R
import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities
import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.thoughtcrime.securesms.util.Util
+import org.whispersystems.signalservice.loki.crypto.MnemonicCodec
import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLink
import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSession
import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSessionListener
-import org.whispersystems.signalservice.loki.crypto.MnemonicCodec
class LinkDeviceSlaveModeDialog : DialogFragment(), DeviceLinkingSessionListener {
private val languageFileDirectory by lazy { MnemonicUtilities.getLanguageFileDirectory(context!!) }
@@ -50,8 +50,8 @@ class LinkDeviceSlaveModeDialog : DialogFragment(), DeviceLinkingSessionListener
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = 0
contentView.titleTextView.layoutParams = titleTextViewLayoutParams
- contentView.titleTextView.text = "Device Link Authorized"
- contentView.explanationTextView.text = "Your device has been linked successfully"
+ contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_slave_mode_title_2)
+ contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_slave_mode_explanation_2)
contentView.mnemonicTextView.visibility = View.GONE
contentView.cancelButton.visibility = View.GONE
Handler().postDelayed({
diff --git a/src/org/thoughtcrime/securesms/loki/dialogs/SeedDialog.kt b/src/org/thoughtcrime/securesms/loki/dialogs/SeedDialog.kt
index 255580b3a8..3caf3d752b 100644
--- a/src/org/thoughtcrime/securesms/loki/dialogs/SeedDialog.kt
+++ b/src/org/thoughtcrime/securesms/loki/dialogs/SeedDialog.kt
@@ -45,7 +45,7 @@ class SeedDialog : DialogFragment() {
val clipboard = activity!!.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Seed", seed)
clipboard.primaryClip = clip
- Toast.makeText(context!!, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(context!!, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
dismiss()
}
}
\ No newline at end of file
diff --git a/src/org/thoughtcrime/securesms/loki/views/SessionRestoreBannerView.kt b/src/org/thoughtcrime/securesms/loki/views/SessionRestoreBannerView.kt
index c5e18915de..b5fcabc105 100644
--- a/src/org/thoughtcrime/securesms/loki/views/SessionRestoreBannerView.kt
+++ b/src/org/thoughtcrime/securesms/loki/views/SessionRestoreBannerView.kt
@@ -27,7 +27,7 @@ class SessionRestoreBannerView : LinearLayout {
fun update(recipient: Recipient) {
this.recipient = recipient
- messageTextView.text = context.getString(R.string.session_restore_banner_message, recipient.toShortString())
+ messageTextView.text = context.getString(R.string.session_reset_banner_message, recipient.toShortString())
}
fun show() {