Add "Help us Translate Session" button

pull/549/head
nielsandriesse 3 years ago
parent 5a1cd99612
commit e79d23c910

@ -86,12 +86,11 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
publicKeyTextView.text = hexEncodedPublicKey
copyButton.setOnClickListener { copyPublicKey() }
shareButton.setOnClickListener { sharePublicKey() }
linkedDevicesButtonTopSeparator.visibility = View.GONE
linkedDevicesButton.visibility = View.GONE
privacyButton.setOnClickListener { showPrivacySettings() }
notificationsButton.setOnClickListener { showNotificationSettings() }
chatsButton.setOnClickListener { showChatSettings() }
sendInvitationButton.setOnClickListener { sendInvitation() }
helpTranslateButton.setOnClickListener { helpTranslate() }
seedButton.setOnClickListener { showSeed() }
clearAllDataButton.setOnClickListener { clearAllData() }
versionTextView.text = String.format(getString(R.string.version_s), "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
@ -292,6 +291,16 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
startActivity(intent)
}
private fun helpTranslate() {
try {
val url = "https://crowdin.com/project/session-android"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
} catch (e: Exception) {
Toast.makeText(this, "Can't open URL", Toast.LENGTH_LONG).show()
}
}
private fun showSeed() {
SeedDialog().show(supportFragmentManager, "Recovery Phrase Dialog")
}

@ -111,11 +111,6 @@
android:layout_marginTop="@dimen/large_spacing"
android:background="?android:dividerHorizontal" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:dividerHorizontal" />
<TextView
android:id="@+id/privacyButton"
android:layout_width="match_parent"
@ -160,13 +155,12 @@
android:text="@string/activity_settings_chats_button_title" />
<View
android:id="@+id/linkedDevicesButtonTopSeparator"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:dividerHorizontal" />
<TextView
android:id="@+id/linkedDevicesButton"
android:id="@+id/seedButton"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:background="@drawable/setting_button_background"
@ -174,7 +168,7 @@
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:gravity="center"
android:text="@string/activity_settings_devices_button_title" />
android:text="@string/activity_settings_recovery_phrase_button_title" />
<View
android:layout_width="match_parent"
@ -182,70 +176,55 @@
android:background="?android:dividerHorizontal" />
<TextView
android:id="@+id/sendInvitationButton"
android:id="@+id/clearAllDataButton"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:background="@drawable/setting_button_background"
android:textColor="@color/text"
android:textColor="@color/destructive"
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:gravity="center"
android:text="@string/activity_settings_invite_button_title" />
android:text="@string/activity_settings_clear_all_data_button_title" />
<View
android:id="@+id/seedButtonTopSeparator"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_spacing"
android:background="?android:dividerHorizontal" />
<TextView
android:id="@+id/seedButton"
android:id="@+id/sendInvitationButton"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:background="@drawable/setting_button_background"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:gravity="center"
android:text="@string/activity_settings_recovery_phrase_button_title" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:dividerHorizontal" />
android:text="@string/activity_settings_invite_button_title" />
<TextView
android:id="@+id/clearAllDataButton"
android:id="@+id/helpTranslateButton"
android:layout_width="match_parent"
android:layout_height="@dimen/setting_button_height"
android:background="@drawable/setting_button_background"
android:textColor="@color/destructive"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_spacing"
android:textColor="@color/text"
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:gravity="center"
android:text="@string/activity_settings_clear_all_data_button_title" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_spacing"
android:background="?android:dividerHorizontal" />
android:text="Help us Translate Session" />
<TextView
android:id="@+id/versionTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_spacing"
android:layout_marginBottom="@dimen/medium_spacing"
android:gravity="center"
android:text="@string/version_s"
android:textColor="@color/text"
android:alpha="0.6"
android:textSize="@dimen/very_small_font_size" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_spacing" />
</LinearLayout>
</ScrollView>
@ -254,6 +233,7 @@
android:animateLayoutChanges="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/loader"
android:layout_width="match_parent"
@ -272,4 +252,5 @@
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
Loading…
Cancel
Save