Prepare remaining screens for localization

This commit is contained in:
nielsandriesse 2020-05-25 17:11:15 +10:00
parent 61733d90ba
commit 18967d9890
13 changed files with 79 additions and 47 deletions

View File

@ -30,7 +30,7 @@
android:textAlignment="center" android:textAlignment="center"
android:paddingTop="12dp" android:paddingTop="12dp"
android:paddingBottom="12dp" android:paddingBottom="12dp"
android:hint="Enter a name" /> android:hint="@string/dialog_edit_device_name_edit_text_hint" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -44,7 +44,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:text="Cancel" /> android:text="@string/cancel" />
<Button <Button
style="@style/UnimportantDialogButton" style="@style/UnimportantDialogButton"
@ -53,7 +53,7 @@
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="@dimen/medium_spacing" android:layout_marginLeft="@dimen/medium_spacing"
android:text="OK" /> android:text="@string/ok" />
</LinearLayout> </LinearLayout>

View File

@ -40,7 +40,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing" 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:textColor="@color/text"
android:textStyle="bold" android:textStyle="bold"
android:textSize="@dimen/medium_font_size" /> android:textSize="@dimen/medium_font_size" />
@ -50,7 +50,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing" android:layout_marginTop="@dimen/large_spacing"
android:text="Download Session on your other device and tap &quot;Link to an existing account&quot; 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:textColor="@color/text"
android:textSize="@dimen/small_font_size" android:textSize="@dimen/small_font_size"
android:textAlignment="center" /> android:textAlignment="center" />
@ -79,7 +79,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:text="Cancel" /> android:text="@string/cancel" />
<Button <Button
style="@style/ProminentDialogButton" style="@style/ProminentDialogButton"
@ -88,7 +88,7 @@
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="@dimen/medium_spacing" android:layout_marginLeft="@dimen/medium_spacing"
android:text="Authorize" android:text="@string/dialog_link_device_master_mode_authorize_button_title"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing" 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:textColor="@color/text"
android:textStyle="bold" android:textStyle="bold"
android:textSize="@dimen/medium_font_size" /> android:textSize="@dimen/medium_font_size" />
@ -35,7 +35,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/large_spacing" 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:textColor="@color/text"
android:textSize="@dimen/small_font_size" android:textSize="@dimen/small_font_size"
android:textAlignment="center" /> android:textAlignment="center" />
@ -56,6 +56,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_marginTop="@dimen/large_spacing" android:layout_marginTop="@dimen/large_spacing"
android:text="Cancel" /> android:text="@string/cancel" />
</LinearLayout> </LinearLayout>

View File

@ -15,7 +15,7 @@
android:drawableStart="@drawable/ic_edit_white_24dp" android:drawableStart="@drawable/ic_edit_white_24dp"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:textColor="@color/text" android:textColor="@color/text"
android:text="Change name"/> android:text="@string/fragment_device_list_bottom_sheet_change_name_button_title"/>
<TextView <TextView
android:id="@+id/unlinkDeviceText" android:id="@+id/unlinkDeviceText"
@ -23,6 +23,6 @@
android:drawableStart="@drawable/ic_phonelink_erase_white_24dp" android:drawableStart="@drawable/ic_phonelink_erase_white_24dp"
android:textSize="@dimen/medium_font_size" android:textSize="@dimen/medium_font_size"
android:textColor="@color/text" android:textColor="@color/text"
android:text="@string/fragment_device_list_unlink_device_title" /> android:text="@string/fragment_device_list_bottom_sheet_unlink_device_button_title" />
</LinearLayout> </LinearLayout>

View File

@ -33,7 +33,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/small_spacing" 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:textColor="@color/text"
android:textSize="@dimen/small_font_size" android:textSize="@dimen/small_font_size"
android:textAlignment="center" /> android:textAlignment="center" />
@ -50,7 +50,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/session_restore_banner_dismiss_button_title" /> android:text="@string/session_reset_banner_dismiss_button_title" />
<Button <Button
style="@style/ProminentDialogButton" style="@style/ProminentDialogButton"
@ -59,7 +59,7 @@
android:layout_height="@dimen/small_button_height" android:layout_height="@dimen/small_button_height"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="@dimen/medium_spacing" android:layout_marginLeft="@dimen/medium_spacing"
android:text="@string/session_restore_banner_restore_button_title" /> android:text="@string/session_reset_banner_restore_button_title" />
</LinearLayout> </LinearLayout>

View File

@ -1619,16 +1619,6 @@
<string name="fragment_add_public_chat_add_button_title_2">Adding Server...</string> <string name="fragment_add_public_chat_add_button_title_2">Adding Server...</string>
<string name="fragment_add_public_chat_invalid_url_message">Invalid URL</string> <string name="fragment_add_public_chat_invalid_url_message">Invalid URL</string>
<string name="fragment_add_public_chat_connection_failed_message">Couldn\'t Connect</string> <string name="fragment_add_public_chat_connection_failed_message">Couldn\'t Connect</string>
<!-- Friend request view -->
<string name="view_friend_request_accept_button_title">Accept</string>
<string name="view_friend_request_reject_button_title">Decline</string>
<string name="view_friend_request_incoming_pending_message">%1$s sent you a session request</string>
<string name="view_friend_request_incoming_accepted_message">You\'ve accepted %1$s\'s session request</string>
<string name="view_friend_request_incoming_declined_message">You\'ve declined %1$s\'s session request</string>
<string name="view_friend_request_incoming_expired_message">%1$s\'s session request has expired</string>
<string name="view_friend_request_outgoing_pending_message">You\'ve sent %1$s a session request</string>
<string name="view_friend_request_outgoing_accepted_message">%1$s accepted your session request</string>
<string name="view_friend_request_outgoing_expired_message">Your session request to %1$s has expired</string>
<!-- Conversation activity --> <!-- Conversation activity -->
<string name="activity_conversation_pending_friend_request_hint">Pending Friend Request…</string> <string name="activity_conversation_pending_friend_request_hint">Pending Friend Request…</string>
<string name="activity_conversation_default_hint">New Message</string> <string name="activity_conversation_default_hint">New Message</string>
@ -1662,9 +1652,6 @@
<string name="dialog_device_unlink_title">Device unlinked</string> <string name="dialog_device_unlink_title">Device unlinked</string>
<string name="dialog_device_unlink_message">This device has been successfully unlinked</string> <string name="dialog_device_unlink_message">This device has been successfully unlinked</string>
<!-- Session restore banner --> <!-- Session restore banner -->
<string name="session_restore_banner_message">Would you like to restore your session with %s?</string>
<string name="session_restore_banner_dismiss_button_title">Dismiss</string>
<string name="session_restore_banner_restore_button_title">Restore</string>
@ -1794,10 +1781,41 @@
<string name="activity_settings_recovery_phrase_button_title">Recovery Phrase</string> <string name="activity_settings_recovery_phrase_button_title">Recovery Phrase</string>
<string name="activity_settings_clear_all_data_button_title">Clear Data</string> <string name="activity_settings_clear_all_data_button_title">Clear Data</string>
<string name="activity_notification_settings_title">Notifications</string>
<string name="activity_privacy_settings_title">Privacy</string>
<string name="activity_chat_settings_title">Chats</string>
<string name="activity_linked_devices_title">Devices</string>
<string name="activity_linked_devices_multi_device_limit_reached_dialog_title">Device Limit Reached</string>
<string name="activity_linked_devices_multi_device_limit_reached_dialog_explanation">It\'s currently not allowed to link more than one device.</string>
<string name="activity_linked_devices_unlinking_failed_message">Couldn\'t unlink device.</string>
<string name="activity_linked_devices_unlinking_successful_message">Your device was unlinked successfully</string>
<string name="activity_linked_devices_linking_failed_message">Couldn\'t link device.</string>
<string name="preferences_notifications_strategy_category_title">Notification Strategy</string> <string name="preferences_notifications_strategy_category_title">Notification Strategy</string>
<string name="preferences_notifications_use_fcm_option_title">Use FCM</string> <string name="preferences_notifications_use_fcm_option_title">Use FCM</string>
<string name="preferences_notifications_use_fcm_option_explanation">Using Firebase Cloud Messaging allows for more reliable push notifications, but exposes your IP to Google.</string> <string name="preferences_notifications_use_fcm_option_explanation">Using Firebase Cloud Messaging allows for more reliable push notifications, but exposes your IP to Google.</string>
<string name="dialog_link_device_slave_mode_title_1">Waiting for Authorization</string>
<string name="dialog_link_device_slave_mode_title_2">Device Link Authorized</string>
<string name="dialog_link_device_slave_mode_explanation_1">Please check that the words below match those shown on your other device.</string>
<string name="dialog_link_device_slave_mode_explanation_2">Your device has been linked successfully</string>
<string name="dialog_link_device_master_mode_title_1">Waiting for Device</string>
<string name="dialog_link_device_master_mode_title_2">Linking Request Received</string>
<string name="dialog_link_device_master_mode_title_3">Authorizing Device Link</string>
<string name="dialog_link_device_master_mode_explanation_1">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.</string>
<string name="dialog_link_device_master_mode_explanation_2">Please check that the words below match those shown on your other device.</string>
<string name="dialog_link_device_master_mode_explanation_3">Please wait while the device link is created. This can take up to a minute.</string>
<string name="dialog_link_device_master_mode_authorize_button_title">Authorize</string>
<string name="fragment_device_list_bottom_sheet_change_name_button_title">Change name</string>
<string name="fragment_device_list_bottom_sheet_unlink_device_button_title">Unlink device</string>
<string name="dialog_edit_device_name_edit_text_hint">Enter a name</string>
<string name="dialog_seed_title">Your Recovery Phrase</string> <string name="dialog_seed_title">Your Recovery Phrase</string>
<string name="dialog_seed_explanation">This is your recovery phrase. With it, you can restore or migrate your Session ID to a new device.</string> <string name="dialog_seed_explanation">This is your recovery phrase. With it, you can restore or migrate your Session ID to a new device.</string>
@ -1812,6 +1830,20 @@
<string name="fragment_view_my_qr_code_explanation">This is your QR code. Other users can scan it to start a session with you.</string> <string name="fragment_view_my_qr_code_explanation">This is your QR code. Other users can scan it to start a session with you.</string>
<string name="fragment_view_my_qr_code_share_title">Share QR Code</string> <string name="fragment_view_my_qr_code_share_title">Share QR Code</string>
<string name="view_friend_request_accept_button_title">Accept</string>
<string name="view_friend_request_reject_button_title">Decline</string>
<string name="view_friend_request_incoming_pending_message">%1$s sent you a session request</string>
<string name="view_friend_request_incoming_accepted_message">You\'ve accepted %1$s\'s session request</string>
<string name="view_friend_request_incoming_declined_message">You\'ve declined %1$s\'s session request</string>
<string name="view_friend_request_incoming_expired_message">%1$s\'s session request has expired</string>
<string name="view_friend_request_outgoing_pending_message">You\'ve sent %1$s a session request</string>
<string name="view_friend_request_outgoing_accepted_message">%1$s accepted your session request</string>
<string name="view_friend_request_outgoing_expired_message">Your session request to %1$s has expired</string>
<string name="session_reset_banner_message">Would you like to restore your session with %s?</string>
<string name="session_reset_banner_dismiss_button_title">Dismiss</string>
<string name="session_reset_banner_restore_button_title">Restore</string>
<string name="fragment_contact_selection_contacts_title">Contacts</string> <string name="fragment_contact_selection_contacts_title">Contacts</string>
<string name="fragment_contact_selection_closed_groups_title">Closed Groups</string> <string name="fragment_contact_selection_closed_groups_title">Closed Groups</string>
<string name="fragment_contact_selection_open_groups_title">Open Groups</string> <string name="fragment_contact_selection_open_groups_title">Open Groups</string>

View File

@ -10,7 +10,7 @@ class ChatSettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) { override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady) super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper) setContentView(R.layout.activity_fragment_wrapper)
supportActionBar!!.title = "Chats" supportActionBar!!.title = resources.getString(R.string.activity_chat_settings_title)
val fragment = ChatsPreferenceFragment() val fragment = ChatsPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction() val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment) transaction.replace(R.id.fragmentContainer, fragment)

View File

@ -46,7 +46,7 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) { override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady) super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_linked_devices) setContentView(R.layout.activity_linked_devices)
supportActionBar!!.title = "Devices" supportActionBar!!.title = resources.getString(R.string.activity_linked_devices_title)
recyclerView.adapter = linkedDevicesAdapter recyclerView.adapter = linkedDevicesAdapter
recyclerView.layoutManager = LinearLayoutManager(this) recyclerView.layoutManager = LinearLayoutManager(this)
linkDeviceButton.setOnClickListener { linkDevice() } linkDeviceButton.setOnClickListener { linkDevice() }
@ -99,9 +99,9 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
linkDeviceDialog.show(supportFragmentManager, "Link Device Dialog") linkDeviceDialog.show(supportFragmentManager, "Link Device Dialog")
} else { } else {
val builder = AlertDialog.Builder(this) val builder = AlertDialog.Builder(this)
builder.setTitle("Multi Device Limit Reached") builder.setTitle(resources.getString(R.string.activity_linked_devices_multi_device_limit_reached_dialog_title))
builder.setMessage("It's currently not allowed to link more than one device.") builder.setMessage(resources.getString(R.string.activity_linked_devices_multi_device_limit_reached_dialog_explanation))
builder.setPositiveButton("OK", { dialog, _ -> dialog.dismiss() }) builder.setPositiveButton(resources.getString(R.string.ok), { dialog, _ -> dialog.dismiss() })
builder.create().show() builder.create().show()
} }
} }
@ -128,7 +128,7 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
val deviceLinks = apiDB.getDeviceLinks(userPublicKey) val deviceLinks = apiDB.getDeviceLinks(userPublicKey)
val deviceLink = deviceLinks.find { it.masterHexEncodedPublicKey == userPublicKey && it.slaveHexEncodedPublicKey == slaveDevicePublicKey } val deviceLink = deviceLinks.find { it.masterHexEncodedPublicKey == userPublicKey && it.slaveHexEncodedPublicKey == slaveDevicePublicKey }
if (deviceLink == null) { 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 { LokiFileServerAPI.shared.setDeviceLinks(setOf()).successUi {
DatabaseFactory.getLokiAPIDatabase(this).clearDeviceLinks(userPublicKey) DatabaseFactory.getLokiAPIDatabase(this).clearDeviceLinks(userPublicKey)
@ -152,9 +152,9 @@ class LinkedDevicesActivity : PassphraseRequiredActionBarActivity, LoaderManager
sessionStore.deleteAllSessions(deviceLink.slaveHexEncodedPublicKey) sessionStore.deleteAllSessions(deviceLink.slaveHexEncodedPublicKey)
} }
LoaderManager.getInstance(this).restartLoader(0, null, this) 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 { }.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() { 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() { override fun onDeviceLinkCanceled() {

View File

@ -10,7 +10,7 @@ class NotificationSettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) { override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady) super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper) setContentView(R.layout.activity_fragment_wrapper)
supportActionBar!!.title = "Notifications" supportActionBar!!.title = resources.getString(R.string.activity_notification_settings_title)
val fragment = NotificationsPreferenceFragment() val fragment = NotificationsPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction() val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment) transaction.replace(R.id.fragmentContainer, fragment)

View File

@ -10,7 +10,7 @@ class PrivacySettingsActivity : PassphraseRequiredActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) { override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
super.onCreate(savedInstanceState, isReady) super.onCreate(savedInstanceState, isReady)
setContentView(R.layout.activity_fragment_wrapper) setContentView(R.layout.activity_fragment_wrapper)
supportActionBar!!.title = "Privacy" supportActionBar!!.title = resources.getString(R.string.activity_privacy_settings_title)
val fragment = AppProtectionPreferenceFragment() val fragment = AppProtectionPreferenceFragment()
val transaction = supportFragmentManager.beginTransaction() val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, fragment) transaction.replace(R.id.fragmentContainer, fragment)

View File

@ -59,8 +59,8 @@ class LinkDeviceMasterModeDialog : DialogFragment(), DeviceLinkingSessionListene
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = toPx(8, resources) titleTextViewLayoutParams.topMargin = toPx(8, resources)
contentView.titleTextView.layoutParams = titleTextViewLayoutParams contentView.titleTextView.layoutParams = titleTextViewLayoutParams
contentView.titleTextView.text = "Linking Request Received" contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_master_mode_title_2)
contentView.explanationTextView.text = "Please check that the words below match those shown on your other device" contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_master_mode_explanation_2)
contentView.mnemonicTextView.visibility = View.VISIBLE contentView.mnemonicTextView.visibility = View.VISIBLE
contentView.mnemonicTextView.text = MnemonicUtilities.getFirst3Words(MnemonicCodec(languageFileDirectory), deviceLink.slaveHexEncodedPublicKey) contentView.mnemonicTextView.text = MnemonicUtilities.getFirst3Words(MnemonicCodec(languageFileDirectory), deviceLink.slaveHexEncodedPublicKey)
contentView.authorizeButton.visibility = View.VISIBLE contentView.authorizeButton.visibility = View.VISIBLE
@ -77,8 +77,8 @@ class LinkDeviceMasterModeDialog : DialogFragment(), DeviceLinkingSessionListene
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = toPx(24, resources) titleTextViewLayoutParams.topMargin = toPx(24, resources)
contentView.titleTextView.layoutParams = titleTextViewLayoutParams contentView.titleTextView.layoutParams = titleTextViewLayoutParams
contentView.titleTextView.text = "Authorizing Device Link" contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_master_mode_title_3)
contentView.explanationTextView.text = "Please wait while the device link is created. This can take up to a minute." contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_master_mode_explanation_3)
contentView.mnemonicTextView.visibility = View.GONE contentView.mnemonicTextView.visibility = View.GONE
contentView.buttonContainer.visibility = View.GONE contentView.buttonContainer.visibility = View.GONE
contentView.cancelButton.visibility = View.GONE contentView.cancelButton.visibility = View.GONE

View File

@ -15,10 +15,10 @@ import network.loki.messenger.R
import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities
import org.thoughtcrime.securesms.util.TextSecurePreferences import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.thoughtcrime.securesms.util.Util 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.DeviceLink
import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSession import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSession
import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSessionListener import org.whispersystems.signalservice.loki.protocol.multidevice.DeviceLinkingSessionListener
import org.whispersystems.signalservice.loki.crypto.MnemonicCodec
class LinkDeviceSlaveModeDialog : DialogFragment(), DeviceLinkingSessionListener { class LinkDeviceSlaveModeDialog : DialogFragment(), DeviceLinkingSessionListener {
private val languageFileDirectory by lazy { MnemonicUtilities.getLanguageFileDirectory(context!!) } private val languageFileDirectory by lazy { MnemonicUtilities.getLanguageFileDirectory(context!!) }
@ -50,8 +50,8 @@ class LinkDeviceSlaveModeDialog : DialogFragment(), DeviceLinkingSessionListener
val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams val titleTextViewLayoutParams = contentView.titleTextView.layoutParams as LinearLayout.LayoutParams
titleTextViewLayoutParams.topMargin = 0 titleTextViewLayoutParams.topMargin = 0
contentView.titleTextView.layoutParams = titleTextViewLayoutParams contentView.titleTextView.layoutParams = titleTextViewLayoutParams
contentView.titleTextView.text = "Device Link Authorized" contentView.titleTextView.text = resources.getString(R.string.dialog_link_device_slave_mode_title_2)
contentView.explanationTextView.text = "Your device has been linked successfully" contentView.explanationTextView.text = resources.getString(R.string.dialog_link_device_slave_mode_explanation_2)
contentView.mnemonicTextView.visibility = View.GONE contentView.mnemonicTextView.visibility = View.GONE
contentView.cancelButton.visibility = View.GONE contentView.cancelButton.visibility = View.GONE
Handler().postDelayed({ Handler().postDelayed({

View File

@ -27,7 +27,7 @@ class SessionRestoreBannerView : LinearLayout {
fun update(recipient: Recipient) { fun update(recipient: Recipient) {
this.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() { fun show() {