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/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/values/strings.xml b/res/values/strings.xml
index 486745bc12..f3757fe85d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1674,10 +1674,11 @@
ContinueCopy
- Couldn\'t open link
+ Invalid URLCopied to clipboardCouldn\'t link device.Next
+ ShareInvalid Session IDYour Session begins here...
@@ -1703,7 +1704,7 @@
Link DeviceEnter Session IDScan 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."
+ 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 deviceNavigate to "Settings" > "Devices" > "Link a Device" on your other device and then enter your Session ID here to start the linking process.
@@ -1752,6 +1753,30 @@
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.
+
+ 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
+
+ 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
+
+
+
ContactsClosed GroupsOpen Groups
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/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()
}
}