Unverified Commit 98a94bb1 authored by Rafael Kellermann Streit's avatar Rafael Kellermann Streit Committed by GitHub

Merge pull request #1867 from RocketChat/new/licence-contactus

[NEW] Add licence and contact us.
parents ed59ccbf c439dfad
package chat.rocket.android.helper
import android.os.Build
import android.text.SpannableString
import android.text.Spanned
import android.text.method.LinkMovementMethod
import android.text.style.ClickableSpan
import android.widget.TextView
import chat.rocket.android.BuildConfig
import chat.rocket.android.util.extensions.ifEmpty
object TextHelper {
......@@ -23,7 +25,12 @@ object TextHelper {
val link = links[i]
val startIndexOfLink = textView.text.indexOf(link)
spannableString.setSpan(clickableSpan, startIndexOfLink, startIndexOfLink + link.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
spannableString.setSpan(
clickableSpan,
startIndexOfLink,
startIndexOfLink + link.length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
)
}
textView.movementMethod = LinkMovementMethod.getInstance()
textView.setText(spannableString, TextView.BufferType.SPANNABLE)
......@@ -39,4 +46,13 @@ object TextHelper {
string.ifEmpty("?")
return string.substring(0, 1).toUpperCase()
}
/**
* Returns the user device information as well as the app information being used by the user.
*/
fun getDeviceAndAppInformation(): String {
return "v${BuildConfig.VERSION_NAME} - (${BuildConfig.VERSION_CODE}) \n" +
"${Build.MANUFACTURER} - ${Build.MODEL} \n" +
"Android ${Build.VERSION.RELEASE}"
}
}
\ No newline at end of file
......@@ -23,6 +23,7 @@ fun Context.changeServerIntent(serverUrl: String? = null, chatRoomId: String? =
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK
}
}
class ChangeServerActivity : AppCompatActivity(), ChangeServerView {
@Inject lateinit var presenter: ChangeServerPresenter
......
......@@ -2,7 +2,6 @@ package chat.rocket.android.settings.ui
import android.content.ActivityNotFoundException
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
......@@ -16,6 +15,7 @@ import chat.rocket.android.about.ui.AboutFragment
import chat.rocket.android.about.ui.TAG_ABOUT_FRAGMENT
import chat.rocket.android.analytics.AnalyticsManager
import chat.rocket.android.analytics.event.ScreenViewEvent
import chat.rocket.android.helper.TextHelper.getDeviceAndAppInformation
import chat.rocket.android.main.ui.MainActivity
import chat.rocket.android.preferences.ui.PreferencesFragment
import chat.rocket.android.preferences.ui.TAG_PREFERENCES_FRAGMENT
......@@ -23,10 +23,11 @@ import chat.rocket.android.settings.password.ui.PasswordActivity
import chat.rocket.android.settings.presentation.SettingsView
import chat.rocket.android.util.extensions.addFragmentBackStack
import chat.rocket.android.util.extensions.inflate
import chat.rocket.android.webview.ui.webViewIntent
import dagger.android.support.AndroidSupportInjection
import kotlinx.android.synthetic.main.fragment_settings.*
import timber.log.Timber
import javax.inject.Inject
import kotlin.reflect.KClass
internal const val TAG_SETTINGS_FRAGMENT = "SettingsFragment"
......@@ -60,7 +61,7 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
override fun onItemClick(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
when (parent?.getItemAtPosition(position).toString()) {
resources.getString(R.string.title_preferences) -> {
resources.getStringArray(R.array.settings_actions)[0] -> {
(activity as AppCompatActivity).addFragmentBackStack(
TAG_PREFERENCES_FRAGMENT,
R.id.fragment_container
......@@ -68,9 +69,24 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
PreferencesFragment.newInstance()
}
}
resources.getString(R.string.title_change_password) ->
startNewActivity(PasswordActivity::class)
resources.getString(R.string.title_about) -> {
resources.getStringArray(R.array.settings_actions)[1] ->
activity?.startActivity(Intent(activity, PasswordActivity::class.java))
resources.getStringArray(R.array.settings_actions)[2] -> shareApp()
resources.getStringArray(R.array.settings_actions)[3] -> showAppOnStore()
resources.getStringArray(R.array.settings_actions)[4] -> contactSupport()
resources.getStringArray(R.array.settings_actions)[5] -> activity?.startActivity(
context?.webViewIntent(
getString(R.string.license_url),
getString(R.string.title_licence)
)
)
resources.getStringArray(R.array.settings_actions)[6] -> {
(activity as AppCompatActivity).addFragmentBackStack(
TAG_ABOUT_FRAGMENT,
R.id.fragment_container
......@@ -78,20 +94,10 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
AboutFragment.newInstance()
}
}
resources.getString(R.string.title_share_the_app) ->{
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.type = "text/plain"
val shareBody = getString(R.string.msg_check_this_out)
val shareSub = getString(R.string.play_store_link)
shareIntent.putExtra(Intent.EXTRA_SUBJECT, shareBody)
shareIntent.putExtra(Intent.EXTRA_TEXT, shareSub)
startActivity(Intent.createChooser(shareIntent, getString(R.string.msg_share_using)))
}
resources.getString(R.string.title_rate_us) -> startAppPlayStore()
}
}
private fun startAppPlayStore() {
private fun showAppOnStore() {
try {
startActivity(Intent(Intent.ACTION_VIEW, getString(R.string.market_link).toUri()))
} catch (error: ActivityNotFoundException) {
......@@ -108,9 +114,27 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
getString(R.string.title_settings)
}
private fun startNewActivity(classType: KClass<out AppCompatActivity>) {
startActivity(Intent(activity, classType.java))
activity?.overridePendingTransition(R.anim.open_enter, R.anim.open_exit)
private fun shareApp() {
with(Intent(Intent.ACTION_SEND)) {
type = "text/plain"
putExtra(Intent.EXTRA_SUBJECT, getString(R.string.msg_check_this_out))
putExtra(Intent.EXTRA_TEXT, getString(R.string.play_store_link))
startActivity(Intent.createChooser(this, getString(R.string.msg_share_using)))
}
}
private fun contactSupport() {
with(Intent(Intent.ACTION_SEND)) {
type = "message/rfc822"
putExtra(Intent.EXTRA_EMAIL, arrayOf("support@rocket.chat"))
putExtra(Intent.EXTRA_SUBJECT, getString(R.string.msg_android_app_support))
putExtra(Intent.EXTRA_TEXT, getDeviceAndAppInformation())
try {
startActivity(Intent.createChooser(this, getString(R.string.msg_send_email)))
} catch (ex: ActivityNotFoundException) {
Timber.e(ex)
}
}
}
companion object {
......
......@@ -22,7 +22,8 @@
<string name="title_update_profile">Update Profil</string>
<string name="title_about">Über</string>
<string name="title_create_channel">Erstelle Raum</string>
<string name="title_are_you_sure">Are you sure?</string><!-- TODO Add translation -->
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
<string name="action_connect">Verbinde</string>
......@@ -58,10 +59,12 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Ändere Passwort</item>
<item name="item_share_app">App teilen</item>
<item name="item_rate_us">Bewerten Sie uns</item>
<item name="item_password">Über</item>
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -172,12 +175,11 @@
<string name="msg_message_copied">Nachricht kopiert</string>
<string name="msg_delete_message">Lösche Nachricht</string>
<string name="msg_delete_description">Sind Sie sicher, dass Sie diese Nachricht löschen wollen?</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<string name="msg_view_more">view more</string> <!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string> <!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<!-- Preferences messages -->
<string name="msg_analytics_tracking">Analytics tracking</string> <!-- TODO Add translation -->
......
......@@ -21,6 +21,7 @@
<string name="title_update_profile">Actualización del perfil</string>
<string name="title_about">Acerca de</string>
<string name="title_create_channel">Crear canal</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -57,10 +58,12 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Cambia la contraseña</item>
<item name="item_share_app">Compartir aplicación</item>
<item name="item_rate_us">Nos califica</item>
<item name="item_password">Acerca de</item>
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -162,18 +165,15 @@
<string name="msg_member_already_added">Ya has seleccionado este usuario</string>
<string name="msg_member_not_found">Miembro no encontrado</string>
<string name="msg_channel_created_successfully">Canal creado con éxito</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string> <!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string> <!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="other">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="other">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Preferences messages -->
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Mettre à jour le profil</string>
<string name="title_about">À propos</string>
<string name="title_create_channel">Créer salon</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Préférences</item>
<item name="item_password">Changer le mot de passe</item>
<item name="item_share_app">Partager l\'application</item>
<item name="item_rate_us">évaluez nous</item>
<item name="item_password">À propos</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -154,18 +157,15 @@
<string name="msg_continue_with_wordpress">Continue with <b>WordPress</b></string> <!-- TODO Add translation -->
<string name="msg_two_factor_authentication">Two-factor Authentication</string> <!-- TODO Add translation -->
<string name="msg__your_2fa_code">What’s your 2FA code?</string> <!-- TODO Add translation -->
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string> <!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string> <!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="other">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="other">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Create channel messages -->
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">प्रोफ़ाइल अपडेट करें</string>
<string name="title_about">परिचय</string>
<string name="title_create_channel">चैनल बनाएं</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">प्राथमिकताएँ</item>
<item name="item_password">पासवर्ड बदलें</item>
<item name="item_share_app">ऐप शेयर करें</item>
<item name="item_rate_us">हमें रेटिंग दें</item>
<item name="item_password">परिचय</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -170,14 +173,14 @@
<string name="msg_channel_created_successfully">चैनल सफलतापूर्वक बनाया गया</string>
<string name="msg_view_more">और देखें</string>
<string name="msg_view_less">कम देखें</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="other">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="few">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="many">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Preferences messages -->
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Aggiorna Profilo</string>
<string name="title_about">Informazioni</string>
<string name="title_create_channel">Crea Canale</string>
<string name="title_licence">Licence</string> <!-- TODO ADD translation -->
<string name="title_are_you_sure">Sei sicuro che vuoi uscire ?</string>
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferenze</item>
<item name="item_password">Cambiare Password</item>
<item name="item_share_app">Condividi App</item>
<item name="item_rate_us">Valutaci</item>
<item name="item_password">Informazioni</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -151,6 +154,8 @@
<string name="msg_two_factor_authentication">Autenticazione a 2 fattori (2FA)</string>
<string name="msg__your_2fa_code">Qual è il tuo codice 2FA ?</string>
<string name="msg_permalink_copied">Permalink copiato</string>
<string name="msg_send_email">Send email</string>
<string name="msg_android_app_support">Android app support</string>
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s ha reagito con %2$s</item>
<item quantity="other">%1$s ha reagito con %2$s</item>
......
......@@ -23,6 +23,7 @@
<string name="title_password">パスワードの変更</string>
<string name="title_update_profile">プロフィールの更新</string>
<string name="title_about">About</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_create_channel">新しいチャネルを作成</string>
<string name="title_are_you_sure">本気ですか?</string>
......@@ -59,11 +60,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">環境設定</item>
<item name="item_password">パスワードの変更</item>
<item name="item_share_app">アプリを共有する</item>
<item name="item_rate_us">私たちを評価してください</item>
<item name="item_password">アプリ情報</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -178,8 +181,9 @@
<string name="msg_message_copied">メッセージをコピー</string>
<string name="msg_delete_message">メッセージを削除</string>
<string name="msg_delete_description">このメッセージを削除してもよろしいですか?</string>
<string name="msg_permalink_copied">パーマリンクのコピー</string>
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<!-- Preferences messages -->
<string name="msg_analytics_tracking">トラッキングの分析</string>
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Editar perfil</string>
<string name="title_about">Sobre</string>
<string name="title_create_channel">Criar chat</string>
<string name="title_licence">Licença</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Você tem certeza?</string>
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferencias</item>
<item name="item_preferences">Preferências</item>
<item name="item_password">Alterar senha</item>
<item name="item_share_app">Compartilhe o aplicativo</item>
<item name="item_rate_us">nos avalie</item>
<item name="item_password">Sobre</item>
<item name="item_share_app">Compartilhar app</item>
<item name="item_rate_us">Classifique-nos</item>
<item name="item_contact_us">Contate-nos</item>
<item name="item_licence">Licença</item>
<item name="item_about">Sobre</item>
</string-array>
<!-- Regular information messages -->
......@@ -157,8 +160,9 @@
<string name="msg__your_2fa_code">What’s your 2FA code?</string> <!-- TODO Add translation -->
<string name="msg_view_more">visualizar mais</string>
<string name="msg_view_less">visualizar menos</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copiado</string>
<string name="msg_send_email">Enviar e-mail</string>
<string name="msg_android_app_support">Suporte ao aplicativo Android</string>
<string name="msg_muted_on_this_channel">Você está silenciado neste canal</string>
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reagiu com %2$s</item>
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Обновить профиль</string>
<string name="title_about">О программе</string>
<string name="title_create_channel">Создать новый канал</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Персональные</item>
<item name="item_password">Изменить пароль</item>
<item name="item_rate_us">оцените нас</item>
<item name="item_share_app">добавить приложение</item>
<item name="item_password">О программе</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -156,13 +159,13 @@
<string name="msg_view_more">больше</string>
<string name="msg_view_less">меньше</string>
<string name="msg_permalink_copied">Ссылка скопирована</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="few">%1$s reacted with %2$s</item>
<item quantity="many">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="few">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="many">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Create channel messages -->
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Profilinizi Düzenleyin</string>
<string name="title_about">Hakkında</string>
<string name="title_create_channel">Yeni Kanal Oluştur</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -57,11 +58,13 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Tercihler</item>
<item name="item_password">Şifre Değiştir</item>
<item name="item_share_app">uygulamayı Paylaş</item>
<item name="item_rate_us">Bizi değerlendirin</item>
<item name="item_password">Hakkında</item>
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -171,16 +174,14 @@
<string name="msg_delete_description">Bu mesajı silmek istediğinizden emin misiniz</string>
<string name="msg_view_more">Daha fazla göster</string>
<string name="msg_view_less">Daha az göster</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="other">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="other">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Preferences messages -->
<string name="msg_analytics_tracking">İstatistik takibi</string>
<string name="msg_send_analytics_tracking">Uygulamanın gelişmesine katkıda bulunmak için anonim istatistik bilgisi gönder</string>
......
......@@ -22,6 +22,7 @@
<string name="title_update_profile">Оновити профіль</string>
<string name="title_about">"Про програму"</string>
<string name="title_create_channel">Створити новий канал</string>
<string name="title_licence">Licence</string> <!-- TODO Add translation -->
<string name="title_are_you_sure">Are you sure?</string> <!-- TODO Add translation -->
<!-- Actions -->
......@@ -58,10 +59,12 @@
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferences</item> <!-- TODO Add translation -->
<item name="item_password">Change Password</item> <!-- TODO Add translation -->
<item name="item_share_app">поділитися прикладом</item>
<item name="item_rate_us">Оцініть нас</item>
<item name="item_password">About</item> <!-- TODO Add translation -->
<item name="item_password">Change password</item> <!-- TODO Add translation -->
<item name="item_share_app">Share app</item> <!-- TODO Add translation -->
<item name="item_rate_us">Rate us</item> <!-- TODO Add translation -->
<item name="item_contact_us">Contact us</item> <!-- TODO Add translation -->
<item name="item_licence">Licence</item> <!-- TODO Add translation -->
<item name="item_about">About</item> <!-- TODO Add translation -->
</string-array>
<!-- Regular information messages -->
......@@ -152,19 +155,16 @@
<string name="msg_continue_with_wordpress">Continue with <b>WordPress</b></string> <!-- TODO Add translation -->
<string name="msg_two_factor_authentication">Two-factor Authentication</string> <!-- TODO Add translation -->
<string name="msg__your_2fa_code">What’s your 2FA code?</string> <!-- TODO Add translation -->
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string>
<!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string>
<!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string>
<!-- TODO - Add proper translation -->
<string name="msg_view_more">view more</string> <!-- TODO - Add proper translation -->
<string name="msg_view_less">view less</string> <!-- TODO - Add proper translation -->
<string name="msg_permalink_copied">Permalink copied</string> <!-- TODO - Add proper translation -->
<string name="msg_send_email">Send email</string> <!-- TODO - Add proper translation -->
<string name="msg_android_app_support">Android app support</string> <!-- TODO - Add proper translation -->
<string name="msg_muted_on_this_channel">You are muted on this channel</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="few">%1$s reacted with %2$s</item>
<item quantity="many">%1$s reacted with %2$s</item>
<item quantity="one">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="few">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
<item quantity="many">%1$s reacted with %2$s</item> <!-- TODO - Add proper translation -->
</plurals>
<!-- Create channel messages -->
......
......@@ -6,4 +6,5 @@
<string name="create_server_url" translatable="false">cloud.rocket.chat/trial</string>
<string name="play_store_link" translatable="false">https://play.google.com/store/apps/details?id=chat.rocket.android</string>
<string name="market_link" translatable="false">market://details?id=chat.rocket.android</string>
<string name="license_url" translatable="false">https://github.com/RocketChat/Rocket.Chat.Android/blob/develop/LICENSE</string>
</resources>
\ No newline at end of file
......@@ -34,6 +34,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="title_update_profile">Update profile</string>
<string name="title_about">About</string>
<string name="title_create_channel">Create Channel</string>
<string name="title_licence">Licence</string>
<string name="title_are_you_sure">Are you sure?</string>
<!-- Actions -->
......@@ -70,10 +71,12 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Preferences</item>
<item name="item_password">Change Password</item>
<item name="item_share_app">Share App</item>
<item name="item_rate_us">Rate Us</item>
<item name="item_password">About</item>
<item name="item_password">Change password</item>
<item name="item_share_app">Share app</item>
<item name="item_rate_us">Rate us</item>
<item name="item_contact_us">Contact us</item>
<item name="item_licence">Licence</item>
<item name="item_about">About</item>
</string-array>
<!-- Regular information messages -->
......@@ -168,6 +171,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<string name="msg_permalink_copied">Permalink copied</string>
<string name="msg_send_email">Send email</string>
<string name="msg_android_app_support">Android app support</string>
<plurals name="msg_reacted_with_">
<item quantity="one">%1$s reacted with %2$s</item>
<item quantity="other">%1$s reacted with %2$s</item>
......
......@@ -4,6 +4,9 @@ import java.math.BigInteger
import java.security.MessageDigest
import java.security.NoSuchAlgorithmException
/**
* Returns a SHA-256 hash for a string.
*/
@Throws(NoSuchAlgorithmException::class)
fun String.gethash(): ByteArray {
val digest = MessageDigest.getInstance("SHA-256")
......@@ -11,4 +14,7 @@ fun String.gethash(): ByteArray {
return digest.digest(this.toByteArray())
}
/**
* Return the hex of a [ByteArray].
*/
fun ByteArray.toHex(): String = String.format("%0" + this.size * 2 + "X", BigInteger(1, this))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment