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/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/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/values/strings.xml b/res/values/strings.xml
index ccf59d5bee..bf813e01c0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1619,16 +1619,6 @@
Adding Server...
Invalid URL
Couldn\'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 expired
Pending Friend Request…
New Message
@@ -1662,9 +1652,6 @@
Device unlinked
This device has been successfully unlinked
- Would you like to restore your session with %s?
- Dismiss
- Restore
@@ -1794,10 +1781,41 @@
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 Strategy
Use FCM
Using 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.
@@ -1812,6 +1830,20 @@
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/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/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/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() {